[x264-devel] A warning about x264_picture_t initialization
Jason Garrett-Glaser
darkshikari at gmail.com
Fri Jun 4 07:36:06 CEST 2010
To all x264 library users,
It appears that there has been an implicit, but undocumented
requirement until now that all the fields of x264_picture_t be
initialized to valid values by the calling application (in the case
that x264_picture_alloc is not used). This requirement has been
satisfied, usually, by memsetting it. However, this is not guaranteed
to work for all future cases, as all-zero may not always be a valid
initial state in future versions. Thus, we have added
x264_picture_init() which can be used to initialize a new
x264_picture_t to valid default values (for the data outside of the
actual image data). You still have to load your pointers, stride,
colorspace, and i_plane values in, of course.
We strongly recommend that calling applications not using
x264_picture_alloc switch to using x264_picture_init. Applications
using x264_picture_alloc need not change anything; alloc now calls
init internally.
Dark Shikari
More information about the x264-devel
mailing list