We are porting our MSVC/Win32 applications to Clang/GCC/Linux and have just spent the morning tracing why our unit tests fail.
double a = NAN;
Under MSVC and Clang all good, GCC asserts. We added printf’s and looked at the assembly and the code was hard coded to 0.
Some googling found 2006 posts stating GCC -ffast-math did odd things with isnan, and it’s still a presently reported issue
This came about because we are using Premake, and had the FloatFast flag set, because that’s how our MSVC projects were set, and we don’t want to change those builds, so for now we have tweaked the Premake code for this flag under GCC, as it doesn’t make sense that you would ever want isnan to be hard coded to zero, that’s really not fast maths at all.
We also put a #ifdef for ffast-math to break if this flag is present in the future.
And by we I mean Dave, and I just sat and talking it though with him.
Posted in C++, Programming
Moons/Planets instead of countries, quite funny to see this morning:
After a couple of weeks of hard code tracing Coderat nailed the where/how of the bit rates for Nikon DSLR movies recording are set. The sad thing is the source of the bit rates is just a simple function that had been documented for a couple of years, the completeness of it’s effect was just not understood. Sigh.
But now we have patched in higher bit rates. To that end 34mbps and 54mbps have been tested on a D5100, and I’ve tested 34mbps, 49mbps and 64mbps on my D7000.
There are some D7000 video’s that can be reviewed if that’s your thing 1080 24fps 18mbps (default) 29MB 1080 24fps 30mbps (default) 47MB 1080 24fps 45mbps (default) 60MB
The online patch tool now lets to install these rates, on D5100 and D7000, and only at 1080p, but I’m sure more models/modes will follow as requested.
I had no record problems with 64mbps (really 60mbps as I had no sound being recorded), using both my slow Transcend Class 10 card, or my fast SanDisk Extreme Pro, which I purchased for these very tests back in 2012.
So if you want to test or talk about this come on over to the Nikon Hacker forums.
I recently purchased the Rebecca & Fiona – Luminary Ones (Nause Remix) off iTunes Store as I really like the song, and that mix in particular. The song is a 7m 47s DJ friendly mix, thus has 2 minutes of intro and 2 minutes of outro, that are honestly boring.
So I have been day dreaming of making a new cut of the track with those minutes trimmed, so I jumped into iTunes to see the file type to work out what needs to be done to trim the song, and just for the laughs I look at the Options tab of the track, and low and behold, a ‘Start Time’ and ‘Stop Time’.
And the settings worked on my PC, so I synced my iPhone, and they work there also. Sorted!
Now I would like a fade out option, as the ending is abrupt, but there is not a nice breakdown to end on, and maybe I will trim the song externally, but 95% of my problem is solved, so most likely I won’t.
Just changed the layout a touch of the web tool trying to emphasize you don’t have to pay for the patch tool. To help with this added a Big ugly link to the Help and a FAQ.
So if you have Patching related questions, feel free to ask them here or on the FAQ page.
If there are any web designers that want to make the patch tool less ugly, or simpler etc, I’m very open to less ugly. Also open to better work flow etc.