[File] [PATCH 3/3] Fix VP8 scaling factor matching

Emmanuel Gil Peyrot linkmauve at linkmauve.fr
Fri Apr 5 12:39:48 UTC 2024


I don’t have any sample using these horizontal scaling factors, but the
previous code couldn’t have worked anyway, x & 0xc000 couldn’t produce
values such as 0x1000, 0x2000 or 0x3000.  Additionally, the horizontal
scale factor was parsed twice, instead of also doing the vertical one.
---
 magic/Magdir/riff | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/magic/Magdir/riff b/magic/Magdir/riff
index b86502d3..9a1c18bc 100644
--- a/magic/Magdir/riff
+++ b/magic/Magdir/riff
@@ -147,13 +147,13 @@
 >>>>>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
-- 
2.44.0



More information about the File mailing list