<div dir="ltr"><div class="gmail_quote">On Fri, Jun 15, 2012 at 10:18 AM, Vijay Ajay <span dir="ltr"><<a href="mailto:namballa.vijaykumar@gmail.com" target="_blank">namballa.vijaykumar@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hai all,<br>
<br>
i am decoding jpeg using<br>
<br>
avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);<br>
<br>
I want  to save pFrame to a file i,e in yuv420  format.<br>
Can some one please help me.<br></blockquote><div> <br>You can use rawvideo format with yuv pixel format. If you want to access an `AVFrame` structure directly, you should look at `data[0]` (for Y), `data[1]` (for U), and `data[2]` (for V). For Y plane you should read `height` lines, `linesize[0]` bytes per line. For U and V planes, there will be `height/2` lines, and linesize[1] and linesize[2] will define bytes per line for each plane. `linesize` is expected to be the same for U and for V.<br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks in advance.<br>
vijay<br></blockquote><div><br>Good luck,<br>Alex <br></div></div></div>