This commit is contained in:
tonton th 2021-01-14 19:06:09 +01:00
parent 6a53282cd9
commit 7f4ac3b39b
2 changed files with 6 additions and 4 deletions

View File

@ -48,11 +48,12 @@ return -1;
/* nouveau du premier dimanche de 2020 'nextgen' */
static int pixel_trinitron(FloatImg *pimg, int pos[4], float *fvals)
{
int x, y, off;
int x, y, pline, off;
for (y=pos[1]; y<pos[1]+pos[3]; y++) {
for (x=pos[0]+1; x<pos[0]+pos[2]-1; x++) {
off = (y*pimg->width) + x;
pline = y*pimg->width;
for (x=pos[0]+2; x<pos[0]+pos[2]-2; x++) {
off = pline + x;
pimg->R[off] = fvals[0];
pimg->G[off] = fvals[1];
pimg->B[off] = fvals[2];

View File

@ -104,7 +104,8 @@ fimg_destroy(&image);
single_print_state("end of run :)", 0);
elapsed = fimg_timer_get(0);
fprintf(stderr, " %d frames, elapsed %.3f s, %.3f fps\n",
fprintf(stderr, "%s: %d frames, elapsed %.3f s, %.3f fps\n",
__func__,
globbuf.gl_pathc, elapsed,
(double)globbuf.gl_pathc/elapsed);