Compare commits
No commits in common. "a4b7f5c21c8166a84fe7e99f00eea055dc6a2758" and "154844c94dc01bb44b18bba07d75682bcbeb6f25" have entirely different histories.
a4b7f5c21c
...
154844c94d
@ -41,19 +41,19 @@ singlepass: singlepass.c ${DEPS} ${OBJS} Makefile
|
|||||||
# some files are magically generated, sorry.
|
# some files are magically generated, sorry.
|
||||||
#
|
#
|
||||||
crapdef.h: crapulors.liste Makefile craplist2h.awk
|
crapdef.h: crapulors.liste Makefile craplist2h.awk
|
||||||
< $< ./craplist2h.awk > $@
|
./craplist2h.awk < $< | tee $@
|
||||||
|
|
||||||
crapstr.h: crapulors.liste Makefile craplist2str.awk
|
crapstr.h: crapulors.liste Makefile craplist2str.awk
|
||||||
< $< ./craplist2str.awk > $@
|
./craplist2str.awk < $< | tee $@
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
#
|
#
|
||||||
# a lot of silly functions
|
# a lot of silly functions
|
||||||
#
|
#
|
||||||
crapulator.o: crapulator.c $(DEPS) Makefile
|
crapulator.o: crapulator.c ${DEPS} Makefile
|
||||||
gcc ${COPT} -c $<
|
gcc ${COPT} -c $<
|
||||||
|
|
||||||
fifo.o: fifo.c fifo.h $(DEPS) Makefile
|
fifo.o: fifo.c fifo.h Makefile
|
||||||
gcc ${COPT} -c $<
|
gcc ${COPT} -c $<
|
||||||
|
|
||||||
sfx.o: sfx.c ${DEPS} Makefile
|
sfx.o: sfx.c ${DEPS} Makefile
|
||||||
|
@ -6,19 +6,18 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
print "// -------------------------------------"
|
print "// -----------------------------------"
|
||||||
print "// generated file, do not edit by hand !"
|
print "// generated file, do not edit by hand !"
|
||||||
print "// -------------------------------------"
|
print "// -----------------------------------"
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 is the badly brain-designed numeric id
|
# $1 is the badly brain-designed numeric id
|
||||||
# $2 is the user name of the filter
|
# $2 is the user name of the filter
|
||||||
|
|
||||||
{
|
{
|
||||||
name = sprintf("CR_%s", $2)
|
printf "#define CR_%s (%d)\n", $2, $1
|
||||||
printf "#define %-15s (%d)\n", name, $1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
END {
|
END {
|
||||||
print "\n// generated file, do not edit by hand !"
|
print "// generated file, do not edit by hand !"
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
# is includet by 'crapulator.c'
|
# is includet by 'crapulator.c'
|
||||||
#
|
#
|
||||||
BEGIN {
|
BEGIN {
|
||||||
print "// -------------------------------------"
|
print "// -----------------------------------"
|
||||||
print "// generated file, do not edit by hand !";
|
print "// generated file, do not edit by hand";
|
||||||
print "// -------------------------------------"
|
print "// -----------------------------------"
|
||||||
print "Crapulor CrapL[] = {";
|
print "Crapulor CrapL[] = {";
|
||||||
}
|
}
|
||||||
|
|
||||||
# $1 is the badly brain-designed numeric id
|
# $1 is the badly brain-designed numeric id
|
||||||
@ -16,13 +16,12 @@ BEGIN {
|
|||||||
# $3 and $4 are two not used parameters
|
# $3 and $4 are two not used parameters
|
||||||
#
|
#
|
||||||
{
|
{
|
||||||
name = sprintf("CR_%s", $2)
|
printf " { CR_%s, \"%s\", %d, %f }, // id=%d\n",
|
||||||
printf " { %-12s, \"%s\", %d, %f }, // #%d\n",
|
$2, $2, $3, $4, $1;
|
||||||
name, $2, $3, $4, $1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
END {
|
END {
|
||||||
print " { -1, NULL }"
|
print " { -1, NULL }"
|
||||||
print " };"
|
print " };"
|
||||||
print "// ! generated file, do not edit by hand !"
|
print "// generated file, do not edit by hand"
|
||||||
}
|
}
|
||||||
|
@ -195,8 +195,6 @@ int ret;
|
|||||||
memset(&tmp, 0, sizeof(FloatImg));
|
memset(&tmp, 0, sizeof(FloatImg));
|
||||||
fimg_clone(img, &tmp, 0);
|
fimg_clone(img, &tmp, 0);
|
||||||
ret = fimg_pixelize_h_rnd(img, &tmp, k);
|
ret = fimg_pixelize_h_rnd(img, &tmp, k);
|
||||||
if (verbosity > 1) fprintf(stderr, "in %s, pixelize H rnd -> %d\n",
|
|
||||||
__func__, ret);
|
|
||||||
fimg_copy_data(&tmp, img);
|
fimg_copy_data(&tmp, img);
|
||||||
fimg_destroy(&tmp);
|
fimg_destroy(&tmp);
|
||||||
|
|
||||||
@ -436,12 +434,9 @@ switch (idFx) {
|
|||||||
case CR_pixelizh:
|
case CR_pixelizh:
|
||||||
retval = run_pixelize_0(image, 8);
|
retval = run_pixelize_0(image, 8);
|
||||||
break;
|
break;
|
||||||
case CR_pixelizv:
|
|
||||||
retval = run_pixelize_0(image, 32);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CR_pixelrand:
|
case CR_pixelrand:
|
||||||
retval = run_pixelize_random(image, 16);
|
retval = run_pixelize_random(image, -1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CR_splitlevel:
|
case CR_splitlevel:
|
||||||
@ -449,10 +444,10 @@ switch (idFx) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CR_decrgbzc:
|
case CR_decrgbzc:
|
||||||
retval = run_decomprgbz_color(image, 0);
|
retval = run_decomprgbz_color(image, -1);
|
||||||
break;
|
break;
|
||||||
case CR_decrgbzg:
|
case CR_decrgbzg:
|
||||||
retval = run_decomprgbz_gray(image, 0);
|
retval = run_decomprgbz_gray(image, -1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CR_hilightr:
|
case CR_hilightr:
|
||||||
|
@ -151,11 +151,13 @@ int pass, szimg, osrc, odst;
|
|||||||
szimg = picture->width * picture->height;
|
szimg = picture->width * picture->height;
|
||||||
|
|
||||||
for (pass=0; pass<szimg/32; pass++) {
|
for (pass=0; pass<szimg/32; pass++) {
|
||||||
|
|
||||||
osrc = rand() % szimg;
|
osrc = rand() % szimg;
|
||||||
odst = rand() % szimg;
|
odst = rand() % szimg;
|
||||||
picture->R[odst] = (picture->R[osrc] + picture->R[odst]) / 2.0;
|
picture->R[odst] = (picture->R[osrc] + picture->R[odst]) / 2.0;
|
||||||
picture->G[odst] = (picture->G[osrc] + picture->G[odst]) / 2.0;
|
picture->G[odst] = (picture->G[osrc] + picture->G[odst]) / 2.0;
|
||||||
picture->B[odst] = (picture->B[osrc] + picture->B[odst]) / 2.0;
|
picture->B[odst] = (picture->B[osrc] + picture->B[odst]) / 2.0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -178,6 +180,7 @@ for (y=0; y<picture->height; y+=16) {
|
|||||||
un_petit_flou_8x8(picture, x, y+8);
|
un_petit_flou_8x8(picture, x, y+8);
|
||||||
un_petit_flou_8x8(picture, x+8, y+8);
|
un_petit_flou_8x8(picture, x+8, y+8);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,17 +22,19 @@ do_an_effect_pass()
|
|||||||
{
|
{
|
||||||
local effect=$1
|
local effect=$1
|
||||||
local ddir=$2
|
local ddir=$2
|
||||||
|
|
||||||
figlet "$effect" ; echo
|
figlet "$effect" ; echo
|
||||||
|
|
||||||
echo " ===> " $ddir
|
echo " ===> " $ddir
|
||||||
|
ls $ddir | wc
|
||||||
|
|
||||||
rm -f $ddir/?????.png
|
rm -f $ddir/?????.png
|
||||||
|
ls $ddir | wc
|
||||||
|
|
||||||
$SPASS -F $effect \
|
$SPASS -F $effect \
|
||||||
-g $SRCDIR/'?????.fimg' \
|
-g $SRCDIR/'?????.fimg' \
|
||||||
-O $ddir \
|
-O $ddir \
|
||||||
-r 1
|
-r 2
|
||||||
|
ls $ddir | wc
|
||||||
}
|
}
|
||||||
|
|
||||||
# --------------------------------------------
|
# --------------------------------------------
|
||||||
@ -45,17 +47,6 @@ local sdir=$2
|
|||||||
echo "====== Linkfarming from " $sdir \
|
echo "====== Linkfarming from " $sdir \
|
||||||
"====== avec" $(ls $sdir | wc -l) "images"
|
"====== avec" $(ls $sdir | wc -l) "images"
|
||||||
|
|
||||||
mogrify \
|
|
||||||
-font Utopia-Bold \
|
|
||||||
-pointsize 90 \
|
|
||||||
-kerning 9 \
|
|
||||||
-fill Gray80 \
|
|
||||||
-stroke Gray20 \
|
|
||||||
-strokewidth 3 \
|
|
||||||
-gravity South-East \
|
|
||||||
-annotate +45+125 $effname \
|
|
||||||
$sdir/*.png
|
|
||||||
|
|
||||||
for img in $(ls -1 $sdir/?????.png)
|
for img in $(ls -1 $sdir/?????.png)
|
||||||
do
|
do
|
||||||
|
|
||||||
@ -63,6 +54,16 @@ do
|
|||||||
# echo "image = " $img
|
# echo "image = " $img
|
||||||
# echo "link = " $linkname
|
# echo "link = " $linkname
|
||||||
|
|
||||||
|
mogrify \
|
||||||
|
-font Noto-Serif-Bold \
|
||||||
|
-pointsize 70 \
|
||||||
|
-kerning 4 \
|
||||||
|
-fill Gray90 \
|
||||||
|
-stroke Gray10 \
|
||||||
|
-strokewidth 3 \
|
||||||
|
-annotate +35+85 $effname \
|
||||||
|
$img
|
||||||
|
|
||||||
ln --force --symbolic $img $linkname
|
ln --force --symbolic $img $linkname
|
||||||
|
|
||||||
LINKNUM=$(( LINKNUM + 1 ))
|
LINKNUM=$(( LINKNUM + 1 ))
|
||||||
@ -74,7 +75,7 @@ echo "linkfarming done"
|
|||||||
|
|
||||||
do_all_the_effects()
|
do_all_the_effects()
|
||||||
{
|
{
|
||||||
EFFECTS=$( $SPASS -L | sort --reverse )
|
EFFECTS=$( $SPASS -L | sort )
|
||||||
|
|
||||||
for effect in $EFFECTS
|
for effect in $EFFECTS
|
||||||
do
|
do
|
||||||
@ -98,6 +99,8 @@ done
|
|||||||
|
|
||||||
rm -v -f $LINKFARM/L?????.png
|
rm -v -f $LINKFARM/L?????.png
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
do_all_the_effects
|
do_all_the_effects
|
||||||
|
|
||||||
banner encoding
|
banner encoding
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* https://git.tetalab.org/tTh/FloatImg
|
* https://git.tetalab.org/tTh/FloatImg
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define FIMG_VERSION (220)
|
#define FIMG_VERSION (219)
|
||||||
#define RELEASE_NAME ("noname")
|
#define RELEASE_NAME ("noname")
|
||||||
|
|
||||||
/* XXX add a test for stdint.h / uint32_t XXX */
|
/* XXX add a test for stdint.h / uint32_t XXX */
|
||||||
|
@ -44,9 +44,6 @@ fprintf(stderr, ">>> %s ( %p %p %d )\n", __func__,
|
|||||||
psrc, pdst, k);
|
psrc, pdst, k);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* XXX useless message ?
|
|
||||||
*/
|
|
||||||
if (k) { fprintf(stderr, "k=%d in %s\n", k, __func__); }
|
if (k) { fprintf(stderr, "k=%d in %s\n", k, __func__); }
|
||||||
|
|
||||||
fimg_clear(pdst);
|
fimg_clear(pdst);
|
||||||
@ -105,9 +102,6 @@ fprintf(stderr, ">>> %s ( %p %p %d )\n", __func__,
|
|||||||
psrc, pdst, k);
|
psrc, pdst, k);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* XXX useless message ?
|
|
||||||
*/
|
|
||||||
if (k) { fprintf(stderr, "k=%d in %s\n", k, __func__); }
|
if (k) { fprintf(stderr, "k=%d in %s\n", k, __func__); }
|
||||||
|
|
||||||
fimg_clear(pdst);
|
fimg_clear(pdst);
|
||||||
|
@ -32,7 +32,7 @@ switch(largeur) {
|
|||||||
case 8: case 16: case 32:
|
case 8: case 16: case 32:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "%s: bad width %d\n", __func__, largeur);
|
fprintf(stderr, "pixeliz bad width %d\n", largeur);
|
||||||
return -77;
|
return -77;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
# Images en virgule flottante, video 4 linux
|
# Images en virgule flottante, video 4 linux
|
||||||
|
|
||||||
Quelques gruikwares en rapport avec la capture vidéo.
|
|
||||||
|
|
||||||
|
|
||||||
## grabvidseq
|
## grabvidseq
|
||||||
|
|
||||||
Logiciel de capture d'une image flottante par accumulation de trames.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
tth@lubitel:~/Devel/FloatImg/v4l2$ ./grabvidseq -h
|
tth@lubitel:~/Devel/FloatImg/v4l2$ ./grabvidseq -h
|
||||||
options :
|
options :
|
||||||
@ -23,10 +18,6 @@ options :
|
|||||||
-v increase verbosity
|
-v increase verbosity
|
||||||
```
|
```
|
||||||
|
|
||||||
Les formats d'exportation sont : Fimg, Png, Tiff, Pnm et Fits. Chacun d'eux
|
|
||||||
ayant son propre lot de limitations et de bugs. Le choix est fait
|
|
||||||
selon l'extension du nom de fichier demandé~: ".fimg", ".tiff"...
|
|
||||||
|
|
||||||
## video-infos
|
## video-infos
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -78,7 +78,7 @@ if (-1 == stat(device, &st)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!S_ISCHR(st.st_mode)) {
|
if (!S_ISCHR(st.st_mode)) {
|
||||||
fprintf(stderr, "%s is not a char device\n", device);
|
fprintf(stderr, "%s is no device\n", device);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
|||||||
xioctl(fd, VIDIOC_STREAMON, &type);
|
xioctl(fd, VIDIOC_STREAMON, &type);
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
if (verbosity) fprintf(stderr,"pid %d is going to grab %d frames...\n",
|
if (verbosity) fprintf(stderr,"pid %d is going to grab %d picz...\n",
|
||||||
getpid(), nbre_capt);
|
getpid(), nbre_capt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
6
v4l2/t.c
6
v4l2/t.c
@ -26,9 +26,7 @@ int vfd, foo;
|
|||||||
struct v4l2_format fmt;
|
struct v4l2_format fmt;
|
||||||
// struct v4l2_requestbuffers reqbuf;
|
// struct v4l2_requestbuffers reqbuf;
|
||||||
|
|
||||||
#if DEBUG_LEVEL
|
|
||||||
fprintf(stderr, ">>> %s ( '%s' %d )\n", __func__, dev, k);
|
fprintf(stderr, ">>> %s ( '%s' %d )\n", __func__, dev, k);
|
||||||
#endif
|
|
||||||
|
|
||||||
vfd = open_device(dev);
|
vfd = open_device(dev);
|
||||||
if (verbosity) fprintf(stderr, "\topen %s -> %d\n", dev, vfd);
|
if (verbosity) fprintf(stderr, "\topen %s -> %d\n", dev, vfd);
|
||||||
@ -36,7 +34,7 @@ if (verbosity) fprintf(stderr, "\topen %s -> %d\n", dev, vfd);
|
|||||||
memset(&fmt, 0, sizeof(fmt));
|
memset(&fmt, 0, sizeof(fmt));
|
||||||
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||||
foo = ioctl(vfd, VIDIOC_G_FMT, &fmt);
|
foo = ioctl(vfd, VIDIOC_G_FMT, &fmt);
|
||||||
if (verbosity) fprintf(stderr, "%s: ioctl -> %d\n", __func__, foo);
|
fprintf(stderr, "%s : ioctl -> %d\n", __func__, foo);
|
||||||
if (0 != foo) {
|
if (0 != foo) {
|
||||||
perror("ioctl G_FMT");
|
perror("ioctl G_FMT");
|
||||||
return -1;
|
return -1;
|
||||||
@ -84,7 +82,7 @@ while ((opt = getopt(argc, argv, "d:hK:v")) != -1) {
|
|||||||
if (verbosity) fimg_print_version(0);
|
if (verbosity) fimg_print_version(0);
|
||||||
|
|
||||||
foo = essai_get_fmt(device, K);
|
foo = essai_get_fmt(device, K);
|
||||||
if (verbosity || foo) fprintf(stderr, "%s: essai -> %d\n", __func__, foo);
|
fprintf(stderr, "\tessai -> %d\n", foo);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ return "???";
|
|||||||
/* --------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------- */
|
||||||
int pr_v4l2_format(char *txt, struct v4l2_format *ptr)
|
int pr_v4l2_format(char *txt, struct v4l2_format *ptr)
|
||||||
{
|
{
|
||||||
fprintf(FP, "## v4l2_format, %-15s, %p\n", txt, ptr);
|
fprintf(FP, "## v4l2_format, %-15s %p\n", txt, ptr);
|
||||||
fprintf(FP, " type %d %s\n", ptr->type,/* enum v4l2_buf_type */
|
fprintf(FP, " type %d %s\n", ptr->type,/* enum v4l2_buf_type */
|
||||||
fmttype2str(ptr->type));
|
fmttype2str(ptr->type));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user