[Ffmpeg-devel] Re: Motion Jpeg to mpeg2

Burkhard Plaum plaum
Wed Aug 10 13:36:19 CEST 2005

> My basic code goes something like this:
> register codecs
> allocate a temporary picture (with final width & height)
> for each image:
>    read image from file
>    img_convert -- from file image to YUV420 using temp pict

The problem is, that JPEG YUV420 isn't the same as MPEG2 YUV420.
The different ranges of the values (MPEG has limited range, JEPG 
is full range), can be converted with img_convert, but the Chroma 
placement is also different as explained here:


If you are lucky (and don't look too closely) you might not notice the
error, but doing this 100% correct involves resampling the chroma planes.


More information about the ffmpeg-devel mailing list