[x264-devel] updated from x264 rev57 to rev65 and got "invalid CSP" errors

Jason Garrett-Glaser darkshikari at gmail.com
Wed Dec 10 14:34:42 CET 2008


On Wed, Dec 10, 2008 at 5:30 AM, Horst Weglanz <weglanz12 at yahoo.com> wrote:
> Hello
>
> I've been using libx264 since about a year in my application  (Build 57) and wanted to upgrade to a more recent one (Build 65). The problem is now I'm getting the following error with each frame:
>
> | x264 [error]: Arg invalid CSP
> | x264 [error]: Arg invalid CSP
> | x264 [error]: Arg invalid CSP
>
> probably since this change:
> http://trac.videolan.org/x264/changeset/733
>
> The output stream should in fact be in i420, but my source material isn't and currently I'm allocating my pictures this way (which worked fine before):
>
> | x264_picture_t pic;
> | x264_picture_alloc( &pic, X264_CSP_BGR, par.i_width, par.i_height);
>
> How can I encode RGB (or in this case BGR) material with the recent version?

x264 has never been able to encode any colorspace other than YV12.
Colorspace conversion support was removed because video encoders have
no business containing such code: their job is to encode video, not
decode or convert the input.

You can either trivially write your own conversion routine for
BGR->YV12, or you can use one of many existing libraries for that
purpose if you want something that's fast.  Libavcodec's swscale is an
example of a library with fast YV12 conversion.

Dark Shikari


More information about the x264-devel mailing list