[FFmpeg-cvslog] avfilter/vf_lenscorrection: simplify options
Paul B Mahol
git at videolan.org
Mon Jan 25 01:49:55 EET 2021
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jan 24 12:18:09 2021 +0100| [4f5a1bcd55108bd46c550bddc8ecc73c50c8173e] | committer: Paul B Mahol
avfilter/vf_lenscorrection: simplify options
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4f5a1bcd55108bd46c550bddc8ecc73c50c8173e
---
libavfilter/vf_lenscorrection.c | 9 +++++----
1 file 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 }
};
More information about the ffmpeg-cvslog
mailing list