<div dir="ltr"><div>You might find what you need by using openCV : AVframe can easily be converted to opencv Mat, then a lot of tools are available<br></div>I'll admit, though, that it's a lot like using a hammer to crush your fly...<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-04 20:21 GMT+02:00 Jorge Lúcio <span dir="ltr"><<a href="mailto:jlucio88@gmail.com" target="_blank">jlucio88@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I was using the "-pix_fmt rgb24" option, so I thought the frame was already RGB. Probably this conversion only takes place after the filter phase. Thanks for the tip, now I'll try to write my own function considering this.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-03 20:06 GMT-03:00 Gonzalo Garramuno <span dir="ltr"><<a href="mailto:ggarra13@gmail.com" target="_blank">ggarra13@gmail.com</a>></span>:<div>
<div class="h5"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 03/05/14 17:21, Jorge Lúcio wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The output could be BMP or PNG. I've tried to write my own function, but so far the best I could do was to write a black and white version of the frame. It's hard to figure out how the image data is stored on the "data" field inside the AVFrame.<br>
</blockquote>
<br></div>
There isn't a function to do what you want, albeit you can use the ffmpeg utility to do the conversion for you.<br>
The data is stored as specified in AVCodecContext->pix_fmt. In principle this means some form of YUV (YUV422 or YUV444 usually). Your white image is probably the first luminance channel you extract from the file (Y).<br>
______________________________<u></u>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/<u></u>listinfo/libav-user</a><br>
</blockquote></div></div></div><br></div>
<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br></div>