PDA

View Full Version : Crazy bug, RGB->YV12


mf
24th November 2003, 16:14
I was writing some new functions while suddenly I got this:
http://mf.creations.nl/convertbug.png

While calling this function:
function PointConvertToYV12(clip input, bool "silent") {
silent = Default(silent, false) # stfu and convert anyway if input is YV12

input.PointResize(input.width*2, input.height*2)
ConvertToYV12()
big = last

input.ConvertToYV12().GreyScale()
y = last

big.UToY()
PointResize(input.width/2, input.height/2)
u = last

big.VToY()
PointResize(input.width/2, input.height/2)
v = last

YToUV(u, v, y)
converted = last

isnotyv12 = input.IsYV12() ? false : true

silent ? Assert(isnotyv12, "Input is YV12, you're doing a useless conversion. Set silent=true \
to get rid of this msg.") : nop()

return converted

}

This happens only when input is RGB. Input size was 640x480.

sh0dan
24th November 2003, 16:46
I cannot reproduce. Could I get a piece of your source and the complete script to reproduce?

Does the same thing happend if you use Bilinearresize? Pointresize has a known bug (http://sourceforge.net/tracker/index.php?func=detail&aid=834266&group_id=57023&atid=482673).

mf
24th November 2003, 19:58
Originally posted by sh0dan
Does the same thing happend if you use Bilinearresize? Pointresize has a known bug (http://sourceforge.net/tracker/index.php?func=detail&aid=834266&group_id=57023&atid=482673).
Nope. I'll see if I can workaround, thanks.