aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/libmpcodecs/vf_hue.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-01-14 04:55:15 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-01-20 00:57:33 +0100
commit8e45c103e9578abfa52c7bd85ec75b288d151e54 (patch)
tree4baae9529a836075b5517e72c7638c553c727634 /libavfilter/libmpcodecs/vf_hue.c
parent4d463614252d2ffe23cb6ea938389c115291fcd3 (diff)
downloadffmpeg-8e45c103e9578abfa52c7bd85ec75b288d151e54.tar.gz
Remove dependancy of m_option & m_struct from libmpcodecs.
Diffstat (limited to 'libavfilter/libmpcodecs/vf_hue.c')
-rw-r--r--libavfilter/libmpcodecs/vf_hue.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/libavfilter/libmpcodecs/vf_hue.c b/libavfilter/libmpcodecs/vf_hue.c
index 177142f032..9a8fc8b61b 100644
--- a/libavfilter/libmpcodecs/vf_hue.c
+++ b/libavfilter/libmpcodecs/vf_hue.c
@@ -32,17 +32,10 @@
#include "libvo/video_out.h"
-#include "m_option.h"
-#include "m_struct.h"
-
-static struct vf_priv_s {
+struct vf_priv_s {
uint8_t *buf[2];
float hue;
float saturation;
-} const vf_priv_dflt = {
- {NULL, NULL},
- 0.0,
- 1.0,
};
static void process_C(uint8_t *udst, uint8_t *vdst, uint8_t *usrc, uint8_t *vsrc, int dststride, int srcstride,
@@ -170,31 +163,19 @@ static int vf_open(vf_instance_t *vf, char *args)
vf->put_image=put_image;
vf->uninit=uninit;
+ vf->priv = malloc(sizeof(struct vf_priv_s));
+ memset(vf->priv, 0, sizeof(struct vf_priv_s));
+ sscanf(args, "%f:%f", &vf->priv->hue, &vf->priv->saturation);
vf->priv->hue *= M_PI / 180.0;
process = process_C;
return 1;
}
-#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
-static const m_option_t vf_opts_fields[] = {
- {"hue", ST_OFF(hue), CONF_TYPE_FLOAT, M_OPT_RANGE,-180.0 ,180.0, NULL},
- {"saturation", ST_OFF(saturation), CONF_TYPE_FLOAT, M_OPT_RANGE,-10.0 ,10.0, NULL},
- { NULL, NULL, 0, 0, 0, 0, NULL }
-};
-
-static const m_struct_t vf_opts = {
- "hue",
- sizeof(struct vf_priv_s),
- &vf_priv_dflt,
- vf_opts_fields
-};
-
const vf_info_t vf_info_hue = {
"hue changer",
"hue",
"Michael Niedermayer",
"",
vf_open,
- &vf_opts
};