From 505c55b2e1251c867bc0f9d6ab17f876c1ee9b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 7 Feb 2022 16:17:36 +0100 Subject: [PATCH] Fix FTBFS due to narrowing conversions in x86 mmx code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- k9decmpeg/idct_mmx.cpp | 8 ++++---- k9decmpeg/mmx.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/k9decmpeg/idct_mmx.cpp b/k9decmpeg/idct_mmx.cpp index 99e8a12..5b656cb 100644 --- a/k9decmpeg/idct_mmx.cpp +++ b/k9decmpeg/idct_mmx.cpp @@ -402,10 +402,10 @@ static inline void idct_col (int16_t * const col, const int offset) #define T3 43790 #define C4 23170 - static const short _T1[] ATTR_ALIGN(8) = {T1,T1,T1,T1}; - static const short _T2[] ATTR_ALIGN(8) = {T2,T2,T2,T2}; - static const short _T3[] ATTR_ALIGN(8) = {T3,T3,T3,T3}; - static const short _C4[] ATTR_ALIGN(8) = {C4,C4,C4,C4}; + static const unsigned short _T1[] ATTR_ALIGN(8) = {T1,T1,T1,T1}; + static const unsigned short _T2[] ATTR_ALIGN(8) = {T2,T2,T2,T2}; + static const unsigned short _T3[] ATTR_ALIGN(8) = {T3,T3,T3,T3}; + static const unsigned short _C4[] ATTR_ALIGN(8) = {C4,C4,C4,C4}; /* column code adapted from peter gubanov */ /* http://www.elecard.com/peter/idct.shtml */ diff --git a/k9decmpeg/mmx.h b/k9decmpeg/mmx.h index 01943de..858119a 100644 --- a/k9decmpeg/mmx.h +++ b/k9decmpeg/mmx.h @@ -31,14 +31,14 @@ #define MMX_H typedef union { - long long q; /* Quadword (64-bit) value */ unsigned long long uq; /* Unsigned Quadword */ - int d[2]; /* 2 Doubleword (32-bit) values */ + long long q; /* Quadword (64-bit) value */ unsigned int ud[2]; /* 2 Unsigned Doubleword */ - short w[4]; /* 4 Word (16-bit) values */ + int d[2]; /* 2 Doubleword (32-bit) values */ unsigned short uw[4]; /* 4 Unsigned Word */ - char b[8]; /* 8 Byte (8-bit) values */ + short w[4]; /* 4 Word (16-bit) values */ unsigned char ub[8]; /* 8 Unsigned Byte */ + char b[8]; /* 8 Byte (8-bit) values */ float s[2]; /* Single-precision (32-bit) value */ } ATTR_ALIGN(8) mmx_t; /* On an 8-byte (64-bit) boundary */