spice/server
Frediano Ziglio e3e2cbcb3a Revert "gstreamer: Avoid memory copy if strides are different"
This reverts commit c3d237075b.

When you call gst_buffer_add_video_meta_full GStreamer assumes that
buffer is contiguous. Specifically GStreamer assumes that the first
chunk is big enough to hold a whole frame. This results usually in
some pixel shifts in the video. The pixel shifts you can see are
artifacts due to how the guest sends the frames.

Assuming you allocate the 2 chunks with 2 malloc:

   p1 = malloc(size);
   ...
   p2 = malloc(size);

Usually the memory allocator tend to allocate linearly if there are
space adding a prefix to describe next block leading to a memory
arrangement as:

   +-------------------+
   | p1 prefix         |
   +-------------------+
   | p1 buffer         |
   +-------------------+
   | p2 prefix         |
   +-------------------+
   | p2 buffer         |
   +-------------------+

now if you take p1 pointer and you assume it points to a 2 * size
buffer you will get p2 prefix in the middle, this prefix is the pixel
shifts.

Problems happens specifically in gst_video_frame_map_id.
This bug is reported in https://bugzilla.gnome.org/show_bug.cgi?id=779524.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-03-16 13:19:01 +00:00
..
tests test-leaks: Checks some leaks using TLS 2017-03-08 12:21:15 +00:00
.gitignore gitignore: Reuse top-level gitignore 2016-12-14 19:09:21 +00:00
agent-msg-filter.c Fix minor inconsistencies with declaration and definition 2017-02-16 10:28:52 +00:00
agent-msg-filter.h agent-filter: Use enum as return value 2016-09-16 11:54:56 +01:00
cache-item.h Move RedCacheItem size field inside cache_data union 2016-05-25 09:53:57 +01:00
cache-item.tmpl.c Use SPICE_VERIFY macro for RHEL6 compatibility 2016-11-14 17:22:02 +00:00
char-device.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
char-device.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
common-graphics-channel.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
common-graphics-channel.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
cursor-channel-client.c Introduce CommonGraphicsChannelClient 2017-03-04 14:58:05 +00:00
cursor-channel-client.h Introduce CommonGraphicsChannelClient 2017-03-04 14:58:05 +00:00
cursor-channel.c red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
cursor-channel.h red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
dcc-private.h dcc: handle preferred video codec message 2017-03-02 17:48:17 +00:00
dcc-send.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
dcc.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
dcc.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
demarshallers.h Make sure all headers are independent 2016-05-18 00:24:37 +01:00
dispatcher.c dispatcher: write_safe: move EINTR debug message 2016-12-06 16:45:11 +00:00
dispatcher.h unify header include order 2016-05-12 11:02:54 +01:00
display-channel-private.h Improve statistic code interface 2017-02-15 10:13:48 +00:00
display-channel.c DisplayChannel: start documenting drawable tree 2017-03-09 12:01:35 -06:00
display-channel.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
display-limits.h worker: start a DisplayChannelClient unit 2015-11-19 12:43:02 +00:00
event-loop.c Remove core_public and core_interface_adapter globals usage 2016-11-15 16:49:09 +00:00
glib-compat.h display-channel: reuse function to set video codecs 2016-12-05 11:47:37 +00:00
glz-encode-match.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
glz-encode.tmpl.c Fix -Werror=format with DEBUG_ENCODE 2016-07-01 14:00:37 +02:00
glz-encoder-dict.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
glz-encoder-dict.h remove glz_encoder_config.h 2015-12-04 11:57:18 +00:00
glz-encoder-priv.h Make sure all headers are independent 2016-05-18 00:24:37 +01:00
glz-encoder.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
glz-encoder.h unify header include order 2016-05-12 11:02:54 +01:00
gstreamer-encoder.c Revert "gstreamer: Avoid memory copy if strides are different" 2017-03-16 13:19:01 +00:00
image-cache.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
image-cache.h Limit direct access to DisplayChannelClient 2016-08-09 10:22:46 -05:00
image-encoders.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
image-encoders.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
inputs-channel-client.c red-channel: Move alloc_recv_buf and release_recv_buf to RedChannelClient 2017-03-04 14:58:15 +00:00
inputs-channel-client.h red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
inputs-channel.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
inputs-channel.h Convert RedChannel hierarchy to GObject 2016-10-25 11:32:13 -05:00
jpeg-encoder.c Sort include order in source files 2016-12-16 08:16:21 +00:00
jpeg-encoder.h server: rename files 2015-12-03 23:54:32 +00:00
lz4-encoder.c Use LZ4_compress_fast_continue if available 2016-11-28 18:38:22 +00:00
lz4-encoder.h server: rename files 2015-12-03 23:54:32 +00:00
main-channel-client.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
main-channel-client.h red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
main-channel.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
main-channel.h red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
main-dispatcher.c Add missing chainups to parent class 2017-03-14 09:19:49 +00:00
main-dispatcher.h unify header include order 2016-05-12 11:02:54 +01:00
Makefile.am red-channel: Separate RedChannelCapabilities 2017-03-02 15:32:16 +00:00
memslot.c Add a red_memslot_info_destroy function 2016-11-25 14:36:40 +00:00
memslot.h Add a red_memslot_info_destroy function 2016-11-25 14:36:40 +00:00
migration-protocol.h Fix 'freezed' typo 2016-09-09 14:56:31 +01:00
mjpeg-encoder.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
pixmap-cache.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
pixmap-cache.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-channel-capabilities.c red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
red-channel-capabilities.h red-channel: Separate RedChannelCapabilities 2017-03-02 15:32:16 +00:00
red-channel-client.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-channel-client.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-channel.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-channel.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-client.c syntax-check: Include config.h file #include <> 2016-11-09 16:20:20 +00:00
red-client.h Convert RedClient to GObject 2016-11-02 19:30:58 +00:00
red-common.h Remove core_public and core_interface_adapter globals usage 2016-11-15 16:49:09 +00:00
red-parse-qxl.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-parse-qxl.h Make QXLMessage handling safe 2016-11-09 16:43:40 +00:00
red-pipe-item.c MainChannel: remove another init_send_data arg 2016-12-20 16:11:13 +00:00
red-pipe-item.h MainChannel: remove another init_send_data arg 2016-12-20 16:11:13 +00:00
red-qxl.c red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
red-qxl.h red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
red-record-qxl.c Remove stdbool.h include from .c files 2017-03-09 18:39:13 +01:00
red-record-qxl.h record: Use reference counting for recording 2017-03-02 15:37:40 +00:00
red-replay-qxl.c Remove stdbool.h include from .c files 2017-03-09 18:39:13 +01:00
red-worker.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-worker.h Add red_qxl_destroy function 2016-12-02 15:53:39 +00:00
reds-private.h record: Allocate recording file globally from reds.c 2017-03-02 16:14:10 +00:00
reds-stream.c reds-stream: Use true/false instead of TRUE/FALSE 2017-03-09 18:39:57 +01:00
reds-stream.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
reds.c Add missing chainups to parent class 2017-03-14 09:19:49 +00:00
reds.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
smartcard-channel-client.c smartcard: Remove unneeded 'dispose' implementation 2017-03-14 09:19:30 +00:00
smartcard-channel-client.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
smartcard.c red-channel: Move alloc_recv_buf and release_recv_buf to RedChannelClient 2017-03-04 14:58:15 +00:00
smartcard.h Split RedCharDeviceSmartcard and SmartCardChannelClient 2016-09-30 13:14:03 +01:00
sound.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
sound.h Make sure all headers are independent 2016-05-18 00:24:37 +01:00
spice-audio.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-bitmap-utils.c Handle top down bitmaps dumping 2016-11-15 14:12:25 +00:00
spice-bitmap-utils.h server: misc header cleanups 2015-12-09 22:17:51 +00:00
spice-bitmap-utils.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
spice-char.h Constify spice_server_char_device_recognized_subtypes 2016-06-29 08:09:03 +01:00
spice-core.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-experimental.h Add missing license headers 2015-10-19 14:25:36 +02:00
spice-input.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-migration.h server: Use SPICE_GNUC_DEPRECATED to avoid a dependency on glib.h 2016-08-12 09:47:40 +01:00
spice-qxl.h Revert accidentally merged experimental patches 2016-11-09 13:54:58 +00:00
spice-replay.h Make red-replay-qxl.h a public header 2016-11-10 06:37:15 +00:00
spice-server-enums.tmpl.c syntax-check: Use templates for glib-mkenums 2016-11-14 17:45:32 +00:00
spice-server-enums.tmpl.h syntax-check: Use templates for glib-mkenums 2016-11-14 17:45:32 +00:00
spice-server.h Convert RedChannelClient hierarchy to GObject 2016-10-07 14:46:37 -05:00
spice-server.syms streaming: Let the administrator pick the video encoder and codec 2016-06-14 17:04:40 +02:00
spice-version.h.in build-sys: generate spice-version.h 2014-11-27 14:27:33 +01:00
spice.h Make red-replay-qxl.h a public header 2016-11-10 06:37:15 +00:00
spicevmc.c Add missing chainups to parent class 2017-03-14 09:19:49 +00:00
stat-file.c stat-file: Avoid compiler warning 2017-02-03 18:13:22 +00:00
stat-file.h Move some include from header to source 2016-11-30 15:44:28 +00:00
stat.h Improve statistic code interface 2017-02-15 10:13:48 +00:00
stream.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
stream.h streaming: Always delegate bit rate control to the video encoder 2016-11-21 16:47:51 +00:00
sw-canvas.c remove sw-canvas.h 2016-05-09 12:45:37 +01:00
tree.c DisplayChannel: start documenting drawable tree 2017-03-09 12:01:35 -06:00
tree.h DisplayChannel: start documenting drawable tree 2017-03-09 12:01:35 -06:00
utils.c worker: move dcc_add_surface_area_image 2015-11-23 13:50:44 +00:00
utils.h Avoid recursive inclusion of headers 2016-10-20 16:33:20 +01:00
video-encoder.h Make video-encoder.h self independent 2016-06-16 14:14:04 +01:00
zlib-encoder.c Sort include order in source files 2016-12-16 08:16:21 +00:00
zlib-encoder.h Make sure all headers are independent 2016-05-18 00:24:37 +01:00