Commit f9b028ae authored by Julian Scheel's avatar Julian Scheel Committed by Rémi Denis-Courmont

mmal: Restore old buffer configuration

With previours cleanups we reduced the number of allocated mmal buffers and
buffer headers. This caused some issues as the mmal components had to wait for
buffers frequently, which slowed them down. To avoid framedrops and even
picture stalls revert to the old buffer configuration, which wastes a bit
memory in theory but works way more reliably and smoothly.
Signed-off-by: default avatarJulian Scheel <julian@jusst.de>
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 39c2f78d
......@@ -38,10 +38,11 @@
#include "mmal_picture.h"
/* These are only required when combined with image_fx filter. But as they
* won't do much harm besides using a few MB GPU memory, keep them always on
/*
* This seems to be a bit high, but reducing it causes instabilities
*/
#define NUM_EXTRA_BUFFERS 5
#define NUM_EXTRA_BUFFERS 20
#define NUM_DECODER_BUFFER_HEADERS 20
#define MIN_NUM_BUFFERS_IN_TRANSIT 2
......@@ -317,12 +318,13 @@ static int change_output_format(decoder_t *dec)
if (sys->opaque) {
sys->output->buffer_num = NUM_ACTUAL_OPAQUE_BUFFERS;
pool_size = NUM_DECODER_BUFFER_HEADERS;
} else {
sys->output->buffer_num = __MAX(sys->output->buffer_num_recommended,
MIN_NUM_BUFFERS_IN_TRANSIT);
pool_size = sys->output->buffer_num;
}
pool_size = sys->output->buffer_num;
sys->output->buffer_size = sys->output->buffer_size_recommended;
status = mmal_port_enable(sys->output, output_port_cb);
......
......@@ -25,7 +25,7 @@
#include <interface/mmal/mmal.h>
/* Think twice before changing this. Incorrect values cause havoc. */
#define NUM_ACTUAL_OPAQUE_BUFFERS 20
#define NUM_ACTUAL_OPAQUE_BUFFERS 40
struct picture_sys_t {
vlc_object_t *owner;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment