[Libav-user] Scale image from 4:2:2 to 4:2:0

David Sze sze.david at gmail.com
Fri Mar 30 00:01:11 CEST 2012


On Thu, Mar 29, 2012 at 11:34 AM, Ушаков Андрей <sorcchan at gmail.com> wrote:

> Hello all!
>
> 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?
>
> Here is the code: http://dl.dropbox.com/u/43123609/swsscale.c commands
> how to compile, run and see result in comment in code.
> Here you can download video example to test:
> http://dl.dropbox.com/u/43123609/video422.raw Ouch! Size is 120 Mb
> Here you can see result without compile, run, etc:
> http://dl.dropbox.com/u/43123609/Screenshot-1.png



The comments in your source file say:


 * Watch original video:
 * vlc video422.raw :demux=rawvid --rawvid-fps=25 --rawvid-width=720
--rawvid-height=576 --rawvid-chroma=UYVY
 * Watch "scaled" result:
 * vlc video420p.raw :demux=rawvid --rawvid-fps=25 --rawvid-width=720
--rawvid-height=576 --rawvid-chroma=YV12


So you probably should be using PIX_FMT_UYVY422 instead of PIX_FMT_YUYV422
when doing the conversion.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120329/d4fbfc0e/attachment.html>


More information about the Libav-user mailing list