Initial commit - from Precise source
[freerdp-ubuntu-pcb-backport.git] / libfreerdp-codec / rfx_types.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol client.
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 __RFX_TYPES_H
21 #define __RFX_TYPES_H
22
23 #include "config.h"
24 #include <freerdp/utils/debug.h>
25 #include <freerdp/utils/profiler.h>
26
27 #ifdef WITH_DEBUG_RFX
28 #define DEBUG_RFX(fmt, ...) DEBUG_CLASS(RFX, fmt, ## __VA_ARGS__)
29 #else
30 #define DEBUG_RFX(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
31 #endif
32
33 #include "rfx_pool.h"
34
35 struct _RFX_CONTEXT_PRIV
36 {
37         /* pre-allocated buffers */
38
39         RFX_POOL* pool; /* memory pool */
40
41         sint16 y_r_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */
42         sint16 cb_g_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */
43         sint16 cr_b_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */
44  
45         sint16* y_r_buffer;
46         sint16* cb_g_buffer;
47         sint16* cr_b_buffer;
48  
49         sint16 dwt_mem[32 * 32 * 2 * 2 + 8]; /* maximum sub-band width is 32 */
50
51         sint16* dwt_buffer;
52
53         /* profilers */
54         PROFILER_DEFINE(prof_rfx_decode_rgb);
55         PROFILER_DEFINE(prof_rfx_decode_component);
56         PROFILER_DEFINE(prof_rfx_rlgr_decode);
57         PROFILER_DEFINE(prof_rfx_differential_decode);
58         PROFILER_DEFINE(prof_rfx_quantization_decode);
59         PROFILER_DEFINE(prof_rfx_dwt_2d_decode);
60         PROFILER_DEFINE(prof_rfx_decode_ycbcr_to_rgb);
61         PROFILER_DEFINE(prof_rfx_decode_format_rgb);
62
63         PROFILER_DEFINE(prof_rfx_encode_rgb);
64         PROFILER_DEFINE(prof_rfx_encode_component);
65         PROFILER_DEFINE(prof_rfx_rlgr_encode);
66         PROFILER_DEFINE(prof_rfx_differential_encode);
67         PROFILER_DEFINE(prof_rfx_quantization_encode);
68         PROFILER_DEFINE(prof_rfx_dwt_2d_encode);
69         PROFILER_DEFINE(prof_rfx_encode_rgb_to_ycbcr);
70         PROFILER_DEFINE(prof_rfx_encode_format_rgb);
71 };
72
73 #endif /* __RFX_TYPES_H */