From simpleD3D9Texture to RGB -> YUV conversion

Can anyone tell me howcome my image I read is turned 180 degrees? I did a RGB -> YUV conversion…

Anyone has an idea where I have to look to find out my mistake?

Thanks in advance!