<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 11, 2014, at 5:03 PM, wm4 <<a href="mailto:nfxjfg@googlemail.com">nfxjfg@googlemail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Mon, 10 Mar 2014 18:32:54 -0700<br>Ricky Huang <<a href="mailto:rhuang.work@gmail.com">rhuang.work@gmail.com</a>> wrote:<br><br><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">AVFilterBufferRef *cur_pic = link->cur_buf;<br>uint8_t *data = cur_pic->data[0];<br></blockquote></blockquote><br>I think this functionality was removed long ago. You're supposed to<br>write/read AVFrames from the filters.<br></blockquote><br>Due to internal reasons, we are running ffmpeg 0.7, so the primary arguments to draw_slice() is AVFilterLink*. Sorry I should have specified that when asked the question.<br></blockquote><br>Sure is ancient...<br><br><blockquote type="cite">Or maybe I am missing something obvious here? Can you help me out with how to use AVFrame to extract the luminance component?<br></blockquote><br>AVFrame works similar to AVFilterBufferRef. Assuming the data member<br>contains the plane pointers, data[0] will contain the plane with the<br>luminance data.<br></div></blockquote><div><br></div><div>Thank you for responding, wm4. Let's use this from pixfmt.h header file as an example:</div><div><br></div><div><div> PIX_FMT_YUV420P, ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)</div><div><br></div><div>Does that mean I should read in the luminance plane 2 bytes at a time and interpret it as a number together? The reason I ask that is because the linesize of data[0] is twice as wide as data[1] or data[2] (720 vs 368 and 368, respectively). Also the data point is declared as "uint8_t *", how does one determine how to interpret the type of the value - int, float, etc?</div><div><br></div></div><div>Thank you again!</div><div><br></div><br><blockquote type="cite"><div>_______________________________________________<br>Libav-user mailing list<br><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>http://ffmpeg.org/mailman/listinfo/libav-user<br></div></blockquote></div><br></body></html>