[x264-devel] avoiding copying x264_picture_t

Jason Garrett-Glaser darkshikari at gmail.com
Mon Aug 30 22:34:37 CEST 2010


On Mon, Aug 30, 2010 at 1:17 PM, Dennis Munsie <dmunsie at gmail.com> wrote:
> Hi --
> I have a question about the x264_picture_t that gets passed into
> x264_encoder_encode() -- would it be possible for the encoder to not copy
> the YUV buffer and work off the pointer to the YUV buffer directly?  I
> already have a mechanism in my code that would insure that the YUV data that
> I provide in the x264_picture_t could stay around until the library
> indicates that it no longer needs that picture.  I'm just not using it at
> the moment because x264 copies the frame data.  Even if this required
> additional restrictions on the picture that is passed in (such
> as alignment), I could work those into my program.
> I don't know if this would yield a noticeable improvement in encoding speed
> or not -- it may have been that this has been looked into in the past and
> there wasn't a clear win.  If that is the case, my apologies in advance.
> Thanks!
> dennis

I have a draft patch for this from a while back.  There would be two
restrictions:

1.  It would have to be a memory buffer of x264's choosing.
2.  It would have to be stored as NV12.

Dark Shikari


More information about the x264-devel mailing list