cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

interleaved.h (2432B)


      1/**
      2 * FreeRDP: A Remote Desktop Protocol Implementation
      3 * Interleaved RLE Bitmap Codec
      4 *
      5 * Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
      6 *
      7 * Licensed under the Apache License, Version 2.0 (the "License");
      8 * you may not use this file except in compliance with the License.
      9 * You may obtain a copy of the License at
     10 *
     11 *     http://www.apache.org/licenses/LICENSE-2.0
     12 *
     13 * Unless required by applicable law or agreed to in writing, software
     14 * distributed under the License is distributed on an "AS IS" BASIS,
     15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 * See the License for the specific language governing permissions and
     17 * limitations under the License.
     18 */
     19
     20#ifndef FREERDP_CODEC_INTERLEAVED_H
     21#define FREERDP_CODEC_INTERLEAVED_H
     22
     23typedef struct _BITMAP_INTERLEAVED_CONTEXT BITMAP_INTERLEAVED_CONTEXT;
     24
     25#include <freerdp/api.h>
     26#include <freerdp/types.h>
     27
     28#include <freerdp/codec/color.h>
     29#include <freerdp/codec/bitmap.h>
     30
     31struct _BITMAP_INTERLEAVED_CONTEXT
     32{
     33	BOOL Compressor;
     34
     35	UINT32 TempSize;
     36	BYTE* TempBuffer;
     37
     38	wStream* bts;
     39};
     40
     41#ifdef __cplusplus
     42extern "C"
     43{
     44#endif
     45
     46	FREERDP_API BOOL interleaved_decompress(BITMAP_INTERLEAVED_CONTEXT* interleaved,
     47	                                        const BYTE* pSrcData, UINT32 SrcSize, UINT32 nSrcWidth,
     48	                                        UINT32 nSrcHeight, UINT32 bpp, BYTE* pDstData,
     49	                                        UINT32 DstFormat, UINT32 nDstStep, UINT32 nXDst,
     50	                                        UINT32 nYDst, UINT32 nDstWidth, UINT32 nDstHeight,
     51	                                        const gdiPalette* palette);
     52
     53	FREERDP_API BOOL interleaved_compress(BITMAP_INTERLEAVED_CONTEXT* interleaved, BYTE* pDstData,
     54	                                      UINT32* pDstSize, UINT32 nWidth, UINT32 nHeight,
     55	                                      const BYTE* pSrcData, UINT32 SrcFormat, UINT32 nSrcStep,
     56	                                      UINT32 nXSrc, UINT32 nYSrc, const gdiPalette* palette,
     57	                                      UINT32 bpp);
     58
     59	FREERDP_API BOOL bitmap_interleaved_context_reset(BITMAP_INTERLEAVED_CONTEXT* interleaved);
     60
     61	FREERDP_API BITMAP_INTERLEAVED_CONTEXT* bitmap_interleaved_context_new(BOOL Compressor);
     62	FREERDP_API void bitmap_interleaved_context_free(BITMAP_INTERLEAVED_CONTEXT* interleaved);
     63
     64#ifdef __cplusplus
     65}
     66#endif
     67
     68#endif /* FREERDP_CODEC_INTERLEAVED_H */