From 6c55e06d588fb26e21ec9b27cae7eebb83f6358d Mon Sep 17 00:00:00 2001 From: cocoon Date: Wed, 8 Mar 2017 07:23:03 +0100 Subject: [PATCH] fixes for Ubuntu 16.04.2, including https://github.com/FreeRDP/FreeRDP/pull/1610 --- channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c | 25 ++++++++++++++-- channels/xrdpvr/xrdpvr_player.c | 35 ++++++++++++++-------- libfreerdp-codec/color.c | 8 ++--- libfreerdp-core/fastpath.c | 4 +-- libfreerdp-core/orders.c | 26 ++++++++-------- libfreerdp-gdi/16bpp.c | 32 ++++++++++---------- libfreerdp-gdi/32bpp.c | 32 ++++++++++---------- libfreerdp-gdi/8bpp.c | 32 ++++++++++---------- 8 files changed, 111 insertions(+), 83 deletions(-) diff --git a/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c b/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c index 248d0fe9..996f788d 100644 --- a/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c +++ b/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c @@ -35,12 +35,22 @@ #define AVMEDIA_TYPE_AUDIO 1 #endif +#if LIBAVCODEC_VERSION_MAJOR < 54 +#define MAX_AUDIO_FRAME_SIZE AVCODEC_MAX_AUDIO_FRAME_SIZE +#else +#define MAX_AUDIO_FRAME_SIZE 192000 +#endif + typedef struct _TSMFFFmpegDecoder { ITSMFDecoder iface; int media_type; - enum CodecID codec_id; +#if LIBAVCODEC_VERSION_MAJOR < 55 + enum CodecID codec_id; +#else + enum AVCodecID codec_id; +#endif AVCodecContext* codec_context; AVCodec* codec; AVFrame* frame; @@ -89,6 +99,7 @@ static tbool tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_ME mdecoder->codec_context->channels = media_type->Channels; mdecoder->codec_context->block_align = media_type->BlockAlign; +#if LIBAVCODEC_VERSION_MAJOR < 55 #ifdef AV_CPU_FLAG_SSE2 mdecoder->codec_context->dsp_mask = AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2; #else @@ -99,6 +110,14 @@ static tbool tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_ME #endif #endif +#else /* LIBAVCODEC_VERSION_MAJOR < 55 */ +#ifdef AV_CPU_FLAG_SSE2 + av_set_cpu_flags_mask(AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2); +#else + av_set_cpu_flags_mask(FF_MM_SSE2 | FF_MM_MMX2); +#endif +#endif /* LIBAVCODEC_VERSION_MAJOR < 55 */ + return true; } @@ -387,7 +406,7 @@ static tbool tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, #endif if (mdecoder->decoded_size_max == 0) - mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE + 16; + mdecoder->decoded_size_max = MAX_AUDIO_FRAME_SIZE + 16; mdecoder->decoded_data = xzalloc(mdecoder->decoded_size_max); /* align the memory for SSE2 needs */ dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F); @@ -398,7 +417,7 @@ static tbool tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, while (src_size > 0) { /* Ensure enough space for decoding */ - if (mdecoder->decoded_size_max - mdecoder->decoded_size < AVCODEC_MAX_AUDIO_FRAME_SIZE) + if (mdecoder->decoded_size_max - mdecoder->decoded_size < MAX_AUDIO_FRAME_SIZE) { mdecoder->decoded_size_max = mdecoder->decoded_size_max * 2 + 16; mdecoder->decoded_data = xrealloc(mdecoder->decoded_data, mdecoder->decoded_size_max); diff --git a/channels/xrdpvr/xrdpvr_player.c b/channels/xrdpvr/xrdpvr_player.c index 89b6059e..1dc97f10 100644 --- a/channels/xrdpvr/xrdpvr_player.c +++ b/channels/xrdpvr/xrdpvr_player.c @@ -68,6 +68,11 @@ ubuntu 14.04 #define LIBAVCODEC_VERSION_MINOR 35 #define LIBAVCODEC_VERSION_MICRO 0 +ubuntu 16.04 +#define LIBAVCODEC_VERSION_MAJOR 56 +#define LIBAVCODEC_VERSION_MINOR 60 +#define LIBAVCODEC_VERSION_MICRO 100 + debian 7 #define LIBAVCODEC_VERSION_MAJOR 54 #define LIBAVCODEC_VERSION_MINOR 59 @@ -107,6 +112,10 @@ debian 8 #define DISTRO_UBUNTU1404 #endif +#if LIBAVCODEC_VERSION_MAJOR == 56 && LIBAVCODEC_VERSION_MINOR == 60 +#define DISTRO_UBUNTU1604 +#endif + #if LIBAVCODEC_VERSION_MAJOR == 56 && LIBAVCODEC_VERSION_MINOR == 26 #define DISTRO_DEBIAN8 #endif @@ -115,7 +124,7 @@ debian 8 #if !defined(DISTRO_DEBIAN6) && !defined(DISTRO_UBUNTU1104) && \ !defined(DISTRO_UBUNTU1111) && !defined(DISTRO_UBUNTU1204) && \ !defined(DISTRO_DEBIAN7) && !defined(DISTRO_UBUNTU1404) && \ - !defined(DISTRO_DEBIAN8) + !defined(DISTRO_UBUNTU1604) && !defined(DISTRO_DEBIAN8) #warning unsupported distro #endif @@ -141,7 +150,7 @@ typedef struct player_state_info AVCodec *video_codec; AVFrame *audio_frame; AVFrame *video_frame; -#if defined(DISTRO_DEBIAN8) +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) AVDictionary *audio_codec_options; AVDictionary *video_codec_options; #endif @@ -183,11 +192,11 @@ static int display_picture(PLAYER_STATE_INFO *psi); #define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO #endif -#if defined(DISTRO_DEBIAN7) || defined(DISTRO_UBUNTU1404) || defined(DISTRO_DEBIAN8) +#if defined(DISTRO_DEBIAN7) || defined(DISTRO_UBUNTU1404) || defined(DISTRO_UBUNTU1604) || defined(DISTRO_DEBIAN8) #define SAMPLE_FMT_U8 AV_SAMPLE_FMT_U8 #endif -#if defined(DISTRO_DEBIAN8) +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 #endif @@ -218,20 +227,20 @@ void* init_player(void* plugin, char* filename) psi->audio_codec = avcodec_find_decoder(CODEC_ID_AAC); -#ifdef DISTRO_DEBIAN8 +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) psi->audio_codec_ctx = avcodec_alloc_context3(psi->audio_codec); #else psi->audio_codec_ctx = avcodec_alloc_context(); #endif psi->video_codec = avcodec_find_decoder(CODEC_ID_H264); -#ifdef DISTRO_DEBIAN8 +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) psi->video_codec_ctx = avcodec_alloc_context3(psi->video_codec); #else psi->video_codec_ctx = avcodec_alloc_context(); #endif -#ifdef DISTRO_DEBIAN8 +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) psi->audio_frame = av_frame_alloc(); psi->video_frame = av_frame_alloc(); #else @@ -404,7 +413,7 @@ set_audio_config(void* vp, char* extradata, int extradata_size, psi->audio_codec_ctx->block_align = block_align; #if defined(AV_CPU_FLAG_SSE2) -#if defined(DISTRO_DEBIAN8) +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) av_force_cpu_flags(AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2); #else psi->audio_codec_ctx->dsp_mask = AV_CPU_FLAG_SSE2 | AV_CPU_FLAG_MMX2; @@ -414,7 +423,7 @@ set_audio_config(void* vp, char* extradata, int extradata_size, #if LIBAVCODEC_VERSION_MAJOR < 53 -#if defined(DISTRO_DEBIAN8) +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) av_force_cpu_flags(FF_MM_SSE2 | FF_MM_MMXEXT); #else psi->audio_codec_ctx->dsp_mask = FF_MM_SSE2 | FF_MM_MMXEXT; @@ -422,7 +431,7 @@ set_audio_config(void* vp, char* extradata, int extradata_size, #else -#if defined(DISTRO_DEBIAN8) +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) av_force_cpu_flags(FF_MM_SSE2 | FF_MM_MMX2); #else psi->audio_codec_ctx->dsp_mask = FF_MM_SSE2 | FF_MM_MMX2; @@ -436,7 +445,7 @@ set_audio_config(void* vp, char* extradata, int extradata_size, psi->audio_codec_ctx->flags |= CODEC_FLAG_TRUNCATED; } -#ifdef DISTRO_DEBIAN8 +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) if (avcodec_open2(psi->audio_codec_ctx, psi->audio_codec, &psi->audio_codec_options) < 0) #else @@ -459,7 +468,7 @@ set_video_config(void *vp) PLAYER_STATE_INFO *psi = (PLAYER_STATE_INFO *) vp; printf("set_video_config:\n"); -#ifdef DISTRO_DEBIAN8 +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) if (avcodec_open2(psi->video_codec_ctx, psi->video_codec, &psi->video_codec_options) < 0) #else @@ -596,7 +605,7 @@ play_video(PLAYER_STATE_INFO *psi, struct AVPacket *av_pkt) /* TODO where is this memory released? */ psi->video_decoded_data = xzalloc(psi->video_decoded_size); -#if defined(DISTRO_DEBIAN8) +#if defined(DISTRO_DEBIAN8) || defined(DISTRO_UBUNTU1604) frame = av_frame_alloc(); #else frame = avcodec_alloc_frame(); diff --git a/libfreerdp-codec/color.c b/libfreerdp-codec/color.c index 97187f81..a72b1917 100644 --- a/libfreerdp-codec/color.c +++ b/libfreerdp-codec/color.c @@ -86,7 +86,7 @@ void freerdp_set_pixel(uint8* data, int x, int y, int width, int height, int bpp } } -INLINE void freerdp_color_split_rgb(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) { *red = *green = *blue = 0; *alpha = (clrconv->alpha) ? 0xFF : 0x00; @@ -137,7 +137,7 @@ INLINE void freerdp_color_split_rgb(uint32* color, int bpp, uint8* red, uint8* g } } -INLINE void freerdp_color_split_bgr(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) { *red = *green = *blue = 0; *alpha = (clrconv->alpha) ? 0xFF : 0x00; @@ -188,7 +188,7 @@ INLINE void freerdp_color_split_bgr(uint32* color, int bpp, uint8* red, uint8* g } } -INLINE void freerdp_color_make_rgb(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) { switch (bpp) { @@ -229,7 +229,7 @@ INLINE void freerdp_color_make_rgb(uint32* color, int bpp, uint8* red, uint8* gr } } -INLINE void freerdp_color_make_bgr(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) +static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv) { switch (bpp) { diff --git a/libfreerdp-core/fastpath.c b/libfreerdp-core/fastpath.c index 0fd740e8..76f2d831 100644 --- a/libfreerdp-core/fastpath.c +++ b/libfreerdp-core/fastpath.c @@ -91,7 +91,7 @@ uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s) return length; } -INLINE void fastpath_read_update_header(STREAM* s, uint8* updateCode, uint8* fragmentation, uint8* compression) +static INLINE void fastpath_read_update_header(STREAM* s, uint8* updateCode, uint8* fragmentation, uint8* compression) { uint8 updateHeader; @@ -101,7 +101,7 @@ INLINE void fastpath_read_update_header(STREAM* s, uint8* updateCode, uint8* fra *compression = (updateHeader >> 6) & 0x03; } -INLINE void fastpath_write_update_header(STREAM* s, uint8 updateCode, uint8 fragmentation, uint8 compression) +static INLINE void fastpath_write_update_header(STREAM* s, uint8 updateCode, uint8 fragmentation, uint8 compression) { uint8 updateHeader = 0; diff --git a/libfreerdp-core/orders.c b/libfreerdp-core/orders.c index 424307f8..eeeebed6 100644 --- a/libfreerdp-core/orders.c +++ b/libfreerdp-core/orders.c @@ -144,7 +144,7 @@ static const uint8 BMF_BPP[] = 0, 1, 0, 8, 16, 24, 32 }; -INLINE void update_read_coord(STREAM* s, sint32* coord, tbool delta) +static INLINE void update_read_coord(STREAM* s, sint32* coord, tbool delta) { sint8 lsi8; sint16 lsi16; @@ -161,7 +161,7 @@ INLINE void update_read_coord(STREAM* s, sint32* coord, tbool delta) } } -INLINE void update_read_color(STREAM* s, uint32* color) +static INLINE void update_read_color(STREAM* s, uint32* color) { uint8 byte; @@ -173,7 +173,7 @@ INLINE void update_read_color(STREAM* s, uint32* color) *color |= (byte << 16); } -INLINE void update_read_colorref(STREAM* s, uint32* color) +static INLINE void update_read_colorref(STREAM* s, uint32* color) { uint8 byte; @@ -186,7 +186,7 @@ INLINE void update_read_colorref(STREAM* s, uint32* color) stream_seek_uint8(s); } -INLINE void update_read_color_quad(STREAM* s, uint32* color) +static INLINE void update_read_color_quad(STREAM* s, uint32* color) { uint8 byte; @@ -199,7 +199,7 @@ INLINE void update_read_color_quad(STREAM* s, uint32* color) stream_seek_uint8(s); } -INLINE void update_read_2byte_unsigned(STREAM* s, uint32* value) +static INLINE void update_read_2byte_unsigned(STREAM* s, uint32* value) { uint8 byte; @@ -217,7 +217,7 @@ INLINE void update_read_2byte_unsigned(STREAM* s, uint32* value) } } -INLINE void update_read_2byte_signed(STREAM* s, sint32* value) +static INLINE void update_read_2byte_signed(STREAM* s, sint32* value) { uint8 byte; tbool negative; @@ -238,7 +238,7 @@ INLINE void update_read_2byte_signed(STREAM* s, sint32* value) *value *= -1; } -INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value) +static INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value) { uint8 byte; uint8 count; @@ -282,7 +282,7 @@ INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value) } } -INLINE void update_read_delta(STREAM* s, sint32* value) +static INLINE void update_read_delta(STREAM* s, sint32* value) { uint8 byte; @@ -300,7 +300,7 @@ INLINE void update_read_delta(STREAM* s, sint32* value) } } -INLINE void update_read_glyph_delta(STREAM* s, uint16* value) +static INLINE void update_read_glyph_delta(STREAM* s, uint16* value) { uint8 byte; @@ -312,7 +312,7 @@ INLINE void update_read_glyph_delta(STREAM* s, uint16* value) *value = (byte & 0x3F); } -INLINE void update_seek_glyph_delta(STREAM* s) +static INLINE void update_seek_glyph_delta(STREAM* s) { uint8 byte; @@ -322,7 +322,7 @@ INLINE void update_seek_glyph_delta(STREAM* s) stream_seek_uint8(s); } -INLINE void update_read_brush(STREAM* s, rdpBrush* brush, uint8 fieldFlags) +static INLINE void update_read_brush(STREAM* s, rdpBrush* brush, uint8 fieldFlags) { if (fieldFlags & ORDER_FIELD_01) stream_read_uint8(s, brush->x); @@ -360,7 +360,7 @@ INLINE void update_read_brush(STREAM* s, rdpBrush* brush, uint8 fieldFlags) } } -INLINE void update_read_delta_rects(STREAM* s, DELTA_RECT* rectangles, int number) +static INLINE void update_read_delta_rects(STREAM* s, DELTA_RECT* rectangles, int number) { int i; uint8 flags = 0; @@ -405,7 +405,7 @@ INLINE void update_read_delta_rects(STREAM* s, DELTA_RECT* rectangles, int numbe } } -INLINE void update_read_delta_points(STREAM* s, DELTA_POINT* points, int number, sint16 x, sint16 y) +static INLINE void update_read_delta_points(STREAM* s, DELTA_POINT* points, int number, sint16 x, sint16 y) { int i; uint8 flags = 0; diff --git a/libfreerdp-gdi/16bpp.c b/libfreerdp-gdi/16bpp.c index 98dc5b54..63cd3be7 100644 --- a/libfreerdp-gdi/16bpp.c +++ b/libfreerdp-gdi/16bpp.c @@ -791,96 +791,96 @@ int PatBlt_16bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, i return 1; } -INLINE void SetPixel_BLACK_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_BLACK_16bpp(uint16 *pixel, uint16 *pen) { /* D = 0 */ *pixel = 0; } -INLINE void SetPixel_NOTMERGEPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOTMERGEPEN_16bpp(uint16 *pixel, uint16 *pen) { /* D = ~(D | P) */ *pixel = ~(*pixel | *pen); } -INLINE void SetPixel_MASKNOTPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MASKNOTPEN_16bpp(uint16 *pixel, uint16 *pen) { /* D = D & ~P */ *pixel &= ~(*pen); } -INLINE void SetPixel_NOTCOPYPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOTCOPYPEN_16bpp(uint16 *pixel, uint16 *pen) { /* D = ~P */ *pixel = ~(*pen); } -INLINE void SetPixel_MASKPENNOT_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MASKPENNOT_16bpp(uint16 *pixel, uint16 *pen) { /* D = P & ~D */ *pixel = *pen & ~*pixel; } -INLINE void SetPixel_NOT_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOT_16bpp(uint16 *pixel, uint16 *pen) { /* D = ~D */ *pixel = ~(*pixel); } -INLINE void SetPixel_XORPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_XORPEN_16bpp(uint16 *pixel, uint16 *pen) { /* D = D ^ P */ *pixel = *pixel ^ *pen; } -INLINE void SetPixel_NOTMASKPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOTMASKPEN_16bpp(uint16 *pixel, uint16 *pen) { /* D = ~(D & P) */ *pixel = ~(*pixel & *pen); } -INLINE void SetPixel_MASKPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MASKPEN_16bpp(uint16 *pixel, uint16 *pen) { /* D = D & P */ *pixel &= *pen; } -INLINE void SetPixel_NOTXORPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOTXORPEN_16bpp(uint16 *pixel, uint16 *pen) { /* D = ~(D ^ P) */ *pixel = ~(*pixel ^ *pen); } -INLINE void SetPixel_NOP_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_NOP_16bpp(uint16 *pixel, uint16 *pen) { /* D = D */ } -INLINE void SetPixel_MERGENOTPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MERGENOTPEN_16bpp(uint16 *pixel, uint16 *pen) { /* D = D | ~P */ *pixel |= ~(*pen); } -INLINE void SetPixel_COPYPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_COPYPEN_16bpp(uint16 *pixel, uint16 *pen) { /* D = P */ *pixel = *pen; } -INLINE void SetPixel_MERGEPENNOT_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MERGEPENNOT_16bpp(uint16 *pixel, uint16 *pen) { /* D = P | ~D */ *pixel = *pen | ~(*pixel); } -INLINE void SetPixel_MERGEPEN_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_MERGEPEN_16bpp(uint16 *pixel, uint16 *pen) { /* D = P | D */ *pixel |= *pen; } -INLINE void SetPixel_WHITE_16bpp(uint16 *pixel, uint16 *pen) +static INLINE void SetPixel_WHITE_16bpp(uint16 *pixel, uint16 *pen) { /* D = 1 */ *pixel = 0xFFFF; diff --git a/libfreerdp-gdi/32bpp.c b/libfreerdp-gdi/32bpp.c index 23e591cf..9feff507 100644 --- a/libfreerdp-gdi/32bpp.c +++ b/libfreerdp-gdi/32bpp.c @@ -820,96 +820,96 @@ int PatBlt_32bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, i return 1; } -INLINE void SetPixel_BLACK_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_BLACK_32bpp(uint32* pixel, uint32* pen) { /* D = 0 */ *pixel = 0; } -INLINE void SetPixel_NOTMERGEPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOTMERGEPEN_32bpp(uint32* pixel, uint32* pen) { /* D = ~(D | P) */ *pixel = ~(*pixel | *pen); } -INLINE void SetPixel_MASKNOTPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MASKNOTPEN_32bpp(uint32* pixel, uint32* pen) { /* D = D & ~P */ *pixel &= ~(*pen); } -INLINE void SetPixel_NOTCOPYPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOTCOPYPEN_32bpp(uint32* pixel, uint32* pen) { /* D = ~P */ *pixel = ~(*pen); } -INLINE void SetPixel_MASKPENNOT_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MASKPENNOT_32bpp(uint32* pixel, uint32* pen) { /* D = P & ~D */ *pixel = *pen & ~*pixel; } -INLINE void SetPixel_NOT_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOT_32bpp(uint32* pixel, uint32* pen) { /* D = ~D */ *pixel = ~(*pixel); } -INLINE void SetPixel_XORPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_XORPEN_32bpp(uint32* pixel, uint32* pen) { /* D = D ^ P */ *pixel = *pixel ^ *pen; } -INLINE void SetPixel_NOTMASKPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOTMASKPEN_32bpp(uint32* pixel, uint32* pen) { /* D = ~(D & P) */ *pixel = ~(*pixel & *pen); } -INLINE void SetPixel_MASKPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MASKPEN_32bpp(uint32* pixel, uint32* pen) { /* D = D & P */ *pixel &= *pen; } -INLINE void SetPixel_NOTXORPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOTXORPEN_32bpp(uint32* pixel, uint32* pen) { /* D = ~(D ^ P) */ *pixel = ~(*pixel ^ *pen); } -INLINE void SetPixel_NOP_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_NOP_32bpp(uint32* pixel, uint32* pen) { /* D = D */ } -INLINE void SetPixel_MERGENOTPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MERGENOTPEN_32bpp(uint32* pixel, uint32* pen) { /* D = D | ~P */ *pixel |= ~(*pen); } -INLINE void SetPixel_COPYPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_COPYPEN_32bpp(uint32* pixel, uint32* pen) { /* D = P */ *pixel = *pen; } -INLINE void SetPixel_MERGEPENNOT_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MERGEPENNOT_32bpp(uint32* pixel, uint32* pen) { /* D = P | ~D */ *pixel = *pen | ~(*pixel); } -INLINE void SetPixel_MERGEPEN_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_MERGEPEN_32bpp(uint32* pixel, uint32* pen) { /* D = P | D */ *pixel |= *pen; } -INLINE void SetPixel_WHITE_32bpp(uint32* pixel, uint32* pen) +static INLINE void SetPixel_WHITE_32bpp(uint32* pixel, uint32* pen) { /* D = 1 */ *pixel = 0xFFFFFF; diff --git a/libfreerdp-gdi/8bpp.c b/libfreerdp-gdi/8bpp.c index 0a7eb53f..a8e9a739 100644 --- a/libfreerdp-gdi/8bpp.c +++ b/libfreerdp-gdi/8bpp.c @@ -700,96 +700,96 @@ int PatBlt_8bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, in return 1; } -INLINE void SetPixel_BLACK_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_BLACK_8bpp(uint8* pixel, uint8* pen) { /* D = 0 */ *pixel = 0; } -INLINE void SetPixel_NOTMERGEPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOTMERGEPEN_8bpp(uint8* pixel, uint8* pen) { /* D = ~(D | P) */ *pixel = ~(*pixel | *pen); } -INLINE void SetPixel_MASKNOTPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MASKNOTPEN_8bpp(uint8* pixel, uint8* pen) { /* D = D & ~P */ *pixel &= ~(*pen); } -INLINE void SetPixel_NOTCOPYPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOTCOPYPEN_8bpp(uint8* pixel, uint8* pen) { /* D = ~P */ *pixel = ~(*pen); } -INLINE void SetPixel_MASKPENNOT_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MASKPENNOT_8bpp(uint8* pixel, uint8* pen) { /* D = P & ~D */ *pixel = *pen & ~*pixel; } -INLINE void SetPixel_NOT_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOT_8bpp(uint8* pixel, uint8* pen) { /* D = ~D */ *pixel = ~(*pixel); } -INLINE void SetPixel_XORPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_XORPEN_8bpp(uint8* pixel, uint8* pen) { /* D = D ^ P */ *pixel = *pixel ^ *pen; } -INLINE void SetPixel_NOTMASKPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOTMASKPEN_8bpp(uint8* pixel, uint8* pen) { /* D = ~(D & P) */ *pixel = ~(*pixel & *pen); } -INLINE void SetPixel_MASKPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MASKPEN_8bpp(uint8* pixel, uint8* pen) { /* D = D & P */ *pixel &= *pen; } -INLINE void SetPixel_NOTXORPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOTXORPEN_8bpp(uint8* pixel, uint8* pen) { /* D = ~(D ^ P) */ *pixel = ~(*pixel ^ *pen); } -INLINE void SetPixel_NOP_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_NOP_8bpp(uint8* pixel, uint8* pen) { /* D = D */ } -INLINE void SetPixel_MERGENOTPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MERGENOTPEN_8bpp(uint8* pixel, uint8* pen) { /* D = D | ~P */ *pixel |= ~(*pen); } -INLINE void SetPixel_COPYPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_COPYPEN_8bpp(uint8* pixel, uint8* pen) { /* D = P */ *pixel = *pen; } -INLINE void SetPixel_MERGEPENNOT_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MERGEPENNOT_8bpp(uint8* pixel, uint8* pen) { /* D = P | ~D */ *pixel = *pen | ~(*pixel); } -INLINE void SetPixel_MERGEPEN_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_MERGEPEN_8bpp(uint8* pixel, uint8* pen) { /* D = P | D */ *pixel |= *pen; } -INLINE void SetPixel_WHITE_8bpp(uint8* pixel, uint8* pen) +static INLINE void SetPixel_WHITE_8bpp(uint8* pixel, uint8* pen) { /* D = 1 */ *pixel = 0xFF;