Compare commits

..

No commits in common. "d6877097d06c8330a746947a8c3906a9fe9caed4" and "82a7050d07193f587dbe7d8b756b7bdd68e589d5" have entirely different histories.

3 changed files with 0 additions and 101 deletions

View File

@ -3,14 +3,3 @@
But du jeu : traiter la séquence d'image complète d'une vidéo live,
sans devoir attendre 107 ans que le job soit fait.
## Current status
- [rgb_decomp.c](rgb_decomp.c)
## Film at 11.
See you soon.

View File

@ -1,87 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <tthimage.h>
/* -------------------------------------------------------- */
/* -------------------------------------------------------- */
int rgb_process_by_filename(char *inf, char *outf)
{
Image_Desc *src, *dst;
int foo;
int x, y, larg, offs;
int r, g, b;
if ( (src=Image_TGA_alloc_load(inf)) == NULL )
{
fprintf(stderr, "%s: err load %s\n", __func__, inf);
exit(5);
}
printf("source '%s' %dx%d\n", inf, src->width, src->height);
if ( (dst=Image_clone(src, 0)) == NULL )
{
fprintf(stderr, "%s: no mem for image cloning\n", __func__);
exit(5);
}
Image_clear(dst, 160, 60, 60);
/*
* calcul de la zone à traiter
*/
larg = src->width / 3;
offs = (src->width - larg) / 2;
printf("largeur %d offset %d\n", larg, offs);
for (y=0; y<src->height; y++) {
for (x=0; x<larg; x++) {
Image_getRGB(src, x+offs, y, &r, &g, &b);
Image_plotRGB(dst, x, y, r, r, r);
Image_plotRGB(dst, x+offs, y, g, g, g);
Image_plotRGB(dst, x+(2*offs), y, b, b, b);
}
}
Image_egalise_cos010(dst, dst, 0);
foo = Image_TGA_save(outf, dst, 0);
if (foo) {
fprintf(stderr, "%s: error %d saving %s\n", __func__, foo, outf);
exit(5);
}
return 0;
}
/* -------------------------------------------------------- */
int main(int argc, char *argv[])
{
int foo;
if (3 != argc)
{
exit(1);
}
foo = rgb_process_by_filename(argv[1], argv[2]);
if (foo) {
fprintf(stderr, "process by filename -> %d\n", foo);
}
return 0;
}
/* -------------------------------------------------------- */

View File

@ -28,9 +28,6 @@ printf("%c\r", batons[foo&0x03]); fflush(stdout);
/*::------------------------------------------------------------------::*/
/*
* I think that the 'chrono' system is full broken
*
* You have to look at 'functions.c' for more timing functions.
*
*/
#define NB_CHRONOS 42