summaryrefslogtreecommitdiff
path: root/libavfilter/vf_lenscorrection.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-01-24 12:18:09 +0100
committerPaul B Mahol <onemda@gmail.com>2021-01-25 00:47:06 +0100
commit4f5a1bcd55108bd46c550bddc8ecc73c50c8173e (patch)
treee0a3d2e1014103510016378f0afba7f03f1f98f7 /libavfilter/vf_lenscorrection.c
parentae5be6236f6456ec183a8127296863c272888b39 (diff)
avfilter/vf_lenscorrection: simplify options
Diffstat (limited to 'libavfilter/vf_lenscorrection.c')
-rw-r--r--libavfilter/vf_lenscorrection.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c
index bb8ea3734f..43260ec4bd 100644
--- a/libavfilter/vf_lenscorrection.c
+++ b/libavfilter/vf_lenscorrection.c
@@ -44,12 +44,13 @@ typedef struct LenscorrectionCtx {
int32_t *correction[4];
} LenscorrectionCtx;
+#define OFFSET(x) offsetof(LenscorrectionCtx, x)
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
static const AVOption lenscorrection_options[] = {
- { "cx", "set relative center x", offsetof(LenscorrectionCtx, cx), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 1, .flags=FLAGS },
- { "cy", "set relative center y", offsetof(LenscorrectionCtx, cy), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 1, .flags=FLAGS },
- { "k1", "set quadratic distortion factor", offsetof(LenscorrectionCtx, k1), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, -1, 1, .flags=FLAGS },
- { "k2", "set double quadratic distortion factor", offsetof(LenscorrectionCtx, k2), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, -1, 1, .flags=FLAGS },
+ { "cx", "set relative center x", OFFSET(cx), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 1, .flags=FLAGS },
+ { "cy", "set relative center y", OFFSET(cy), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 1, .flags=FLAGS },
+ { "k1", "set quadratic distortion factor", OFFSET(k1), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, -1, 1, .flags=FLAGS },
+ { "k2", "set double quadratic distortion factor", OFFSET(k2), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, -1, 1, .flags=FLAGS },
{ NULL }
};