Hello
I just finished writing rudimentary H264 encoder using Video Toolbox on macOS. Apart from some tricks (like certain VTSession properties seem to have effect only if set before creating VTSession) it is really easy and nice API. But I have one question - I'd like to be able to peek (while encoding) at how my encoded frame looks like. Obviously, this is lossy compression, and so encoded frame won't reconstruct to exactly same image that I have fed. I am interested in how many things have changes, maybe computing some metrics, etc. Question is - can I get last encoded frame's reconstructed image from the encoder?
Of course I can create H264 decoder and feed it with outgoing encoded frames, but this is hardly ideal solution, because I add the cost of decoding. And I know that H264 encoder has to "know" how encoded image will look like (otherwise how could it compute motion estimation?).
Any help appreciated.
Michal