[FFmpeg-devel] Allocating a single YUV buffer rather than 3?
wm4
nfxjfg at googlemail.com
Mon Feb 1 16:22:23 CET 2016
On Mon, 01 Feb 2016 15:17:51 +0000
John Cox <jc at kynesim.co.uk> wrote:
> Hi
>
> In order to get a copy-free display on my target h/w I need to have my
> decode output YUV planes contiguous. The default allocater gets each
> plane separately (so they aren't or at least aren't always). Is there a
> simple preferred way of getting this to work? I've got slightly lost in
> the maze of twisty little frame/buffer allocation functions and a
> pointer to the right place would be extremely helpful.
>
> If methods vary by decoder/format then I'm only really interested in
> H.265 8-bit 4:2:0 at the moment.
Override the get_buffer2 callback, and allocate your own frame in it.
(It must be refcounted, meaning the plane data points to 1 or more
AVBufferRefs listed in AVFrame.buf.)
Also, this is the wrong mailing list for API usage questions.
More information about the ffmpeg-devel
mailing list