[Libav-user] save YUV420p file
alexcohn at netvision.net.il
Tue Jun 19 08:24:22 CEST 2012
On Fri, Jun 15, 2012 at 10:18 AM, Vijay Ajay
<namballa.vijaykumar at gmail.com>wrote:
> Hai all,
> i am decoding jpeg using
> avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
> I want to save pFrame to a file i,e in yuv420 format.
> Can some one please help me.
You can use rawvideo format with yuv pixel format. If you want to access an
`AVFrame` structure directly, you should look at `data` (for Y),
`data` (for U), and `data` (for V). For Y plane you should read
`height` lines, `linesize` bytes per line. For U and V planes, there
will be `height/2` lines, and linesize and linesize will define bytes
per line for each plane. `linesize` is expected to be the same for U and
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user