From: Diego B. <di...@bi...> - 2011-05-16 18:57:27
|
The _fast integer types provide no realworld benefits, but may introduce portability issues and are just plain ugly. --- libmpeg2/idct_alpha.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libmpeg2/idct_alpha.c b/libmpeg2/idct_alpha.c index 8e94219..490b659 100644 --- a/libmpeg2/idct_alpha.c +++ b/libmpeg2/idct_alpha.c @@ -53,7 +53,7 @@ do { \ #else #define BUTTERFLY(t0,t1,W0,W1,d0,d1) \ do { \ - int_fast32_t tmp = W0 * (d0 + d1); \ + int32_t tmp = W0 * (d0 + d1); \ t0 = tmp + (W1 - W0) * d1; \ t1 = tmp - (W1 + W0) * d0; \ } while (0) @@ -62,9 +62,9 @@ do { \ static inline void idct_row (int16_t * const block) { uint64_t l, r; - int_fast32_t d0, d1, d2, d3; - int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3; - int_fast32_t t0, t1, t2, t3; + int32_t d0, d1, d2, d3; + int32_t a0, a1, a2, a3, b0, b1, b2, b3; + int32_t t0, t1, t2, t3; l = ldq (block); r = ldq (block + 4); @@ -118,9 +118,9 @@ static inline void idct_row (int16_t * const block) static inline void idct_col (int16_t * const block) { - int_fast32_t d0, d1, d2, d3; - int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3; - int_fast32_t t0, t1, t2, t3; + int32_t d0, d1, d2, d3; + int32_t a0, a1, a2, a3, b0, b1, b2, b3; + int32_t t0, t1, t2, t3; d0 = (block[8*0] << 11) + 65536; d1 = block[8*1]; -- 1.5.6.5 |
From: R. Denis-C. <re...@vi...> - 2011-05-16 20:12:59
|
Le lundi 16 mai 2011 21:27:13 Diego Biurrun, vous avez écrit : > The _fast integer types provide no realworld benefits, but may introduce > portability issues and are just plain ugly. int_fastXX_t are in ISO C just as intXX_t. So IMHO I don't see how they are less portable, less standard or less POSIX. -- Rémi Denis-Courmont http://git.remlab.net/cgi-bin/gitweb.cgi?p=vlc-courmisch.git;a=summary |
From: Diego B. <di...@bi...> - 2011-05-16 23:54:35
|
On Mon, May 16, 2011 at 10:53:56PM +0300, Rémi Denis-Courmont wrote: > Le lundi 16 mai 2011 21:27:13 Diego Biurrun, vous avez écrit : > > The _fast integer types provide no realworld benefits, but may introduce > > portability issues and are just plain ugly. > > int_fastXX_t are in ISO C just as intXX_t. So IMHO I don't see how they are > less portable, less standard or less POSIX. Maybe my commit message is a bit misleading - I intended for "standard counterparts" to be read as "more common counterparts that als happen to be (just as) standard", not as "counterparts that are POSIX standard, unlike the originally used types". I can adjust the log message. The int_fast types are less portable because they are a part of the standard that is actually implemented on fewer systems. Diego |
From: R. Denis-C. <re...@re...> - 2011-05-17 15:22:57
|
Le mardi 17 mai 2011 02:54:28 Diego Biurrun, vous avez écrit : > On Mon, May 16, 2011 at 10:53:56PM +0300, Rémi Denis-Courmont wrote: > > Le lundi 16 mai 2011 21:27:13 Diego Biurrun, vous avez écrit : > > > The _fast integer types provide no realworld benefits, but may > > > introduce portability issues and are just plain ugly. > > > > int_fastXX_t are in ISO C just as intXX_t. So IMHO I don't see how they > > are less portable, less standard or less POSIX. > > Maybe my commit message is a bit misleading - I intended for "standard > counterparts" to be read as "more common counterparts that als happen > to be (just as) standard", not as "counterparts that are POSIX standard, > unlike the originally used types". I can adjust the log message. > > The int_fast types are less portable because they are a part of the > standard that is actually implemented on fewer systems. If they really are missing on a real-life system you can replace them with autofoo AFAICT. -- Rémi Denis-Courmont http://www.remlab.info/ http://fi.linkedin.com/in/remidenis |
From: David I. L. <dl...@vt...> - 2011-05-17 20:21:12
|
On Mon, May 16, 2011 at 7:54 PM, Diego Biurrun <di...@bi...> wrote: > The int_fast types are less portable because they are a part of the > standard that is actually implemented on fewer systems. > Which systems lack int_fast* support? -dave |
From: Diego B. <di...@bi...> - 2011-05-17 19:03:54
|
On Tue, May 17, 2011 at 06:05:48PM +0300, Rémi Denis-Courmont wrote: > Le mardi 17 mai 2011 02:54:28 Diego Biurrun, vous avez écrit : > > On Mon, May 16, 2011 at 10:53:56PM +0300, Rémi Denis-Courmont wrote: > > > Le lundi 16 mai 2011 21:27:13 Diego Biurrun, vous avez écrit : > > > > The _fast integer types provide no realworld benefits, but may > > > > introduce portability issues and are just plain ugly. > > > > > > int_fastXX_t are in ISO C just as intXX_t. So IMHO I don't see how they > > > are less portable, less standard or less POSIX. > > > > Maybe my commit message is a bit misleading - I intended for "standard > > counterparts" to be read as "more common counterparts that als happen > > to be (just as) standard", not as "counterparts that are POSIX standard, > > unlike the originally used types". I can adjust the log message. > > > > The int_fast types are less portable because they are a part of the > > standard that is actually implemented on fewer systems. > > If they really are missing on a real-life system you can replace them with > autofoo AFAICT. Just replacing them with their equivalents without "fast" in the name seems way easier. Anyway, is the patch accepted or rejected? Diego |