As the Court leaves the "theater", Hamlet sings his lines, throwing his torch in the air jubilantly. He becomes so manic, in fact, that Horatio can hardly keep up and isn't given enough time to confirm or deny the King's reaction (although it was pretty dramatic and clear). Olivier compressed a lot of the action, so there are a number of cuts, including (sadly) the pipe metaphor. This is, after all, a version of the play without Rosencrantz & Guildenstern. A few of their lines are given to Polonius instead, which tends to make him less scatterbrained for the start of the sequence and then seems to make him press the issue as he repeats the summons in his own voice.
Instead of focusing on Hamlet's madness in this moment, Olivier makes lines like "My wit's diseased" as level-headed as any. There's a solid confidence in his treatment of Polonius, and when he points to clouds out in a dark corner of the castle, never even looking in that direction, he is serious and cruel. He's not acting crazy, not seeing things, or even feigning hallucinations. He is testing how far Polonius' sycophancy goes. He never takes his eyes off the old man, implicitly telling him that he owns him: "I am the master here and you'd do well to know your place, you who would command me to go to my mother's closet." A brilliant representation of what is going on under the surface of the cloud exchange.
"By and by is easily said" isn't spoken to Polonius, but as a thoughtful aside. Olivier takes a verbal dagger and points it at Hamlet himself. "By and by" means "in a moment", and implies a delay, so of course we're reminded of his forever-delayed revenge. Easily sworn, but the deadline is something that lacks definition, and the doing is much more difficult. It is somewhat moving that the camera lingers on Horatio after he is dismissed. He wasn't really consulted and sees that he cannot truly help his friend, especially since he strikes me as someone who would never counsel going through with a murder.
The following soliloquy starts with Hamlet his back to us, so that you can't initially tell if he's speaking the words or using voice-over. He is facing utter darkness. When he turns, we see he was indeed speaking the lines, but the original confusion has put you in the right frame of mind - we are hearing a man's inner thoughts. He then starts to go up some stairs towards his mother's closet, looking up at a god-like beam of light. Olivier has crafted an image here that shows Hamlet going from dark to light, from doubt to decision, and at the same time, relates to the King's own dilemma, as in the next scene we will see his words going up, but his thoughts remaining below. Hamlet's own pledge here will be as empty as the King's own prayers.