avcodec/nvenc: support external context in sw mode