1 /**
2  * FreeRDP: A Remote Desktop Protocol client.
3  * RemoteFX Codec Library - Encode
4  *
5  * Copyright 2011 Vic Lee
6  * Copyright 2014-2017 Jay Sorg <jay.sorg@gmail.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *     http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef __RFXTILE_H
22 #define __RFXTILE_H
23 
24 #include "rfxcommon.h"
25 
26 
27 #define RFX_YUV_BTES (64 * 64)
28 
29 int
30 rfx_encode_component_rlgr1(struct rfxencode *enc, const char *qtable,
31                            const uint8 *data,
32                            uint8 *buffer, int buffer_size, int *size);
33 int
34 rfx_encode_component_rlgr3(struct rfxencode *enc, const char *qtable,
35                            const uint8 *data,
36                            uint8 *buffer, int buffer_size, int *size);
37 int
38 rfx_encode_rgb(struct rfxencode *enc, const char *rgb_data,
39                int width, int height, int stride_bytes,
40                const char *y_quants, const char *u_quants,
41                const char *v_quants,
42                STREAM *data_out, int *y_size, int *cb_size, int *cr_size);
43 int
44 rfx_encode_argb(struct rfxencode *enc, const char *argb_data,
45                 int width, int height, int stride_bytes,
46                 const char *y_quants, const char *cb_quants,
47                 const char *cr_quants,
48                 STREAM *data_out, int *y_size, int *u_size,
49                 int *v_size, int *a_size);
50 int
51 rfx_encode_yuv(struct rfxencode *enc, const char *yuv_data,
52                int width, int height, int stride_bytes,
53                const char *y_quants, const char *u_quants,
54                const char *v_quants,
55                STREAM *data_out, int *y_size, int *u_size, int *v_size);
56 int
57 rfx_encode_yuva(struct rfxencode *enc, const char *yuv_data,
58                 int width, int height, int stride_bytes,
59                 const char *y_quants, const char *u_quants,
60                 const char *v_quants,
61                 STREAM *data_out, int *y_size, int *u_size,
62                 int *v_size, int *a_size);
63 
64 int
65 rfx_encode_component_rlgr1_x86_sse2(struct rfxencode *enc, const char *qtable,
66                                     const uint8 *data,
67                                     uint8 *buffer, int buffer_size, int *size);
68 int
69 rfx_encode_component_rlgr3_x86_sse2(struct rfxencode *enc, const char *qtable,
70                                     const uint8 *data,
71                                     uint8 *buffer, int buffer_size, int *size);
72 int
73 rfx_encode_component_rlgr1_x86_sse41(struct rfxencode *enc, const char *qtable,
74                                      const uint8 *data,
75                                      uint8 *buffer, int buffer_size, int *size);
76 int
77 rfx_encode_component_rlgr3_x86_sse41(struct rfxencode *enc, const char *qtable,
78                                      const uint8 *data,
79                                      uint8 *buffer, int buffer_size, int *size);
80 int
81 rfx_encode_component_rlgr1_amd64_sse2(struct rfxencode *enc, const char *qtable,
82                                       const uint8 *data,
83                                       uint8 *buffer, int buffer_size, int *size);
84 int
85 rfx_encode_component_rlgr3_amd64_sse2(struct rfxencode *enc, const char *qtable,
86                                       const uint8 *data,
87                                       uint8 *buffer, int buffer_size, int *size);
88 int
89 rfx_encode_component_rlgr1_amd64_sse41(struct rfxencode *enc, const char *qtable,
90                                        const uint8 *data,
91                                        uint8 *buffer, int buffer_size, int *size);
92 int
93 rfx_encode_component_rlgr3_amd64_sse41(struct rfxencode *enc, const char *qtable,
94                                        const uint8 *data,
95                                        uint8 *buffer, int buffer_size, int *size);
96 
97 #endif
98