diff options
author | Paul B Mahol <onemda@gmail.com> | 2021-01-24 12:18:09 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-01-25 00:47:06 +0100 |
commit | 4f5a1bcd55108bd46c550bddc8ecc73c50c8173e (patch) | |
tree | e0a3d2e1014103510016378f0afba7f03f1f98f7 /libavfilter/vf_lenscorrection.c | |
parent | ae5be6236f6456ec183a8127296863c272888b39 (diff) |
avfilter/vf_lenscorrection: simplify options
Diffstat (limited to 'libavfilter/vf_lenscorrection.c')
-rw-r--r-- | libavfilter/vf_lenscorrection.c | 9 |
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 } }; |