summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/univint/src/ImageCodec.pas
blob: a4728372f6f9ad02f4b53cbe275df968f00d9db3 (plain)
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
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
{
     File:       QuickTime/ImageCodec.h
 
     Contains:   QuickTime Interfaces.
 
     Version:    QuickTime 7.6.3
 
     Copyright:  © 1990-2008 by Apple Inc., all rights reserved
 
     Bugs?:      For bug reports, consult the following page on
                 the World Wide Web:
 
                     http://www.freepascal.org/bugs.html
 
}
{  Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2009 }
{
    Modified for use with Free Pascal
    Version 308
    Please report any bugs to <gpc@microbizz.nl>
}

{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
{$mode macpas}
{$packenum 1}
{$macro on}
{$inline on}
{$calling mwpascal}

unit ImageCodec;
interface
{$setc UNIVERSAL_INTERFACES_VERSION := $0400}
{$setc GAP_INTERFACES_VERSION := $0308}

{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
{$endc}

{$ifc defined CPUPOWERPC and defined CPUI386}
	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
{$endc}
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
{$endc}

{$ifc not defined __ppc__ and defined CPUPOWERPC32}
	{$setc __ppc__ := 1}
{$elsec}
	{$setc __ppc__ := 0}
{$endc}
{$ifc not defined __ppc64__ and defined CPUPOWERPC64}
	{$setc __ppc64__ := 1}
{$elsec}
	{$setc __ppc64__ := 0}
{$endc}
{$ifc not defined __i386__ and defined CPUI386}
	{$setc __i386__ := 1}
{$elsec}
	{$setc __i386__ := 0}
{$endc}
{$ifc not defined __x86_64__ and defined CPUX86_64}
	{$setc __x86_64__ := 1}
{$elsec}
	{$setc __x86_64__ := 0}
{$endc}
{$ifc not defined __arm__ and defined CPUARM}
	{$setc __arm__ := 1}
{$elsec}
	{$setc __arm__ := 0}
{$endc}

{$ifc defined cpu64}
  {$setc __LP64__ := 1}
{$elsec}
  {$setc __LP64__ := 0}
{$endc}


{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
	{$error Conflicting definitions for __ppc__ and __i386__}
{$endc}

{$ifc defined __ppc__ and __ppc__}
	{$setc TARGET_CPU_PPC := TRUE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := FALSE}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elifc defined __ppc64__ and __ppc64__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := TRUE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := FALSE}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elifc defined __i386__ and __i386__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := TRUE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := FALSE}
{$ifc defined(iphonesim)}
 	{$setc TARGET_OS_MAC := FALSE}
	{$setc TARGET_OS_IPHONE := TRUE}
	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
{$elsec}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$endc}
{$elifc defined __x86_64__ and __x86_64__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := TRUE}
	{$setc TARGET_CPU_ARM := FALSE}
	{$setc TARGET_OS_MAC := TRUE}
	{$setc TARGET_OS_IPHONE := FALSE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elifc defined __arm__ and __arm__}
	{$setc TARGET_CPU_PPC := FALSE}
	{$setc TARGET_CPU_PPC64 := FALSE}
	{$setc TARGET_CPU_X86 := FALSE}
	{$setc TARGET_CPU_X86_64 := FALSE}
	{$setc TARGET_CPU_ARM := TRUE}
	{ will require compiler define when/if other Apple devices with ARM cpus ship }
	{$setc TARGET_OS_MAC := FALSE}
	{$setc TARGET_OS_IPHONE := TRUE}
	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
{$elsec}
	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
{$endc}

{$ifc defined __LP64__ and __LP64__ }
  {$setc TARGET_CPU_64 := TRUE}
{$elsec}
  {$setc TARGET_CPU_64 := FALSE}
{$endc}

{$ifc defined FPC_BIG_ENDIAN}
	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
{$elifc defined FPC_LITTLE_ENDIAN}
	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
{$elsec}
	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
{$endc}
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
{$setc CALL_NOT_IN_CARBON := FALSE}
{$setc OLDROUTINENAMES := FALSE}
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
{$setc OPAQUE_UPP_TYPES := TRUE}
{$setc OTCARBONAPPLICATION := TRUE}
{$setc OTKERNEL := FALSE}
{$setc PM_USE_SESSION_APIS := TRUE}
{$setc TARGET_API_MAC_CARBON := TRUE}
{$setc TARGET_API_MAC_OS8 := FALSE}
{$setc TARGET_API_MAC_OSX := TRUE}
{$setc TARGET_CARBON := TRUE}
{$setc TARGET_CPU_68K := FALSE}
{$setc TARGET_CPU_MIPS := FALSE}
{$setc TARGET_CPU_SPARC := FALSE}
{$setc TARGET_OS_UNIX := FALSE}
{$setc TARGET_OS_WIN32 := FALSE}
{$setc TARGET_RT_MAC_68881 := FALSE}
{$setc TARGET_RT_MAC_CFM := FALSE}
{$setc TARGET_RT_MAC_MACHO := TRUE}
{$setc TYPED_FUNCTION_POINTERS := TRUE}
{$setc TYPE_BOOL := FALSE}
{$setc TYPE_EXTENDED := FALSE}
{$setc TYPE_LONGLONG := TRUE}
uses MacTypes,Components,Dialogs,Events,ImageCompression,Movies,OSUtils,QuickdrawTypes,QDOffscreen,CFDictionary;
{$endc} {not MACOSALLINCLUDE}


{$ifc TARGET_OS_MAC}

{$ALIGN MAC68K}

{ QuickTime is not available to 64-bit clients }

{$ifc not TARGET_CPU_64}

{
   The following GX types were previously in GXTypes.h, but that header
   is not available in any Mac OS X framework. 
}
type
	gxPoint = record
		x: Fixed;
		y: Fixed;
	end;
type
	gxPathPtr = ^gxPath;
	gxPath = record
		vectors: SIGNEDLONG;
		controlBits: array [0..0] of SIGNEDLONG;
		vector: array [0..0] of gxPoint;
	end;
type
	gxPathsPtr = ^gxPaths;
	gxPaths = record
		contours: SIGNEDLONG;
    contour: array [0..0] of gxPath;
	end;
{  codec capabilities flags    }
const
	codecCanScale = 1 shl 0;
	codecCanMask = 1 shl 1;
	codecCanMatte = 1 shl 2;
	codecCanTransform = 1 shl 3;
	codecCanTransferMode = 1 shl 4;
	codecCanCopyPrev = 1 shl 5;
	codecCanSpool = 1 shl 6;
	codecCanClipVertical = 1 shl 7;
	codecCanClipRectangular = 1 shl 8;
	codecCanRemapColor = 1 shl 9;
	codecCanFastDither = 1 shl 10;
	codecCanSrcExtract = 1 shl 11;
	codecCanCopyPrevComp = 1 shl 12;
	codecCanAsync = 1 shl 13;
	codecCanMakeMask = 1 shl 14;
	codecCanShift = 1 shl 15;
	codecCanAsyncWhen = 1 shl 16;
	codecCanShieldCursor = 1 shl 17;
	codecCanManagePrevBuffer = 1 shl 18;
	codecHasVolatileBuffer = 1 shl 19; { codec requires redraw after window movement }
	codecWantsRegionMask = 1 shl 20;
	codecImageBufferIsOnScreen = 1 shl 21; { old def of codec using overlay surface, = ( codecIsDirectToScreenOnly | codecUsesOverlaySurface | codecImageBufferIsOverlaySurface | codecSrcMustBeImageBuffer ) }
	codecWantsDestinationPixels = 1 shl 22;
	codecWantsSpecialScaling = 1 shl 23;
	codecHandlesInputs = 1 shl 24;
	codecCanDoIndirectSurface = 1 shl 25; { codec can handle indirect surface (GDI) }
	codecIsSequenceSensitive = 1 shl 26;
	codecRequiresOffscreen = 1 shl 27;
	codecRequiresMaskBits = 1 shl 28;
	codecCanRemapResolution = 1 shl 29;
	codecIsDirectToScreenOnly = 1 shl 30; { codec can only decompress data to the screen }
	codecCanLockSurface = 1 shl 31; { codec can lock destination surface, icm doesn't lock for you }

{  codec capabilities flags2   }
const
	codecUsesOverlaySurface = 1 shl 0; { codec uses overlay surface }
	codecImageBufferIsOverlaySurface = 1 shl 1; { codec image buffer is overlay surface, the bits in the buffer are on the screen }
	codecSrcMustBeImageBuffer = 1 shl 2; { codec can only source data from an image buffer }
	codecImageBufferIsInAGPMemory = 1 shl 4; { codec image buffer is in AGP space, byte writes are OK }
	codecImageBufferIsInPCIMemory = 1 shl 5; { codec image buffer is across a PCI bus; byte writes are bad }
	codecImageBufferMemoryFlagsValid = 1 shl 6; { set by ImageCodecNewImageBufferMemory/NewImageGWorld to indicate that it set the AGP/PCI flags (supported in QuickTime 6.0 and later) }
	codecDrawsHigherQualityScaled = 1 shl 7; { codec will draw higher-quality image if it performs scaling (eg, wipe effect with border) }
	codecSupportsOutOfOrderDisplayTimes = 1 shl 8; { codec supports frames queued in one order for display in a different order, eg, IPB content }
	codecSupportsScheduledBackwardsPlaybackWithDifferenceFrames = 1 shl 9; { codec can use additional buffers to minimise redecoding during backwards playback }

type
	CodecCapabilitiesPtr = ^CodecCapabilities;
	CodecCapabilities = record
		flags: SIGNEDLONG;
		wantedPixelSize: SInt16;
		extendWidth: SInt16;
		extendHeight: SInt16;
		bandMin: SInt16;
		bandInc: SInt16;
		pad: SInt16;
		time: UNSIGNEDLONG;
		flags2: SIGNEDLONG;                 { field new in QuickTime 4.0 }
	end;
{  codec condition flags   }
const
	codecConditionFirstBand = 1 shl 0;
	codecConditionLastBand = 1 shl 1;
	codecConditionFirstFrame = 1 shl 2;
	codecConditionNewDepth = 1 shl 3;
	codecConditionNewTransform = 1 shl 4;
	codecConditionNewSrcRect = 1 shl 5;
	codecConditionNewMask = 1 shl 6;
	codecConditionNewMatte = 1 shl 7;
	codecConditionNewTransferMode = 1 shl 8;
	codecConditionNewClut = 1 shl 9;
	codecConditionNewAccuracy = 1 shl 10;
	codecConditionNewDestination = 1 shl 11;
	codecConditionFirstScreen = 1 shl 12;
	codecConditionDoCursor = 1 shl 13;
	codecConditionCatchUpDiff = 1 shl 14;
	codecConditionMaskMayBeChanged = 1 shl 15;
	codecConditionToBuffer = 1 shl 16;
	codecConditionCodecChangedMask = 1 shl 31;


const
	codecInfoResourceType = FourCharCode('cdci'); { codec info resource type }
	codecInterfaceVersion = 2;     { high word returned in component GetVersion }

type
	CDSequenceDataSourceQueueEntry = record
		nextBusy: UnivPtr;

		descSeed: SIGNEDLONG;
		dataDesc: Handle;
		data: UnivPtr;
		dataSize: SIGNEDLONG;

		useCount: SIGNEDLONG;

		frameTime: TimeValue;
		frameDuration: TimeValue;
		timeScale: TimeValue;
	end;
	CDSequenceDataSourceQueueEntryPtr = ^CDSequenceDataSourceQueueEntry;
type
	CDSequenceDataSource = record
		recordSize: SIGNEDLONG;

		next: UnivPtr;

		seqID: ImageSequence;
		sourceID: ImageSequenceDataSource;
		sourceType: OSType;
		sourceInputNumber: SIGNEDLONG;
		dataPtr: UnivPtr;
		dataDescription: Handle;
		changeSeed: SIGNEDLONG;
		transferProc: ICMConvertDataFormatUPP;
		transferRefcon: UnivPtr;
		dataSize: SIGNEDLONG;

                                              { fields available in QT 3 and later }

		dataQueue: QHdrPtr;              { queue of CDSequenceDataSourceQueueEntry structures}

		originalDataPtr: UnivPtr;
		originalDataSize: SIGNEDLONG;
		originalDataDescription: Handle;
		originalDataDescriptionSeed: SIGNEDLONG;
	end;
	CDSequenceDataSourcePtr = ^CDSequenceDataSource;
type
	ICMFrameTimeInfo = record
		startTime: wide;
		scale: SIGNEDLONG;
		duration: SIGNEDLONG;
	end;
	ICMFrameTimeInfoPtr = ^ICMFrameTimeInfo;
type
	CodecCompressParams = record
		sequenceID: ImageSequence;             { precompress,bandcompress }
		imageDescription: ImageDescriptionHandle;   { precompress,bandcompress }
		data: Ptr;
		bufferSize: SIGNEDLONG;
		frameNumber: SIGNEDLONG;
		startLine: SIGNEDLONG;
		stopLine: SIGNEDLONG;
		conditionFlags: SIGNEDLONG;
		callerFlags: CodecFlags;
		capabilities: CodecCapabilitiesPtr;           { precompress,bandcompress }
		progressProcRecord: ICMProgressProcRecord;
		completionProcRecord: ICMCompletionProcRecord;
		flushProcRecord: ICMFlushProcRecord;

		srcPixMap: PixMap;              { precompress,bandcompress }
		prevPixMap: PixMap;
		spatialQuality: CodecQ;
		temporalQuality: CodecQ;
		similarity: Fixed;
		dataRateParams: DataRateParamsPtr;
		reserved: SIGNEDLONG;

                                              { The following fields only exist for QuickTime 2.1 and greater }
		majorSourceChangeSeed: UInt16;
		minorSourceChangeSeed: UInt16;
		sourceData: CDSequenceDataSourcePtr;

                                              { The following fields only exist for QuickTime 2.5 and greater }
		preferredPacketSizeInBytes: SIGNEDLONG;

                                              { The following fields only exist for QuickTime 3.0 and greater }
		requestedBufferWidth: SIGNEDLONG;   { must set codecWantsSpecialScaling to indicate this field is valid}
		requestedBufferHeight: SIGNEDLONG;  { must set codecWantsSpecialScaling to indicate this field is valid}

                                              { The following fields only exist for QuickTime 4.0 and greater }
		wantedSourcePixelType: OSType;

                                              { The following fields only exist for QuickTime 5.0 and greater }
		compressedDataSize: SIGNEDLONG;     { if nonzero, this overrides (*imageDescription)->dataSize}
		taskWeight: UInt32;             { preferred weight for MP tasks implementing this operation}
		taskName: OSType;               { preferred name (type) for MP tasks implementing this operation}
	end;
type
	CodecDecompressParamsPtr = ^CodecDecompressParams;
	CodecDecompressParams = record
		sequenceID: ImageSequence;             { predecompress,banddecompress }
		imageDescription: ImageDescriptionHandle;   { predecompress,banddecompress }
		data: Ptr;
		bufferSize: SIGNEDLONG;
		frameNumber: SIGNEDLONG;
		startLine: SIGNEDLONG;
		stopLine: SIGNEDLONG;
		conditionFlags: SIGNEDLONG;
		callerFlags: CodecFlags;
		capabilities: CodecCapabilitiesPtr;           { predecompress,banddecompress }
		progressProcRecord: ICMProgressProcRecord;
		completionProcRecord: ICMCompletionProcRecord;
		dataProcRecord: ICMDataProcRecord;

		port: CGrafPtr;                   { predecompress,banddecompress }
		dstPixMap: PixMap;              { predecompress,banddecompress }
		maskBits: BitMapPtr;
		mattePixMap: PixMapPtr;
		srcRect: Rect;                { predecompress,banddecompress }
		matrix: MatrixRecordPtr;                 { predecompress,banddecompress }
		accuracy: CodecQ;               { predecompress,banddecompress }
		transferMode: SInt16;           { predecompress,banddecompress }
		frameTime: ICMFrameTimePtr;              { banddecompress }
    reserved: array [0..0] of SIGNEDLONG;

                                              { The following fields only exist for QuickTime 2.0 and greater }
		matrixFlags: SInt8;            { high bit set if 2x resize }
		matrixType: SInt8;
		dstRect: Rect;                { only valid for simple transforms }

                                              { The following fields only exist for QuickTime 2.1 and greater }
		majorSourceChangeSeed: UInt16;
		minorSourceChangeSeed: UInt16;
		sourceData: CDSequenceDataSourcePtr;

		maskRegion: RgnHandle;

                                              { The following fields only exist for QuickTime 2.5 and greater }
		wantedDestinationPixelTypes: OSTypeHandle; { Handle to 0-terminated list of OSTypes }

		screenFloodMethod: SIGNEDLONG;
		screenFloodValue: SIGNEDLONG;
		preferredOffscreenPixelSize: SInt16;

                                              { The following fields only exist for QuickTime 3.0 and greater }
		syncFrameTime: ICMFrameTimeInfoPtr;         { banddecompress }
		needUpdateOnTimeChange: Boolean; { banddecompress }
		enableBlackLining: Boolean;
		needUpdateOnSourceChange: Boolean; { band decompress }
		pad: Boolean;

		unused: SIGNEDLONG;

		finalDestinationPort: CGrafPtr;

		requestedBufferWidth: SIGNEDLONG;   { must set codecWantsSpecialScaling to indicate this field is valid}
		requestedBufferHeight: SIGNEDLONG;  { must set codecWantsSpecialScaling to indicate this field is valid}

                                              { The following fields only exist for QuickTime 4.0 and greater }
		displayableAreaOfRequestedBuffer: Rect; { set in predecompress}
		requestedSingleField: Boolean;
		needUpdateOnNextIdle: Boolean;
		pad2: array [0..1] of Boolean;
		bufferGammaLevel: Fixed;

                                              { The following fields only exist for QuickTime 5.0 and greater }
		taskWeight: UInt32;             { preferred weight for MP tasks implementing this operation}
		taskName: OSType;               { preferred name (type) for MP tasks implementing this operation}

                                              { The following fields only exist for QuickTime 6.0 and greater }
		pad3: Boolean;
		destinationBufferMemoryPreference: UInt8; { a codec's PreDecompress/Preflight call can set this to express a preference about what kind of memory its destination buffer should go into.  no guarantees.}
		codecBufferMemoryPreference: UInt8; { may indicate preferred kind of memory that NewImageGWorld/NewImageBufferMemory should create its buffer in, if applicable.}
		onlyUseCodecIfItIsInUserPreferredCodecList: Boolean; { set to prevent this codec from being used unless it is in the userPreferredCodec list}

		mediaContextID: QTMediaContextID;

                                              { The following fields only exist for QuickTime 6.5 and greater }
		deinterlaceRequest: UInt8;     { set by the ICM before PreDecompress/Preflight }
		deinterlaceAnswer: UInt8;      { codec should set this in PreDecompress/Preflight if it will satisfy the deinterlaceRequest }

                                              { The following fields only exist for QuickTime 7.0 and greater }
		pad4: array[0..1] of UInt8;
		reserved2: SIGNEDLONG;
		reserved3: UInt32;
		reserved4: SIGNEDLONG;
		reserved5: UnivPtr;
		reserved6: UnivPtr;
		reserved7: UnivPtr;
		reserved8: UnivPtr;
	end;
const
	matrixFlagScale2x = 1 shl 7;
	matrixFlagScale1x = 1 shl 6;
	matrixFlagScaleHalf = 1 shl 5;

const
	kScreenFloodMethodNone = 0;
	kScreenFloodMethodKeyColor = 1;
	kScreenFloodMethodAlpha = 2;

const
	kFlushLastQueuedFrame = 0;
	kFlushFirstQueuedFrame = 1;

const
	kNewImageGWorldErase = 1 shl 0;

{ values for destinationBufferMemoryPreference and codecBufferMemoryPreference }
const
	kICMImageBufferNoPreference = 0;
	kICMImageBufferPreferMainMemory = 1;
	kICMImageBufferPreferVideoMemory = 2;

{ values for deinterlaceRequest and deinterlaceAnswer }
const
	kICMNoDeinterlacing = 0;
	kICMDeinterlaceFields = 1;

type
	ImageCodecTimeTriggerProcPtr = procedure( refcon: UnivPtr );
	ImageCodecDrawBandCompleteProcPtr = procedure( refcon: UnivPtr; drawBandResult: ComponentResult; drawBandCompleteFlags: UInt32 );
	ImageCodecTimeTriggerUPP = ImageCodecTimeTriggerProcPtr;
	ImageCodecDrawBandCompleteUPP = ImageCodecDrawBandCompleteProcPtr;
{
 *  NewImageCodecTimeTriggerUPP()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0.2 and later
 *    Non-Carbon CFM:   available as macro/inline
 }
function NewImageCodecTimeTriggerUPP( userRoutine: ImageCodecTimeTriggerProcPtr ): ImageCodecTimeTriggerUPP; external name '_NewImageCodecTimeTriggerUPP';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)

{
 *  NewImageCodecDrawBandCompleteUPP()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Non-Carbon CFM:   available as macro/inline
 }
function NewImageCodecDrawBandCompleteUPP( userRoutine: ImageCodecDrawBandCompleteProcPtr ): ImageCodecDrawBandCompleteUPP; external name '_NewImageCodecDrawBandCompleteUPP';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)

{
 *  DisposeImageCodecTimeTriggerUPP()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0.2 and later
 *    Non-Carbon CFM:   available as macro/inline
 }
procedure DisposeImageCodecTimeTriggerUPP( userUPP: ImageCodecTimeTriggerUPP ); external name '_DisposeImageCodecTimeTriggerUPP';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)

{
 *  DisposeImageCodecDrawBandCompleteUPP()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Non-Carbon CFM:   available as macro/inline
 }
procedure DisposeImageCodecDrawBandCompleteUPP( userUPP: ImageCodecDrawBandCompleteUPP ); external name '_DisposeImageCodecDrawBandCompleteUPP';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)

{
 *  InvokeImageCodecTimeTriggerUPP()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0.2 and later
 *    Non-Carbon CFM:   available as macro/inline
 }
procedure InvokeImageCodecTimeTriggerUPP( refcon: UnivPtr; userUPP: ImageCodecTimeTriggerUPP ); external name '_InvokeImageCodecTimeTriggerUPP';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)

{
 *  InvokeImageCodecDrawBandCompleteUPP()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Non-Carbon CFM:   available as macro/inline
 }
procedure InvokeImageCodecDrawBandCompleteUPP( refcon: UnivPtr; drawBandResult: ComponentResult; drawBandCompleteFlags: UInt32; userUPP: ImageCodecDrawBandCompleteUPP ); external name '_InvokeImageCodecDrawBandCompleteUPP';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)

type
	ImageSubCodecDecompressCapabilitiesPtr = ^ImageSubCodecDecompressCapabilities;
	ImageSubCodecDecompressCapabilities = record
		recordSize: SIGNEDLONG;             { sizeof(ImageSubCodecDecompressCapabilities)}
		decompressRecordSize: SIGNEDLONG;   { size of your codec's decompress record}
		canAsync: Boolean;               { default true}
		pad0: UInt8;
                                              { The following field only exists for QuickTime 4.1 and greater }
		suggestedQueueSize: UInt16;
                                              { The following field only exists for QuickTime 4.0 and greater }
		canProvideTrigger: Boolean;

                                              { The following fields only exist for QuickTime 5.0 and greater }
		subCodecFlushesScreen: Boolean;  { only used on Mac OS X}
		subCodecCallsDrawBandComplete: Boolean;
		pad2: array[0..1] of UInt8;

                                              { The following fields only exist for QuickTime 5.0.1 and greater }
		isChildCodec: Boolean;           { set by base codec before calling Initialize}
		reserved1: UInt8;
		pad4: array[0..1] of UInt8;

                                              { The following fields only exist for QuickTime 7.0 and greater }
		subCodecIsMultiBufferAware: Boolean; { set if subcodec always draws using ImageSubCodecDecompressRecord.baseAddr/rowBytes passed to ImageCodecDrawBand, and always writes every pixel in the buffer}
		subCodecSupportsOutOfOrderDisplayTimes: Boolean;
		subCodecSupportsScheduledBackwardsPlaybackWithDifferenceFrames: Boolean;
		subCodecNeedsHelpReportingNonDisplayableFrames: Boolean;
		baseCodecShouldCallDecodeBandForAllFrames: Boolean;

		pad5: array[0..1] of UInt8;
		subCodecSupportsDrawInDecodeOrder: Boolean; { indicates that it's okay for the subcodec to get a single DrawBand call for each frame in decode order even when frames need reordering.  (This will only happen when other circumstances allow it.)}
		subCodecSupportsDecodeSmoothing: Boolean; { Frame-reordering subcodecs should set this to indicate that they can safely decode a non-droppable frame before drawing the previous non-droppable frame.  This enables smoother playback in GWorlds.}
		pad6: array[0..3] of UInt8;
	end;
const
	kCodecFrameTypeUnknown = 0;
	kCodecFrameTypeKey = 1;
	kCodecFrameTypeDifference = 2;
	kCodecFrameTypeDroppableDifference = 3;

type
	ImageSubCodecDecompressRecordPtr = ^ImageSubCodecDecompressRecord;
	ImageSubCodecDecompressRecord = record
		baseAddr: Ptr;
		rowBytes: SIGNEDLONG;
		codecData: Ptr;
		progressProcRecord: ICMProgressProcRecord;
		dataProcRecord: ICMDataProcRecord;
		userDecompressRecord: UnivPtr;   { pointer to codec-specific per-band data}
		frameType: UInt8;
		inhibitMP: Boolean;              { set this in BeginBand to tell the base decompressor not to call DrawBand from an MP task for this frame.  (Only has any effect for MP-capable subcodecs.  New in QuickTime 5.0.)}
		pad2: array[0..11] of UInt8;
		priv: array[0..1] of SIGNEDLONG;

                                              { The following fields only exist for QuickTime 5.0 and greater }
		drawBandCompleteUPP: ImageCodecDrawBandCompleteUPP; { only used if subcodec set subCodecCallsDrawBandComplete; if drawBandCompleteUPP is non-nil, codec must call it when a frame is finished, but may return from DrawBand before the frame is finished. }
		drawBandCompleteRefCon: UnivPtr; { Note: do not call drawBandCompleteUPP directly from a hardware interrupt; instead, use DTInstall to run a function at deferred task time, and call drawBandCompleteUPP from that. }

                                              { The following fields only exist for QuickTime 7.0 and greater }
		reserved1: UnivPtr;
		reserved2: SIGNEDLONG;
		reserved3: SIGNEDLONG;
	end;
{
  These data structures are used by code that wants to pass planar pixmap 
   information around.
  The structure below gives the basic idea of what is being done.
  Normal instances of code will use a fixed number of planes (eg YUV420 uses 
   three planes, Y, U and V). Each such code instance will define its own
   version of the PlanarPixMapInfo struct counting the number of planes it 
   needs along with defining constants that specify the meanings of each
   plane.
}
type
	PlanarComponentInfo = record
		offset: SInt32;
		rowBytes: UInt32;
	end;
type
	PlanarPixMapInfoPtr = ^PlanarPixMapInfo;
	PlanarPixMapInfo = record
		componentInfo:			array [0..0] of PlanarComponentInfo;
	end;
type
	PlanarPixmapInfoSorensonYUV9Ptr = ^PlanarPixmapInfoSorensonYUV9;
	PlanarPixmapInfoSorensonYUV9 = record
		componentInfoY: PlanarComponentInfo;
		componentInfoU: PlanarComponentInfo;
		componentInfoV: PlanarComponentInfo;
	end;
type
	PlanarPixmapInfoYUV420Ptr = ^PlanarPixmapInfoYUV420;
	PlanarPixmapInfoYUV420 = record
		componentInfoY: PlanarComponentInfo;
		componentInfoCb: PlanarComponentInfo;
		componentInfoCr: PlanarComponentInfo;
	end;
const
	codecSuggestedBufferSentinel = FourCharCode('sent'); { codec public resource containing suggested data pattern to put past end of data buffer }


{ name of parameters or effect -- placed in root container, required }
const
	kParameterTitleName = FourCharCode('name');
	kParameterTitleID = 1;

{ codec sub-type of parameters or effect -- placed in root container, required }
const
	kParameterWhatName = FourCharCode('what');
	kParameterWhatID = 1;

{ effect version -- placed in root container, optional, but recommended }
const
	kParameterVersionName = FourCharCode('vers');
	kParameterVersionID = 1;

{ is effect repeatable -- placed in root container, optional, default is TRUE}
const
	kParameterRepeatableName = FourCharCode('pete');
	kParameterRepeatableID = 1;

const
	kParameterRepeatableTrue = 1;
	kParameterRepeatableFalse = 0;

{ substitution codec in case effect is missing -- placed in root container, recommended }
const
	kParameterAlternateCodecName = FourCharCode('subs');
	kParameterAlternateCodecID = 1;

{ maximum number of sources -- placed in root container, required }
const
	kParameterSourceCountName = FourCharCode('srcs');
	kParameterSourceCountID = 1;

{ EFFECT CLASSES}

{
   The effect major class defines the major grouping of the effect.
   Major classes are defined only by Apple and are not extendable by third
   parties.  Major classes are used for filtering of the effect list by
   applications, but do not define what UI sub-group may or may not be
   presented to the user.  For example, the major class may be a transition,
   but the minor class may be a wipe.  
}

{
   Effects that fail to include a
   kEffectMajorClassType will be classified as kMiscMajorClass.
}
const
	kEffectMajorClassType = FourCharCode('clsa');
	kEffectMajorClassID = 1;

const
	kGeneratorMajorClass = FourCharCode('genr'); { zero source effects}
	kFilterMajorClass = FourCharCode('filt'); { one source effects}
	kTransitionMajorClass = FourCharCode('tran'); { multisource morph effects }
	kCompositorMajorClass = FourCharCode('comp'); { multisource layer effects}
	kMiscMajorClass = FourCharCode('misc'); { all other effects}

{
   The effect minor class defines the grouping of effects for the purposes
   of UI.  Apple defines a set of minor classes and will extend it over
   time.  Apple also provides strings within the UI for minor classes
   that it defines.  Third party developers may either classify
   their effects as a type defined by Apple, or may define their own
   minor class.  Effects which define a minor class of their own
   must also then supply a kEffectMinorClassNameType atom.
}

{
   If a kEffectMinorClassNameType atom is present, but
   the minor type is one defined by Apple, the Apple supplied
   string will be used in the UI.
}

{
   Effects that fail to supply a kEffectMinorClassType will be 
   classified as kMiscMinorClass.
}
const
	kEffectMinorClassType = FourCharCode('clsi');
	kEffectMinorClassID = 1;
	kEffectMinorClassNameType = FourCharCode('clsn');
	kEffectMinorClassNameID = 1;

const
	kGeneratorMinorClass = FourCharCode('genr'); { "Generators"}
	kRenderMinorClass = FourCharCode('rend'); { "Render"}
	kFilterMinorClass = FourCharCode('filt'); { "Filters"}
	kArtisticMinorClass = FourCharCode('arts'); { "Artistic}
	kBlurMinorClass = FourCharCode('blur'); { "Blur"}
	kSharpenMinorClass = FourCharCode('shrp'); { "Sharpen"}
	kDistortMinorClass = FourCharCode('dist'); { "Distort"}
	kNoiseMinorClass = FourCharCode('nois'); { "Noise"}
	kAdjustmentMinorClass = FourCharCode('adst'); { "Adjustments"}
	kTransitionMinorClass = FourCharCode('tran'); { "Transitions"}
	kWipeMinorClass = FourCharCode('wipe'); { "Wipes"}
	k3DMinorClass = FourCharCode('pzre'); { "3D Transitions"}
	kCompositorMinorClass = FourCharCode('comp'); { "Compositors"}
	kEffectsMinorClass = FourCharCode('fxfx'); { "Special Effects"}
	kMiscMinorClass = FourCharCode('misc'); { "Miscellaneous"}

{
   Effects can define a number of "preset" values which will be presented to the user
   in a simplified UI.  Each preset is an atom within the parameter description list
   and must have an atom ID from 1 going up sequentially.  Inside of this atom are three other
   atoms containing:
    1) the name of the preset as a Pascal string
    2) a preview picture for the preset, 86 x 64 pixels in size
    3) the ENTIRE set of parameter values needed to create a sample of this preset.
}
const
	kEffectPresetType = FourCharCode('peff');
	kPresetNameType = FourCharCode('pnam');
	kPresetNameID = 1;
	kPresetPreviewPictureType = FourCharCode('ppct');
	kPresetPreviewPictureID = 1;
	kPresetSettingsType = FourCharCode('psst');
	kPresetSettingsID = 1;

const
	kParameterDependencyName = FourCharCode('deep');
	kParameterDependencyID = 1;

const
	kParameterListDependsUponColorProfiles = FourCharCode('prof');
	kParameterListDependsUponFonts = FourCharCode('font');

type
	ParameterDependancyRecordPtr = ^ParameterDependancyRecord;
	ParameterDependancyRecord = record
		dependCount: SIGNEDLONG;
    depends: array [0..0] of OSType;
	end;
{
   enumeration list in container -- placed in root container, optional unless used by a
   parameter in the list
}
const
	kParameterEnumList = FourCharCode('enum');

type
	EnumValuePairPtr = ^EnumValuePair;
	EnumValuePair = record
		value: SIGNEDLONG;
		name: Str255;
	end;
type
	EnumListRecordPtr = ^EnumListRecord;
	EnumListRecord = record
		enumCount: SIGNEDLONG;              { number of enumeration items to follow}
    values: array [0..0] of EnumValuePair;              { values and names for them, packed }
	end;
{ atom type of parameter}
const
	kParameterAtomTypeAndID = FourCharCode('type');

const
	kNoAtom = FourCharCode('none'); { atom type for no data got/set}
	kAtomNoFlags = $00000000;
	kAtomNotInterpolated = $00000001; { atom can never be interpolated}
	kAtomInterpolateIsOptional = $00000002; { atom can be interpolated, but it is an advanced user operation}
	kAtomMayBeIndexed = $00000004; { more than one value of atom can exist with accending IDs (ie, lists of colors)}

type
	ParameterAtomTypeAndIDPtr = ^ParameterAtomTypeAndID;
	ParameterAtomTypeAndID = record
		atomType: QTAtomType;               { type of atom this data comes from/goes into}
		atomID: QTAtomID;                 { ID of atom this data comes from/goes into}
		atomFlags: SIGNEDLONG;              { options for this atom}
		atomName: Str255;               { name of this value type}
	end;
{ optional specification of mapping between parameters and properties}
const
	kParameterProperty = FourCharCode('prop');

type
	ParameterProperty = record
		propertyClass: OSType;          { class to set for this property (0 for default which is specified by caller)}
		propertyID: OSType;             { id to set for this property (default is the atomType)}
	end;
{ data type of a parameter}
const
	kParameterDataType = FourCharCode('data');

const
	kParameterTypeDataLong = kTweenTypeLong; { integer value}
	kParameterTypeDataFixed = kTweenTypeFixed; { fixed point value}
	kParameterTypeDataRGBValue = kTweenTypeRGBColor; { RGBColor data}
	kParameterTypeDataDouble = kTweenTypeQTFloatDouble; { IEEE 64 bit floating point value}
	kParameterTypeDataText = FourCharCode('text'); { editable text item}
	kParameterTypeDataEnum = FourCharCode('enum'); { enumerated lookup value}
	kParameterTypeDataBitField = FourCharCode('bool'); { bit field value (something that holds boolean(s))}
	kParameterTypeDataImage = FourCharCode('imag'); { reference to an image via Picture data}

type
	ParameterDataTypePtr = ^ParameterDataType;
	ParameterDataType = record
		dataType: OSType;               { type of data this item is stored as}
	end;
{
   alternate (optional) data type -- main data type always required.  
   Must be modified or deleted when modifying main data type.
   Main data type must be modified when alternate is modified.
}
const
	kParameterAlternateDataType = FourCharCode('alt1');
	kParameterTypeDataColorValue = FourCharCode('cmlr'); { CMColor data (supported on machines with ColorSync)}
	kParameterTypeDataCubic = FourCharCode('cubi'); { cubic bezier(s) (no built-in support)}
	kParameterTypeDataNURB = FourCharCode('nurb'); { nurb(s) (no built-in support)}

type
	ParameterAlternateDataEntryPtr = ^ParameterAlternateDataEntry;
	ParameterAlternateDataEntry = record
		dataType: OSType;               { type of data this item is stored as}
		alternateAtom: QTAtomType;          { where to store}
	end;
type
	ParameterAlternateDataTypePtr = ^ParameterAlternateDataType;
	ParameterAlternateDataType = record
		numEntries: SIGNEDLONG;
    entries: array [0..0] of ParameterAlternateDataEntry;
	end;
{ legal values for the parameter}
const
	kParameterDataRange = FourCharCode('rang');

const
	kNoMinimumLongFixed = $7FFFFFFF; { ignore minimum/maxiumum values}
	kNoMaximumLongFixed = $80000000;
	kNoScaleLongFixed = 0;    { don't perform any scaling of value}
	kNoPrecision = -1;  { allow as many digits as format}

{ 'text'}
type
	StringRangeRecordPtr = ^StringRangeRecord;
	StringRangeRecord = record
		maxChars: SIGNEDLONG;               { maximum length of string}
		maxLines: SIGNEDLONG;               { number of editing lines to use (1 typical, 0 to default)}
	end;
{ 'long'}
type
	LongRangeRecordPtr = ^LongRangeRecord;
	LongRangeRecord = record
		minValue: SIGNEDLONG;               { no less than this}
		maxValue: SIGNEDLONG;               { no more than this}
		scaleValue: SIGNEDLONG;             { muliply content by this going in, divide going out}
		precisionDigits: SIGNEDLONG;        { # digits of precision when editing via typing}
	end;
{ 'enum'}
type
	EnumRangeRecordPtr = ^EnumRangeRecord;
	EnumRangeRecord = record
		enumID: SIGNEDLONG;                 { 'enum' list in root container to search within}
	end;
{ 'fixd'}
type
	FixedRangeRecordPtr = ^FixedRangeRecord;
	FixedRangeRecord = record
		minValue: Fixed;               { no less than this}
		maxValue: Fixed;               { no more than this}
		scaleValue: Fixed;             { muliply content by this going in, divide going out}
		precisionDigits: SIGNEDLONG;        { # digits of precision when editing via typing}
	end;
{ 'doub'}


{$push}
{$r-}
{$q-}
const
  kNoMinimumDouble=0.0/0.0;                   { ignore minimum/maxiumum values }
  kNoMaximumDouble=0.0/0.0;
{$pop}
const
  kNoScaleDouble = 0.0;                     { don't perform any scaling of value }
type
	DoubleRangeRecordPtr = ^DoubleRangeRecord;
	DoubleRangeRecord = record
		minValue: QTFloatDouble;           { no less than this }
		maxValue: QTFloatDouble;           { no more than this }
		scaleValue: QTFloatDouble;         { muliply content by this going in, divide going out }
		precisionDigits: SIGNEDLONG;    { # digits of precision when editing via typing }
	end;
    
{ 'bool'   }
type
	BooleanRangeRecordPtr = ^BooleanRangeRecord;
	BooleanRangeRecord = record
		maskValue: SIGNEDLONG;              { value to mask on/off to set/clear the boolean}
	end;
{ 'rgb '}
type
	RGBRangeRecordPtr = ^RGBRangeRecord;
	RGBRangeRecord = record
		minColor: RGBColor;
		maxColor: RGBColor;
	end;
{ 'imag'}
const
	kParameterImageNoFlags = 0;
	kParameterImageIsPreset = 1;

const
	kStandardPresetGroup = FourCharCode('pset');

type
	ImageRangeRecordPtr = ^ImageRangeRecord;
	ImageRangeRecord = record
		imageFlags: SIGNEDLONG;
		fileType: OSType;               { file type to contain the preset group (normally kStandardPresetGroup)}
		replacedAtoms: SIGNEDLONG;          { # atoms at this level replaced by this preset group}
	end;
{ union of all of the above}

type
	ParameterRangeRecord = record
	  case SInt16 of
	    0: (
        longRange: LongRangeRecord;
        );
      1: (
        enumRange: EnumRangeRecord;
        );
      2: (
        fixedRange: FixedRangeRecord;
        );
      3: (
        doubleRange: DoubleRangeRecord;
        );
      4: (
        stringRange: StringRangeRecord;
        );
      5: (
        booleanRange: BooleanRangeRecord;
        );
      6: (
        rgbRange: RGBRangeRecord;
        );
      7: (
        imageRange: ImageRangeRecord;
        );
	end;
  
{ UI behavior of a parameter}
const
	kParameterDataBehavior = FourCharCode('ditl');

const
{ items edited via typing}
	kParameterItemEditText = FourCharCode('edit'); { edit text box}
	kParameterItemEditLong = FourCharCode('long'); { long number editing box}
	kParameterItemEditFixed = FourCharCode('fixd'); { fixed point number editing box}
	kParameterItemEditDouble = FourCharCode('doub'); { double number editing box}
                                        { items edited via control(s)}
	kParameterItemPopUp = FourCharCode('popu'); { pop up value for enum types}
	kParameterItemRadioCluster = FourCharCode('radi'); { radio cluster for enum types}
	kParameterItemCheckBox = FourCharCode('chex'); { check box for booleans}
	kParameterItemControl = FourCharCode('cntl'); { item controlled via a standard control of some type}
                                        { special user items}
	kParameterItemLine = FourCharCode('line'); { line}
	kParameterItemColorPicker = FourCharCode('pick'); { color swatch & picker}
	kParameterItemGroupDivider = FourCharCode('divi'); { start of a new group of items}
	kParameterItemStaticText = FourCharCode('stat'); { display "parameter name" as static text}
	kParameterItemDragImage = FourCharCode('imag'); { allow image display, along with drag and drop}
                                        { flags valid for lines and groups}
	kGraphicsNoFlags = $00000000; { no options for graphics}
	kGraphicsFlagsGray = $00000001; { draw lines with gray}
                                        { flags valid for groups}
	kGroupNoFlags = $00000000; { no options for group -- may be combined with graphics options             }
	kGroupAlignText = $00010000; { edit text items in group have the same size}
	kGroupSurroundBox = $00020000; { group should be surrounded with a box}
	kGroupMatrix = $00040000; { side-by-side arrangement of group is okay}
	kGroupNoName = $00080000; { name of group should not be displayed above box}
                                        { flags valid for popup/radiocluster/checkbox/control}
	kDisableControl = $00000001;
	kDisableWhenNotEqual = $00000000 + kDisableControl;
	kDisableWhenEqual = $00000010 + kDisableControl;
	kDisableWhenLessThan = $00000020 + kDisableControl;
	kDisableWhenGreaterThan = $00000030 + kDisableControl; { flags valid for controls}
	kCustomControl = $00100000; { flags valid for popups}
	kPopupStoreAsString = $00010000;

type
	ControlBehaviors = record
		groupID: QTAtomID;                { group under control of this item}
		controlValue: SIGNEDLONG;           { control value for comparison purposes}
		customType: QTAtomType;             { custom type identifier, for kCustomControl}
		customID: QTAtomID;               { custom type ID, for kCustomControl}
	end;
type
	ParameterDataBehaviorPtr = ^ParameterDataBehavior;
	ParameterDataBehavior = record
		behaviorType: OSType;
		behaviorFlags: SIGNEDLONG;
		case SInt16 of
			0: (
				controls: ControlBehaviors;
				);
	end;
{ higher level purpose of a parameter or set of parameters}
const
	kParameterDataUsage = FourCharCode('use ');

const
	kParameterUsagePixels = FourCharCode('pixl');
	kParameterUsageRectangle = FourCharCode('rect');
	kParameterUsagePoint = FourCharCode('xy  ');
	kParameterUsage3DPoint = FourCharCode('xyz ');
	kParameterUsageDegrees = FourCharCode('degr');
	kParameterUsageRadians = FourCharCode('rads');
	kParameterUsagePercent = FourCharCode('pcnt');
	kParameterUsageSeconds = FourCharCode('secs');
	kParameterUsageMilliseconds = FourCharCode('msec');
	kParameterUsageMicroseconds = FourCharCode('µsec');
	kParameterUsage3by3Matrix = FourCharCode('3by3');
	kParameterUsageCircularDegrees = FourCharCode('degc');
	kParameterUsageCircularRadians = FourCharCode('radc');

type
	ParameterDataUsagePtr = ^ParameterDataUsage;
	ParameterDataUsage = record
		usageType: OSType;              { higher level purpose of the data or group}
	end;
{ default value(s) for a parameter}
const
	kParameterDataDefaultItem = FourCharCode('dflt');

	{	 atoms that help to fill in data within the info window 	}
	kParameterInfoLongName = FourCharCode('©nam');
	kParameterInfoCopyright = FourCharCode('©cpy');
	kParameterInfoDescription	= FourCharCode('©inf');
	kParameterInfoWindowTitle	= FourCharCode('©wnt');
	kParameterInfoPicture = FourCharCode('©pix');
	kParameterInfoManufacturer = FourCharCode('©man');
	kParameterInfoIDs = 1;

	{ flags for ImageCodecValidateParameters }
	kParameterValidationNoFlags = $00000000;
	kParameterValidationFinalValidation = $00000001;


type
	QTParameterValidationOptions = SIGNEDLONG;
{ QTAtomTypes for atoms in image compressor settings containers}
const
	kImageCodecSettingsFieldCount = FourCharCode('fiel'); { Number of fields (UInt8) }
	kImageCodecSettingsFieldOrdering = FourCharCode('fdom'); { Ordering of fields (UInt8)}
	kImageCodecSettingsFieldOrderingF1F2 = 1;
	kImageCodecSettingsFieldOrderingF2F1 = 2;


{
 *  Summary:
 *    Additional Image Description Extensions
 }
const
{
   * Image description extension describing the color properties.
   }
	kColorInfoImageDescriptionExtension = FourCharCode('colr');

  {
   * Image description extension describing the pixel aspect ratio.
   }
	kPixelAspectRatioImageDescriptionExtension = FourCharCode('pasp'); { big-endian PixelAspectRatioImageDescriptionExtension }

  {
   * Image description extension describing the clean aperture.
   }
	kCleanApertureImageDescriptionExtension = FourCharCode('clap'); { big-endian CleanApertureImageDescriptionExtension }

  {
   * Specifies the offset in bytes from the start of one pixel row to
   * the next. Only valid for chunky pixel formats. If present, this
   * image description extension overrides other conventions for
   * calculating rowBytes.
   }
	kQTRowBytesImageDescriptionExtension = FourCharCode('rowb'); { big-endian SInt32 }

{ Color Info Image Description Extension types}
const
	kVideoColorInfoImageDescriptionExtensionType = FourCharCode('nclc'); { For video color descriptions (defined below)    }
	kICCProfileColorInfoImageDescriptionExtensionType = FourCharCode('prof'); { For ICC Profile color descriptions (not defined here)}


{ Video Color Info Image Description Extensions}
type
	NCLCColorInfoImageDescriptionExtension = record
		colorParamType: OSType;         { Type of color parameter 'nclc'               }
		primaries: UInt16;              { CIE 1931 xy chromaticity coordinates          }
		transferFunction: UInt16;       { Nonlinear transfer function from RGB to ErEgEb }
		matrix: UInt16;                 { Matrix from ErEgEb to EyEcbEcr           }
	end;
{ Primaries}
const
	kQTPrimaries_ITU_R709_2 = 1;    { ITU-R BT.709-2, SMPTE 274M-1995, and SMPTE 296M-1997 }
	kQTPrimaries_Unknown = 2;    { Unknown }
	kQTPrimaries_EBU_3213 = 5;    { EBU Tech. 3213 (1981) }
	kQTPrimaries_SMPTE_C = 6;     { SMPTE C Primaries from SMPTE RP 145-1993 }

{ Transfer Function}
const
	kQTTransferFunction_ITU_R709_2 = 1;   { Recommendation ITU-R BT.709-2, SMPTE 274M-1995, SMPTE 296M-1997, SMPTE 293M-1996 and SMPTE 170M-1994 }
	kQTTransferFunction_Unknown = 2;    { Unknown }
	kQTTransferFunction_SMPTE_240M_1995 = 7; { SMPTE 240M-1995 and interim color implementation of SMPTE 274M-1995 }

{ Matrix}
const
	kQTMatrix_ITU_R_709_2 = 1;    { Recommendation ITU-R BT.709-2 (1125/60/2:1 only), SMPTE 274M-1995 and SMPTE 296M-1997 }
	kQTMatrix_Unknown = 2;    { Unknown }
	kQTMatrix_ITU_R_601_4 = 6;    { Recommendation ITU-R BT.601-4, Recommendation ITU-R BT.470-4 System B and G, SMPTE 170M-1994 and SMPTE 293M-1996 }
	kQTMatrix_SMPTE_240M_1995 = 7;     { SMPTE 240M-1995 and interim color implementation of SMPTE 274M-1995 }


{ Field/Frame Info Image Description (this remaps to FieldInfoImageDescriptionExtension)}
type
	FieldInfoImageDescriptionExtension2Ptr = ^FieldInfoImageDescriptionExtension2;
	FieldInfoImageDescriptionExtension2 = record
		fields: UInt8;
		detail: UInt8;
	end;
const
	kQTFieldsProgressiveScan = 1;
	kQTFieldsInterlaced = 2;

const
	kQTFieldDetailUnknown = 0;
	kQTFieldDetailTemporalTopFirst = 1;
	kQTFieldDetailTemporalBottomFirst = 6;
	kQTFieldDetailSpatialFirstLineEarly = 9;
	kQTFieldDetailSpatialFirstLineLate = 14;


{ Pixel Aspect Ratio Image Description Extensions}
type
	PixelAspectRatioImageDescriptionExtensionPtr = ^PixelAspectRatioImageDescriptionExtension;
	PixelAspectRatioImageDescriptionExtension = record
		hSpacing: UInt32;               { Horizontal Spacing }
		vSpacing: UInt32;               { Vertical Spacing }
	end;
{ Clean Aperture Image Description Extensions}
type
	CleanApertureImageDescriptionExtensionPtr = ^CleanApertureImageDescriptionExtension;
	CleanApertureImageDescriptionExtension = record
		cleanApertureWidthN: UInt32;    { width of clean aperture, numerator, denominator }
		cleanApertureWidthD: UInt32;
		cleanApertureHeightN: UInt32;   { height of clean aperture, numerator, denominator}
		cleanApertureHeightD: UInt32;
		horizOffN: SInt32;              { horizontal offset of clean aperture center minus (width-1)/2, numerator, denominator }
		horizOffD: UInt32;
		vertOffN: SInt32;               { vertical offset of clean aperture center minus (height-1)/2, numerator, denominator }
		vertOffD: UInt32;
	end;
type
	ImageCodecMPDrawBandProcPtr = function( refcon: UnivPtr; var drp: ImageSubCodecDecompressRecord ): ComponentResult;
	ImageCodecMPDrawBandUPP = ImageCodecMPDrawBandProcPtr;
{
 *  NewImageCodecMPDrawBandUPP()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   available as macro/inline
 }
function NewImageCodecMPDrawBandUPP( userRoutine: ImageCodecMPDrawBandProcPtr ): ImageCodecMPDrawBandUPP; external name '_NewImageCodecMPDrawBandUPP';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)

{
 *  DisposeImageCodecMPDrawBandUPP()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   available as macro/inline
 }
procedure DisposeImageCodecMPDrawBandUPP( userUPP: ImageCodecMPDrawBandUPP ); external name '_DisposeImageCodecMPDrawBandUPP';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)

{
 *  InvokeImageCodecMPDrawBandUPP()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   available as macro/inline
 }
function InvokeImageCodecMPDrawBandUPP( refcon: UnivPtr; var drp: ImageSubCodecDecompressRecord; userUPP: ImageCodecMPDrawBandUPP ): ComponentResult; external name '_InvokeImageCodecMPDrawBandUPP';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)

{  codec selectors 0-127 are reserved by Apple }
{  codec selectors 128-191 are subtype specific }
{  codec selectors 192-255 are vendor specific }
{  codec selectors 256-511 are available for general use }
{  codec selectors 512-1023 are reserved by Apple }
{  codec selectors 1024-32767 are available for general use }
{  negative selectors are reserved by the Component Manager }
{
 *  ImageCodecGetCodecInfo()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetCodecInfo( ci: ComponentInstance; var info: CodecInfo ): ComponentResult; external name '_ImageCodecGetCodecInfo';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetCompressionTime()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetCompressionTime( ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; depth: SInt16; var spatialQuality: CodecQ; var temporalQuality: CodecQ; var time: UNSIGNEDLONG ): ComponentResult; external name '_ImageCodecGetCompressionTime';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetMaxCompressionSize()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetMaxCompressionSize( ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; depth: SInt16; quality: CodecQ; var size: SIGNEDLONG ): ComponentResult; external name '_ImageCodecGetMaxCompressionSize';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecPreCompress()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecPreCompress( ci: ComponentInstance; var params: CodecCompressParams ): ComponentResult; external name '_ImageCodecPreCompress';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecBandCompress()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecBandCompress( ci: ComponentInstance; var params: CodecCompressParams ): ComponentResult; external name '_ImageCodecBandCompress';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecPreDecompress()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecPreDecompress( ci: ComponentInstance; var params: CodecDecompressParams ): ComponentResult; external name '_ImageCodecPreDecompress';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecBandDecompress()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecBandDecompress( ci: ComponentInstance; var params: CodecDecompressParams ): ComponentResult; external name '_ImageCodecBandDecompress';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecBusy()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecBusy( ci: ComponentInstance; seq: ImageSequence ): ComponentResult; external name '_ImageCodecBusy';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetCompressedImageSize()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetCompressedImageSize( ci: ComponentInstance; desc: ImageDescriptionHandle; data: Ptr; bufferSize: SIGNEDLONG; dataProc: ICMDataProcRecordPtr; var dataSize: SIGNEDLONG ): ComponentResult; external name '_ImageCodecGetCompressedImageSize';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetSimilarity()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetSimilarity( ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; desc: ImageDescriptionHandle; data: Ptr; var similarity: Fixed ): ComponentResult; external name '_ImageCodecGetSimilarity';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecTrimImage()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecTrimImage( ci: ComponentInstance; Desc: ImageDescriptionHandle; inData: Ptr; inBufferSize: SIGNEDLONG; dataProc: ICMDataProcRecordPtr; outData: Ptr; outBufferSize: SIGNEDLONG; flushProc: ICMFlushProcRecordPtr; var trimRect: Rect; progressProc: ICMProgressProcRecordPtr ): ComponentResult; external name '_ImageCodecTrimImage';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecRequestSettings()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecRequestSettings( ci: ComponentInstance; settings: Handle; var rp: Rect; filterProc: ModalFilterUPP ): ComponentResult; external name '_ImageCodecRequestSettings';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetSettings()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetSettings( ci: ComponentInstance; settings: Handle ): ComponentResult; external name '_ImageCodecGetSettings';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecSetSettings()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecSetSettings( ci: ComponentInstance; settings: Handle ): ComponentResult; external name '_ImageCodecSetSettings';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecFlush()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecFlush( ci: ComponentInstance ): ComponentResult; external name '_ImageCodecFlush';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecSetTimeCode()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecSetTimeCode( ci: ComponentInstance; timeCodeFormat: UnivPtr; timeCodeTime: UnivPtr ): ComponentResult; external name '_ImageCodecSetTimeCode';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecIsImageDescriptionEquivalent()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecIsImageDescriptionEquivalent( ci: ComponentInstance; newDesc: ImageDescriptionHandle; var equivalent: Boolean ): ComponentResult; external name '_ImageCodecIsImageDescriptionEquivalent';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecNewMemory()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecNewMemory( ci: ComponentInstance; var data: Ptr; dataSize: Size; dataUse: SIGNEDLONG; memoryGoneProc: ICMMemoryDisposedUPP; refCon: UnivPtr ): ComponentResult; external name '_ImageCodecNewMemory';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecDisposeMemory()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecDisposeMemory( ci: ComponentInstance; data: Ptr ): ComponentResult; external name '_ImageCodecDisposeMemory';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecHitTestData()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecHitTestData( ci: ComponentInstance; desc: ImageDescriptionHandle; data: UnivPtr; dataSize: Size; where: Point; var hit: Boolean ): ComponentResult; external name '_ImageCodecHitTestData';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecNewImageBufferMemory()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecNewImageBufferMemory( ci: ComponentInstance; var params: CodecDecompressParams; flags: SIGNEDLONG; memoryGoneProc: ICMMemoryDisposedUPP; refCon: UnivPtr ): ComponentResult; external name '_ImageCodecNewImageBufferMemory';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecExtractAndCombineFields()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecExtractAndCombineFields( ci: ComponentInstance; fieldFlags: SIGNEDLONG; data1: UnivPtr; dataSize1: SIGNEDLONG; desc1: ImageDescriptionHandle; data2: UnivPtr; dataSize2: SIGNEDLONG; desc2: ImageDescriptionHandle; outputData: UnivPtr; var outDataSize: SIGNEDLONG; descOut: ImageDescriptionHandle ): ComponentResult; external name '_ImageCodecExtractAndCombineFields';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetMaxCompressionSizeWithSources()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetMaxCompressionSizeWithSources( ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; depth: SInt16; quality: CodecQ; sourceData: CDSequenceDataSourcePtr; var size: SIGNEDLONG ): ComponentResult; external name '_ImageCodecGetMaxCompressionSizeWithSources';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecSetTimeBase()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecSetTimeBase( ci: ComponentInstance; base: UnivPtr ): ComponentResult; external name '_ImageCodecSetTimeBase';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecSourceChanged()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecSourceChanged( ci: ComponentInstance; majorSourceChangeSeed: UInt32; minorSourceChangeSeed: UInt32; sourceData: CDSequenceDataSourcePtr; var flagsOut: SIGNEDLONG ): ComponentResult; external name '_ImageCodecSourceChanged';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecFlushFrame()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecFlushFrame( ci: ComponentInstance; flags: UInt32 ): ComponentResult; external name '_ImageCodecFlushFrame';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetSettingsAsText()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.1 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetSettingsAsText( ci: ComponentInstance; var text: Handle ): ComponentResult; external name '_ImageCodecGetSettingsAsText';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetParameterListHandle()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetParameterListHandle( ci: ComponentInstance; var parameterDescriptionHandle: Handle ): ComponentResult; external name '_ImageCodecGetParameterListHandle';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetParameterList()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetParameterList( ci: ComponentInstance; var parameterDescription: QTAtomContainer ): ComponentResult; external name '_ImageCodecGetParameterList';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecCreateStandardParameterDialog()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecCreateStandardParameterDialog( ci: ComponentInstance; parameterDescription: QTAtomContainer; parameters: QTAtomContainer; dialogOptions: QTParameterDialogOptions; existingDialog: DialogPtr; existingUserItem: SInt16; var createdDialog: QTParameterDialog ): ComponentResult; external name '_ImageCodecCreateStandardParameterDialog';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecIsStandardParameterDialogEvent()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecIsStandardParameterDialogEvent( ci: ComponentInstance; var pEvent: EventRecord; createdDialog: QTParameterDialog ): ComponentResult; external name '_ImageCodecIsStandardParameterDialogEvent';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecDismissStandardParameterDialog()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecDismissStandardParameterDialog( ci: ComponentInstance; createdDialog: QTParameterDialog ): ComponentResult; external name '_ImageCodecDismissStandardParameterDialog';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecStandardParameterDialogDoAction()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecStandardParameterDialogDoAction( ci: ComponentInstance; createdDialog: QTParameterDialog; action: SIGNEDLONG; params: UnivPtr ): ComponentResult; external name '_ImageCodecStandardParameterDialogDoAction';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecNewImageGWorld()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecNewImageGWorld( ci: ComponentInstance; var params: CodecDecompressParams; var newGW: GWorldPtr; flags: SIGNEDLONG ): ComponentResult; external name '_ImageCodecNewImageGWorld';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecDisposeImageGWorld()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecDisposeImageGWorld( ci: ComponentInstance; theGW: GWorldPtr ): ComponentResult; external name '_ImageCodecDisposeImageGWorld';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecHitTestDataWithFlags()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.1 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecHitTestDataWithFlags( ci: ComponentInstance; desc: ImageDescriptionHandle; data: UnivPtr; dataSize: Size; where: Point; var hit: SIGNEDLONG; hitFlags: SIGNEDLONG ): ComponentResult; external name '_ImageCodecHitTestDataWithFlags';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecValidateParameters()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecValidateParameters( ci: ComponentInstance; parameters: QTAtomContainer; validationFlags: QTParameterValidationOptions; errorString: StringPtr ): ComponentResult; external name '_ImageCodecValidateParameters';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetBaseMPWorkFunction()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecGetBaseMPWorkFunction( ci: ComponentInstance; var workFunction: ComponentMPWorkFunctionUPP; var refCon: UnivPtr; drawProc: ImageCodecMPDrawBandUPP; drawProcRefCon: UnivPtr ): ComponentResult; external name '_ImageCodecGetBaseMPWorkFunction';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)

{
 *  ImageCodecLockBits()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.3 (or QuickTime 6.4) and later in QuickTime.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 *    Windows:          in qtmlClient.lib 6.5 and later
 }
function ImageCodecLockBits( ci: ComponentInstance; port: CGrafPtr ): ComponentResult; external name '_ImageCodecLockBits';
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)


{
 *  ImageCodecUnlockBits()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.3 (or QuickTime 6.4) and later in QuickTime.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 *    Windows:          in qtmlClient.lib 6.5 and later
 }
function ImageCodecUnlockBits( ci: ComponentInstance; port: CGrafPtr ): ComponentResult; external name '_ImageCodecUnlockBits';
(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)


{
 *  ImageCodecRequestGammaLevel()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Non-Carbon CFM:   in QuickTimeLib 5.0 and later
 *    Windows:          in qtmlClient.lib 5.0 and later
 }
function ImageCodecRequestGammaLevel( ci: ComponentInstance; srcGammaLevel: Fixed; dstGammaLevel: Fixed; var codecCanMatch: SIGNEDLONG ): ComponentResult; external name '_ImageCodecRequestGammaLevel';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecGetSourceDataGammaLevel()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Non-Carbon CFM:   in QuickTimeLib 5.0 and later
 *    Windows:          in qtmlClient.lib 5.0 and later
 }
function ImageCodecGetSourceDataGammaLevel( ci: ComponentInstance; var sourceDataGammaLevel: Fixed ): ComponentResult; external name '_ImageCodecGetSourceDataGammaLevel';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{ (Selector 42 skipped) }
{
 *  ImageCodecGetDecompressLatency()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.3 and later
 *    Non-Carbon CFM:   in QuickTimeLib 5.0 and later
 *    Windows:          in qtmlClient.lib 5.0 and later
 }
function ImageCodecGetDecompressLatency( ci: ComponentInstance; var latency: TimeRecord ): ComponentResult; external name '_ImageCodecGetDecompressLatency';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecMergeFloatingImageOntoWindow()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.2 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.6 and later
 *    Non-Carbon CFM:   in QuickTimeLib 6.0 and later
 *    Windows:          in qtmlClient.lib 6.0 and later
 }
function ImageCodecMergeFloatingImageOntoWindow( ci: ComponentInstance; flags: UInt32 ): ComponentResult; external name '_ImageCodecMergeFloatingImageOntoWindow';
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)


{
 *  ImageCodecRemoveFloatingImage()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.2 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.6 and later
 *    Non-Carbon CFM:   in QuickTimeLib 6.0 and later
 *    Windows:          in qtmlClient.lib 6.0 and later
 }
function ImageCodecRemoveFloatingImage( ci: ComponentInstance; flags: UInt32 ): ComponentResult; external name '_ImageCodecRemoveFloatingImage';
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)


{
 *  ImageCodecGetDITLForSize()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.2 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.6 and later
 *    Non-Carbon CFM:   in QuickTimeLib 6.0 and later
 *    Windows:          in qtmlClient.lib 6.0 and later
 }
function ImageCodecGetDITLForSize( ci: ComponentInstance; var ditl: Handle; var requestedSize: Point ): ComponentResult; external name '_ImageCodecGetDITLForSize';
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)


{
 *  ImageCodecDITLInstall()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.2 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.6 and later
 *    Non-Carbon CFM:   in QuickTimeLib 6.0 and later
 *    Windows:          in qtmlClient.lib 6.0 and later
 }
function ImageCodecDITLInstall( ci: ComponentInstance; d: DialogRef; itemOffset: SInt16 ): ComponentResult; external name '_ImageCodecDITLInstall';
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)


{
 *  ImageCodecDITLEvent()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.2 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.6 and later
 *    Non-Carbon CFM:   in QuickTimeLib 6.0 and later
 *    Windows:          in qtmlClient.lib 6.0 and later
 }
function ImageCodecDITLEvent( ci: ComponentInstance; d: DialogRef; itemOffset: SInt16; const (*var*) theEvent: EventRecord; var itemHit: SInt16; var handled: Boolean ): ComponentResult; external name '_ImageCodecDITLEvent';
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)


{
 *  ImageCodecDITLItem()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.2 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.6 and later
 *    Non-Carbon CFM:   in QuickTimeLib 6.0 and later
 *    Windows:          in qtmlClient.lib 6.0 and later
 }
function ImageCodecDITLItem( ci: ComponentInstance; d: DialogRef; itemOffset: SInt16; itemNum: SInt16 ): ComponentResult; external name '_ImageCodecDITLItem';
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)


{
 *  ImageCodecDITLRemove()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.2 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.6 and later
 *    Non-Carbon CFM:   in QuickTimeLib 6.0 and later
 *    Windows:          in qtmlClient.lib 6.0 and later
 }
function ImageCodecDITLRemove( ci: ComponentInstance; d: DialogRef; itemOffset: SInt16 ): ComponentResult; external name '_ImageCodecDITLRemove';
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)


{
 *  ImageCodecDITLValidateInput()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.2 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.6 and later
 *    Non-Carbon CFM:   in QuickTimeLib 6.0 and later
 *    Windows:          in qtmlClient.lib 6.0 and later
 }
function ImageCodecDITLValidateInput( ci: ComponentInstance; var ok: Boolean ): ComponentResult; external name '_ImageCodecDITLValidateInput';
(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)


{ (Selector 52 skipped) }
{ (Selector 53 skipped) }
{
 *  ImageCodecGetPreferredChunkSizeAndAlignment()
 *  
 *  Summary:
 *    Returns the preferences of an image decompressor for the chunking
 *    of image data within a container, e.g. a movie file.
 *  
 *  Discussion:
 *    If you are writing image data to a container, you can optimize
 *    the subsequent loading of the image data for playback and other
 *    operations by chunking multiple samples of image data together.
 *    This function can be called to determine whether an image
 *    decompressor has special chunking preferences.
 *  
 *  Parameters:
 *    
 *    ci:
 *      Component instance / instance globals.
 *    
 *    desc:
 *      The image description for the image data to be chunked.
 *    
 *    frameRate:
 *      Mean frame rate in frames per second as in SCTemporalSettings;
 *      0 if not known or not applicable.
 *    
 *    dataRate:
 *      Mean data rate in bytes per second as in SCDataRateSettings; 0
 *      if not known.
 *    
 *    bytesPerChunk:
 *      Points to a variable to receive the preferred maximum size in
 *      bytes of each chunk of image data. It is not safe to pass NULL
 *      for this parameter. The codec may indicate that it has no
 *      preference regarding chunk sizing by setting the variable to 0.
 *    
 *    alignment:
 *      Points to a variable to receive the preferred boundary for
 *      chunk alignment in bytes, e.g. 512. It is not safe to pass NULL
 *      for this parameter. The codec may indicate that it has no
 *      preference regarding chunk alignment by setting the variable to
 *      0.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function ImageCodecGetPreferredChunkSizeAndAlignment( ci: ComponentInstance; desc: ImageDescriptionHandle; frameRate: Fixed; dataRate: UInt32; var bytesPerChunk: SIGNEDLONG; var alignment: SIGNEDLONG ): ComponentResult; external name '_ImageCodecGetPreferredChunkSizeAndAlignment';
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)


{ B-Frame Capable Image Compressor Component API }
{
 *  ImageCodecPrepareToCompressFrames()
 *  
 *  Summary:
 *    Prepares the compressor to receive frames.
 *  
 *  Discussion:
 *    The compressor should record session and retain
 *    compressionSessionOptions for use in later calls. 
 *    The compressor may modify imageDescription at this point. 
 *     The compressor should create and return pixel buffer attributes,
 *    which the ICM will release. 
 *    (Note: this replaces ImageCodecPreCompress.)
 *  
 *  Parameters:
 *    
 *    ci:
 *      Component instance / instance globals.
 *    
 *    session:
 *      The compressor session reference. The compressor should store
 *      this in its globals; it will need it when calling the ICM back
 *      (eg, to call ICMEncodedFrameCreateMutable and
 *      ICMCompressorSessionEmitEncodedFrame). 
 *      This is not a CF type. Do not call CFRetain or CFRelease on it.
 *    
 *    compressionSessionOptions:
 *      The session options from the client. The compressor should
 *      retain this and use the settings to guide compression.
 *    
 *    imageDescription:
 *      The image description. The compressor may add image description
 *      extensions.
 *    
 *    reserved:
 *      Reserved for future use.  Ignore this parameter.
 *    
 *    compressorPixelBufferAttributesOut:
 *      The compressor should create a pixel buffer attributes
 *      dictionary and set compressorPixelBufferAttributesOut to it. 
 *      The ICM will release it.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function ImageCodecPrepareToCompressFrames( ci: ComponentInstance; session: ICMCompressorSessionRef; compressionSessionOptions: ICMCompressionSessionOptionsRef; imageDescription: ImageDescriptionHandle; reserved: UnivPtr; var compressorPixelBufferAttributesOut: CFDictionaryRef ): ComponentResult; external name '_ImageCodecPrepareToCompressFrames';
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)


{
 *  ImageCodecEncodeFrame()
 *  
 *  Summary:
 *    Presents the compressor with a frame to encode.
 *  
 *  Discussion:
 *    The compressor may encode the frame immediately or queue it for
 *    later encoding. If the compressor queues the frame for later
 *    decode, it must retain it (by calling
 *    ICMCompressorSourceFrameRetain) and release it when it is done
 *    with it (by calling ICMCompressorSourceFrameRelease). 
 *    Pixel buffers are guaranteed to conform to the pixel buffer
 *    attributes returned by ImageCodecPrepareToCompressFrames. 
 *     During multipass encoding, if the compressor requested the
 *    kICMCompressionPassMode_NoSourceFrames flag, the source frame
 *    pixel buffers may be NULL. 
 *    (Note: this replaces ImageCodecBandCompress.)
 *  
 *  Parameters:
 *    
 *    ci:
 *      Component instance / instance globals.
 *    
 *    sourceFrame:
 *      The source frame to encode.
 *    
 *    flags:
 *      Reserved; ignore.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function ImageCodecEncodeFrame( ci: ComponentInstance; sourceFrame: ICMCompressorSourceFrameRef; flags: UInt32 ): ComponentResult; external name '_ImageCodecEncodeFrame';
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)


{
 *  ImageCodecCompleteFrame()
 *  
 *  Summary:
 *    Directs the compressor to finish with a queued source frame,
 *    either emitting or dropping it.
 *  
 *  Discussion:
 *    This frame does not necessarily need to be the first or only
 *    source frame emitted or dropped during this call, but the
 *    compressor must call either ICMCompressorSessionDropFrame or
 *    ICMCompressorSessionEmitEncodedFrame with this frame before
 *    returning. 
 *    The ICM will call this function to force frames to be encoded for
 *    the following reasons: (a) the maximum frame delay count or
 *    maximum frame delay time in the compressionSessionOptions does
 *    not permit frames to be queued; (b) the client has called
 *    ICMCompressionSessionCompleteFrames.
 *  
 *  Parameters:
 *    
 *    ci:
 *      Component instance / instance globals.
 *    
 *    sourceFrame:
 *      The source frame that must be completed.
 *    
 *    flags:
 *      Reserved; ignore.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function ImageCodecCompleteFrame( ci: ComponentInstance; sourceFrame: ICMCompressorSourceFrameRef; flags: UInt32 ): ComponentResult; external name '_ImageCodecCompleteFrame';
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)


{
 *  ImageCodecBeginPass()
 *  
 *  Summary:
 *    Notifies the compressor that it should operate in multipass mode
 *    and use the given multipass storage.
 *  
 *  Parameters:
 *    
 *    ci:
 *      Component instance / instance globals.
 *    
 *    passModeFlags:
 *      Indicates how the compressor should operate in this pass. 
 *       If the kICMCompressionPassMode_WriteToMultiPassStorage flag is
 *      set, the compressor may gather information of interest and
 *      store it in multiPassStorage. 
 *      If the kICMCompressionPassMode_ReadFromMultiPassStorage flag is
 *      set, the compressor may retrieve information from
 *      multiPassStorage. 
 *      If the kICMCompressionPassMode_OutputEncodedFrames flag is set,
 *      the compressor must encode or drop every frame by calling
 *      ICMCompressorSessionDropFrame or
 *      ICMCompressorSessionEmitEncodedFrame. If that flag is not set,
 *      the compressor should not call these routines.
 *    
 *    flags:
 *      Reserved.  Ignore this parameter.
 *    
 *    multiPassStorage:
 *      The multipass storage object that the compressor should use to
 *      store and retrieve information between passes.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function ImageCodecBeginPass( ci: ComponentInstance; passModeFlags: ICMCompressionPassModeFlags; flags: UInt32; multiPassStorage: ICMMultiPassStorageRef ): ComponentResult; external name '_ImageCodecBeginPass';
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)


{
 *  ImageCodecEndPass()
 *  
 *  Summary:
 *    Notifies the compressor that a pass is over.
 *  
 *  Parameters:
 *    
 *    ci:
 *      Component instance / instance globals.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function ImageCodecEndPass( ci: ComponentInstance ): ComponentResult; external name '_ImageCodecEndPass';
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)


{
 *  ImageCodecProcessBetweenPasses()
 *  
 *  Summary:
 *    Gives the compressor an opportunity to perform processing between
 *    passes.
 *  
 *  Discussion:
 *    This function will be called repeatedly until it returns true in
 *    *interpassProcessingDoneOut. 
 *    The compressor may read and write to multiPassStorage. 
 *    The compressor should indicate which type of pass it would prefer
 *    to perform next by setting *requestedNextPassTypeOut.
 *  
 *  Parameters:
 *    
 *    ci:
 *      Component instance / instance globals.
 *    
 *    multiPassStorage:
 *      The multipass storage object that the compressor should use to
 *      store and retrieve information between passes.
 *    
 *    interpassProcessingDoneOut:
 *      Points to a Boolean. Set this to false if you want your
 *      ImageCodecProcessBetweenPasses function to be called again to
 *      perform more processing, true if not.
 *    
 *    requestedNextPassModeFlagsOut:
 *      Set *requestedNextPassModeFlagsOut to indicate the type of pass
 *      that should be performed next: 
 *      To recommend a repeated analysis pass, set it to
 *      kICMCompressionPassMode_ReadFromMultiPassStorage |
 *      kICMCompressionPassMode_WriteToMultiPassStorage. 
 *      To recommend a final encoding pass, set it to
 *      kICMCompressionPassMode_ReadFromMultiPassStorage |
 *      kICMCompressionPassMode_OutputEncodedFrames. 
 *      If source frame buffers are not necessary for the recommended
 *      pass (eg, because all the required data has been copied into
 *      multipass storage), set kICMCompressionPassMode_NoSourceFrames.
 *  
 *  Availability:
 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 }
function ImageCodecProcessBetweenPasses( ci: ComponentInstance; multiPassStorage: ICMMultiPassStorageRef; var interpassProcessingDoneOut: Boolean; var requestedNextPassModeFlagsOut: ICMCompressionPassModeFlags ): ComponentResult; external name '_ImageCodecProcessBetweenPasses';
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)


{ (Selector 61 skipped) }
{ (Selector 62 skipped) }
{ (Selector 63 skipped) }
{ (Selector 64 skipped) }
{ (Selector 65 skipped) }
{ (Selector 66 skipped) }
{
 *  ImageCodecPreflight()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecPreflight( ci: ComponentInstance; var params: CodecDecompressParams ): ComponentResult; external name '_ImageCodecPreflight';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecInitialize()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecInitialize( ci: ComponentInstance; var cap: ImageSubCodecDecompressCapabilities ): ComponentResult; external name '_ImageCodecInitialize';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecBeginBand()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecBeginBand( ci: ComponentInstance; var params: CodecDecompressParams; var drp: ImageSubCodecDecompressRecord; flags: SIGNEDLONG ): ComponentResult; external name '_ImageCodecBeginBand';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecDrawBand()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecDrawBand( ci: ComponentInstance; var drp: ImageSubCodecDecompressRecord ): ComponentResult; external name '_ImageCodecDrawBand';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecEndBand()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecEndBand( ci: ComponentInstance; var drp: ImageSubCodecDecompressRecord; result: OSErr; flags: SIGNEDLONG ): ComponentResult; external name '_ImageCodecEndBand';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecQueueStarting()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecQueueStarting( ci: ComponentInstance ): ComponentResult; external name '_ImageCodecQueueStarting';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecQueueStopping()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecQueueStopping( ci: ComponentInstance ): ComponentResult; external name '_ImageCodecQueueStopping';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecDroppingFrame()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecDroppingFrame( ci: ComponentInstance; const (*var*) drp: ImageSubCodecDecompressRecord ): ComponentResult; external name '_ImageCodecDroppingFrame';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecScheduleFrame()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0.2 and later
 *    Non-Carbon CFM:   in QuickTimeLib 4.0 and later
 *    Windows:          in qtmlClient.lib 4.0 and later
 }
function ImageCodecScheduleFrame( ci: ComponentInstance; const (*var*) drp: ImageSubCodecDecompressRecord; triggerProc: ImageCodecTimeTriggerUPP; triggerProcRefCon: UnivPtr ): ComponentResult; external name '_ImageCodecScheduleFrame';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecCancelTrigger()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0.2 and later
 *    Non-Carbon CFM:   in QuickTimeLib 4.0 and later
 *    Windows:          in qtmlClient.lib 4.0 and later
 }
function ImageCodecCancelTrigger( ci: ComponentInstance ): ComponentResult; external name '_ImageCodecCancelTrigger';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecDecodeBand()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
 *    CarbonLib:        not available
 *    Non-Carbon CFM:   not available
 *    Windows:          in qtmlClient.lib version 10.4 (or QuickTime 7.0) and later
 }
function ImageCodecDecodeBand( ci: ComponentInstance; var drp: ImageSubCodecDecompressRecord; flags: UNSIGNEDLONG ): ComponentResult; external name '_ImageCodecDecodeBand';
(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)


{ selectors for component calls }
const
	kImageCodecGetCodecInfoSelect = $0000;
	kImageCodecGetCompressionTimeSelect = $0001;
	kImageCodecGetMaxCompressionSizeSelect = $0002;
	kImageCodecPreCompressSelect = $0003;
	kImageCodecBandCompressSelect = $0004;
	kImageCodecPreDecompressSelect = $0005;
	kImageCodecBandDecompressSelect = $0006;
	kImageCodecBusySelect = $0007;
	kImageCodecGetCompressedImageSizeSelect = $0008;
	kImageCodecGetSimilaritySelect = $0009;
	kImageCodecTrimImageSelect = $000A;
	kImageCodecRequestSettingsSelect = $000B;
	kImageCodecGetSettingsSelect = $000C;
	kImageCodecSetSettingsSelect = $000D;
	kImageCodecFlushSelect = $000E;
	kImageCodecSetTimeCodeSelect = $000F;
	kImageCodecIsImageDescriptionEquivalentSelect = $0010;
	kImageCodecNewMemorySelect = $0011;
	kImageCodecDisposeMemorySelect = $0012;
	kImageCodecHitTestDataSelect = $0013;
	kImageCodecNewImageBufferMemorySelect = $0014;
	kImageCodecExtractAndCombineFieldsSelect = $0015;
	kImageCodecGetMaxCompressionSizeWithSourcesSelect = $0016;
	kImageCodecSetTimeBaseSelect = $0017;
	kImageCodecSourceChangedSelect = $0018;
	kImageCodecFlushFrameSelect = $0019;
	kImageCodecGetSettingsAsTextSelect = $001A;
	kImageCodecGetParameterListHandleSelect = $001B;
	kImageCodecGetParameterListSelect = $001C;
	kImageCodecCreateStandardParameterDialogSelect = $001D;
	kImageCodecIsStandardParameterDialogEventSelect = $001E;
	kImageCodecDismissStandardParameterDialogSelect = $001F;
	kImageCodecStandardParameterDialogDoActionSelect = $0020;
	kImageCodecNewImageGWorldSelect = $0021;
	kImageCodecDisposeImageGWorldSelect = $0022;
	kImageCodecHitTestDataWithFlagsSelect = $0023;
	kImageCodecValidateParametersSelect = $0024;
	kImageCodecGetBaseMPWorkFunctionSelect = $0025;
	kImageCodecLockBitsSelect = $0026;
	kImageCodecUnlockBitsSelect = $0027;
	kImageCodecRequestGammaLevelSelect = $0028;
	kImageCodecGetSourceDataGammaLevelSelect = $0029;
	kImageCodecGetDecompressLatencySelect = $002B;
	kImageCodecMergeFloatingImageOntoWindowSelect = $002C;
	kImageCodecRemoveFloatingImageSelect = $002D;
	kImageCodecGetDITLForSizeSelect = $002E;
	kImageCodecDITLInstallSelect = $002F;
	kImageCodecDITLEventSelect = $0030;
	kImageCodecDITLItemSelect = $0031;
	kImageCodecDITLRemoveSelect = $0032;
	kImageCodecDITLValidateInputSelect = $0033;
	kImageCodecGetPreferredChunkSizeAndAlignmentSelect = $0036;
	kImageCodecPrepareToCompressFramesSelect = $0037;
	kImageCodecEncodeFrameSelect = $0038;
	kImageCodecCompleteFrameSelect = $0039;
	kImageCodecBeginPassSelect = $003A;
	kImageCodecEndPassSelect = $003B;
	kImageCodecProcessBetweenPassesSelect = $003C;
	kImageCodecPreflightSelect = $0200;
	kImageCodecInitializeSelect = $0201;
	kImageCodecBeginBandSelect = $0202;
	kImageCodecDrawBandSelect = $0203;
	kImageCodecEndBandSelect = $0204;
	kImageCodecQueueStartingSelect = $0205;
	kImageCodecQueueStoppingSelect = $0206;
	kImageCodecDroppingFrameSelect = $0207;
	kImageCodecScheduleFrameSelect = $0208;
	kImageCodecCancelTriggerSelect = $0209;
	kImageCodecDecodeBandSelect = $020F;


const
	kMotionJPEGTag = FourCharCode('mjpg');
	kJPEGQuantizationTablesImageDescriptionExtension = FourCharCode('mjqt');
	kJPEGHuffmanTablesImageDescriptionExtension = FourCharCode('mjht');
	kFieldInfoImageDescriptionExtension = FourCharCode('fiel'); { image description extension describing the field count and field orderings}

const
	kFieldOrderUnknown = 0;
	kFieldsStoredF1F2DisplayedF1F2 = 1;
	kFieldsStoredF1F2DisplayedF2F1 = 2;
	kFieldsStoredF2F1DisplayedF1F2 = 5;
	kFieldsStoredF2F1DisplayedF2F1 = 6;

type
	MotionJPEGApp1MarkerPtr = ^MotionJPEGApp1Marker;
	MotionJPEGApp1Marker = record
		unused: SIGNEDLONG;
		tag: SIGNEDLONG;
		fieldSize: SIGNEDLONG;
		paddedFieldSize: SIGNEDLONG;
		offsetToNextField: SIGNEDLONG;
		qTableOffset: SIGNEDLONG;
		huffmanTableOffset: SIGNEDLONG;
		sofOffset: SIGNEDLONG;
		sosOffset: SIGNEDLONG;
		soiOffset: SIGNEDLONG;
	end;
type
	FieldInfoImageDescriptionExtensionPtr = ^FieldInfoImageDescriptionExtension;
	FieldInfoImageDescriptionExtension = record
		fieldCount: UInt8;
		fieldOrderings: UInt8;
	end;

{
 *  QTPhotoSetSampling()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function QTPhotoSetSampling( codec: ComponentInstance; yH: SInt16; yV: SInt16; cbH: SInt16; cbV: SInt16; crH: SInt16; crV: SInt16 ): ComponentResult; external name '_QTPhotoSetSampling';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  QTPhotoSetRestartInterval()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function QTPhotoSetRestartInterval( codec: ComponentInstance; restartInterval: UInt16 ): ComponentResult; external name '_QTPhotoSetRestartInterval';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  QTPhotoDefineHuffmanTable()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function QTPhotoDefineHuffmanTable( codec: ComponentInstance; componentNumber: SInt16; isDC: Boolean; lengthCounts: UInt8Ptr; values: UInt8Ptr ): ComponentResult; external name '_QTPhotoDefineHuffmanTable';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  QTPhotoDefineQuantizationTable()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function QTPhotoDefineQuantizationTable( codec: ComponentInstance; componentNumber: SInt16; table: UInt8Ptr ): ComponentResult; external name '_QTPhotoDefineQuantizationTable';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{ selectors for component calls }
const
	kQTPhotoSetSamplingSelect = $0100;
	kQTPhotoSetRestartIntervalSelect = $0101;
	kQTPhotoDefineHuffmanTableSelect = $0102;
	kQTPhotoDefineQuantizationTableSelect = $0103;

{
 *  Summary:
 *    Properties for image compressor components
 }
const
{
   * Property class for image compressor components.
   }
	kQTPropertyClass_ImageCompressor = FourCharCode('imco');


{
 *  Summary:
 *    Enforced properties for image compressor components
 *  
 *  Discussion:
 *    Image compressors that sometimes or always restrict image
 *    dimensions, clean aperture and/or pixel aspect ratio should
 *    support these properties. 
 *    If these properties can change dynamically for a compressor (eg,
 *    in response to user interaction) then the properties should be
 *    listenable, and the compressor should call the listeners whenever
 *    the properties change. (In this case, the component's
 *    GetComponentPropertyInfo function should set the
 *    kComponentPropertyFlagWillNotifyListeners flag.) 
 *    If a compressor has a mode in which these properties are
 *    flexible, then when the component is in that mode, (a) the
 *    component's GetComponentProperty function should return
 *    kQTPropertyAskLaterErr for these properties, and (b) the
 *    component's GetComponentPropertyInfo function should set the
 *    kComponentPropertyFlagCanGetLater flag for these properties.
 }
const
{
   * The encoded width enforced for compressed frames.
   }
	kICMImageCompressorPropertyID_EnforcedEncodedWidth = FourCharCode('enwi'); { SInt32, Read/Sometimes Listen }

  {
   * The encoded height enforced for compressed frames.
   }
	kICMImageCompressorPropertyID_EnforcedEncodedHeight = FourCharCode('enhe'); { SInt32, Read/Sometimes Listen }

  {
   * The clean aperture enforced for compressed frames.
   }
	kICMImageCompressorPropertyID_EnforcedCleanAperture = FourCharCode('encl'); { CleanApertureImageDescriptionExtension, Read/Sometimes Listen }

  {
   * The pixel aspect ratio enforced for compressed frames.
   }
	kICMImageCompressorPropertyID_EnforcedPixelAspectRatio = FourCharCode('enpa'); { PixelAspectRatioImageDescriptionExtension, Read/Sometimes Listen }

  {
   * The number and order of fields enforced for compressed frames.
   }
	kICMImageCompressorPropertyID_EnforcedFieldInfo = FourCharCode('enfi'); { FieldInfoImageDescriptionExtension2, Read/Sometimes Listen }


{
 *  Summary:
 *    DV Compressor Component Properties.
 }
const
{
   * Property class for DV compressors.  (Applicable to DV25, DV50,
   * NTSC, PAL, PROPAL.)
   }
	kQTPropertyClass_DVCompressor = FourCharCode('dvco');

  {
   * If set, indicates that the compressed frames should be marked as
   * progressive-scan. By default, this flag is clear, meaning that
   * frames should be marked as interlaced.
   }
	kDVCompressorPropertyID_ProgressiveScan = FourCharCode('prog'); { Boolean, Read/Write }

  {
   * If set, indicates that the compressor should use a 16:9 picture
   * aspect ratio. If clear, the compressor will use the default 4:3
   * picture aspect ratio.
   }
	kDVCompressorPropertyID_AspectRatio16x9 = FourCharCode('16x9'); { Boolean, Read/Write }


{ source identifier -- placed in root container of description, one or more required }
const
	kEffectSourceName = FourCharCode('src ');


{ source type -- placed in the input map to identify the source kind }
const
	kEffectDataSourceType = FourCharCode('dtst');

{  default effect types }
const
	kEffectRawSource = 0;    { the source is raw image data}
	kEffectGenericType = FourCharCode('geff'); { generic effect for combining others}

type
	EffectSourcePtr = ^EffectSource;
	SourceDataPtr = ^SourceData;
	SourceData = record
		case SInt16 of
		0: (
			image:				CDSequenceDataSourcePtr;
			);
		1: (
			effect:				EffectSourcePtr;
			);
	end;


	EffectSource = record
		effectType: SIGNEDLONG;             { type of effect or kEffectRawSource if raw ICM data}
		data: Ptr;                   { track data for this effect}
		source: SourceData;                 { source/effect pointers}
		next: EffectSourcePtr;                   { the next source for the parent effect}

                                              { fields added for QuickTime 4.0}
		lastTranslatedFrameTime: TimeValue; { start frame time of last converted frame, may be -1}
		lastFrameDuration: TimeValue;      { duration of the last converted frame, may be zero}
		lastFrameTimeScale: TimeValue;     { time scale of this source frame, only has meaning if above fields are valid}
	end;

type
	ICMFrameTimeRecord_QT3Ptr = ^ICMFrameTimeRecord_QT3;
	ICMFrameTimeRecord_QT3 = record
		value: wide;                  { frame display time}
		scale: SIGNEDLONG;                  { timescale of value/duration fields}
		base: UnivPtr;                   { timebase}

		duration: SIGNEDLONG;               { duration frame is to be displayed (0 if unknown)}
		rate: Fixed;                   { rate of timebase relative to wall-time}

		recordSize: SIGNEDLONG;             { total number of bytes in ICMFrameTimeRecord}

		frameNumber: SIGNEDLONG;            { number of frame, zero if not known}

		flags: SIGNEDLONG;

		virtualStartTime: wide;       { conceptual start time}
		virtualDuration: SIGNEDLONG;        { conceptual duration}
	end;
type
	EffectsFrameParamsPtr = ^EffectsFrameParams;
	EffectsFrameParams = record
		frameTime: ICMFrameTimeRecord_QT3;          { timing data (uses non-extended ICMFrameTimeRecord)}
		effectDuration: SIGNEDLONG;         { the duration of a single effect frame}
		doAsync: Boolean;                { set to true if the effect can go async}
		pad: array[0..2] of UInt8;
		source: EffectSourcePtr;                 { ptr to the source input tree}
		refCon: UnivPtr;                 { storage for the effect}
	end;

{
 *  ImageCodecEffectSetup()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecEffectSetup( effect: ComponentInstance; var p: CodecDecompressParams ): ComponentResult; external name '_ImageCodecEffectSetup';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecEffectBegin()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecEffectBegin( effect: ComponentInstance; var p: CodecDecompressParams; ePtr: EffectsFrameParamsPtr ): ComponentResult; external name '_ImageCodecEffectBegin';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecEffectRenderFrame()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecEffectRenderFrame( effect: ComponentInstance; p: EffectsFrameParamsPtr ): ComponentResult; external name '_ImageCodecEffectRenderFrame';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecEffectConvertEffectSourceToFormat()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecEffectConvertEffectSourceToFormat( effect: ComponentInstance; sourceToConvert: EffectSourcePtr; requestedDesc: ImageDescriptionHandle ): ComponentResult; external name '_ImageCodecEffectConvertEffectSourceToFormat';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecEffectCancel()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecEffectCancel( effect: ComponentInstance; p: EffectsFrameParamsPtr ): ComponentResult; external name '_ImageCodecEffectCancel';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecEffectGetSpeed()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function ImageCodecEffectGetSpeed( effect: ComponentInstance; parameters: QTAtomContainer; var pFPS: Fixed ): ComponentResult; external name '_ImageCodecEffectGetSpeed';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


const
	kSMPTENoFlag = 0;
	kSMPTESmoothEdgeFlag = $01; { smooth edges of the stroke}
	kSMPTEStrokeEdgeFlag = $02;  { stroke edge with color}

type
	SMPTEFlags = SIGNEDLONG;
	SMPTEFrameReference = SIGNEDLONG;
const
	kSlideHorizontalWipe = 1;
	kSlideVerticalWipe = 2;
	kTopLeftWipe = 3;
	kTopRightWipe = 4;
	kBottomRightWipe = 5;
	kBottomLeftWipe = 6;
	kFourCornerWipe = 7;
	kFourBoxWipe = 8;
	kBarnVerticalWipe = 21;
	kBarnHorizontalWipe = 22;
	kTopCenterWipe = 23;
	kRightCenterWipe = 24;
	kBottomCenterWipe = 25;
	kLeftCenterWipe = 26;
	kDiagonalLeftDownWipe = 41;
	kDiagonalRightDownWipe = 42;
	kTopBottomBowTieWipe = 43;
	kLeftRightBowTieWipe = 44;
	kDiagonalLeftOutWipe = 45;
	kDiagonalRightOutWipe = 46;
	kDiagonalCrossWipe = 47;
	kDiagonalBoxWipe = 48;
	kFilledVWipe = 61;
	kFilledVRightWipe = 62;
	kFilledVBottomWipe = 63;
	kFilledVLeftWipe = 64;
	kHollowVWipe = 65;
	kHollowVRightWipe = 66;
	kHollowVBottomWipe = 67;
	kHollowVLeftWipe = 68;
	kVerticalZigZagWipe = 71;
	kHorizontalZigZagWipe = 72;
	kVerticalBarnZigZagWipe = 73;
	kHorizontalBarnZigZagWipe = 74;

const
	kRectangleWipe = 101;
	kDiamondWipe = 102;
	kTriangleWipe = 103;
	kTriangleRightWipe = 104;
	kTriangleUpsideDownWipe = 105;
	kTriangleLeftWipe = 106;
	kSpaceShipWipe = 107;
	kSpaceShipRightWipe = 108;
	kSpaceShipUpsideDownWipe = 109;
	kSpaceShipLeftWipe = 110;
	kPentagonWipe = 111;
	kPentagonUpsideDownWipe = 112;
	kHexagonWipe = 113;
	kHexagonSideWipe = 114;
	kCircleWipe = 119;
	kOvalWipe = 120;
	kOvalSideWipe = 121;
	kCatEyeWipe = 122;
	kCatEyeSideWipe = 123;
	kRoundRectWipe = 124;
	kRoundRectSideWipe = 125;
	kFourPointStarWipe = 127;
	kFivePointStarWipe = 128;
	kStarOfDavidWipe = 129;
	kHeartWipe = 130;
	kKeyholeWipe = 131;

const
	kRotatingTopWipe = 201;
	kRotatingRightWipe = 202;
	kRotatingBottomWipe = 203;
	kRotatingLeftWipe = 204;
	kRotatingTopBottomWipe = 205;
	kRotatingLeftRightWipe = 206;
	kRotatingQuadrantWipe = 207;
	kTopToBottom180Wipe = 211;
	kRightToLeft180Wipe = 212;
	kTopToBottom90Wipe = 213;
	kRightToLeft90Wipe = 214;
	kTop180Wipe = 221;
	kRight180Wipe = 222;
	kBottom180Wipe = 223;
	kLeft180Wipe = 224;
	kCounterRotatingTopBottomWipe = 225;
	kCounterRotatingLeftRightWipe = 226;
	kDoubleRotatingTopBottomWipe = 227;
	kDoubleRotatingLeftRightWipe = 228;
	kVOpenTopWipe = 231;
	kVOpenRightWipe = 232;
	kVOpenBottomWipe = 233;
	kVOpenLeftWipe = 234;
	kVOpenTopBottomWipe = 235;
	kVOpenLeftRightWipe = 236;
	kRotatingTopLeftWipe = 241;
	kRotatingBottomLeftWipe = 242;
	kRotatingBottomRightWipe = 243;
	kRotatingTopRightWipe = 244;
	kRotatingTopLeftBottomRightWipe = 245;
	kRotatingBottomLeftTopRightWipe = 246;
	kRotatingTopLeftRightWipe = 251;
	kRotatingLeftTopBottomWipe = 252;
	kRotatingBottomLeftRightWipe = 253;
	kRotatingRightTopBottomWipe = 254;
	kRotatingDoubleCenterRightWipe = 261;
	kRotatingDoubleCenterTopWipe = 262;
	kRotatingDoubleCenterTopBottomWipe = 263;
	kRotatingDoubleCenterLeftRightWipe = 264;

const
	kHorizontalMatrixWipe = 301;
	kVerticalMatrixWipe = 302;
	kTopLeftDiagonalMatrixWipe = 303;
	kTopRightDiagonalMatrixWipe = 304;
	kBottomRightDiagonalMatrixWipe = 305;
	kBottomLeftDiagonalMatrixWipe = 306;
	kClockwiseTopLeftMatrixWipe = 310;
	kClockwiseTopRightMatrixWipe = 311;
	kClockwiseBottomRightMatrixWipe = 312;
	kClockwiseBottomLeftMatrixWipe = 313;
	kCounterClockwiseTopLeftMatrixWipe = 314;
	kCounterClockwiseTopRightMatrixWipe = 315;
	kCounterClockwiseBottomRightMatrixWipe = 316;
	kCounterClockwiseBottomLeftMatrixWipe = 317;
	kVerticalStartTopMatrixWipe = 320;
	kVerticalStartBottomMatrixWipe = 321;
	kVerticalStartTopOppositeMatrixWipe = 322;
	kVerticalStartBottomOppositeMatrixWipe = 323;
	kHorizontalStartLeftMatrixWipe = 324;
	kHorizontalStartRightMatrixWipe = 325;
	kHorizontalStartLeftOppositeMatrixWipe = 326;
	kHorizontalStartRightOppositeMatrixWipe = 327;
	kDoubleDiagonalTopRightMatrixWipe = 328;
	kDoubleDiagonalBottomRightMatrixWipe = 329;
	kDoubleSpiralTopMatixWipe = 340;
	kDoubleSpiralBottomMatixWipe = 341;
	kDoubleSpiralLeftMatixWipe = 342;
	kDoubleSpiralRightMatixWipe = 343;
	kQuadSpiralVerticalMatixWipe = 344;
	kQuadSpiralHorizontalMatixWipe = 345;
	kVerticalWaterfallLeftMatrixWipe = 350;
	kVerticalWaterfallRightMatrixWipe = 351;
	kHorizontalWaterfallLeftMatrixWipe = 352;
	kHorizontalWaterfallRightMatrixWipe = 353;
	kRandomWipe = 409;  { non-SMPTE standard numbers}
	kRandomWipeGroupWipe = 501;
	kRandomIrisGroupWipe = 502;
	kRandomRadialGroupWipe = 503;
	kRandomMatrixGroupWipe = 504;

type
	SMPTEWipeType = UNSIGNEDLONG;
{
 *  ImageCodecEffectPrepareSMPTEFrame()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0.2 and later
 *    Non-Carbon CFM:   in QuickTimeLib 4.0 and later
 *    Windows:          in qtmlClient.lib 4.0 and later
 }
function ImageCodecEffectPrepareSMPTEFrame( effect: ComponentInstance; destPixMap: PixMapPtr; var returnValue: SMPTEFrameReference ): ComponentResult; external name '_ImageCodecEffectPrepareSMPTEFrame';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecEffectDisposeSMPTEFrame()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0.2 and later
 *    Non-Carbon CFM:   in QuickTimeLib 4.0 and later
 *    Windows:          in qtmlClient.lib 4.0 and later
 }
function ImageCodecEffectDisposeSMPTEFrame( effect: ComponentInstance; frameRef: SMPTEFrameReference ): ComponentResult; external name '_ImageCodecEffectDisposeSMPTEFrame';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  ImageCodecEffectRenderSMPTEFrame()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0.2 and later
 *    Non-Carbon CFM:   in QuickTimeLib 4.0 and later
 *    Windows:          in qtmlClient.lib 4.0 and later
 }
function ImageCodecEffectRenderSMPTEFrame( effect: ComponentInstance; destPixMap: PixMapPtr; frameRef: SMPTEFrameReference; effectPercentageEven: Fixed; effectPercentageOdd: Fixed; var pSourceRect: Rect; var matrixP: MatrixRecord; effectNumber: SMPTEWipeType; xRepeat: SIGNEDLONG; yRepeat: SIGNEDLONG; flags: SMPTEFlags; penWidth: Fixed; strokeValue: SIGNEDLONG ): ComponentResult; external name '_ImageCodecEffectRenderSMPTEFrame';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{ selectors for component calls }
const
	kImageCodecEffectSetupSelect = $0300;
	kImageCodecEffectBeginSelect = $0301;
	kImageCodecEffectRenderFrameSelect = $0302;
	kImageCodecEffectConvertEffectSourceToFormatSelect = $0303;
	kImageCodecEffectCancelSelect = $0304;
	kImageCodecEffectGetSpeedSelect = $0305;
	kImageCodecEffectPrepareSMPTEFrameSelect = $0100;
	kImageCodecEffectDisposeSMPTEFrameSelect = $0101;
	kImageCodecEffectRenderSMPTEFrameSelect = $0102;


{ curve atom types and data structures }
const
	kCurvePathAtom = FourCharCode('path');
	kCurveEndAtom = FourCharCode('zero');
	kCurveAntialiasControlAtom = FourCharCode('anti');
	kCurveAntialiasOff = 0;
	kCurveAntialiasOn = $FFFFFFFF;
	kCurveFillTypeAtom = FourCharCode('fill');
	kCurvePenThicknessAtom = FourCharCode('pent');
	kCurveMiterLimitAtom = FourCharCode('mitr');
	kCurveJoinAttributesAtom = FourCharCode('join');
	kCurveMinimumDepthAtom = FourCharCode('mind');
	kCurveDepthAlwaysOffscreenMask = $80000000;
	kCurveTransferModeAtom = FourCharCode('xfer');
	kCurveGradientAngleAtom = FourCharCode('angl');
	kCurveGradientRadiusAtom = FourCharCode('radi');
	kCurveGradientOffsetAtom = FourCharCode('cent');

const
	kCurveARGBColorAtom = FourCharCode('argb');

type
	ARGBColorPtr = ^ARGBColor;
	ARGBColor = record
		alpha: UInt16;
		red: UInt16;
		green: UInt16;
		blue: UInt16;
	end;
const
	kCurveGradientRecordAtom = FourCharCode('grad');

type
	GradientColorRecordPtr = ^GradientColorRecord;
	GradientColorRecord = record
		thisColor: ARGBColor;
		endingPercentage: Fixed;
	end;
type
	GradientColorPtr = GradientColorRecordPtr;
const
	kCurveGradientTypeAtom = FourCharCode('grdt');

{ currently supported gradient types }
const
	kLinearGradient = 0;
	kCircularGradient = 1;

type
	GradientType = SIGNEDLONG;
{
 *  CurveGetLength()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveGetLength( effect: ComponentInstance; var target: gxPaths; index: SIGNEDLONG; var wideLength: wide ): ComponentResult; external name '_CurveGetLength';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveLengthToPoint()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveLengthToPoint( effect: ComponentInstance; var target: gxPaths; index: SIGNEDLONG; length: Fixed; var location: FixedPoint; var tangent: FixedPoint ): ComponentResult; external name '_CurveLengthToPoint';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveNewPath()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveNewPath( effect: ComponentInstance; var pPath: Handle ): ComponentResult; external name '_CurveNewPath';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveCountPointsInPath()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveCountPointsInPath( effect: ComponentInstance; var aPath: gxPaths; contourIndex: UNSIGNEDLONG; var pCount: UNSIGNEDLONG ): ComponentResult; external name '_CurveCountPointsInPath';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveGetPathPoint()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveGetPathPoint( effect: ComponentInstance; var aPath: gxPaths; contourIndex: UNSIGNEDLONG; pointIndex: UNSIGNEDLONG; var thePoint: gxPoint; var ptIsOnPath: Boolean ): ComponentResult; external name '_CurveGetPathPoint';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveInsertPointIntoPath()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveInsertPointIntoPath( effect: ComponentInstance; var aPoint: gxPoint; thePath: Handle; contourIndex: UNSIGNEDLONG; pointIndex: UNSIGNEDLONG; ptIsOnPath: Boolean ): ComponentResult; external name '_CurveInsertPointIntoPath';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveSetPathPoint()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveSetPathPoint( effect: ComponentInstance; var aPath: gxPaths; contourIndex: UNSIGNEDLONG; pointIndex: UNSIGNEDLONG; var thePoint: gxPoint; ptIsOnPath: Boolean ): ComponentResult; external name '_CurveSetPathPoint';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveGetNearestPathPoint()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveGetNearestPathPoint( effect: ComponentInstance; var aPath: gxPaths; var thePoint: FixedPoint; var contourIndex: UNSIGNEDLONG; var pointIndex: UNSIGNEDLONG; var theDelta: Fixed ): ComponentResult; external name '_CurveGetNearestPathPoint';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurvePathPointToLength()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurvePathPointToLength( ci: ComponentInstance; var aPath: gxPaths; startDist: Fixed; endDist: Fixed; var thePoint: FixedPoint; var pLength: Fixed ): ComponentResult; external name '_CurvePathPointToLength';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveCreateVectorStream()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveCreateVectorStream( effect: ComponentInstance; var pStream: Handle ): ComponentResult; external name '_CurveCreateVectorStream';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveAddAtomToVectorStream()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveAddAtomToVectorStream( effect: ComponentInstance; atomType: OSType; atomSize: Size; pAtomData: UnivPtr; vectorStream: Handle ): ComponentResult; external name '_CurveAddAtomToVectorStream';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveAddPathAtomToVectorStream()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveAddPathAtomToVectorStream( effect: ComponentInstance; pathData: Handle; vectorStream: Handle ): ComponentResult; external name '_CurveAddPathAtomToVectorStream';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveAddZeroAtomToVectorStream()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveAddZeroAtomToVectorStream( effect: ComponentInstance; vectorStream: Handle ): ComponentResult; external name '_CurveAddZeroAtomToVectorStream';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{
 *  CurveGetAtomDataFromVectorStream()
 *  
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 3.0 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 }
function CurveGetAtomDataFromVectorStream( effect: ComponentInstance; vectorStream: Handle; atomType: SIGNEDLONG; var dataSize: SIGNEDLONG; var dataPtr: Ptr ): ComponentResult; external name '_CurveGetAtomDataFromVectorStream';
(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)


{ selectors for component calls }
const
	kCurveGetLengthSelect = $0100;
	kCurveLengthToPointSelect = $0101;
	kCurveNewPathSelect = $0102;
	kCurveCountPointsInPathSelect = $0103;
	kCurveGetPathPointSelect = $0104;
	kCurveInsertPointIntoPathSelect = $0105;
	kCurveSetPathPointSelect = $0106;
	kCurveGetNearestPathPointSelect = $0107;
	kCurvePathPointToLengthSelect = $0108;
	kCurveCreateVectorStreamSelect = $0109;
	kCurveAddAtomToVectorStreamSelect = $010A;
	kCurveAddPathAtomToVectorStreamSelect = $010B;
	kCurveAddZeroAtomToVectorStreamSelect = $010C;
	kCurveGetAtomDataFromVectorStreamSelect = $010D;
{ UPP call backs }

{$endc} {not TARGET_CPU_64}

{$endc} {TARGET_OS_MAC}
{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}

end.
{$endc} {not MACOSALLINCLUDE}