[FFmpeg-devel] [RFC/PATCH]Interlaced lossless

Dave Rice dave at dericed.com
Mon Jan 28 17:01:10 CET 2013

Hi Peter,

On Jan 28, 2013, at 10:50 AM, Peter B. wrote:
> Quoting Tim Nicholson <nichot20 at yahoo.com>:
>> For lossless codecs I'm not sure that the codec will work any
>> differently between interlace and progressive, you just nee to ensure
>> that the final output is flagged correctly.
> The good thing about lossless is, that the bits will be preserved. However, I do suspect that, depending on the encoding algorithm, different compression ratios might be achieved if the material is encoded differently, depending on whether the source was interlaced or progressive.
> For example, usually codecs looove adjacent areas with similar colors, right? Even lossless ones (I hope I'm not talking bullshit here).
> So, if the encoder encodes fields (for interlaced) rather than frames, there would be more similar-colored pixels adjacent to each other than if encoded progressively.
> Same goes for progressive material: If encoded field-wise, you might lose compression possibly gained by adjacent similar-colored pixels/areas.

I think you're right. For files created from interlaced source material (most analog video tapes), the lossless compression can be more effective when compressing fields rather than frames. Here's an example of that style, http://archive.org/download/sample_losslessj2k_mxf/test-jpeg2000-color-wsound1.mxf, where the jpeg2000 encoding is done per field.
Dave Rice

More information about the ffmpeg-devel mailing list