[FFmpeg-devel] [RFC] libswscale and non-chroma-aligned slices

Stefano Sabatini stefano.sabatini-lala
Sat Jan 9 17:40:36 CET 2010

Hi all,

libswscale issues slices with weird heigth, for example:
y:100 h:9
y:119 h:9
y:128 h:10

this with an yuv420p output, so I'd expect for each slice an height
which is a multiple of vsub^2, that is:
h == (h & ~((1 << vsub) - 1));

For example for the previous case I'd rather expect:
y:100 h:8
y:118 h:10
y:128 h:10

I suppose the chroma components lines associated to the last luminance
line is already filled, anyway it would be a lot simpler to make the
scaler always return already chroma-aligned h values, this would
simplify the logic required from each filter dealing with such slices,
which gets complicated especially with negative slice direction

FFmpeg = Foolish and Faithless Merciful Problematic Esoteric Gargoyle

More information about the ffmpeg-devel mailing list