port imlib2 vhook to swscaler