<div class="gmail_quote">On Thu, Mar 29, 2012 at 11:34 AM, Ушаков Андрей <span dir="ltr"><<a href="mailto:sorcchan@gmail.com">sorcchan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello all!<br><br>I've try to convert my video from YUV 4:2:2 format (PIX_FMT_YUYV422) to YUV 4:2:0 (PIX_FMT_YUV420P). Doesn't work properly. Can some one help?<br><br>Here is the code: <a href="http://dl.dropbox.com/u/43123609/swsscale.c" target="_blank">http://dl.dropbox.com/u/43123609/swsscale.c</a> commands how to compile, run and see result in comment in code.<br>


Here you can download video example to test: <a href="http://dl.dropbox.com/u/43123609/video422.raw" target="_blank">http://dl.dropbox.com/u/43123609/video422.raw</a> Ouch! Size is 120 Mb<br>Here you can see result without compile, run, etc: <a href="http://dl.dropbox.com/u/43123609/Screenshot-1.png" target="_blank">http://dl.dropbox.com/u/43123609/Screenshot-1.png</a></blockquote>

<div><br></div><div><br></div><div>The comments in your source file say:</div><div><br></div><div><br></div><div><div> * Watch original video:</div><div> * vlc video422.raw :demux=rawvid --rawvid-fps=25 --rawvid-width=720 --rawvid-height=576 --rawvid-chroma=UYVY</div>

<div> * Watch "scaled" result:</div><div> * vlc video420p.raw :demux=rawvid --rawvid-fps=25 --rawvid-width=720 --rawvid-height=576 --rawvid-chroma=YV12</div></div><div><br></div><div><br></div><div>So you probably should be using PIX_FMT_UYVY422 instead of PIX_FMT_YUYV422 when doing the conversion.</div>

<div><br></div></div>