[x264-devel] Codec usage with image sequence

Jason Garrett-Glaser darkshikari at gmail.com
Wed Feb 18 18:16:08 CET 2009


On Wed, Feb 18, 2009 at 9:02 AM, Stephan Menzel <stephan.menzel at gmx.eu> wrote:
>> > As far as I understand, this format is only used in video stream
>> contexts, such as y4m.
>>
>> JPEG is YV12 as well, as are generally JPEG-2000 and most other lossy
>> image formats.
>
> Ah, OK.
> So if I got the image sequence in JPEG, I can open an image, seek for the SOS ( 'FF DA' ) and just take everything until the final 'FF D9'. Then I could copy that into x264_picture_t->img->plane and put it into the encoder? Would that suffice?

No, since JPEG is a compressed format, and you'd have to decompress it first.

> I'd think that'd be a little too easy, for there's more to fill in that struct. And pane[] has at least 3 ptrs, right?
>

Yes, the first pointer is the Y plane, the second is the U plane, the
third is the V plane.

The format of YV12 is very basic; you should be able to trivially
write a converter from RGB or another format of your choice.

Dark Shikari


More information about the x264-devel mailing list