I have successfully import libavcodec library into a iphone application project, and I used it to decode a movie file into YUV420P data, so that I can get all the frames of the movie then convert them into RGB data, and so it can be displayed by OpenGL ES.
The movie can be played successfully but it is quite slow as the conversion from YUV to RGB and the display method of OpenGL (glDrawArrays) is slow.
Is there any smarter way to play the video (assuming the movie must be decoded by libavcodec)? Like display the YUV directly or convert to a YUV-like data which can be display directly? Or other display method faster than glDrawArrays? Can YUV data be loaded by Core Graphics?
Thanks for any help.
The movie can be played successfully but it is quite slow as the conversion from YUV to RGB and the display method of OpenGL (glDrawArrays) is slow.
Is there any smarter way to play the video (assuming the movie must be decoded by libavcodec)? Like display the YUV directly or convert to a YUV-like data which can be display directly? Or other display method faster than glDrawArrays? Can YUV data be loaded by Core Graphics?
Thanks for any help.