[FFmpeg-devel] [PATCH] libavcodec/libdav1d: add libdav1d_get_format method to call ff_get_format

2019-04-10 Thread Lukas Rusak
This will allow applications to properly init the decoder in cases where a hardware decoder is tried first and and software decoder is tried after by calling the get_format callback. Even though there is no hardware pixel formats available we still need to return the software pixel format. Tested

Re: [FFmpeg-devel] [PATCH] libavcodec/libdav1d: add libdav1d_get_format method to call ff_get_format

2019-04-12 Thread Lukas Rusak
On Thu, 2019-04-11 at 21:03 +0200, Hendrik Leppkes wrote: > On Thu, Apr 11, 2019 at 7:47 PM Peter F > wrote: > > Hi, > > > > Am Do., 11. Apr. 2019 um 00:50 Uhr schrieb Hendrik Leppkes > > : > > > On Thu, Apr 11, 2019 at 12:39 AM Lukas Rusak > > >

[FFmpeg-devel] [PATCH] libavcodec: v4l2m2m: allow lower minimum buffer values

2020-05-07 Thread Lukas Rusak
There is no reason to enforce a high minimum. In the context of streaming only a few output buffers and capture buffers are even needed for continuous playback. This also helps alleviate memory pressure when decoding 4K media. --- libavcodec/v4l2_m2m.h | 2 +- libavcodec/v4l2_m2m_dec.c | 2 +-

[FFmpeg-devel] [PATCH 2/3] libavcodec: v4l2m2m: output AVDRMFrameDescriptor

2018-05-08 Thread Lukas Rusak
This is V2 of my previous patch. I have worked together with Jorge to get this working properly. We have made it so that AV_PIX_FMT_DRM_PRIME output can be selected by setting avctx->pix_fmt. This allows v4l2 to export the buffer so we can use it for zero-copy. If AV_PIX_FMT_DRM_PRIME is not sel

[FFmpeg-devel] [PATCH 3/3] libavcodec: v4l2m2m: fix error handling during buffer init

2018-05-08 Thread Lukas Rusak
From: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz --- libavcodec/v4l2_context.c | 19 --- libavcodec/v4l2_m2m_dec.c | 11 --- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c index 9457fadb1e

[FFmpeg-devel] [PATCH 1/3] libavcodec: v4l2m2m: fix indentation and add M2MDEC_CLASS

2018-05-08 Thread Lukas Rusak
This is just some formatting that is taken from the rkmpp decoder. I find that this make is more readable. --- libavcodec/v4l2_m2m_dec.c | 44 --- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_de

[FFmpeg-devel] [PATCH 1/3] libavcodec/v4l2_buffers: return int64_t in v4l2_get_pts

2018-01-08 Thread Lukas Rusak
v4l2_pts is type int64_t we should return that instead of uint64_t --- libavcodec/v4l2_buffers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c index ba70c5d14b..fdafe7edca 100644 --- a/libavcodec/v4l2_buffers.c +++ b/liba

[FFmpeg-devel] [PATCH 2/3] libavcodec/v4l2_buffers: check for valid pts value

2018-01-08 Thread Lukas Rusak
we check for a valid pts in v4l2_set_pts so we should do the same here --- libavcodec/v4l2_buffers.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c index fdafe7edca..5337f6f287 100644 --- a/libavcodec/v4l2_buffers.c ++

[FFmpeg-devel] [PATCH 3/3] libavcodec/v4l2_m2m_dec: set default time base

2018-01-08 Thread Lukas Rusak
This default time base should be set in order for ffmpeg to rescale the timebase in v4l2_get_pts and v4l2_set_pts --- libavcodec/v4l2_m2m_dec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c index 8308613978..4de091a011 100644 --- a/li

[FFmpeg-devel] [PATCH 0/3] v4l2: some small fixes

2018-01-08 Thread Lukas Rusak
Some small fixes that I have done while working with v4l2 Lukas Rusak (3): libavcodec/v4l2_buffers: return int64_t in v4l2_get_pts libavcodec/v4l2_buffers: check for valid pts value libavcodec/v4l2_m2m_dec: set default time base libavcodec/v4l2_buffers.c | 7 +-- libavcodec

[FFmpeg-devel] [PATCH][RFC] libavcodec/v4l2_m2m_dec: output AVDRMFrameDescriptor

2018-01-08 Thread Lukas Rusak
This is a patch I have been testing for a while in combination with kodi's drmprime renderer I have been testing this with i.MX6 and Dragonboard 410c. So it covers single and multiplanar formats. I'm looking to get some comments on how to integrate this properly so that if we request AV_PIX_FM

Re: [FFmpeg-devel] [PATCH 2/3] libavcodec/v4l2_buffers: check for valid pts value

2018-01-08 Thread Lukas Rusak
Hmm ok, disregard then. On Mon, Jan 8, 2018 at 3:53 PM wm4 wrote: > On Mon, 8 Jan 2018 15:27:38 -0800 > Lukas Rusak wrote: > > > we check for a valid pts in v4l2_set_pts so we should do the same here > > > > --- > > libavcodec/v4l2_buffers.c | 5 - > &

Re: [FFmpeg-devel] [PATCH 3/3] libavcodec/v4l2_m2m_dec: set default time base

2018-01-08 Thread Lukas Rusak
15:27:39 -0800 > Lukas Rusak wrote: > > > This default time base should be set in order for ffmpeg to rescale the > timebase in v4l2_get_pts and v4l2_set_pts > > > > --- > > libavcodec/v4l2_m2m_dec.c | 2 ++ > > 1 file changed, 2 insertions(+) > > &g

[FFmpeg-devel] [PATCH] libavcodec: v4l2m2m: make sure to unref avpkt

2018-06-26 Thread Lukas Rusak
This was found using valgrind. Using this patch there is no more memleak present. --- libavcodec/v4l2_m2m_dec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c index 598dc10781..710e40efd8 100644 --- a/libavcodec/v4l2_m

[FFmpeg-devel] [PATCH 2/4] libavcodec: v4l2m2m: output AVDRMFrameDescriptor

2018-08-03 Thread Lukas Rusak
This allows for a zero-copy output by exporting the v4l2 buffer then wrapping that buffer in the AVDRMFrameDescriptor like it is done in rkmpp. This has been in use for quite some time with great success on many platforms including: - Amlogic S905 - Raspberry Pi - i.MX6 - Dragonboard 410c T

[FFmpeg-devel] [PATCH 4/4] libavcodec: v4l2m2m: fix error handling during buffer init

2018-08-03 Thread Lukas Rusak
From: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz --- libavcodec/v4l2_context.c | 19 --- libavcodec/v4l2_m2m_dec.c | 9 +++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c index 9457fadb1e..

[FFmpeg-devel] [PATCH 1/4] libavcodec: v4l2m2m: fix indentation and add M2MDEC_CLASS

2018-08-03 Thread Lukas Rusak
This just makes the M2MDEC_CLASS similar to how it is done in rkmpp. It looks clean and has proper indentation --- libavcodec/v4l2_m2m_dec.c | 46 --- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m

[FFmpeg-devel] [PATCH 3/4] libavcodec: v4l2m2m: adjust formatting

2018-08-03 Thread Lukas Rusak
just some simple formatting fixes that unify the code quality --- libavcodec/v4l2_buffers.c | 23 +++ libavcodec/v4l2_buffers.h | 1 - 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c index e5c46ac81e..897c3c

Re: [FFmpeg-devel] [PATCH 2/4] libavcodec: v4l2m2m: output AVDRMFrameDescriptor

2018-08-16 Thread Lukas Rusak
On Sat, 2018-08-04 at 22:43 +0100, Mark Thompson wrote: > On 04/08/18 01:40, Lukas Rusak wrote: > > This allows for a zero-copy output by exporting the v4l2 buffer > > then wrapping that buffer > > in the AVDRMFrameDescriptor like it is done in rkmpp. > > > > Th

Re: [FFmpeg-devel] [PATCH 2/4] libavcodec: v4l2m2m: output AVDRMFrameDescriptor

2018-08-16 Thread Lukas Rusak
Just an FYI i will be developing here if anyone wants to comment and/or PR other changes for V4. https://github.com/lrusak/FFmpeg/commits/v4l2-drmprime-v4 > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo