[Libav-user] Help with unpacking PIX_FMT_YUV4* data types

wm4 nfxjfg at googlemail.com
Wed Mar 12 01:03:25 CET 2014


On Mon, 10 Mar 2014 18:32:54 -0700
Ricky Huang <rhuang.work at gmail.com> wrote:

> >>> AVFilterBufferRef *cur_pic = link->cur_buf;
> >>> uint8_t *data = cur_pic->data[0];
> > 
> > I think this functionality was removed long ago. You're supposed to
> > write/read AVFrames from the filters.
> 
> 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.

Sure is ancient...

> Or maybe I am missing something obvious here?  Can you help me out with how to use AVFrame to extract the luminance component?

AVFrame works similar to AVFilterBufferRef. Assuming the data member
contains the plane pointers, data[0] will contain the plane with the
luminance data.


More information about the Libav-user mailing list