raspiyuv and raspividyuv are both shifting a fair amount
of data around and currently doing a copy through VCHI.
Enable zero copy to reduce this overhead. This does add
a dependency on VCSM, but that has been in the standard
builds for several years.
#include <unistd.h>
#include <errno.h>
-#define VERSION_STRING "v1.3.6"
+#define VERSION_STRING "v1.3.7"
#include "bcm_host.h"
#include "interface/vcos/vcos.h"
still_port->buffer_num = still_port->buffer_num_recommended;
+ status = mmal_port_parameter_set_boolean(video_port, MMAL_PARAMETER_ZERO_COPY, MMAL_TRUE);
+ if (status != MMAL_SUCCESS)
+ {
+ vcos_log_error("Failed to select zero copy");
+ goto error;
+ }
+
status = mmal_port_format_commit(still_port);
if (status != MMAL_SUCCESS )
#include <memory.h>
#include <sysexits.h>
-#define VERSION_STRING "v1.3.13"
+#define VERSION_STRING "v1.3.14"
#include "bcm_host.h"
#include "interface/vcos/vcos.h"
if (video_port->buffer_num < VIDEO_OUTPUT_BUFFERS_NUM)
video_port->buffer_num = VIDEO_OUTPUT_BUFFERS_NUM;
+ status = mmal_port_parameter_set_boolean(video_port, MMAL_PARAMETER_ZERO_COPY, MMAL_TRUE);
+ if (status != MMAL_SUCCESS)
+ {
+ vcos_log_error("Failed to select zero copy");
+ goto error;
+ }
+
// Set the encode format on the still port
format = still_port->format;