Skip to content
This repository was archived by the owner on Oct 31, 2022. It is now read-only.

Commit 4088036

Browse files
committed
Mark const function arguments const
1 parent af0a31f commit 4088036

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

source/YCoCg.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
B = [1 -1 -1] [Cg]
4141
*/
4242

43-
void ConvertRGBAToCoCgAY8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
43+
void ConvertRGBAToCoCgAY8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
4444
{
4545
const int32_t post_bias[4] = { 512, 512, 0, 0 };
4646

@@ -54,7 +54,7 @@ void ConvertRGBAToCoCgAY8888( uint8_t *src, uint8_t *dst, unsigned long width, u
5454
ImageMath_MatrixMultiply8888(src, src_rowbytes, dst, dst_rowbytes, width, height, matrix, 4, NULL, post_bias, allow_tile);
5555
}
5656

57-
void ConvertCoCgAY8888ToRGBA( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
57+
void ConvertCoCgAY8888ToRGBA( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
5858
{
5959
const int16_t pre_bias[4] = { -128, -128, 0, 0 };
6060

@@ -69,7 +69,7 @@ void ConvertCoCgAY8888ToRGBA( uint8_t *src, uint8_t *dst, unsigned long width, u
6969
}
7070

7171

72-
void ConvertBGRAToCoCgAY8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
72+
void ConvertBGRAToCoCgAY8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
7373
{
7474
const int32_t post_bias[4] = { 512, 512, 0, 0 };
7575

@@ -83,7 +83,7 @@ void ConvertBGRAToCoCgAY8888( uint8_t *src, uint8_t *dst, unsigned long width, u
8383
ImageMath_MatrixMultiply8888(src, src_rowbytes, dst, dst_rowbytes, width, height, matrix, 4, NULL, post_bias, allow_tile);
8484
}
8585

86-
void ConvertCoCgAY8888ToBGRA( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
86+
void ConvertCoCgAY8888ToBGRA( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
8787
{
8888
const int16_t pre_bias[4] = { -128, -128, 0, 0 };
8989

@@ -97,27 +97,27 @@ void ConvertCoCgAY8888ToBGRA( uint8_t *src, uint8_t *dst, unsigned long width, u
9797
ImageMath_MatrixMultiply8888(src, src_rowbytes, dst, dst_rowbytes, width, height, matrix, 1, pre_bias, NULL, allow_tile);
9898
}
9999

100-
void ConvertBGR_ToCoCg_Y8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
100+
void ConvertBGR_ToCoCg_Y8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
101101
{
102102
ConvertBGRAToCoCgAY8888(src, dst, width, height, src_rowbytes, dst_rowbytes, allow_tile);
103103
}
104104

105-
void ConvertCoCg_Y8888ToBGR_( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
105+
void ConvertCoCg_Y8888ToBGR_( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
106106
{
107107
ConvertCoCgAY8888ToBGRA(src, dst, width, height, src_rowbytes, dst_rowbytes, allow_tile);
108108
}
109109

110-
void ConvertRGB_ToCoCg_Y8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
110+
void ConvertRGB_ToCoCg_Y8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
111111
{
112112
ConvertRGBAToCoCgAY8888(src, dst, width, height, src_rowbytes, dst_rowbytes, allow_tile);
113113
}
114114

115-
void ConvertCoCg_Y8888ToRGB_( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
115+
void ConvertCoCg_Y8888ToRGB_( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
116116
{
117117
ConvertCoCgAY8888ToRGBA(src, dst, width, height, src_rowbytes, dst_rowbytes, allow_tile);
118118
}
119119

120-
void ConvertRGBAToCoYCgA8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
120+
void ConvertRGBAToCoYCgA8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
121121
{
122122
const int32_t post_bias[4] = { 512, 0, 512, 0 };
123123

@@ -131,7 +131,7 @@ void ConvertRGBAToCoYCgA8888( uint8_t *src, uint8_t *dst, unsigned long width, u
131131
ImageMath_MatrixMultiply8888(src, src_rowbytes, dst, dst_rowbytes, width, height, matrix, 4, NULL, post_bias, allow_tile);
132132
}
133133

134-
void ConvertCoYCgA8888ToRGBA( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
134+
void ConvertCoYCgA8888ToRGBA( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
135135
{
136136
const int16_t pre_bias[4] = { -128, 0, -128, 0 };
137137

@@ -145,7 +145,7 @@ void ConvertCoYCgA8888ToRGBA( uint8_t *src, uint8_t *dst, unsigned long width, u
145145
ImageMath_MatrixMultiply8888(src, src_rowbytes, dst, dst_rowbytes, width, height, matrix, 1, pre_bias, NULL, allow_tile);
146146
}
147147

148-
void ConvertBGRAToCoYCgA8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
148+
void ConvertBGRAToCoYCgA8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
149149
{
150150
const int32_t post_bias[4] = { 512, 0, 512, 0 };
151151

@@ -159,7 +159,7 @@ void ConvertBGRAToCoYCgA8888( uint8_t *src, uint8_t *dst, unsigned long width, u
159159
ImageMath_MatrixMultiply8888(src, src_rowbytes, dst, dst_rowbytes, width, height, matrix, 4, NULL, post_bias, allow_tile);
160160
}
161161

162-
void ConvertCoYCgA8888ToBGRA( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
162+
void ConvertCoYCgA8888ToBGRA( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
163163
{
164164
const int16_t pre_bias[4] = { -128, 0, -128, 0 };
165165

@@ -174,22 +174,22 @@ void ConvertCoYCgA8888ToBGRA( uint8_t *src, uint8_t *dst, unsigned long width, u
174174
ImageMath_MatrixMultiply8888(src, src_rowbytes, dst, dst_rowbytes, width, height, matrix, 1, pre_bias, NULL, allow_tile);
175175
}
176176

177-
void ConvertBGR_ToCoYCg_8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
177+
void ConvertBGR_ToCoYCg_8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
178178
{
179179
ConvertBGRAToCoYCgA8888(src, dst, width, height, src_rowbytes, dst_rowbytes, allow_tile);
180180
}
181181

182-
void ConvertCoYCg_8888ToBGR_( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
182+
void ConvertCoYCg_8888ToBGR_( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
183183
{
184184
ConvertCoYCgA8888ToBGRA(src, dst, width, height, src_rowbytes, dst_rowbytes, allow_tile);
185185
}
186186

187-
void ConvertRGB_ToCoYCg_8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
187+
void ConvertRGB_ToCoYCg_8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
188188
{
189189
ConvertRGBAToCoYCgA8888(src, dst, width, height, src_rowbytes, dst_rowbytes, allow_tile);
190190
}
191191

192-
void ConvertCoYCg_8888ToRGB_( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
192+
void ConvertCoYCg_8888ToRGB_( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile )
193193
{
194194
ConvertCoYCgA8888ToRGBA(src, dst, width, height, src_rowbytes, dst_rowbytes, allow_tile);
195195
}

source/YCoCg.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,24 @@
3939
/*
4040
RGB(A) and BGR(A) to and from CoCg(A)Y
4141
*/
42-
void ConvertRGBAToCoCgAY8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
43-
void ConvertCoCgAY8888ToRGBA( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
44-
void ConvertBGRAToCoCgAY8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
45-
void ConvertCoCgAY8888ToBGRA( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
46-
void ConvertBGR_ToCoCg_Y8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
47-
void ConvertCoCg_Y8888ToBGR_( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
48-
void ConvertRGB_ToCoCg_Y8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
49-
void ConvertCoCg_Y8888ToRGB_( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
42+
void ConvertRGBAToCoCgAY8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
43+
void ConvertCoCgAY8888ToRGBA( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
44+
void ConvertBGRAToCoCgAY8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
45+
void ConvertCoCgAY8888ToBGRA( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
46+
void ConvertBGR_ToCoCg_Y8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
47+
void ConvertCoCg_Y8888ToBGR_( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
48+
void ConvertRGB_ToCoCg_Y8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
49+
void ConvertCoCg_Y8888ToRGB_( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
5050

5151
/*
5252
RGB(A) and BGR(A) to and from CoYCg(A)
5353
*/
54-
void ConvertRGBAToCoYCgA8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
55-
void ConvertCoYCgA8888ToRGBA( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
56-
void ConvertBGRAToCoYCgA8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
57-
void ConvertCoYCgA8888ToBGRA( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
58-
void ConvertBGR_ToCoYCg_8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
59-
void ConvertCoYCg_8888ToBGR_( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
60-
void ConvertRGB_ToCoYCg_8888( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
61-
void ConvertCoYCg_8888ToRGB_( uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
54+
void ConvertRGBAToCoYCgA8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
55+
void ConvertCoYCgA8888ToRGBA( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
56+
void ConvertBGRAToCoYCgA8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
57+
void ConvertCoYCgA8888ToBGRA( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
58+
void ConvertBGR_ToCoYCg_8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
59+
void ConvertCoYCg_8888ToBGR_( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
60+
void ConvertRGB_ToCoYCg_8888( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
61+
void ConvertCoYCg_8888ToRGB_( const uint8_t *src, uint8_t *dst, unsigned long width, unsigned long height, size_t src_rowbytes, size_t dst_rowbytes, int allow_tile );
6262
#endif

0 commit comments

Comments
 (0)