diff options
Diffstat (limited to 'contrib/file/magic/Magdir/riff')
-rw-r--r-- | contrib/file/magic/Magdir/riff | 174 |
1 files changed, 165 insertions, 9 deletions
diff --git a/contrib/file/magic/Magdir/riff b/contrib/file/magic/Magdir/riff index 39a5acbe23b9..664fef24d5e9 100644 --- a/contrib/file/magic/Magdir/riff +++ b/contrib/file/magic/Magdir/riff @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: riff,v 1.43 2021/04/26 15:56:00 christos Exp $ +# $File: riff,v 1.50 2024/04/13 16:40:48 christos Exp $ # riff: file(1) magic for RIFF format # See # @@ -140,27 +140,100 @@ >>&(4.l+4) use riff-walk >0 string fact >>&(4.l+4) use riff-walk ->0 string VP8 +# https://developers.google.com/speed/webp/docs/riff_container +>0 string VP8\x20 >>11 byte 0x9d >>>12 byte 0x01 >>>>13 byte 0x2a \b, VP8 encoding >>>>>14 leshort&0x3fff x \b, %d >>>>>16 leshort&0x3fff x \bx%d, Scaling: >>>>>14 leshort&0xc000 0x0000 \b [none] ->>>>>14 leshort&0xc000 0x1000 \b [5/4] ->>>>>14 leshort&0xc000 0x2000 \b [5/3] ->>>>>14 leshort&0xc000 0x3000 \b [2] ->>>>>14 leshort&0xc000 0x0000 \bx[none] ->>>>>14 leshort&0xc000 0x1000 \bx[5/4] ->>>>>14 leshort&0xc000 0x2000 \bx[5/3] ->>>>>14 leshort&0xc000 0x3000 \bx[2] +>>>>>14 leshort&0xc000 0x4000 \b [5/4] +>>>>>14 leshort&0xc000 0x8000 \b [5/3] +>>>>>14 leshort&0xc000 0xc000 \b [2] +>>>>>16 leshort&0xc000 0x0000 \bx[none] +>>>>>16 leshort&0xc000 0x4000 \bx[5/4] +>>>>>16 leshort&0xc000 0x8000 \bx[5/3] +>>>>>16 leshort&0xc000 0xc000 \bx[2] >>>>>15 byte&0x80 =0x00 \b, YUV color >>>>>15 byte&0x80 =0x80 \b, bad color specification >>>>>15 byte&0x40 =0x40 \b, no clamping required >>>>>15 byte&0x40 =0x00 \b, decoders should clamp +>0 string VP8L +>>8 byte 0x2f \b, lossless +>>>11 byte &0x01 \b, with alpha +>0 string VP8X +>>4 lelong 0x0a +>>>8 byte &0x02 \b, animated +>>>8 byte &0x04 \b, XMP metadata +>>>8 byte &0x08 \b, EXIF metadata +>>>8 byte &0x10 \b, with alpha +>>>8 byte &0x20 \b, ICC profile +# TODO: These two values are off-by-one, for a 64x64 WebP they contain +# 63x63 as there can be no 0x0 file. +>>>12 lelong&0xffffff x \b, %d+1 +>>>15 lelong&0xffffff x \bx%d+1 #>0 string x we got %s #>>&(4.l+4) use riff-walk +# RecorderGear TR500 call recorder digits (BCD) +0 name tr500-call-recorder-digits +>0 byte&0xF0 0x00 \b0 +>0 byte&0xF0 0x10 \b1 +>0 byte&0xF0 0x20 \b2 +>0 byte&0xF0 0x30 \b3 +>0 byte&0xF0 0x40 \b4 +>0 byte&0xF0 0x50 \b5 +>0 byte&0xF0 0x60 \b6 +>0 byte&0xF0 0x70 \b7 +>0 byte&0xF0 0x80 \b8 +>0 byte&0xF0 0x90 \b9 +>0 byte&0xF0 0xb0 \b* +>0 byte&0xF0 0xc0 \b# +>0 byte&0x0F 0 \b0 +>0 byte&0x0F 1 \b1 +>0 byte&0x0F 2 \b2 +>0 byte&0x0F 3 \b3 +>0 byte&0x0F 4 \b4 +>0 byte&0x0F 5 \b5 +>0 byte&0x0F 6 \b6 +>0 byte&0x0F 7 \b7 +>0 byte&0x0F 8 \b8 +>0 byte&0x0F 9 \b9 +>0 byte&0x0F 0xb \b* +>0 byte&0x0F 0xc \b# + +# TR500 call recorder extended header +# From: David Korth <gerbilsoft@gerbilsoft.com> +# Contains dialed/incoming phone number and timestamp. +# TODO: Verify byte 15. +0 name tr500-call-recorder-header +>15 byte 2 (outgoing call: +>15 byte 4 (incoming call: +>1 byte 0xFF \bno number +>1 byte !0xFF +>>1 use tr500-call-recorder-digits +>>2 byte !0xFF +>>>2 use tr500-call-recorder-digits +>>3 byte !0xFF +>>>3 use tr500-call-recorder-digits +>>4 byte !0xFF +>>>4 use tr500-call-recorder-digits +>>5 byte !0xFF +>>>5 use tr500-call-recorder-digits +>>6 byte !0xFF +>>>6 use tr500-call-recorder-digits +>>7 byte !0xFF +>>>7 use tr500-call-recorder-digits +>>8 byte !0xFF +>>>8 use tr500-call-recorder-digits +>9 byte x \b, 20%02x +>10 byte x \b/%02x +>11 byte x \b/%02x +>12 byte x %02x +>13 byte x \b:%02x +>14 byte x \b:%02x) + # AVI section extended by Patrik Radman <patrik+file-magic@iki.fi> # 0 string RIFF RIFF (little-endian) data @@ -231,6 +304,11 @@ !:ext wav/wave >>12 string >\0 >>>12 use riff-walk +# TR500 call recorder extended header +>>16 ulelong 0x1E4 +>>>20 leshort 0x11 +>>>>256 byte 4 +>>>>>256 use tr500-call-recorder-header # Update: Joerg Jenderek # lower case for Corel Draw version 8 Bidi >8 string/c cdr @@ -269,7 +347,68 @@ # MORE TESTS NEEDED HERE! #>>>0 use corel-des #>>>0 use corel-draw +# From: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/SHW_(Corel) +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/shw-corel.trid.xml +# Note: called "CorelSHOW presentation (v4)" by TrID +# and "Corel Presentation" by DROID via PUID fmt/877 +>8 string shw4 \b, CorelSHOW presentation, version 4 +#!:mime application/octet-stream +!:mime application/x-corel-shw +!:ext shw +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/shw-corel-5.trid.xml +# Note: called "CorelSHOW presentation (v5)" by TrID +>8 string shw5 \b, CorelSHOW presentation, version 5 +#!:mime application/octet-stream +!:mime application/x-corel-shw +!:ext shw +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/shb-corel.trid.xml +# Note: called "CorelSHOW Background (v5)" by TrID +>8 string shl5 \b, CorelSHOW Background, version 5 +#!:mime application/octet-stream +!:mime application/x-corel-shb +# GRR: no example +!:ext shb +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/shr-corel.trid.xml +# Note: called "CorelSHOW player data (v5)" by TrID +>8 string shr5 \b, CorelSHOW player data, version 5 +#!:mime application/octet-stream +!:mime application/x-corel-shr +# GRR: no example +!:ext shr >8 string NUNDROOT \b, Steinberg CuBase +# From: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/MIDI_Instrument_Definition_File +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/i/idf.trid.xml +# ftp://curscott.servebeer.com/Download/Apps/_Microsoft/ +# Visual%20Studio%206.0%20Professional%20MSDN/ +# SAMPLES/VC98/SDK/GRAPHICS/AUDIO/IDFEDIT/GLOBALS.H +# Note: called "MIDI Instrument Definition File" by TrID +>8 string IDF\ LIST \b, MIDI Instrument Definition File +!:mime audio/x-idf +!:ext idf +# 3rd chunk size like: 254 284 286 670 +#>>0x10 ulelong x \b, 3th SIZE %u +# for debugging purpose display next chunk like: MMAPhdr +#>>0x14 string x \b, 4th "%-8.8s" +#>>0x1C ulelong x \b, 4th SIZE 0x%x +# probably MIDI instrument name like: "Universal-MIDI-Instrument" "instrument name" "General MIDI" +>>0x30 string x "%s" +# look for inst TAG +>>0x31 search/256 inst by +# probably manufacture name like: "Unspecified Company" "NVidia Corporation" +>>>&0x24 string x "%s" +# From: Joerg Jenderek +# URL: https://en.wikipedia.org/wiki/Microsoft_Flight_Simulator +# Reference: https://www.fsdeveloper.com/wiki/index.php?title=MDL_file_format_(FSX) +# http://mark0.net/download/triddefs_xml.7z/defs/m/mdl-fs-gen.trid.xml +# Note: called "Microsoft Flight Simulator 3D model (generic)" by TrID +>8 string MDL +>>12 string MDLH \b, Microsoft Flight Simulator 3D model +#!:mime application/x-riff +!:mime application/x-ms-mdl +!:ext mdl +#>>>8 string MDL8 \b, version 8? # AVI == Audio Video Interleave # Reference: http://fileformats.archiveteam.org/wiki/AVI >8 string AVI\040 \b, AVI @@ -566,6 +705,22 @@ !:mime application/x-trid-trd !:ext trd # From: Joerg Jenderek +# URL: http://fileformats.archiveteam.org/wiki/Easy_CD_Creator +# https://en.wikipedia.org/wiki/Roxio +# Reference: http://mark0.net/download/triddefs_xml.7z/defs/i/img-cif.trid.xml +# Note: called "Easy CD Creator disk image" by TrID, +# "Adaptec CD Image File" by Adaptec CD Creator 2.1.082 1995-1996 and +# "Easy CD/DVD Creator image" by PowerISO 8.5 +>8 string imag \b, Easy CD Creator disk image +#!:mime application/octet-stream +#!:mime application/x-riff +!:mime application/x-corel-cif +!:ext cif +# contains also 2 strings disc info +# look for ISO 9660 CD-ROM tag handled by ./filesystems +>>32769 search/4565/s CD001 \b; with +>>>&-32769 use cdrom +# From: Joerg Jenderek # URL: https://en.wikipedia.org/wiki/CorelDRAW # Reference: http://fileformats.archiveteam.org/wiki/CorelDRAW # Note: Since version 3 CorelDraw Pictures are RIFF based @@ -676,6 +831,7 @@ # for debugging purpose display 5th chunk like: LIST osfp #>>(26.l+30) string x \b, 5th "%-4.4s" >4 ulelong+8 x \b, %u bytes + # # XXX - some of the below may only appear in little-endian form. # |