diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-02-11 15:41:05 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-02-14 14:53:41 +0100 |
commit | 1e7d2007c3aca1cc1cd3b1ca409f4ded6c885f86 (patch) | |
tree | a8348cf24bf8e9209fc60e04ef2eaaf4c0351830 /libavcodec/proresenc_kostya.c | |
parent | 8a2c8687bdb03fd2da9734c1340046f157458ca4 (diff) | |
download | ffmpeg-1e7d2007c3aca1cc1cd3b1ca409f4ded6c885f86.tar.gz |
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 'libavcodec/proresenc_kostya.c')
-rw-r--r-- | libavcodec/proresenc_kostya.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 92351ecc4a..6720774e14 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -1327,39 +1327,39 @@ static const AVOption options[] = { AV_OPT_TYPE_INT, { .i64 = 8 }, 1, MAX_MBS_PER_SLICE, VE }, { "profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = PRORES_PROFILE_AUTO }, - PRORES_PROFILE_AUTO, PRORES_PROFILE_4444XQ, VE, "profile" }, + PRORES_PROFILE_AUTO, PRORES_PROFILE_4444XQ, VE, .unit = "profile" }, { "auto", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_AUTO }, - 0, 0, VE, "profile" }, + 0, 0, VE, .unit = "profile" }, { "proxy", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_PROXY }, - 0, 0, VE, "profile" }, + 0, 0, VE, .unit = "profile" }, { "lt", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_LT }, - 0, 0, VE, "profile" }, + 0, 0, VE, .unit = "profile" }, { "standard", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_STANDARD }, - 0, 0, VE, "profile" }, + 0, 0, VE, .unit = "profile" }, { "hq", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_HQ }, - 0, 0, VE, "profile" }, + 0, 0, VE, .unit = "profile" }, { "4444", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_4444 }, - 0, 0, VE, "profile" }, + 0, 0, VE, .unit = "profile" }, { "4444xq", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = PRORES_PROFILE_4444XQ }, - 0, 0, VE, "profile" }, + 0, 0, VE, .unit = "profile" }, { "vendor", "vendor ID", OFFSET(vendor), AV_OPT_TYPE_STRING, { .str = "Lavc" }, 0, 0, VE }, { "bits_per_mb", "desired bits per macroblock", OFFSET(bits_per_mb), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 8192, VE }, { "quant_mat", "quantiser matrix", OFFSET(quant_sel), AV_OPT_TYPE_INT, - { .i64 = -1 }, -1, QUANT_MAT_DEFAULT, VE, "quant_mat" }, + { .i64 = -1 }, -1, QUANT_MAT_DEFAULT, VE, .unit = "quant_mat" }, { "auto", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = -1 }, - 0, 0, VE, "quant_mat" }, + 0, 0, VE, .unit = "quant_mat" }, { "proxy", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = QUANT_MAT_PROXY }, - 0, 0, VE, "quant_mat" }, + 0, 0, VE, .unit = "quant_mat" }, { "lt", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = QUANT_MAT_LT }, - 0, 0, VE, "quant_mat" }, + 0, 0, VE, .unit = "quant_mat" }, { "standard", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = QUANT_MAT_STANDARD }, - 0, 0, VE, "quant_mat" }, + 0, 0, VE, .unit = "quant_mat" }, { "hq", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = QUANT_MAT_HQ }, - 0, 0, VE, "quant_mat" }, + 0, 0, VE, .unit = "quant_mat" }, { "default", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = QUANT_MAT_DEFAULT }, - 0, 0, VE, "quant_mat" }, + 0, 0, VE, .unit = "quant_mat" }, { "alpha_bits", "bits for alpha plane", OFFSET(alpha_bits), AV_OPT_TYPE_INT, { .i64 = 16 }, 0, 16, VE }, { NULL } |