News for hackers. Stuff that matters.
Re:FFmpeg and a thousand fixes by nitrogen on Saturday January 11, 2014 @02:10AM (#7041907)
Isn't that what the restrict keyword is for?
Re:FFmpeg and a thousand fixes by astrange on Saturday January 11, 2014 @02:46PM (#7043511)
gcc mostly ignores restrict, though it's got a little better in recent versions. icc uses it a little more.

But restrict is only good in specific situations - if you have three pointers, and #2 can alias #1 but not #3, there's no way to express that.

It also tends to be used on function arguments, not at some higher up point of declaration. So when compilers inline the function and can see more global info about it, the restrict gets lost and optimization gets worse.

I think some kind of stronger 'typedef' would be better.

Re:FFmpeg and a thousand fixes by panzi on Saturday January 11, 2014 @08:47AM (#7042560)
Yes, but how long does this exist? My guess would be that it isn't really used (yet) in ffmpeg.
Re:FFmpeg and a thousand fixes by anon1385 on Saturday January 11, 2014 @12:11PM (#7043038)
Since C99 so 15 years, which is older than ffmpeg.
Re:FFmpeg and a thousand fixes by panzi on Saturday January 11, 2014 @12:50PM (#7043153)
What I meant is how long is it supported by compilers. I know its by GCC, but I think it's not by MSCV. Is it possible to compile ffmpeg with MSVC? But ok, one could use it and just #define it away for crappy compilers.
Re:FFmpeg and a thousand fixes by jasomill on Saturday January 11, 2014 @07:20PM (#7044493)
According to MSDN, Visual C++ has supported the equivalent __restrict keyword since at least 2005 [1], and according to the ffmpeg documentation [2], "FFmpeg can be built with MSVC 2012 or earlier using a C99-to-C89 conversion utility and wrapper, or with MSVC 2013 and ICL natively."

[1] http://msdn.microsoft.com/en-us/library/5ft82fed(v=vs.80).as...

[2] http://www.ffmpeg.org/platform.html