[vlc-devel] Q: Deinterlacer merge function
remi at remlab.net
Thu Aug 2 15:28:10 CEST 2012
I am looking at the Merge() function in the deinterlacer. There seems to be
confusion with the picture pitches, and/or in my brain:
On the one hand, linear, mean and blend modes assume that the input pitch is
smaller (or equal) to the output pitch. If this is not true, an overflow will
occur while running memcpy() or Merge().
On the other hand, the IVTC and Phosphor (i.e. ComposeFrame()) check the
visible widths instead of the pitches. They make no assumptions: neither that
both input pitches are equal, nor that the input pitches and the output pitch
While the latter approach is certainly safe, it is suboptimal: The picture
widths are not so SIMD-friendly power-of-two multiples as picture pitches.
Also, if all pitches are equal, the Merge() operation for each plane could be
all done in one go, rather than one scan line at a time.
So hmm, can the the pitches from the two input pictures actually be different
(for the same plane, of course)? I'd think they have to be equal to the width
of the video format...
Also, can the output pitch differ from the input pitch?
How come the filter only checks chroma and height after GetOutputFormat()?
More information about the vlc-devel