Some Android App/Hardware Ideas

Here are some free ideas for Android and phones in general.

  • The palm sweat meter (prove that holding hands just isn’t that bad, the scientific way). Should be doable using the humidity sensor in the new Galaxy S4.
  • A game that simulates real physics. It will be dull but someone should make it just so it’s been done.
  • Someone should properly figure out all the mDNIe fields so Samsung’s oversaturated OLED travesty can be somewhat improved. I did figure out most of them on the Galaxy S2 but lacked a colorimeter at the time so I couldn’t write a simple display calibrator. It is possible to mostly fix color temperature and gamma (same curve shared for all RGB). 10K+ color temperature makes me blue.
  • An IR diod/front camera, so the useless Samsung face stay and rotate features can work when it’s not perfect lighting conditions. Like in bed.
  • Or to take the previous one even further. IR camera+laser projected IR pattern. Then we could have kinect style 3D scanning in our phone. Don’t think I’m crazy, if you can stick a projector into a phone this can be done too.
  • Bonus hardware feature: breathalyzer in next gen phones.

As you may have guessed I’ve used Samsung phones the past year.

Alive again

Last week I went on a day trip to Denmark. On the way back I entered the booze lottery on the ferry and won a big bottle of Mount Gay Rum. Drinking it made me happy enough to actively continue the project.

Slowing Down

My previous post about looking for work was a lot more successful that I expected so I’ve been busy with work recently. The project isn’t dead though, I intend to continue with the improvements until at least the QTGMC script can run well using only native plugins.

I’ve already started working on some minor scripting changes. The most noticeable one being that python scripts will now be using a singleton pattern for the core (may change some more but from R19 vs.get_core() is the most appropriate way to obtain a core instance).

Oh, and apparently R18 may be one memory leak bug short of beta quality and I’ll try to hunt that one down tomorrow…

R18 – Beta Quality

I’m back on my release early and often schedule… or at least something resembling it. This is a big bug fix release and officially brings the core of VapourSynth to beta quality. Less memory will be leaked and pressing F2 in VirtualDub is no longer the fastest way to run out of address space and crash.

There are only a few more things to add and change but the goal is getting closer. Report any bug you find no matter how small it is. The focus of the next release will be on performance and I’m interested in all speed comparisons between VapourSynth and Avisynth, especially the single threaded versions.

You should also check out Chikuzen’s GenericFilters which implement almost all missing features from masktools that aren’t already present in the core. This has made it possible to port a few more scripts to be fully native.

If you’re curious about the future direction and changes go check out the bug tracker. I use it as a place to write down most planned enhancements as well and scribble a row or two about it. I have also been commissioned to make an image writer plugin based on ImageMagick so that will most likely show up before R19.

Looking for contract work

I am currently looking for contract work so now’s the chance for you to hire a good developer. My main skills are C, C++ and x86 assembler. I also have experience writing multithreaded and cross platform applications.

So why should you hire me and not someone else with a similar list?

  • I want to build up a positive reputation and the best way to do so is to have satisfied clients – if I don’t think I can do a job well I will simply turn it down instead of doing it badly
  • Used to working on tight schedules in the corporate world
  • I write clear and maintanable code – check out the vapoursynth source code for an example

Don’t hesitate to contact me at fredrik.mellbin [at] gmail.com if you’re interested.

R17 – A Soft Package

It took a bit longer than I anticipated to get R17 done but it’s finally done enough. The highlights are:

  • User contributions! – this is the first release where several fixes and parts were contributed by other people
  • The new Expr filter (similar to mt_lutxyz) which can evaluate expressions per pixels during run-time
  • A subtitle filter based on libass (inappropriately named assvapour)
  • Lots of bugfixes, for example AVISource should now be usable with all formats and alpha output
  • Even stricter checks for filters – the ongoing work to detect common coding and API usage errors continues

With this release a few more popular scripts can be implemented using only VapourSynth filters, however the work will continue to recreate the missing common filters from masktools. I would appreciate some help in implementing equivalents to mt_edge, mt_inpand, mt_expand, mt_inflate and mt_deflate. It’s a simple project and good for someone who wants to get started writing filters and help out, I just happen to want to start with the challenging stuff. MVTools. The core part of several of the most powerful Avisynth scripts and a something that could certainly use a rewrite.

Positive Thinking – How to Convince Yourself That You Can Code

Previously I’ve discussed how computers work so now it’s time to take a look at how humans work. I personally think this is something programming textbooks neglect to take into consideration, for example humans generally work very badly when confronted with binary operations and bit-wise shifts the first time. It can also be somewhat detrimental to their mental state. So this post is about negative thinking and what You Can Do To Break The Pattern! My personal trick is to always keep the law of attraction in mind when I code and so should you! Get the positive thinking going by putting some comments telling yourself that YOU CAN DO IT! or maybe that it’s simple. See this example from Avisynth:

if (!(audio && video)) { // Hey - simple!!
if (audio) {
  return new DirectShowSource(filename, _avg_time_per_frame, seekmode, true , false,
    args[5].AsBool(false), _media, _timeout, _frames, log, env);

And indeed that is simple! Just imagine what this technique can do for your mental health. No more feeling like a rejected PHP coder, instead you’ll be the coolest PHP coder in a basement within two blocks. Guaranteed or your money back!

Personally I prefer to apply the law of attraction in a slightly different way. For example I write my goal in every single comment. See this code snippet:

// Buy milk
for (int x = 0; x < width; x++) {
// Clean thoughts
// (representing my desire to have a clean toilet)
  dstp[x] = srcp[x-1] + srcp[x+1] + srcp[x-1-stride] + srcp[x+1-stride] + srcp[x-1+stride] + srcp[x+1+stride];
  // For loops are trivial and even my grandma could do them...
  // if she was still alive

Sometimes I try this but I have had less success with it:

// Hire Fredrik Mellbin, he's awesome

I’m currently experimenting with writing it every 10 lines in my code just to see what happens. I’ll post a follow-up later and tell you all how it works out.

Finally Using the Bug Tracker

I’ve added link to the bug tracker on Google Code and I will be checking it a lot more often. It’s the best way of submitting documentation corrections as well. Just remember to quickly check the closed reports too because I usually only upload a new documentation revision when a new version is released of VapourSynth. You can find the link in the sidebar.