We have not seen any issues like that here. As a sanity check I also verified with a similar setup as yours and did not encounter any issues.
I suspect your issue may be related to raw yuv input content not actually being of the specified dimension, such as 720x480? Could you please double check by regenerating the yuv content or checking the content in a yuv viewer tool?
Also, looking at your code it seems the variables"extBuffersInit" and "extCO" are created in the encoder init scope (function)? Is that correct? If so I instead suggest you put
in the owning class to make sure they do not get destroyed when going out of scope.
If you still have issues could you please provide some more details about your system setup, such as driver version, did you use SW or HW encode etc.
I finally solve my problem! I was missing the pitch member of the mfxSurface for both encoding and decoding, I was only using the real width of the video. I added the management of the pitch and it works well now.