I tried hard to convert a raw yuv 4:2:2 image to rgb colorspace, without success. (shouldn't a common yuv -> rgb convertion be an easy go for the powerful ImageMagick?)
one of my trial was: $ convert -verbose -size 768x576 -sampling-factor 4:2:2 -depth 8 yuv:yuv rgb:rgb yuv:yuv=>yuv YUV 768x576 768x576+0+0 DirectClass 8-bit 864kb yuv:yuv=>rgb YUV 768x576 768x576+0+0 DirectClass 8-bit 1.26562mb unfortunately "rgb" seemed not what I expected. My fault/stupidity, or ... convert's? Here is how they looked like: $ od -tx1 yuv|head 0000000 10 80 10 80 10 80 10 80 10 80 10 80 10 80 10 80 * 0000200 10 80 10 80 10 80 10 80 10 80 10 80 10 80 11 80 0000220 10 80 10 80 10 80 10 80 10 80 10 80 10 80 10 80 * 0000360 10 80 10 80 10 80 11 80 10 80 10 80 10 80 10 80 0000400 10 80 10 80 10 80 10 80 10 80 10 80 10 80 10 80 * 0000520 10 80 10 80 10 80 10 80 10 80 11 80 10 80 10 80 0000540 10 80 10 80 10 80 10 80 10 80 10 80 10 80 10 80 $ od -tx1 rgb|head 0000000 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 0000020 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 0000040 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 0000060 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 0000100 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 0000120 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 0000140 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 0000160 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 0000200 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 0000220 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 f5 00 00 I found that mplayer gave me the expected result: $ mplayer -demuxer rawvideo -rawvideo w=768:h=576:yuy2 yuv -vo png ... (produced 00000001.png. I "display"ed it, found that a correct image.) $ convert 00000001.png rgb:mp.rgb $ od -tx1 mp.rgb|head 0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0000320 00 00 00 00 00 01 00 01 00 00 00 00 00 00 00 00 0000340 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0000560 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 0000600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 0001000 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 0001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 $ convert -version Version: ImageMagick 6.3.7 08/07/09 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC $ dpkg -l imagemagick Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-=============================-=============================-========================================================================== ii imagemagick 7:6.3.7.9.dfsg2-1~lenny3 image manipulation programs yu ning _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
