summaryrefslogtreecommitdiff
path: root/libavfilter/vf_chromashift.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-02-11 15:41:05 +0100
committerAnton Khirnov <anton@khirnov.net>2024-02-14 14:53:41 +0100
commit1e7d2007c3aca1cc1cd3b1ca409f4ded6c885f86 (patch)
treea8348cf24bf8e9209fc60e04ef2eaaf4c0351830 /libavfilter/vf_chromashift.c
parent8a2c8687bdb03fd2da9734c1340046f157458ca4 (diff)
all: use designated initializers for AVOption.unit
Makes it robust against adding fields before it, which will be useful in following commits. Majority of the patch generated by the following Coccinelle script: @@ typedef AVOption; identifier arr_name; initializer list il; initializer list[8] il1; expression tail; @@ AVOption arr_name[] = { il, { il1, - tail + .unit = tail }, ... }; with some manual changes, as the script: * has trouble with options defined inside macros * sometimes does not handle options under an #else branch * sometimes swallows whitespace
Diffstat (limited to 'libavfilter/vf_chromashift.c')
-rw-r--r--libavfilter/vf_chromashift.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/vf_chromashift.c b/libavfilter/vf_chromashift.c
index 39b96a749e..6c929472a7 100644
--- a/libavfilter/vf_chromashift.c
+++ b/libavfilter/vf_chromashift.c
@@ -363,9 +363,9 @@ static const AVOption chromashift_options[] = {
{ "cbv", "shift chroma-blue vertically", OFFSET(cbv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
{ "crh", "shift chroma-red horizontally", OFFSET(crh), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
{ "crv", "shift chroma-red vertically", OFFSET(crv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
- { "edge", "set edge operation", OFFSET(edge), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, .flags = VFR, "edge" },
- { "smear", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, .flags = VFR, "edge" },
- { "wrap", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, .flags = VFR, "edge" },
+ { "edge", "set edge operation", OFFSET(edge), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, .flags = VFR, .unit = "edge" },
+ { "smear", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, .flags = VFR, .unit = "edge" },
+ { "wrap", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, .flags = VFR, .unit = "edge" },
{ NULL },
};
@@ -424,9 +424,9 @@ static const AVOption rgbashift_options[] = {
{ "bv", "shift blue vertically", OFFSET(bv), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
{ "ah", "shift alpha horizontally", OFFSET(ah), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
{ "av", "shift alpha vertically", OFFSET(av), AV_OPT_TYPE_INT, {.i64=0}, -255, 255, .flags = VFR },
- { "edge", "set edge operation", OFFSET(edge), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, .flags = VFR, "edge" },
- { "smear", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, .flags = VFR, "edge" },
- { "wrap", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, .flags = VFR, "edge" },
+ { "edge", "set edge operation", OFFSET(edge), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, .flags = VFR, .unit = "edge" },
+ { "smear", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, .flags = VFR, .unit = "edge" },
+ { "wrap", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, .flags = VFR, .unit = "edge" },
{ NULL },
};