- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'd like to capture video frame data from the "uvcvideo" V4L2 device driver, using a number of pixel formats commonly used by webcams like NV12, UYVY, YUYV, etc., and then pass these video frames to a VPL session for VPP processing to convert the pixel format to an acceptable format for 10-bit HEVC encoding (e.g. NV12 -> P010 for 4:2:0, UYVY/YUYV -> Y210 for 4:2:2) on modern Intel GPUs, and then pass the output of VPL VPP processing as input into VPL ENCODE. I think I understand how to do this part OK.
I have a demo app that, for simplicity, just sends the V4L2 captured frames from an NV12 camera directly to VPL ENCODE for 8-bit HEVC encoding since that can be done without pixel format conversion.
Right now I'm simply calling MFXMemory_GetSurfaceForEncode() to get a mfxFrameSurface1 and memcpy()'ing the V4L2 frame data into the Data.Y and Data.UV members of the mfxFrameSurface1 object.
What I'd like to do is eliminate the memcpy() between V4L2 and VPL. I guess I could use either V4L2_MEMORY_MMAP (perhaps VPL can directly import the memory allocated by V4L2?) or V4L2_MEMORY_USERPTR (perhaps V4L2 can write frame data into the memory allocated by VPL?).
Is it possible to get rid of this memcpy() between V4L2 and VPL and how might I go about implementing that? Do I need to define a mfxFrameAllocator?
Thanks!
Link Copied
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page