pinterf / masktools

MaskTools v2 fork
Other
48 stars 11 forks source link

mt_motion() mask from 10-bit input causes color garbage - rounding error? #7

Closed vasyl-zabolotniy closed 4 years ago

vasyl-zabolotniy commented 4 years ago

Seems like a rounding errors/trailing bits, considering the workaround. Code to see the defect:

#  YUV422P10 source with some noise or movement

mt_merge(RemoveGrain(17), mt_motion(chroma="-128"), luma=true)

Workaround that works:

mask = ConvertBits(ConvertBits(mt_motion(chroma="-128"),8),10)
mt_merge(RemoveGrain(17), mask, luma=true)
pinterf commented 4 years ago

Thanks for the report, fixed on git. Code was always using mask values for the 16 bit case even for 10-14 bits.