[FFmpeg-devel] AVFrame linesize and OpenGL GL_UNPACK_ROW_LENGTH

Pavel Koshevoy pkoshevoy at gmail.com
Tue May 7 06:57:37 CEST 2013


On 05/06/2013 10:27 PM, Reimar Döffinger wrote:
> On Mon, May 06, 2013 at 10:06:39PM -0600, Pavel Koshevoy wrote:
>> If AVFrame data rows are not pixel aligned then data has to be
>> copied row-by-row into an intermediate frame with compatible
>> alignment.  It's wasteful and I would like to avoid this because it
>> noticably hurts playback performance in my player.
> There's loads and loads more stuff that can hurt your performance,
> for example ATI (used to?) have rather bad performance unless you used
> PBOs - even doing an extra memcpy into the PBO would improve performance.
> You might be interested in looking into MPlayer's -vo gl code,
> particularly if GPL would be acceptable (but even if not, looking
> is always ok).
>


I don't have any ATI hardware to test with, but I will test on PPC G4 with 
GeForce 4MX card, and on Intel GMA950.  Thank's for the hints.

I have a couple of my own OpenGL video rendering canvas implementations.  One 
that works with legacy OpenGL 1.2 (seamlessly tiles rectangular frames as 
power-of-two texture), and a more modern version that uses non-power-of-two 
textures.  They've served me well, and the code is MIT licensed -- 
http://sourceforge.net/projects/apprenticevideo/

Thank you,
     Pavel.



More information about the ffmpeg-devel mailing list