[Libva] [libva] How to avoid mem copy during h264 encode
He Zhenwei
hezhenwei at roseek.com
Wed Jul 13 07:41:10 UTC 2016
Hi Shenquan,
Thanks for your information.
So does it means if I am using a camera,
I could use libva to create buffer first and let camera directly write data into the buffer, and thus avoid the mem copy?
Andy,
-----Original Message-----
From: Yuan, Shengquan [mailto:shengquan.yuan at intel.com]
Sent: Wednesday, July 13, 2016 3:17 PM
To: He Zhenwei; libva at lists.freedesktop.org
Subject: RE: [Libva] [libva] How to avoid mem copy during h264 encode
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:libva-bounces at lists.freedesktop.org] On Behalf Of He Zhenwei
Sent: Wednesday, July 13, 2016 2:40 PM
To: libva at lists.freedesktop.org
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
Libva at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libva
More information about the Libva
mailing list