[FFmpeg-devel] [PATCH v2 4/4] avcodec/mmaldec: fix pointer type warning

2021-09-24 Thread Ho Ming Shun
Signed-off-by: Ho Ming Shun --- libavcodec/mmaldec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 6dbb991ae1..ff8772b0a6 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -660,7 +660,7 @@ static int

[FFmpeg-devel] [PATCH v2 3/4] avcodec/mmaldec: re-use AVPacket for extra_data

2021-09-24 Thread Ho Ming Shun
extra_data and normal packets (from ff_decode_get_packet) processing do not overlap, thus we can re-use the spare AVPacket to send to ffmmal_add_packet. Furthermore, this removes allocation of AVPacket on the stack and stops using deprecated av_init_packet. Signed-off-by: Ho Ming Shun

[FFmpeg-devel] [PATCH v2 2/4] avcodec/mmaldec: use avpkt from DecodeSimpleContext

2021-09-24 Thread Ho Ming Shun
Use spare packet allocated in DecodeSimpleContext to handle packet submission into ffmmal_add_packet. Signed-off-by: Ho Ming Shun --- libavcodec/mmaldec.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index d4788b33f3

[FFmpeg-devel] [PATCH v2 1/4] avcodec/mmaldec: use decoupled dataflow

2021-09-24 Thread Ho Ming Shun
->queue_decoded_frames to grow with no way of draining the queue. Testing this with mpv streaming from a live RTSP source visibly reduced latency introduced by frames waiting in queue_decoded_frames from roughly 2s to 0. Signed-off-by: Ho Ming Shun --- libavcodec/mmaldec.c |

[FFmpeg-devel] [PATCH v2 0/4] Switch mmaldec to decoupled dataflow

2021-09-24 Thread Ho Ming Shun
v2: Signed-off and rebased This series switches mmaldec to use the decoupled dataflow API to reduce excessive buffering in the driver. At the same time, remove dependency on sizeof(AVPacket) which is deprecated. Also fix all compile warnings. Ho Ming Shun (4): avcodec/mmaldec: use decoupled

[FFmpeg-devel] [PATCH 4/4] avcodec/mmaldec: fix pointer type warning

2021-09-23 Thread Ho Ming Shun
Signed-off-by: Ho Ming Shun --- libavcodec/mmaldec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 0aad7d0bb1..8ec0fe 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -660,7 +660,7 @@ static int

[FFmpeg-devel] [PATCH 3/4] avcodec/mmaldec: re-use AVPacket for extra_data

2021-09-23 Thread Ho Ming Shun
extra_data and normal packets (from ff_decode_get_packet) processing do not overlap, thus we can re-use the spare AVPacket to send to ffmmal_add_packet. Furthermore, this removes allocation of AVPacket on the stack and stops using deprecated av_init_packet. --- libavcodec/mmaldec.c | 8 +++-

[FFmpeg-devel] [PATCH 2/4] avcodec/mmaldec: use avpkt from DecodeSimpleContext

2021-09-23 Thread Ho Ming Shun
Use spare packet allocated in DecodeSimpleContext to handle packet submission into ffmmal_add_packet. --- libavcodec/mmaldec.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index b97cc6ff5e..aab107d325 100644 --- a/libavcode

[FFmpeg-devel] [PATCH 1/4] avcodec/mmaldec: use decoupled dataflow

2021-09-23 Thread Ho Ming Shun
->queue_decoded_frames to grow with no way of draining the queue. Testing this with mpv streaming from a live RTSP source visibly reduced latency introduced by frames waiting in queue_decoded_frames from roughly 2s to 0. Signed-off-by: Ho Ming Shun --- libavcodec/mmaldec.c |

[FFmpeg-devel] [PATCH 0/4] Switch mmaldec to decoupled dataflow

2021-09-23 Thread Ho Ming Shun
This series switches mmaldec to use the decoupled dataflow API to reduce excessive buffering in the driver. At the same time, remove dependency on sizeof(AVPacket) which is deprecated. Also fix all compile warnings. Ho Ming Shun (4): avcodec/mmaldec: use decoupled dataflow avcodec/mmaldec

[FFmpeg-devel] [PATCH] avcodec/mmaldec: use decoupled dataflow

2021-09-23 Thread Ho Ming Shun
->queue_decoded_frames to grow with no way of draining the queue. Testing this with mpv streaming from an RTSP source reduced decode latency from 2s to about 0.2s. Signed-off-by: Ho Ming Shun --- libavcodec/mmaldec.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) d

[FFmpeg-devel] [PATCH 2/2] avcodec/mmaldec: fix deprecation warning

2021-09-23 Thread Ho Ming Shun
Signed-off-by: Ho Ming Shun --- libavcodec/mmaldec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 5b75a1e74d..96140bf53d 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -772,7 +772,9 @@ static int ffmmal_decode

[FFmpeg-devel] [PATCH 1/2] avcodec/mmaldec: fix pointer type warning

2021-09-23 Thread Ho Ming Shun
Signed-off-by: Ho Ming Shun --- libavcodec/mmaldec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 8c7d749742..5b75a1e74d 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -651,7 +651,7 @@ static int

[FFmpeg-devel] [PATCH] avcodec/mmaldec: fix decoder freeze when flushing

2021-09-16 Thread Ho Ming Shun
/pull/9189 Signed-off-by: Ho Ming Shun --- libavcodec/mmaldec.c | 38 +++--- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 8c7d749742..6c3e5d99b6 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec