From 722790f4cadc3f2d551bf42702a99b3a3a69e5a3 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 15 May 2020 11:16:18 +0200 Subject: [PATCH] Always require aligned memory for interleaved codec. --- CMakeLists.txt | 4 ---- config.h.in | 1 - libfreerdp/codec/interleaved.c | 4 ---- 3 files changed, 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 51ccae701..ff88f09fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -936,10 +936,6 @@ if(MBEDTLS_FOUND) add_definitions("-DWITH_MBEDTLS") endif() -if (TARGET_ARCH MATCHES "sparc") - set(HAVE_ALIGNED_REQUIRED 1) -endif() - if (WITH_X264 OR WITH_OPENH264 OR WITH_MEDIA_FOUNDATION OR WITH_FFMPEG) set(WITH_GFX_H264 ON) else() diff --git a/config.h.in b/config.h.in index c2e20d356..cf8f3f601 100644 --- a/config.h.in +++ b/config.h.in @@ -26,7 +26,6 @@ #cmakedefine HAVE_EXECINFO_H /* Features */ -#cmakedefine HAVE_ALIGNED_REQUIRED #cmakedefine SWRESAMPLE_FOUND #cmakedefine AVRESAMPLE_FOUND diff --git a/libfreerdp/codec/interleaved.c b/libfreerdp/codec/interleaved.c index 784937a49..e9f92c700 100644 --- a/libfreerdp/codec/interleaved.c +++ b/libfreerdp/codec/interleaved.c @@ -272,11 +272,7 @@ static INLINE void write_pixel_16(BYTE* _buf, UINT16 _pix) #define WHITE_PIXEL 0xFFFF #define DESTWRITEPIXEL(_buf, _pix) write_pixel_16(_buf, _pix) #define DESTREADPIXEL(_pix, _buf) _pix = ((UINT16*)(_buf))[0] -#ifdef HAVE_ALIGNED_REQUIRED #define SRCREADPIXEL(_pix, _buf) _pix = (_buf)[0] | ((_buf)[1] << 8) -#else -#define SRCREADPIXEL(_pix, _buf) _pix = ((UINT16*)(_buf))[0] -#endif #define DESTNEXTPIXEL(_buf) _buf += 2 #define SRCNEXTPIXEL(_buf) _buf += 2 #define WRITEFGBGIMAGE WriteFgBgImage16to16