Lines Matching refs:width

79 static MPP_RET translate_argb(RK_U8 *src, RK_U8 *dst, RK_U32 width, RK_U32 height,  in translate_argb()  argument
95 cfg->stride = width * 4; in translate_argb()
96 memcpy(dst, src, width * height * 4); in translate_argb()
101 cfg->stride = width * 4; in translate_argb()
103 for (i = 0; i < width; i++) { in translate_argb()
104 dst[j * width * 4 + i * 4 + 0] = src[j * width * 4 + i * 4 + 0]; in translate_argb()
105 dst[j * width * 4 + i * 4 + 1] = src[j * width * 4 + i * 4 + 3]; in translate_argb()
106 dst[j * width * 4 + i * 4 + 2] = src[j * width * 4 + i * 4 + 2]; in translate_argb()
107 dst[j * width * 4 + i * 4 + 3] = src[j * width * 4 + i * 4 + 1]; in translate_argb()
115 cfg->stride = width * 4; in translate_argb()
117 for (i = 0; i < width; i++) { in translate_argb()
118 dst[j * width * 4 + i * 4 + 0] = src[j * width * 4 + i * 4 + 3]; in translate_argb()
119 dst[j * width * 4 + i * 4 + 1] = src[j * width * 4 + i * 4 + 2]; in translate_argb()
120 dst[j * width * 4 + i * 4 + 2] = src[j * width * 4 + i * 4 + 1]; in translate_argb()
121 dst[j * width * 4 + i * 4 + 3] = src[j * width * 4 + i * 4 + 0]; in translate_argb()
128 cfg->stride = width * 4; in translate_argb()
130 for (i = 0; i < width; i++) { in translate_argb()
131 dst[j * width * 4 + i * 4 + 0] = src[j * width * 4 + i * 4 + 1]; in translate_argb()
132 dst[j * width * 4 + i * 4 + 1] = src[j * width * 4 + i * 4 + 2]; in translate_argb()
133 dst[j * width * 4 + i * 4 + 2] = src[j * width * 4 + i * 4 + 3]; in translate_argb()
134 dst[j * width * 4 + i * 4 + 3] = src[j * width * 4 + i * 4 + 0]; in translate_argb()
141 cfg->stride = width * 2; in translate_argb()
144 for (i = 0; i < width; i++) { in translate_argb()
145 tmp_r = src[j * width * 4 + i * 4 + 1]; in translate_argb()
146 tmp_g = src[j * width * 4 + i * 4 + 2]; in translate_argb()
147 tmp_b = src[j * width * 4 + i * 4 + 3]; in translate_argb()
148 tmp_u16[j * width + i] = ((tmp_r >> 3) << 10) + in translate_argb()
157 cfg->stride = width * 2; in translate_argb()
160 for (i = 0; i < width; i++) { in translate_argb()
161 tmp_r = src[j * width * 4 + i * 4 + 1]; in translate_argb()
162 tmp_g = src[j * width * 4 + i * 4 + 2]; in translate_argb()
163 tmp_b = src[j * width * 4 + i * 4 + 3]; in translate_argb()
164 tmp_u16[j * width + i] = ((tmp_b >> 3) << 10) + in translate_argb()
173 cfg->stride = width * 2; in translate_argb()
176 for (i = 0; i < width; i++) { in translate_argb()
177 tmp_r = src[j * width * 4 + i * 4 + 1]; in translate_argb()
178 tmp_g = src[j * width * 4 + i * 4 + 2]; in translate_argb()
179 tmp_b = src[j * width * 4 + i * 4 + 3]; in translate_argb()
180 tmp_u16[j * width + i] = ((tmp_r >> 3) << 11) + in translate_argb()
189 cfg->stride = width * 2; in translate_argb()
192 for (i = 0; i < width; i++) { in translate_argb()
193 tmp_r = src[j * width * 4 + i * 4 + 1]; in translate_argb()
194 tmp_g = src[j * width * 4 + i * 4 + 2]; in translate_argb()
195 tmp_b = src[j * width * 4 + i * 4 + 3]; in translate_argb()
196 tmp_u16[j * width + i] = ((tmp_b >> 3) << 11) + in translate_argb()
205 cfg->stride = width * 2; in translate_argb()
208 for (i = 0; i < width; i++) { in translate_argb()
209 tmp_r = src[j * width * 4 + i * 4 + 1]; in translate_argb()
210 tmp_g = src[j * width * 4 + i * 4 + 2]; in translate_argb()
211 tmp_b = src[j * width * 4 + i * 4 + 3]; in translate_argb()
212 tmp_u16[j * width + i] = ((tmp_r >> 4) << 8) + in translate_argb()
221 cfg->stride = width * 2; in translate_argb()
224 for (i = 0; i < width; i++) { in translate_argb()
225 tmp_r = src[j * width * 4 + i * 4 + 1]; in translate_argb()
226 tmp_g = src[j * width * 4 + i * 4 + 2]; in translate_argb()
227 tmp_b = src[j * width * 4 + i * 4 + 3]; in translate_argb()
228 tmp_u16[j * width + i] = ((tmp_b >> 4) << 8) + in translate_argb()
237 cfg->stride = width * 2; in translate_argb()
240 for (i = 0; i < width; i++) { in translate_argb()
241 tmp_r = src[j * width * 4 + i * 4 + 1]; in translate_argb()
242 tmp_g = src[j * width * 4 + i * 4 + 2]; in translate_argb()
243 tmp_b = src[j * width * 4 + i * 4 + 3]; in translate_argb()
244 tmp_u16[j * width + i] = ((tmp_r >> 4) << 12) + in translate_argb()
253 cfg->stride = width * 2; in translate_argb()
256 for (i = 0; i < width; i++) { in translate_argb()
257 tmp_r = src[j * width * 4 + i * 4 + 1]; in translate_argb()
258 tmp_g = src[j * width * 4 + i * 4 + 2]; in translate_argb()
259 tmp_b = src[j * width * 4 + i * 4 + 3]; in translate_argb()
260 tmp_u16[j * width + i] = ((tmp_b >> 4) << 12) + in translate_argb()
269 cfg->stride = width / 4; in translate_argb()
274 for (i = 0; i < width; i++) { in translate_argb()
276 dst[j * width / 4 + i / 4] = (dst[j * width / 4 + i / 4] << 2) | 0; in translate_argb()
278 dst[j * width / 4 + i / 4] = (dst[j * width / 4 + i / 4] << 2) | (1 << 1 | 1); in translate_argb()
285 cfg->stride = width / 8; in translate_argb()
290 for (i = 0; i < width; i++) { in translate_argb()
292 dst[j * width / 8 + i / 8] = (dst[j * width / 8 + i / 8] << 1) | 0; in translate_argb()
294 dst[j * width / 8 + i / 8] = (dst[j * width / 8 + i / 8] << 1) | 1; in translate_argb()
302 static RK_U32 get_frame_size_by_format(OsdFmt fmt, RK_U32 width, RK_U32 height) in get_frame_size_by_format() argument
309 return width * height * 4; in get_frame_size_by_format()
318 return width * height * 2; in get_frame_size_by_format()
320 return width * height / 4; in get_frame_size_by_format()
322 return width * height / 8; in get_frame_size_by_format()