AIF Toolkit
From Adobe Labs
| Table of contents |
Introduction to the Adobe Image Foundation Toolkit Technology Preview Release 2
This Adobe Image Foundation (AIF) Toolkit Preview Release 2 includes a high-performance graphics programming language that Adobe is developing for image processing, codenamed Hydra, and an application to create, compile and preview Hydra filters and effects. The toolkit contains a specification for the Hydra language, several sample filters, and sample images provided by AIF team members. The AIF technology delivers a common image and video processing infrastructure which provides automatic runtime optimization on heterogeneous hardware. It currently ships in After Effects CS3 and will be used in other Adobe products in the future. The next release of Flash Player, codenamed Astro, will leverage Hydra to enable developers to create custom filters, effects and blend modes.
Hydra is a programming language used to implement image processing algorithms in a hardware-independent manner. Some benefits of Hydra include:
- Familiar syntax that is based on GLSL, which is C-based
- Allows the same filter to run efficiently on different GPU and CPU architectures, including multi-core and multiprocessor systems
- Abstraction of the complexity of executing on heterogeneous hardware
- Supports 3rd party creation and sharing of filters and effects
- Delivers excellent image processing performance in Adobe products
For more details, please see the Hydra language specification that is included in the AIF Toolkit.
If you would like to see the AIF presentation from the 2007 Adobe Max Conference, it is available for download as PDF from here.
Note: Your use of this site including software downloads, submission of comments, ideas, feature requests and techniques on this and other Adobe maintained forums, as well as Adobe’s rights to use such materials, is governed by the Terms of Use.
System Requirements
The minimum system requirements for the AIF Toolkit are:
Windows
- Pentium 4 or greater Processor
- 512 MB of Memory
- 50 MB of Disk Space
- Windows XP SP2 or greater
Macintosh
- G4/G5/Intel Processor
- 512 MB of Memory
- 80 MB of Disk Space
- OS X 10.4.10 or greater
Video Card Support
The following table lists the video cards supported by the AIF Toolkit.
Note: AIF Toolkit Preview Release 2 supports filter execution on the GPU and the CPU. Support for software-based rendering is available in this updated preview release.
| Manufacturer | Series | Model Numbers |
|---|---|---|
| NVIDIA | QuadroFX Series | FX 5500 SDI, FX 4500 SDI, FX 5600, FX 5500, FX 4600, FX 4500 X2, FX 4500, FX 4400 (discontinued, replaced by the FX 4500), FX 4000 SDI, FX 3500, FX 3450, FX 1700, FX 1500, FX GO 1400, FX 1400, FX 1300, FX 570, FX 560, FX 550, FX 540, FX 370, FX 350 |
| 9 Series | GeForce 9800 GTX, GeForce 9800 GX2 | |
| 8 Series | GeForce 8800 GTS/GTX/Ultra, GeForce 8600M GT, GeForce 8500 GT | |
| 7 Series | GeForce 7950 GT/GS, GeForce 7900, GeForce 7800, GeForce 7600, GeForce 7300, GeForce 7200 GS, GeForce 7100 | |
| 6 Series | 6800 Ultra, 6800 GT, 6800 GS, 6800, 6800 XT, 6600, 6500, 6200, 6200 TurboCache, 6200 LE, 6100, 6150 | |
| AMD/ATI | Radeon HD3800 series | |
| Radeon HD2000 Series | HD2900, HD2600, HD2400 | |
| Radeon X1000 Series | X1950, X1900, X1800, X1650, X1600, X1300, "All In Wonder" X1900 (X1900 GPU), "All In Wonder" 2006 PCI Express cards (Based on X1300 GPU) | |
| FireGL | Avivo PCI Express, V8650, V8600, V7600, V5600, V3600, V3300, V3400, V5200, V7200, V7300, V7350 |
Installation Instructions
Installing the AIF Toolkit Technology Preview Release 2 is a simple process. Please note that installing this release will replace the Preview 1 release if it was installed on your system.
To install the AIF Toolkit:
Windows
- Download theAIF Toolkit ZIP file.
- Unzip the package, navigate to the unzipped location, and run the Setup.exe application.
- The AIF Toolkit files will be installed into your \Program Files folder under \Program Files\Adobe\Adobe Utilities\AIF Toolkit.
Macintosh
- Download the AIF Toolkit DMG file.
- Double-click on the DMG item to mount the installer virtual disk.
- In that virtual disk, there is a Setup application, double-click to launch it.
- The AIF Toolkit files will be installed into your Applications folder under /Applications/Utilities/Adobe Utilities/AIF Toolkit.
To uninstall the AIF Toolkit:
Windows: Use the "Add or Remove Programs" helper from the Control
Panel.
Macintosh: Use the uninstaller application for the AIF Toolkit under "/Applications/Utilities/Adobe Installers".
Getting Started
Note: If you installed AIF Toolkit Preview Release 1, you must review What Has Changed in Preview Release 2 and make required changes to existing Hydra files.
Windows
- Launch the AIF Toolkit from the Start menu: Adobe Image Foundation Toolkit\AIF Toolkit.
- Load a Hydra file into the toolkit by choosing "Open Hydra File" from the File menu or by pressing Ctrl-O.
- To try the filter, click on the Run button on the bottom right corner, underneath the code editor window.
- If the filter requires an image for processing, you will be prompted to open an image file. If the filter has parameters, you will see editing controls in the panel on the right edge of the application.
Macintosh
- Launch the AIF Toolkit from the Applications Folder: /Applications/Utilites/Adobe Utilities/AIF Toolkit/AIF Toolkit.
- Load a Hydra file into the toolkit by choosing "Open Hydra File" from the File menu or by pressing Cmd-O.
- To try the filter, click on the Run button on the bottom right corner underneath the code editor window.
- If the filter requires an image for processing, you will be prompted to open an image file. If the filter has parameters, you will see editing controls in the panel on the right edge of the application.
Tutorials
A tutorial describing how to write a simple Hydra filter is available as HTML or PDF.
Hydra Gallery
Share your own Hydra filter creations by posting them to the Hydra Gallery.
What Has Changed in Preview Release 2
This section contains a list of changes and new features in AIF Toolkit Preview Release 2. Some of these changes will break existing Hydra scripts.
- Supports both GPU and CPU execution of Hydra filters. A filter will automatically run on the CPU if your graphics card is not supported by the application.
- Supports user preferences and their persistence across application launches. The preferences include:
- Flash Warnings and Errors - with this preference checked, Hydra code will be checked for validity against the subset of Hydra that Flash Player supports.
- Render on Idle - this setting determines if the toolkit should try to render as often as possible. You may choose to turn off this setting to conserve power when running using battery power on a laptop.
- Force filters - this setting forces your Hydra code to run on the CPU even if your graphics card is supported by the application.
- Supports exporting a Hydra filter as Hydra Byte Code for future use with Astro.
- Installs to a new location on your hard drive. Any pre-existing symlinks or shortcuts created against AIF Toolkit Preview Release 1 will stop working.
- There have been some changes and additions to the Hydra language. Details of the changes and additions:
- Conditionals are supported in Flash-compatible Hydra - you are now able to use 'if' statements in your Hydra for Flash programs.
- A languageVersion statement is now compulsory in Hydra files - the language version must be the first interpreted line in a Hydra file(comments excepted). This change requires updates to any existing filters.
Examples of usage:
- <languageVersion : 1.0;>
- kernel SingleDefringe
- <languageVersion : 1.0;>
- library PSBlendModes
- Images are now parameters - images are now available by name in the kernel scope instead of the evaluatePixel scope. That means that they can be used more easily in the per-frame functions like evaluateDependents and the region reasoning functions.
In addition, the function signatures for the needed and changed functions have been simplified. The input_index has been replaced by an imageRef and the domain of definition array is no longer passed in. There is a new built-in function – "dod" – that returns the domain of definition of an image. These changes require updates to any existing filters.
Here's an example of the old and new syntax:
- kernel OldSyntax
- {
- parameter float k;
- void evaluatePixel(
- in image4 foreground,
- in image4 background,
- out pixel4 result)
- {
- pixel4 fp = sample( foreground, outCoord() );
- pixel4 bp = sample( background, outCoord() );
- void evaluatePixel(
- result = mix( fp, bp, k );
- }
- region needed(
- region output_region,
- int input_index,
- region input_DOD[])
- {
- if (input_index == imageIndex( background ))
- return input_DOD[ imageIndex( background ) ];
- else
- return output_region;
- if (input_index == imageIndex( background ))
- }
- region needed(
- }
- <languageVersion : 1.0;>
- kernel NewSyntax
- {
- parameter float k;
- input image4 foreground;
- input image4 background;
- output pixel4 result;
- void evaluatePixel()
- {
- pixel4 fp = sample( foreground, tCoord() );
- pixel4 bp = sample( background, tCoord() );
- result = mix( fp, bp, k );
- }
- region needed(
- region output_region,
- imageRef input_image)
- {
- if( input_image == background ) )
- return dod( background );
- else
- return output_region;
- if( input_image == background ) )
- }
- region needed(
- }
- There are two new built-in functions in Hydra to support pixel aspect ratio (PAR):
float2 pixelSize(image)
float pixelAspectRatio(image)
You can use these functions anywhere inside the kernel, as long as the image parameters to both functions are the declared global input or output image variables.
Here are a few examples:
- <languageVersion : 1.0;>
- kernel Test
- {
- input image4 src;
- output float4 dst;
- void evaluatePixel()
- {
- float2 srcSize = pixelSize( src );
- float2 dstSize = pixelSize( dst );
- float srcPar = pixelAspectRatio( src );
- dst = sample( src, outCoord() );
- }
- }
- =============================
- <languageVersion : 1.0;>
- kernel PixelSize
- {
- input image4 src;
- output pixel4 dst;
- dependent float2 srcSize;
- dependent float2 dstSize;
- dependent float srcPAR;
- void evaluateDependents()
- {
- srcSize = pixelSize(src);
- dstSize = pixelSize(dst);
- srcPAR = pixelAspectRatio(src);
- }
- void evaluatePixel()
- {
- dst = sample( src, outCoord() );
- dst.xy = srcSize;
- float temp = srcPAR;
- }
- }
- =============================
- <languageVersion : 1.0;>
- kernel Test
- {
- input image4 src;
- output float4 dst;
- region changed(region output_region, imageRef i )
- {
- float2 size = pixelSize(i);
- float par = pixelAspectRatio(i);
- return dod( i );
- }
- void evaluatePixel()
- {
- dst = sample(src, outCoord());
- }
- }
Known Issues
- Some generator filters cause poor performance or may cause the Toolkit to hang when run on the CPU.
- Workaround: Run the filter on the GPU.
- The Toolkit does not support loading .exr files.
- Workaround: None. This issue will be addressed in a subsequent release.
- On some Mac systems, installing AIF Toolkit Preview Release 2 after having installed AIF Toolkit Preview Release 1 fails to remove the files installed with AIF Toolkit Preview Release 1. In some cases, the files are removed but empty folders remain.
- Workaround: Manually remove the files in the "/Applications/AIF Toolkit" folder after installing AIF Toolkit Preview Release 2.
- On a Mac, when installing the AIF Toolkit Preview Release 2, the installer Options screen displays the installation path as /Applications/Utilities/Adobe Utilities.localized/AIF Toolkit. The files are actually installed in /Applications/Utilities/Adobe Utilities/AIF Toolkit.
- Workaround: None.
Discussion Forum
Discuss the AIF Toolkit in the Labs forums
FAQ's
This section will be updated from time to time with answers to questions frequently asked in the Discussion area. If you don't see your question answered here, click on the Discussion tab to send us your questions or feedback.
