[Libav-user] Scale image from 4:2:2 to 4:2:0
David Sze
sze.david at gmail.com
Fri Mar 30 14:55:56 CEST 2012
On Fri, Mar 30, 2012 at 4:57 AM, Ушаков Андрей <sorcchan at gmail.com> wrote:
> 30 марта 2012 г. 2:01 пользователь David Sze <sze.david at gmail.com>написал:
>
>>
>> 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.
>>
>
> Thanks a lot, David! :) Now all works perfectly. I just thought YUYV and
> UYVY is the same.
>
> One more question: what PixelFormat is YV12? As I see its not
> PIX_FMT_YUV420P.
>
They're similar, but the U and V planes are swapped.
http://wiki.videolan.org/YUV#YUV_4:2:0_.28I420.2FJ420.2FYV12.29
http://en.wikipedia.org/wiki/YUV#Y.27UV420p_.28and_Y.27V12_or_YV12.29_to_RGB888_conversion
http://www.fourcc.org/yuv.php#YV12
http://www.fourcc.org/yuv.php#IYUV
Note that YUV420P is a.k.a. I420 and IYUV.
The vlc parameter you pass to watch the scaled frame should be I420 instead
of YV12.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120330/2c858447/attachment.html>
More information about the Libav-user
mailing list