aboutsummaryrefslogtreecommitdiff
path: root/src/creator.h
diff options
context:
space:
mode:
authorLeonard Kugis <leonardkugis@gmail.com>2018-01-28 17:35:20 +0100
committerLeonard Kugis <leonardkugis@gmail.com>2018-01-28 17:35:20 +0100
commit4a7e84db9f956b1f1376c888a95e0e5c32a4ce9c (patch)
tree8bf2871e6c08bf9c860162bb830cdc2938dc6ca6 /src/creator.h
parentda4b72ea58e97d14306cfd322a8ef7a40337645d (diff)
parentf72c4f122ccd832031925974ff521955e0e9b17c (diff)
Merge branch 'master' of https://collaborating.tuhh.de/cev7691/mandelbrot-zoom
Diffstat (limited to 'src/creator.h')
-rw-r--r--src/creator.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/creator.h b/src/creator.h
new file mode 100644
index 0000000..7606d4e
--- /dev/null
+++ b/src/creator.h
@@ -0,0 +1,53 @@
+/*
+ * render.h
+ *
+ * Created on: 26.01.2018
+ * Author: rigtopa
+ *
+ */
+
+#ifndef CREATOR_H_
+#define CREATOR_H_
+
+#define COORDS(x, y, width) ((y)*(width)+(x))
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <libavcodec/avcodec.h>
+#include <libavutil/frame.h>
+#include <libavutil/imgutils.h>
+
+typedef struct config {
+ u32 iterations;
+ u8 threads;
+ u32 colorFrom;
+ u32 colorTo;
+ long double to_x;
+ long double to_y;
+ long double speed;
+ u8 video;
+ u8 filetype;
+ u16 width;
+ u16 height;
+ u8 renderFPS;
+ u8 videoFPS;
+ u32 bitrate;
+ const char *path;
+ // TODO: key mapping als option in die struct
+} Config;
+
+Config *_config;
+u32 (*_sfunc) (long double, long double, u32);
+u32 *s_arr;
+long double x_min, x_max, y_min, y_max;
+long double x_min_s, x_max_s, y_min_s, y_max_s;
+int delta;
+long double dt, ft;
+
+static void encode(AVCodecContext *enc_ctx, AVFrame *frame, AVPacket *pkt, FILE *outfile);
+
+int generateVideo(filename, int width, int height, int fps, int bitRate, Config *config, u32 (*sfunc) (long double, long double, u32));
+
+
+#endif /* RENDER_H_ */