I've a problem related to this. I've learned from this topic how to do YV12<-->RGB32 conversion without chroma shift, but in-between I have to do some cropping as well. When I use even numbers to crop, everything is fine:
Code:
ConvertToYV24(chromaresample="point")
MergeChroma(PointResize(width, height, 0, 1))
ConvertToRGB32()
Crop(10,104,-10,-100)
# ...filtering, etc...
ConvertToYV12(chromaresample="point")
# ...further filtering, etc...
AddBorders(10,104,10,100)
...but when I crop by odd values, things gets nasty:
Code:
ConvertToYV24(chromaresample="point")
MergeChroma(PointResize(width, height, 0, 1))
ConvertToRGB32()
Crop(10,105,-10,-99)
# ...filtering, etc...
ConvertToYV12(chromaresample="point")
# ...further filtering, etc...
ss=2
PointResize(width*ss, height*ss)
AddBorders(10*ss, 105*ss, 10*ss, 99*ss)
PointResize(width/ss, height/ss)
The cropping by odd numbers (and adding the borders back eventually with supersampling) leads to heavy chroma shift, very noticeably on the red parts. I suspect that the PointResize() is responsible for this, but I don't know how to avoid it. Can you help?