Quote:
You're using simple lineare interpolation, aren't you?
|
Yup.
Quote:
my method using edge directed interpolation using tomsmocomp (tdeint(mode=1) should work, too) has a better chroma definition on diagonales.
|
If I would know how that works, I can try to implement it
Quote:
Cb & Cr are spatially displaced by one line per field.
Do we need to include this weirdness in our reinterpolation?
|
I did. Let me tell you how I interpolate:
1) Assume clip is interlaced. The layout of the *frame* is as follows
YV1 ...
YV2 ...
YU3 ...
YU4 ...
YV5 ...
YV6 ...
YU7 ...
YU8 ...
when converting to YUY2 by the codec, the existing chroma is untouched. The missing chroma is either duplicated or point sampled (not sure which one it is).
ReInterpolate creates the missing chroma (the existing chroma is left untouched) as follows:
YV1 ... U1 = as done by codec
YV2 ... U2 = as done by codec
YU3 ... V3 = 0.5*( V1 + V5 )
YU4 ... V4 = 0.5*( V2 + V6 )
YV5 ... U5 = 0.5*( U3 + U7 )
YV6 ... U6 = 0.5*( U4 + U8 )
YU7 ...
YU8 ...
2) Assume clip is progressive. I assume that the conversion is always field-based (so codec always upsamples assuming interlaced). Perhaps this is false?
The layout of the *frame* is as follows
ReInterpolate creates the missing chroma (the existing chroma is left untouched) as follows:
YV1 ... U1 = as done by codec
YV2 ... U2 = as done by codec
YU3 ... V3 = 0.666*V2 + 0.333*V5
YU4 ... V4 = 0.333*V2 + 0.666*V5
YV5 ... U5 = 0.666*U4 + 0.333*U7
YV6 ... U6 = 0.333*U4 + 0.666*U7
YU7 ...
YU8 ...
Should I do it differently? Btw, I assume your made your YV12 test clip correctly (feeding the codec with interlaced/progressive YUY2).
Last question
Quote:
my reinterpolate420 tries to find diagonal edge to enhance the chroma resolution. but currently something seems to be slight weird. the chroma is shifted by about 1 or two pixels upwards (wilberts plugin, too!)
|
Could you post some screenshots of this?