adding killrgb experiments

This commit is contained in:
tth
2021-10-10 09:46:27 +02:00
parent 23908cb746
commit 9124ab6434
5 changed files with 36 additions and 6 deletions

View File

@@ -37,6 +37,9 @@ tests.o: tests.c tests.h $(DEPS)
# ###
killrgb.o: killrgb.c $(DEPS)
gcc $(COPT) -c $<
recurse.o: recurse.c $(DEPS)
gcc $(COPT) -c $<

View File

@@ -17,17 +17,20 @@
int fimg_killrgb_v(FloatImg *src, FloatImg *dst, int k)
{
int foo, line, col;
int ir, ig, ib;
int ir;
#if DEBUG_LEVEL
fprintf(stderr, ">>> %s ( %p %p %d )\n", __func__,
src, dst, k);
src, dst, k);
#endif
fimg_clear(dst);
ir = ig = ib = 0;
ir = 0;
for (line=0; line<src->height; line++) {
for (col=0; col<src->width; col+=3) {
// fprintf(stderr, "%s line %d\n", __func__, line);
for (col=0; col<(src->width-3); col+=3) {
dst->R[ir ] = src->R[ir]; ir++;
dst->G[ir+1] = src->G[ir]; ir++;