The scene is explained slightly further in the Extended Edition of the Return of the King. Why they removed it from the theatrical is unclear. However, in the Extended Edition we see Denethor's disappointment in Faramir.
The script is provided at the bottom:
While not sentencing Faramir, Denethor seems to show his disdain for him and his mistakes, comparing him to Boromir and calling him the Wizard's pupil. This in my opinion, is what sets up the later scene when Faramir opts to ride to his own death. Denethor has shown him that he does not consider him to be his child, after being disloyal and death is the only out. Had he captured Frodo and Sam, and brought the Ring to Minas Tirith, this likely would not have been the case.
While this is evidently a change from the books, the line as presented in the film is consistent with the films. The use of the line in the penultimate scene of the second film is fundamental to ensuring the excitement is set for the third instalment. While the removal of the Extended scene from the theatrical version may be strange, there certainly are reasons. However, in the Extended Edition, it is clear, in my opinion, that Denethor sets Faramir up to his death charge.
Scene changes to Denethor's angry face.
DENETHOR: This is how you would serve your city? You would risk its utter ruin?
FARAMIR: I did what I judged to be right.
DENETHOR: What you judged to be right! You sent the Ring of power into Mordor in the hands of a witless Halfling! It should have been brought back to the citadel to be kept safe. Hidden. Dark and deep in the vaults, not to be used. (his eyelids flicker unnaturally) unless, at the uttermost end of need.
FARAMIR: I would not use the Ring. Not if Minas Tirith were falling in ruin and I alone could save her.
DENETHOR: Ever you desire to appear lordly and gracious as a King of old. Boromir would have remembered his father's need. He would have brought me a kingly gift
FARAMIR: Boromir would not have brought the Ring. He would have stretched out his hand to this thing and taking it he would have fallen.
DENETHOR: You know nothing of this matter!
FARAMIR: He would have kept it for his own. And when he returned you would not have known your son.
DENETHOR: (shouting and running towards Faramir) Boromir was loyal to me! Not some wizard's pupil.
Denethor stumbles backwards and falls against the Stewards chair.
FARAMIR: Father? (He moves towards him)
Denethor looks up at him from the floor, smiling and grieving at the same time.
DENETHOR: My son! (He can see Boromir behind Faramir who turns to face him and walking towards him smiling, fades away. Denethor looks at Faramir full of grief for Boromir. His face changes to one of hate.) Leave me! (Faramir turns from him to leave the hall.)
Return of the King - Special Extended Edition script