Jaded-Encoding-Thaumaturgy/vs-kernels

Expand cross conversion shifting params

LightArrowsEXE opened this issue · 3 comments

Currently it's not clear to me whether we can really affect the shift introduced during the resampling of interlaced video.

top_shift, field_shift = de_kwargs.get('src_top', 0.0), 0.125 * height / clip.height
fields = clip.std.SeparateFields(field_based.is_tff)
interleaved = core.std.Interleave([
self.descale_function(fields[offset::2], **(de_kwargs | dict(src_top=top_shift + (field_shift * mult))))
for offset, mult in [(0, 1), (1, -1)]
])

Specifically, some implementations may improperly shift the fields in the same direction (@wiwaz can clarify or correct me here), however currently, to my understanding, there's no way to follow this behaviour, making it impossible to descale it the same way unless you separate the fields yourself. This is rather impractical in certain situations where you have to check different kernels for every frame. Having some kind of way to either override these parameters or toggle between different directions and the same direction would be nice.

Are you asking me to add different shift per field? If so, no; out of scope.

Not out of scope, per-field src_top adjustment is necessary for this.

then, any decent api you suggest?