You can't avoid mem copy in this test app:h264encode If you encode from a YUV file (cmdline option -srcyuv Yuv_File), it will mem copy every frame into current encoding surface Without option "-srcyuv Yuv_File", h264encode will pre-fill 16 surfaces with a black-white checker board pattern and do the encoding in a loop way, and after 16 frames, there is mem copy any more. This way can be used for performance testing.
In real use case, the encoding content is usually from camera or decoder (e.g. transcoding), with proper buffer sharing (e.g. dmabuf) design, there is no memcopy. -----Original Message----- From: Libva [mailto:[email protected]] On Behalf Of He Zhenwei Sent: Wednesday, July 13, 2016 2:40 PM To: [email protected] Subject: [Libva] [libva] How to avoid mem copy during h264 encode Hi All, I am new to libva. I am now asked to do an h264 encode. There is example in the libva test folder. Anyway, I noticed that there is a memory copy while uploading the source data, which cost quite lot of CPU time. Is there anyway to avoid memcpy ? Thanks a lot. Andy _______________________________________________ Libva mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libva _______________________________________________ Libva mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libva
