A few things going on here:
VPX_IMG_FMT_ARGB is not supported. You'll have to convert to YV12/I420.
You don't have to allocate anything every time with vpx_img_wrap().
Use a non-NULL first parameter and it will update that structure with
a descriptor that describes the buffer you've given it.
Generally, if you have the data in a buffer already, you want to use
vpx_img_wrap() to avoid a copy. If you need to copy the data anyway,
then use vpx_img_alloc(), unless you really want to allocate the
buffer yourself.
For copying the data into the buffer, you can do it in one memcpy()
iff you know that the planes have the same offset, same strides, etc.
Otherwise, do a per-row memcpy, honoring the src and dst strides of
each plane.
> --
> You received this message because you are subscribed to the Google Groups
> "WebM Discussion" group.
> To view this discussion on the web visit
>
https://groups.google.com/a/webmproject.org/d/msg/webm-discuss/-/Im0i_Y_4V50J.
> To post to this group, send email to
webm-d...@webmproject.org.
> To unsubscribe from this group, send email to
>
webm-discuss...@webmproject.org.
> For more options, visit this group at
>
http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.