[FFmpeg-devel] [PATCH] libkvazaar: add support for interlaced coding

Hendrik Leppkes h.leppkes at gmail.com
Fri Jan 29 12:33:52 CET 2016

On Thu, Jan 28, 2016 at 10:17 PM, Ari Koivula <ari at koivu.la> wrote:
> I'm not quite sure if I'm going about this interlacing thing correctly, so
> I figured I should send in a patch and ask.
> Is AV_CODEC_FLAG_INTERLACED_DCT the correct flag to look at? There is also
> AV_CODEC_FLAG_INTERLACED_ME, but libx264 uses only DCT.
> Is outputting more than one picture per frame ok? I figured outputting two
> fields isn't really any different from outputting two slices,

Our API doesn't allow outputting more than one packet per input frame,
HEVC Interlaced encoding was looked at for libx265 before and was put
on ice due to the same difficulty.

You could of course pack both field-pictures into the same AVPacket,
but that doesn't yield you proper timestamps for the second, and will
probably also screw up a bunch of other things later on.

Did you properly test this on longer video sequences? Either it screws
up somewhere, or it'll buffer half the fields until EOS, resulting in
massive memory requirements.

- Hendrik

More information about the ffmpeg-devel mailing list