Log in

View Full Version : How to flip image upside-down?


junglemike
12th June 2006, 21:40
Hi all. I want to compare some tests i made for PSNR with Xvid and AVC. The problem is that when i open .mp4 or .mkv file containing H264 video stream with DirectShowSource() - the image gets upside down. I tried reinstalling FFdshow, Avisinth, - doesn't help. So I would like to use a command to flip it back again, so i could compare it with original for PSNR.
PS. I did a search - no results, I also read avisynth docs and didn't find such command there. I only know flip commands in VirtualDub, but it doesnt' help.

kohsaf1
12th June 2006, 21:54
http://www.avisynth.org/DirectShowSource

read the first point under "caveats"

krieger2005
12th June 2006, 21:56
FlipVertical() and FlipHorizontal()

IanB
13th June 2006, 01:21
or Turn180()

stickboy
13th June 2006, 10:16
Well, in his case he probably wants FlipVertical by itself. (Are there really broken codecs that have the horizontal axis wrong?)

foxyshadis
13th June 2006, 18:21
RGB is normally flipped on windows (upside down .bmp and all that). I think some DirectDraw hardware overlay also gets flipped depending on how you call it, or maybe the card it's called on. So if a codec thinks it's writing to something like that it'll just flip the video.