On Mon, Apr 14, 2014 at 3:29 PM, Roman Savchenko <[email protected]> wrote:
> Hi All,
> For first I add AV_FRAME_DATA_MB_TYPE and AV_FRAME_DATA_MOTION_VAL in
> AVFrameSideData enum.

So far so good.

> For second i try to decide what type (or rather copy) in side data  I
> should use. Because If I'll use AVBufferRef I must (should I?) to ref with
> av_buffer_ref. But it will provide a allocation for AVBufferRef and
> AVFrameSideData will provide allocation for AVBufferRef too.  It'll not be
> a problem if I will copy by value.

the "data" field can be anything, you can put an AVBufferRef. If you
need to use the values directly you can just memcpy it (I think) but
if you want to use it normally you'll have to ref/unref it when you
get it from get_side_data. Sorry I can't help you further about
AVBufferRef as i'm not much familiar with those.

> For third, its pretty the same as second, what type of copy should I use to
> copy H264Picture.motion_val. If it will be a deep copy should I expand
> memory to one line or simply provide AV_FRAME_DATA_MOTION_VAL0,
> AV_FRAME_DATA_MOTION_VAL1?

If you use AVBufferRef you can store it directly in data, like
explained above. Or if data is more complex you have to create a data
type in libavutil and store that new struct instead.

> For fourth, and last, can I use expanded_data rather side_data? Where
> should I store knowledge about indexes?

I think side data is more appropriate for this kind of stuff.

-- 
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to