av plane function 'from_ndarray' implementation
Created by: mkassner
During decoding this actually accounts for about 15% of the process cpu time:
# TODO: Use the buffer protocol.
frame.planes[0].update_from_string(array.tostring())
The Python buffer object pointing to the start of the array’s data is simple array.data. I just don't know how hard implementing frame.planes[0].from_buffer
would be in order to avoid the copy.