@@ -192,7 +192,7 @@ DECL_BEGIN
192192#if defined(__KERNEL__ ) || !defined(__pic__ )
193193#define _DEFINE_CODEC_AL1 (name , codec , specs , rambuffer_requirements , \
194194 getpixel , setpixel , rectcopy , rectmove , \
195- linefill , vertfill , rectfill , \
195+ linecopy , linefill , vertfill , rectfill , \
196196 pixel2color , color2pixel , initconverter ) \
197197 PRIVATE struct video_codec const name = { \
198198 /* .vc_codec = */ codec , \
@@ -211,6 +211,7 @@ DECL_BEGIN
211211 /* .vc_rectfill = */ & rectfill , \
212212 /* .vc_rectcopy = */ & rectcopy , \
213213 /* .vc_rectmove = */ & rectmove , \
214+ /* .vc_linecopy = */ & linecopy , \
214215 SET_vc_pixel2color64_STATIC_INITIALIZER (& pixel2color ##64 ) \
215216 SET_vc_color2pixel64_STATIC_INITIALIZER (& color2pixel ##64 ) \
216217 SET_vc_getpixel64_STATIC_INITIALIZER (& getpixel ##_64 ) \
@@ -222,11 +223,11 @@ DECL_BEGIN
222223#define _DEFINE_CODEC_ALX (name , codec , specs , \
223224 align , rambuffer_requirements , \
224225 getpixel , setpixel , rectcopy , rectmove , \
225- linefill , vertfill , rectfill , \
226+ linecopy , linefill , vertfill , rectfill , \
226227 unaligned_getpixel , unaligned_setpixel , \
227228 unaligned_rectcopy , unaligned_rectmove , \
228- unaligned_linefill , unaligned_vertfill , \
229- unaligned_rectfill , \
229+ unaligned_linecopy , unaligned_linefill , \
230+ unaligned_vertfill , unaligned_rectfill , \
230231 pixel2color , color2pixel , initconverter ) \
231232 PRIVATE struct video_codec const unaligned_ ##name = { \
232233 /* .vc_codec = */ codec , \
@@ -245,6 +246,7 @@ DECL_BEGIN
245246 /* .vc_rectfill = */ & unaligned_rectfill , \
246247 /* .vc_rectcopy = */ & unaligned_rectcopy , \
247248 /* .vc_rectmove = */ & unaligned_rectmove , \
249+ /* .vc_linecopy = */ & unaligned_linecopy , \
248250 SET_vc_pixel2color64_STATIC_INITIALIZER (& pixel2color ##64 ) \
249251 SET_vc_color2pixel64_STATIC_INITIALIZER (& color2pixel ##64 ) \
250252 SET_vc_getpixel64_STATIC_INITIALIZER (& unaligned_getpixel ##_64 ) \
@@ -270,6 +272,7 @@ DECL_BEGIN
270272 /* .vc_rectfill = */ & rectfill , \
271273 /* .vc_rectcopy = */ & rectcopy , \
272274 /* .vc_rectmove = */ & rectmove , \
275+ /* .vc_linecopy = */ & linecopy , \
273276 SET_vc_pixel2color64_STATIC_INITIALIZER (& pixel2color ##64 ) \
274277 SET_vc_color2pixel64_STATIC_INITIALIZER(&color2pixel##64) \
275278 SET_vc_getpixel64_STATIC_INITIALIZER(&getpixel##_64) \
@@ -281,7 +284,7 @@ DECL_BEGIN
281284#else /* __KERNEL__ || !__pic__ */
282285#define _DEFINE_CODEC_AL1 (name , codec , specs , rambuffer_requirements , \
283286 getpixel , setpixel , rectcopy , rectmove , \
284- linefill , vertfill , rectfill , \
287+ linecopy , linefill , vertfill , rectfill , \
285288 pixel2color , color2pixel , initconverter ) \
286289 PRIVATE struct video_codec name = { \
287290 /* .vc_codec = */ codec , \
@@ -301,6 +304,7 @@ DECL_BEGIN
301304 name .vc_rectfill = & rectfill ; \
302305 name .vc_rectcopy = & rectcopy ; \
303306 name .vc_rectmove = & rectmove ; \
307+ name .vc_linecopy = & linecopy ; \
304308 SET_vc_pixel2color64_INITIALIZER (name , & pixel2color ##64 ) \
305309 SET_vc_color2pixel64_INITIALIZER(name, &color2pixel##64) \
306310 SET_vc_getpixel64_INITIALIZER(name, &getpixel##_64) \
@@ -315,11 +319,11 @@ DECL_BEGIN
315319#define _DEFINE_CODEC_ALX (name , codec , specs , \
316320 align , rambuffer_requirements , \
317321 getpixel , setpixel , rectcopy , rectmove , \
318- linefill , vertfill , rectfill , \
322+ linecopy , linefill , vertfill , rectfill , \
319323 unaligned_getpixel , unaligned_setpixel , \
320324 unaligned_rectcopy , unaligned_rectmove , \
321- unaligned_linefill , unaligned_vertfill , \
322- unaligned_rectfill , \
325+ unaligned_linecopy , unaligned_linefill , \
326+ unaligned_vertfill , unaligned_rectfill , \
323327 pixel2color , color2pixel , initconverter ) \
324328 PRIVATE struct video_codec unaligned_##name = { \
325329 /* .vc_codec = */ codec , \
@@ -345,6 +349,7 @@ DECL_BEGIN
345349 unaligned_##name.vc_rectfill = &unaligned_rectfill; \
346350 unaligned_##name.vc_rectcopy = &unaligned_rectcopy; \
347351 unaligned_##name.vc_rectmove = &unaligned_rectmove; \
352+ unaligned_##name.vc_linecopy = &unaligned_linecopy; \
348353 SET_vc_pixel2color64_INITIALIZER(unaligned_##name, &pixel2color##64) \
349354 SET_vc_color2pixel64_INITIALIZER(unaligned_##name, &color2pixel##64) \
350355 SET_vc_getpixel64_INITIALIZER(unaligned_##name, &unaligned_getpixel##_64) \
@@ -364,6 +369,7 @@ DECL_BEGIN
364369 name.vc_rectfill = &rectfill; \
365370 name.vc_rectcopy = &rectcopy; \
366371 name.vc_rectmove = &rectmove; \
372+ name.vc_linecopy = &linecopy; \
367373 SET_vc_pixel2color64_INITIALIZER(name, &pixel2color##64) \
368374 SET_vc_color2pixel64_INITIALIZER(name, &color2pixel##64) \
369375 SET_vc_getpixel64_INITIALIZER(name, &getpixel##_64) \
@@ -440,6 +446,19 @@ DECL_BEGIN
440446 line += stride; \
441447 } while (--size_y); \
442448 }
449+ #define DEFINE_GENERIC_linecopy__with__getpixel__and__setpixel (linecopy , getpixel , setpixel ) \
450+ PRIVATE NONNULL((1, 3)) void CC \
451+ linecopy(byte_t *__restrict dst_line, video_coord_t dst_x, \
452+ byte_t const *__restrict src_line, video_coord_t src_x, \
453+ video_dim_t size_x) { \
454+ do { \
455+ video_pixel_t pixel; \
456+ pixel = getpixel(src_line, src_x); \
457+ setpixel(dst_line, dst_x, pixel); \
458+ ++dst_x; \
459+ ++src_x; \
460+ } while (--size_x); \
461+ }
443462#define DEFINE_GENERIC_rectcopy__with__getpixel__and__setpixel (rectcopy , getpixel , setpixel ) \
444463 PRIVATE NONNULL((1, 4)) void CC \
445464 rectcopy(byte_t *__restrict dst_line, video_coord_t dst_x, size_t dst_stride, \
0 commit comments