summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-15 10:18:09 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-15 10:21:09 +0100
commita2ed9d553a54f48f771a74280fb63f95a8b228ae (patch)
tree98c7baed5a1236b1208a223f36ec4c44209fcaee /src/util.c
parent7b53d084fcb90a3e0de053154bbdd2b10454a64f (diff)
downloadadvtime-a2ed9d553a54f48f771a74280fb63f95a8b228ae.tar.gz
advtime-a2ed9d553a54f48f771a74280fb63f95a8b228ae.tar.bz2
advtime-a2ed9d553a54f48f771a74280fb63f95a8b228ae.zip
util: Remove pgm output in frame_mix function
That should be up to the utility user, to use pgm_save afterwards.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/util.c b/src/util.c
index 4e496a4..9ab6e25 100644
--- a/src/util.c
+++ b/src/util.c
@@ -17,8 +17,7 @@ pgm_save(unsigned char *buf, int wrap, int xsize, int ysize, char *filename)
}
void
-frame_mix_pgm_save(struct video_frame *frame_a, struct video_frame *frame_b,
- char *filename)
+frame_mix(struct video_frame *frame_a, struct video_frame *frame_b)
{
uint8_t *row_a = frame_a->data, *col_a = NULL;
uint8_t *row_b = frame_b->data, *col_b = NULL;
@@ -35,10 +34,4 @@ frame_mix_pgm_save(struct video_frame *frame_a, struct video_frame *frame_b,
row_a += frame_a->stride;
row_b += frame_b->stride;
}
-
- FILE *f = fopen(filename, "w");
- fprintf(f, "P5\n%d %d\n%d\n", frame_a->width, frame_a->height, 255);
- for (int i = 0; i < frame_a->height; i++)
- fwrite(frame_a->data+i*frame_a->stride, 1, frame_a->width, f);
- fclose(f);
}