#2: unified pix-orientation
- Contents
- Proposed by
- IOhannes m zmölnig
- Proposal type
- Architecture
- State
- being-discussed
Motivation
pixes of different orientation (upsidedown=false, upsidedown=true) make more problems then they solve
- mixing pixes gives weird results
- texture-coordinates handling becomes complicated
- e.g. uv-texturing of ![model]
Assumptions
definitions
- "upsidedown" means that the pix is delivered with top-down orientation and the "upsidedown" flag is set
- "manually flipped" means, that the pixes are acquired with top-down but are then flipped using CPU-cycles and delivered as bottom-down
- "row indices" indicates that the pix is acquired bottom-up by copying the image line-by-line; thus performance should be the same whether the image is delivered bottom-up and top-down
- "unflipped" delivers pixes bottom-up which is how the pixes are natively acquired
current state:
image-sources:
- magickImage2mem:
manually flipped from top-down to bottom-up
- tiffImage2mem
manually flipped from top-down to bottom-up
- jpegImage2mem
manually flipping the image(?)
- sgiImage2mem (iris image format)
unflipped(?)
- QtImage2mem (OSX)
- filmQT
upsidedown
- filmDarwin (OSX)
- filmQT4L
row-indices
- filmMPEG3
RGBA: row-indices
YUV: upsidedown
- filmMPEG1
upsidedown
- filmGMERLIN
upsidedown
- filmFFMPEG
upsidedown
- filmDS (DirectShow)
unflipped(?)
- filmAVIPLAY
upsidedown
- filmAVI (VfW)
unflipped (manually?)
- videoDV4L
upsidedown
- videoV4L
upsidedown
- videoV4L2
upsidedown
backend-specific objects
- pix_filmQT
upsidedown
- pix_videoSGI
manually flipped
- pix_filmDarwin (OSX)
- pix_filmNT (VfW)
- pix_videoDS (DirectShow)
- pix_videoNT (VfW)
- pix_videoDarwin (OSX)
OS specifics
- OSX:
everything is upsidedown
- w32:
- see http://www.microsoft.com/whdc/archive/biheight.mspx
- VfW
- RGBA bottom-up
- YUV top-down
- DirectDraw: top-down
- DirectShow: both?
Proposal
all pixes should be of the same orientation
i propose that this orientation should be top-down (as opposed to the openGL-default bottom-up), since most video-codecs will deliver the images top-down anyhow
for static images the penalty of flipping the images should be minimal
Risks
the only problem is see is with generated images (using [pix_snap], [pix_snap2tex], [gemframebuffer]), as these will have the default openGL orientation (thus re-introducing the wrong orientation)