1 /** 2 * FreeRDP: A Remote Desktop Protocol Implementation 3 * RemoteFX Codec Library 4 * 5 * Copyright 2011 Vic Lee 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_LIB_CODEC_RFX_TYPES_H 21 #define FREERDP_LIB_CODEC_RFX_TYPES_H 22 23 #ifdef HAVE_CONFIG_H 24 #include "config.h" 25 #endif 26 27 #include <winpr/crt.h> 28 #include <winpr/pool.h> 29 #include <winpr/wlog.h> 30 #include <winpr/collections.h> 31 32 #include <freerdp/log.h> 33 #include <freerdp/utils/profiler.h> 34 35 #define RFX_TAG FREERDP_TAG("codec.rfx") 36 #ifdef WITH_DEBUG_RFX 37 #define DEBUG_RFX(...) WLog_DBG(RFX_TAG, __VA_ARGS__) 38 #else 39 #define DEBUG_RFX(...) \ 40 do \ 41 { \ 42 } while (0) 43 #endif 44 45 typedef struct _RFX_TILE_COMPOSE_WORK_PARAM RFX_TILE_COMPOSE_WORK_PARAM; 46 47 struct _RFX_CONTEXT_PRIV 48 { 49 wLog* log; 50 wObjectPool* TilePool; 51 52 BOOL UseThreads; 53 PTP_WORK* workObjects; 54 RFX_TILE_COMPOSE_WORK_PARAM* tileWorkParams; 55 56 DWORD MinThreadCount; 57 DWORD MaxThreadCount; 58 59 PTP_POOL ThreadPool; 60 TP_CALLBACK_ENVIRON ThreadPoolEnv; 61 62 wBufferPool* BufferPool; 63 64 /* profilers */ 65 PROFILER_DEFINE(prof_rfx_decode_rgb) 66 PROFILER_DEFINE(prof_rfx_decode_component) 67 PROFILER_DEFINE(prof_rfx_rlgr_decode) 68 PROFILER_DEFINE(prof_rfx_differential_decode) 69 PROFILER_DEFINE(prof_rfx_quantization_decode) 70 PROFILER_DEFINE(prof_rfx_dwt_2d_decode) 71 PROFILER_DEFINE(prof_rfx_ycbcr_to_rgb) 72 73 PROFILER_DEFINE(prof_rfx_encode_rgb) 74 PROFILER_DEFINE(prof_rfx_encode_component) 75 PROFILER_DEFINE(prof_rfx_rlgr_encode) 76 PROFILER_DEFINE(prof_rfx_differential_encode) 77 PROFILER_DEFINE(prof_rfx_quantization_encode) 78 PROFILER_DEFINE(prof_rfx_dwt_2d_encode) 79 PROFILER_DEFINE(prof_rfx_rgb_to_ycbcr) 80 PROFILER_DEFINE(prof_rfx_encode_format_rgb) 81 }; 82 83 #endif /* FREERDP_LIB_CODEC_RFX_TYPES_H */ 84