NetBSD/usr.bin/file/magdir/animation

135 lines
5.4 KiB
Plaintext

#------------------------------------------------------------------------------
# animation: file(1) magic for animation/movie formats
#
# animation formats
# MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
# FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
# MPEG animation format
0 belong 0x000001b3 MPEG video stream data
#>4 beshort&0xfff0 x (%d x
#>5 beshort&0x0fff x %d)
0 belong 0x000001ba MPEG system stream data
# MPEG Audio (*.mpx)
# from dreesen@math.fu-berlin.de
0 beshort &0xfff0 MP
# MPEG 1.0
>1 byte&0x08 =0x08 \b
# Layer 3
>>1 byte &0x02 \b3
>>>2 byte&0xf0 =0x10 \b, 32 kBits
>>>2 byte&0xf0 =0x20 \b, 40 kBits
>>>2 byte&0xf0 =0x30 \b, 48 kBits
>>>2 byte&0xf0 =0x40 \b, 56 kBits
>>>2 byte&0xf0 =0x50 \b, 64 kBits
>>>2 byte&0xf0 =0x60 \b, 80 kBits
>>>2 byte&0xf0 =0x70 \b, 96 kBits
>>>2 byte&0xf0 =0x80 \b, 112 kBits
>>>2 byte&0xf0 =0x90 \b, 128 kBits
>>>2 byte&0xf0 =0xA0 \b, 160 kBits
>>>2 byte&0xf0 =0xB0 \b, 192 kBits
>>>2 byte&0xf0 =0xC0 \b, 224 kBits
>>>2 byte&0xf0 =0xD0 \b, 256 kBits
>>>2 byte&0xf0 =0xE0 \b, 320 kBits
# Layer 2
>>1 byte &0x04 \b2
>>>2 byte&0xf0 =0x10 \b, 32 kBits
>>>2 byte&0xf0 =0x20 \b, 48 kBits
>>>2 byte&0xf0 =0x30 \b, 56 kBits
>>>2 byte&0xf0 =0x40 \b, 64 kBits
>>>2 byte&0xf0 =0x50 \b, 80 kBits
>>>2 byte&0xf0 =0x60 \b, 96 kBits
>>>2 byte&0xf0 =0x70 \b, 112 kBits
>>>2 byte&0xf0 =0x80 \b, 128 kBits
>>>2 byte&0xf0 =0x90 \b, 160 kBits
>>>2 byte&0xf0 =0xA0 \b, 192 kBits
>>>2 byte&0xf0 =0xB0 \b, 224 kBits
>>>2 byte&0xf0 =0xC0 \b, 256 kBits
>>>2 byte&0xf0 =0xD0 \b, 320 kBits
>>>2 byte&0xf0 =0xE0 \b, 384 kBits
# freq
>>2 byte&0x0C =0x00 \b, 44.1 kHz
>>2 byte&0x0C =0x04 \b, 48 kHz
>>2 byte&0x0C =0x08 \b, 32 kHz
# MPEG 2.0
>1 byte&0x08 =0x00 \b
# Layer 3
>>1 byte &0x02 \b3
# Layer 2
>>1 byte &0x04 \b2
>>2 byte&0xf0 =0x10 \b, 8 kBits
>>2 byte&0xf0 =0x20 \b, 16 kBits
>>2 byte&0xf0 =0x30 \b, 24 kBits
>>2 byte&0xf0 =0x40 \b, 32 kBits
>>2 byte&0xf0 =0x50 \b, 40 kBits
>>2 byte&0xf0 =0x60 \b, 48 kBits
>>2 byte&0xf0 =0x70 \b, 56 kBits
>>2 byte&0xf0 =0x80 \b, 64 kBits
>>2 byte&0xf0 =0x90 \b, 80 kBits
>>2 byte&0xf0 =0xA0 \b, 96 kBits
>>2 byte&0xf0 =0xB0 \b, 112 kBits
>>2 byte&0xf0 =0xC0 \b, 128 kBits
>>2 byte&0xf0 =0xD0 \b, 144 kBits
>>2 byte&0xf0 =0xE0 \b, 160 kBits
# freq
>>2 byte&0x0C =0x00 \b, 22.05 kHz
>>2 byte&0x0C =0x04 \b, 24 kHz
>>2 byte&0x0C =0x08 \b, 16 kHz
# misc
>3 byte&0xC0 =0x00 \b, Stereo
>3 byte&0xC0 =0x40 \b, JStereo
>3 byte&0xC0 =0x80 \b, Dual-Ch
>3 byte&0xC0 =0xC0 \b, Mono
#>1 byte&0x01 =0x00 \b, Error Protection
#>2 byte&0x02 =0x02 \b, Padding
#>2 byte&0x01 =0x01 \b, Private
#>3 byte&0x08 =0x08 \b, Copyright
#>3 byte&0x04 =0x04 \b, Original
#>3 byte&0x03 1 \b, Emphasis 5
#>3 byte&0x03 3 \b, Emphasis c
# FLI animation format
4 leshort 0xAF11 FLI file
>6 leshort x - %d frames,
>8 leshort x width=%d pixels,
>10 leshort x height=%d pixels,
>12 leshort x depth=%d,
>16 leshort x ticks/frame=%d
# FLC animation format
4 leshort 0xAF12 FLC file
>6 leshort x - %d frames
>8 leshort x width=%d pixels,
>10 leshort x height=%d pixels,
>12 leshort x depth=%d,
>16 leshort x ticks/frame=%d
# DL animation format
# XXX - collision with most `mips' magic
#
# I couldn't find a real magic number for these, however, this
# -appears- to work. Note that it might catch other files, too, so be
# careful!
#
# Note that title and author appear in the two 20-byte chunks
# at decimal offsets 2 and 22, respectively, but they are XOR'ed with
# 255 (hex FF)! The DL format is really bad.
#
#0 byte 1 DL version 1, medium format (160x100, 4 images/screen)
#>42 byte x - %d screens,
#>43 byte x %d commands
#0 byte 2 DL version 2
#>1 byte 1 - large format (320x200,1 image/screen),
#>1 byte 2 - medium format (160x100,4 images/screen),
#>1 byte >2 - unknown format,
#>42 byte x %d screens,
#>43 byte x %d commands
# Based on empirical evidence, DL version 3 have several nulls following the
# \003. Most of them start with non-null values at hex offset 0x34 or so.
#0 string \3\0\0\0\0\0\0\0\0\0\0\0 DL version 3
# SGI and Apple formats
0 string MOVI Silicon Graphics movie file
4 string moov Apple QuickTime movie file (moov)
4 string mdat Apple QuickTime movie file (mdat)