Data structures used in the RIFF chunks are defined in the AVIFMT.H header file. The reference section which follows describes the data structures that are used for the main AVI header, stream headers and AVI index chunks.