Browse code

AVOptions: rename remaining FF_OPT_TYPE_* to AV_OPT_TYPE_*.

Clément Bœsch authored on 2011/10/17 14:33:10
Showing 19 changed files
... ...
@@ -150,7 +150,7 @@ static const AVOption options[] = {
150 150
     { "crystalhd_downscale_width",
151 151
       "Turn on downscaling to the specified width",
152 152
       offsetof(CHDContext, sWidth),
153
-      FF_OPT_TYPE_INT, 0, 0, UINT32_MAX,
153
+      AV_OPT_TYPE_INT, 0, 0, UINT32_MAX,
154 154
       AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM, },
155 155
     { NULL, },
156 156
 };
... ...
@@ -571,20 +571,20 @@ static const AVOption options[] = {
571 571
                          "though earlier partitions have been lost. Note that intra predicition"
572 572
                          " is still done over the partition boundary.",       0, AV_OPT_TYPE_CONST, {VPX_ERROR_RESILIENT_PARTITIONS}, 0, 0, VE, "er"},
573 573
 #endif
574
-{"speed", "", offsetof(VP8Context, cpu_used), FF_OPT_TYPE_INT, {.dbl = 3}, -16, 16, VE},
575
-{"quality", "", offsetof(VP8Context, deadline), FF_OPT_TYPE_INT, {.dbl = VPX_DL_GOOD_QUALITY}, INT_MIN, INT_MAX, VE, "quality"},
576
-{"best", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = VPX_DL_BEST_QUALITY}, INT_MIN, INT_MAX, VE, "quality"},
577
-{"good", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = VPX_DL_GOOD_QUALITY}, INT_MIN, INT_MAX, VE, "quality"},
578
-{"realtime", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = VPX_DL_REALTIME}, INT_MIN, INT_MAX, VE, "quality"},
579
-{"arnr_max_frames", "altref noise reduction max frame count", offsetof(VP8Context, arnr_max_frames), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 15, VE},
580
-{"arnr_strength", "altref noise reduction filter strength", offsetof(VP8Context, arnr_strength), FF_OPT_TYPE_INT, {.dbl = 3}, 0, 6, VE},
581
-{"arnr_type", "altref noise reduction filter type", offsetof(VP8Context, arnr_type), FF_OPT_TYPE_INT, {.dbl = 3}, 1, 3, VE},
574
+{"speed", "", offsetof(VP8Context, cpu_used), AV_OPT_TYPE_INT, {.dbl = 3}, -16, 16, VE},
575
+{"quality", "", offsetof(VP8Context, deadline), AV_OPT_TYPE_INT, {.dbl = VPX_DL_GOOD_QUALITY}, INT_MIN, INT_MAX, VE, "quality"},
576
+{"best", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = VPX_DL_BEST_QUALITY}, INT_MIN, INT_MAX, VE, "quality"},
577
+{"good", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = VPX_DL_GOOD_QUALITY}, INT_MIN, INT_MAX, VE, "quality"},
578
+{"realtime", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = VPX_DL_REALTIME}, INT_MIN, INT_MAX, VE, "quality"},
579
+{"arnr_max_frames", "altref noise reduction max frame count", offsetof(VP8Context, arnr_max_frames), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 15, VE},
580
+{"arnr_strength", "altref noise reduction filter strength", offsetof(VP8Context, arnr_strength), AV_OPT_TYPE_INT, {.dbl = 3}, 0, 6, VE},
581
+{"arnr_type", "altref noise reduction filter type", offsetof(VP8Context, arnr_type), AV_OPT_TYPE_INT, {.dbl = 3}, 1, 3, VE},
582 582
 #if FF_API_X264_GLOBAL_OPTS
583
-{"rc_lookahead", "Number of frames to look ahead for alternate reference frame selection", offsetof(VP8Context, lag_in_frames), FF_OPT_TYPE_INT, {.dbl = -1}, -1, 25, VE},
584
-{"crf", "Select the quality for constant quality mode", offsetof(VP8Context, crf), FF_OPT_TYPE_INT, {.dbl = -1}, -1, 63, VE},
583
+{"rc_lookahead", "Number of frames to look ahead for alternate reference frame selection", offsetof(VP8Context, lag_in_frames), AV_OPT_TYPE_INT, {.dbl = -1}, -1, 25, VE},
584
+{"crf", "Select the quality for constant quality mode", offsetof(VP8Context, crf), AV_OPT_TYPE_INT, {.dbl = -1}, -1, 63, VE},
585 585
 #else
586
-{"rc_lookahead", "Number of frames to look ahead for alternate reference frame selection", offsetof(VP8Context, lag_in_frames), FF_OPT_TYPE_INT, {.dbl = 25}, 0, 25, VE},
587
-{"crf", "Select the quality for constant quality mode", offsetof(VP8Context, crf), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 63, VE},
586
+{"rc_lookahead", "Number of frames to look ahead for alternate reference frame selection", offsetof(VP8Context, lag_in_frames), AV_OPT_TYPE_INT, {.dbl = 25}, 0, 25, VE},
587
+{"crf", "Select the quality for constant quality mode", offsetof(VP8Context, crf), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 63, VE},
588 588
 #endif
589 589
 {NULL}
590 590
 };
... ...
@@ -42,7 +42,7 @@ typedef struct RawVideoContext {
42 42
 } RawVideoContext;
43 43
 
44 44
 static const AVOption options[]={
45
-{"top", "top field first", offsetof(RawVideoContext, tff), FF_OPT_TYPE_INT, {.dbl = -1}, -1, 1, AV_OPT_FLAG_DECODING_PARAM|AV_OPT_FLAG_VIDEO_PARAM},
45
+{"top", "top field first", offsetof(RawVideoContext, tff), AV_OPT_TYPE_INT, {.dbl = -1}, -1, 1, AV_OPT_FLAG_DECODING_PARAM|AV_OPT_FLAG_VIDEO_PARAM},
46 46
 {NULL}
47 47
 };
48 48
 static const AVClass class = { "rawdec", NULL, options, LIBAVUTIL_VERSION_INT };
... ...
@@ -454,7 +454,7 @@ fail:
454 454
 }
455 455
 
456 456
 static const AVOption options[]={
457
-{"dpi", "set the image resolution (in dpi)", offsetof(TiffEncoderContext, dpi), FF_OPT_TYPE_INT, {.dbl = 72}, 1, 0x10000, AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_ENCODING_PARAM},
457
+{"dpi", "set the image resolution (in dpi)", offsetof(TiffEncoderContext, dpi), AV_OPT_TYPE_INT, {.dbl = 72}, 1, 0x10000, AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_ENCODING_PARAM},
458 458
 {NULL}
459 459
 };
460 460
 static const AVClass class = { "tiff", av_default_item_name, options, LIBAVUTIL_VERSION_INT };
... ...
@@ -34,7 +34,7 @@
34 34
     "timecode", "set timecode value following hh:mm:ss[:;.]ff format, "  \
35 35
                 "use ';' or '.' before frame number for drop frame",     \
36 36
     offsetof(ctx, tc.str),                                               \
37
-    FF_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, flags
37
+    AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, flags
38 38
 
39 39
 struct ff_timecode {
40 40
     char *str;       ///< string following the hh:mm:ss[:;.]ff format
... ...
@@ -926,17 +926,17 @@ static int dshow_read_packet(AVFormatContext *s, AVPacket *pkt)
926 926
 #define OFFSET(x) offsetof(struct dshow_ctx, x)
927 927
 #define DEC AV_OPT_FLAG_DECODING_PARAM
928 928
 static const AVOption options[] = {
929
-    { "video_size", "set video size given a string such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
930
-    { "framerate", "set video frame rate", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
931
-    { "sample_rate", "set audio sample rate", OFFSET(sample_rate), FF_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, DEC },
932
-    { "sample_size", "set audio sample size", OFFSET(sample_size), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 16, DEC },
933
-    { "channels", "set number of audio channels, such as 1 or 2", OFFSET(channels), FF_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, DEC },
934
-    { "list_devices", "list available devices", OFFSET(list_devices), FF_OPT_TYPE_INT, {.dbl=0}, 0, 1, DEC, "list_devices" },
935
-    { "true", "", 0, FF_OPT_TYPE_CONST, {.dbl=1}, 0, 0, DEC, "list_devices" },
936
-    { "false", "", 0, FF_OPT_TYPE_CONST, {.dbl=0}, 0, 0, DEC, "list_devices" },
937
-    { "list_options", "list available options for specified device", OFFSET(list_options), FF_OPT_TYPE_INT, {.dbl=0}, 0, 1, DEC, "list_options" },
938
-    { "true", "", 0, FF_OPT_TYPE_CONST, {.dbl=1}, 0, 0, DEC, "list_options" },
939
-    { "false", "", 0, FF_OPT_TYPE_CONST, {.dbl=0}, 0, 0, DEC, "list_options" },
929
+    { "video_size", "set video size given a string such as 640x480 or hd720.", OFFSET(video_size), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
930
+    { "framerate", "set video frame rate", OFFSET(framerate), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
931
+    { "sample_rate", "set audio sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, DEC },
932
+    { "sample_size", "set audio sample size", OFFSET(sample_size), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 16, DEC },
933
+    { "channels", "set number of audio channels, such as 1 or 2", OFFSET(channels), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, DEC },
934
+    { "list_devices", "list available devices", OFFSET(list_devices), AV_OPT_TYPE_INT, {.dbl=0}, 0, 1, DEC, "list_devices" },
935
+    { "true", "", 0, AV_OPT_TYPE_CONST, {.dbl=1}, 0, 0, DEC, "list_devices" },
936
+    { "false", "", 0, AV_OPT_TYPE_CONST, {.dbl=0}, 0, 0, DEC, "list_devices" },
937
+    { "list_options", "list available options for specified device", OFFSET(list_options), AV_OPT_TYPE_INT, {.dbl=0}, 0, 1, DEC, "list_options" },
938
+    { "true", "", 0, AV_OPT_TYPE_CONST, {.dbl=1}, 0, 0, DEC, "list_options" },
939
+    { "false", "", 0, AV_OPT_TYPE_CONST, {.dbl=0}, 0, 0, DEC, "list_options" },
940 940
     { NULL },
941 941
 };
942 942
 
... ...
@@ -321,7 +321,7 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
321 321
 #define DEC AV_OPT_FLAG_DECODING_PARAM
322 322
 
323 323
 static const AVOption options[] = {
324
-    { "graph", "Libavfilter graph", OFFSET(graph_str),  FF_OPT_TYPE_STRING, {.str = NULL }, 0,  0, DEC },
324
+    { "graph", "Libavfilter graph", OFFSET(graph_str),  AV_OPT_TYPE_STRING, {.str = NULL }, 0,  0, DEC },
325 325
     { NULL },
326 326
 };
327 327
 
... ...
@@ -221,12 +221,12 @@ static int read_close(AVFormatContext* ctx)
221 221
 #define OFFSET(x) offsetof(al_data, x)
222 222
 
223 223
 static const AVOption options[] = {
224
-    {"channels", "set number of channels",     OFFSET(channels),     FF_OPT_TYPE_INT, {.dbl=2},     1, 2,      AV_OPT_FLAG_DECODING_PARAM },
225
-    {"sample_rate", "set sample rate",         OFFSET(sample_rate),  FF_OPT_TYPE_INT, {.dbl=44100}, 1, 192000, AV_OPT_FLAG_DECODING_PARAM },
226
-    {"sample_size", "set sample size",         OFFSET(sample_size),  FF_OPT_TYPE_INT, {.dbl=16},    8, 16,     AV_OPT_FLAG_DECODING_PARAM },
227
-    {"list_devices", "list available devices", OFFSET(list_devices), FF_OPT_TYPE_INT, {.dbl=0},     0, 1,      AV_OPT_FLAG_DECODING_PARAM, "list_devices"  },
228
-    {"true",  "", 0, FF_OPT_TYPE_CONST, {.dbl=1}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "list_devices" },
229
-    {"false", "", 0, FF_OPT_TYPE_CONST, {.dbl=0}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "list_devices" },
224
+    {"channels", "set number of channels",     OFFSET(channels),     AV_OPT_TYPE_INT, {.dbl=2},     1, 2,      AV_OPT_FLAG_DECODING_PARAM },
225
+    {"sample_rate", "set sample rate",         OFFSET(sample_rate),  AV_OPT_TYPE_INT, {.dbl=44100}, 1, 192000, AV_OPT_FLAG_DECODING_PARAM },
226
+    {"sample_size", "set sample size",         OFFSET(sample_size),  AV_OPT_TYPE_INT, {.dbl=16},    8, 16,     AV_OPT_FLAG_DECODING_PARAM },
227
+    {"list_devices", "list available devices", OFFSET(list_devices), AV_OPT_TYPE_INT, {.dbl=0},     0, 1,      AV_OPT_FLAG_DECODING_PARAM, "list_devices"  },
228
+    {"true",  "", 0, AV_OPT_TYPE_CONST, {.dbl=1}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "list_devices" },
229
+    {"false", "", 0, AV_OPT_TYPE_CONST, {.dbl=0}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "list_devices" },
230 230
     {NULL},
231 231
 };
232 232
 
... ...
@@ -203,9 +203,9 @@ static int sdl_write_packet(AVFormatContext *s, AVPacket *pkt)
203 203
 #define OFFSET(x) offsetof(SDLContext,x)
204 204
 
205 205
 static const AVOption options[] = {
206
-    { "window_title", "SDL window title",           OFFSET(window_title),  FF_OPT_TYPE_STRING, {.str = NULL }, 0,  0, AV_OPT_FLAG_ENCODING_PARAM },
207
-    { "icon_title",   "SDL iconified window title", OFFSET(icon_title)  ,  FF_OPT_TYPE_STRING, {.str = NULL }, 0,  0, AV_OPT_FLAG_ENCODING_PARAM },
208
-    { "window_size",  "SDL window forced size",     OFFSET(window_size) ,  FF_OPT_TYPE_STRING, {.str = NULL }, 0,  0, AV_OPT_FLAG_ENCODING_PARAM },
206
+    { "window_title", "SDL window title",           OFFSET(window_title),  AV_OPT_TYPE_STRING, {.str = NULL }, 0,  0, AV_OPT_FLAG_ENCODING_PARAM },
207
+    { "icon_title",   "SDL iconified window title", OFFSET(icon_title)  ,  AV_OPT_TYPE_STRING, {.str = NULL }, 0,  0, AV_OPT_FLAG_ENCODING_PARAM },
208
+    { "window_size",  "SDL window forced size",     OFFSET(window_size) ,  AV_OPT_TYPE_STRING, {.str = NULL }, 0,  0, AV_OPT_FLAG_ENCODING_PARAM },
209 209
     { NULL },
210 210
 };
211 211
 
... ...
@@ -40,12 +40,12 @@ typedef struct {
40 40
 #define OFFSET(x) offsetof(ANullContext, x)
41 41
 
42 42
 static const AVOption anullsrc_options[]= {
43
-    { "channel_layout", "set channel_layout", OFFSET(channel_layout_str), FF_OPT_TYPE_STRING, {.str = "stereo"}, 0, 0 },
44
-    { "cl",             "set channel_layout", OFFSET(channel_layout_str), FF_OPT_TYPE_STRING, {.str = "stereo"}, 0, 0 },
45
-    { "sample_rate",    "set sample rate",    OFFSET(sample_rate_str)   , FF_OPT_TYPE_STRING, {.str = "44100"}, 0, 0 },
46
-    { "r",              "set sample rate",    OFFSET(sample_rate_str)   , FF_OPT_TYPE_STRING, {.str = "44100"}, 0, 0 },
47
-    { "nb_samples",     "set the number of samples per requested frame", OFFSET(nb_samples), FF_OPT_TYPE_INT, {.dbl = 1024}, 0, INT_MAX },
48
-    { "n",              "set the number of samples per requested frame", OFFSET(nb_samples), FF_OPT_TYPE_INT, {.dbl = 1024}, 0, INT_MAX },
43
+    { "channel_layout", "set channel_layout", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, {.str = "stereo"}, 0, 0 },
44
+    { "cl",             "set channel_layout", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, {.str = "stereo"}, 0, 0 },
45
+    { "sample_rate",    "set sample rate",    OFFSET(sample_rate_str)   , AV_OPT_TYPE_STRING, {.str = "44100"}, 0, 0 },
46
+    { "r",              "set sample rate",    OFFSET(sample_rate_str)   , AV_OPT_TYPE_STRING, {.str = "44100"}, 0, 0 },
47
+    { "nb_samples",     "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.dbl = 1024}, 0, INT_MAX },
48
+    { "n",              "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.dbl = 1024}, 0, INT_MAX },
49 49
     { NULL },
50 50
 };
51 51
 
... ...
@@ -138,13 +138,13 @@ typedef struct {
138 138
 #define OFFSET(x) offsetof(DelogoContext, x)
139 139
 
140 140
 static const AVOption delogo_options[]= {
141
-    {"x",    "set logo x position",       OFFSET(x),    FF_OPT_TYPE_INT, {.dbl=-1}, -1, INT_MAX },
142
-    {"y",    "set logo y position",       OFFSET(y),    FF_OPT_TYPE_INT, {.dbl=-1}, -1, INT_MAX },
143
-    {"w",    "set logo width",            OFFSET(w),    FF_OPT_TYPE_INT, {.dbl=-1}, -1, INT_MAX },
144
-    {"h",    "set logo height",           OFFSET(h),    FF_OPT_TYPE_INT, {.dbl=-1}, -1, INT_MAX },
145
-    {"band", "set delogo area band size", OFFSET(band), FF_OPT_TYPE_INT, {.dbl= 4}, -1, INT_MAX },
146
-    {"t",    "set delogo area band size", OFFSET(band), FF_OPT_TYPE_INT, {.dbl= 4}, -1, INT_MAX },
147
-    {"show", "show delogo area",          OFFSET(show), FF_OPT_TYPE_INT, {.dbl= 0},  0, 1       },
141
+    {"x",    "set logo x position",       OFFSET(x),    AV_OPT_TYPE_INT, {.dbl=-1}, -1, INT_MAX },
142
+    {"y",    "set logo y position",       OFFSET(y),    AV_OPT_TYPE_INT, {.dbl=-1}, -1, INT_MAX },
143
+    {"w",    "set logo width",            OFFSET(w),    AV_OPT_TYPE_INT, {.dbl=-1}, -1, INT_MAX },
144
+    {"h",    "set logo height",           OFFSET(h),    AV_OPT_TYPE_INT, {.dbl=-1}, -1, INT_MAX },
145
+    {"band", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, {.dbl= 4}, -1, INT_MAX },
146
+    {"t",    "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, {.dbl= 4}, -1, INT_MAX },
147
+    {"show", "show delogo area",          OFFSET(show), AV_OPT_TYPE_INT, {.dbl= 0},  0, 1       },
148 148
     {NULL},
149 149
 };
150 150
 
... ...
@@ -76,17 +76,17 @@ typedef struct {
76 76
 #define OFFSET(x) offsetof(LutContext, x)
77 77
 
78 78
 static const AVOption lut_options[] = {
79
-    {"c0", "set component #0 expression", OFFSET(comp_expr_str[0]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
80
-    {"c1", "set component #1 expression", OFFSET(comp_expr_str[1]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
81
-    {"c2", "set component #2 expression", OFFSET(comp_expr_str[2]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
82
-    {"c3", "set component #3 expression", OFFSET(comp_expr_str[3]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
83
-    {"y",  "set Y expression", OFFSET(comp_expr_str[Y]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
84
-    {"u",  "set U expression", OFFSET(comp_expr_str[U]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
85
-    {"v",  "set V expression", OFFSET(comp_expr_str[V]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
86
-    {"r",  "set R expression", OFFSET(comp_expr_str[R]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
87
-    {"g",  "set G expression", OFFSET(comp_expr_str[G]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
88
-    {"b",  "set B expression", OFFSET(comp_expr_str[B]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
89
-    {"a",  "set A expression", OFFSET(comp_expr_str[A]),  FF_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
79
+    {"c0", "set component #0 expression", OFFSET(comp_expr_str[0]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
80
+    {"c1", "set component #1 expression", OFFSET(comp_expr_str[1]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
81
+    {"c2", "set component #2 expression", OFFSET(comp_expr_str[2]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
82
+    {"c3", "set component #3 expression", OFFSET(comp_expr_str[3]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
83
+    {"y",  "set Y expression", OFFSET(comp_expr_str[Y]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
84
+    {"u",  "set U expression", OFFSET(comp_expr_str[U]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
85
+    {"v",  "set V expression", OFFSET(comp_expr_str[V]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
86
+    {"r",  "set R expression", OFFSET(comp_expr_str[R]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
87
+    {"g",  "set G expression", OFFSET(comp_expr_str[G]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
88
+    {"b",  "set B expression", OFFSET(comp_expr_str[B]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
89
+    {"a",  "set A expression", OFFSET(comp_expr_str[A]),  AV_OPT_TYPE_STRING, {.str="val"}, CHAR_MIN, CHAR_MAX},
90 90
     {NULL},
91 91
 };
92 92
 
... ...
@@ -60,24 +60,24 @@ typedef struct MPTestContext {
60 60
 #define OFFSET(x) offsetof(MPTestContext, x)
61 61
 
62 62
 static const AVOption mptestsrc_options[]= {
63
-    { "rate",     "set video rate",     OFFSET(rate),     FF_OPT_TYPE_STRING, {.str = "25"},      0, 0 },
64
-    { "r",        "set video rate",     OFFSET(rate),     FF_OPT_TYPE_STRING, {.str = "25"},      0, 0 },
65
-    { "duration", "set video duration", OFFSET(duration), FF_OPT_TYPE_STRING, {.str = NULL},      0, 0 },
66
-    { "d",        "set video duration", OFFSET(duration), FF_OPT_TYPE_STRING, {.str = NULL},      0, 0 },
67
-
68
-    { "test", "set test to perform", OFFSET(test),  FF_OPT_TYPE_INT,   {.dbl=TEST_ALL}, 0, INT_MAX, 0, "test" },
69
-    { "t",    "set test to perform", OFFSET(test),  FF_OPT_TYPE_INT,   {.dbl=TEST_ALL}, 0, INT_MAX, 0, "test" },
70
-    { "dc_luma",     "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_DC_LUMA},     INT_MIN, INT_MAX, 0, "test" },
71
-    { "dc_chroma",   "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_DC_CHROMA},   INT_MIN, INT_MAX, 0, "test" },
72
-    { "freq_luma",   "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_FREQ_LUMA},   INT_MIN, INT_MAX, 0, "test" },
73
-    { "freq_chroma", "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_FREQ_CHROMA}, INT_MIN, INT_MAX, 0, "test" },
74
-    { "amp_luma",    "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_AMP_LUMA},    INT_MIN, INT_MAX, 0, "test" },
75
-    { "amp_chroma",  "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_AMP_CHROMA},  INT_MIN, INT_MAX, 0, "test" },
76
-    { "cbp",         "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_CBP},         INT_MIN, INT_MAX, 0, "test" },
77
-    { "mv",          "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_MV},          INT_MIN, INT_MAX, 0, "test" },
78
-    { "ring1",       "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_RING1},       INT_MIN, INT_MAX, 0, "test" },
79
-    { "ring2",       "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_RING2},       INT_MIN, INT_MAX, 0, "test" },
80
-    { "all",         "", 0, FF_OPT_TYPE_CONST, {.dbl=TEST_ALL},         INT_MIN, INT_MAX, 0, "test" },
63
+    { "rate",     "set video rate",     OFFSET(rate),     AV_OPT_TYPE_STRING, {.str = "25"},      0, 0 },
64
+    { "r",        "set video rate",     OFFSET(rate),     AV_OPT_TYPE_STRING, {.str = "25"},      0, 0 },
65
+    { "duration", "set video duration", OFFSET(duration), AV_OPT_TYPE_STRING, {.str = NULL},      0, 0 },
66
+    { "d",        "set video duration", OFFSET(duration), AV_OPT_TYPE_STRING, {.str = NULL},      0, 0 },
67
+
68
+    { "test", "set test to perform", OFFSET(test),  AV_OPT_TYPE_INT,   {.dbl=TEST_ALL}, 0, INT_MAX, 0, "test" },
69
+    { "t",    "set test to perform", OFFSET(test),  AV_OPT_TYPE_INT,   {.dbl=TEST_ALL}, 0, INT_MAX, 0, "test" },
70
+    { "dc_luma",     "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_DC_LUMA},     INT_MIN, INT_MAX, 0, "test" },
71
+    { "dc_chroma",   "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_DC_CHROMA},   INT_MIN, INT_MAX, 0, "test" },
72
+    { "freq_luma",   "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_FREQ_LUMA},   INT_MIN, INT_MAX, 0, "test" },
73
+    { "freq_chroma", "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_FREQ_CHROMA}, INT_MIN, INT_MAX, 0, "test" },
74
+    { "amp_luma",    "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_AMP_LUMA},    INT_MIN, INT_MAX, 0, "test" },
75
+    { "amp_chroma",  "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_AMP_CHROMA},  INT_MIN, INT_MAX, 0, "test" },
76
+    { "cbp",         "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_CBP},         INT_MIN, INT_MAX, 0, "test" },
77
+    { "mv",          "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_MV},          INT_MIN, INT_MAX, 0, "test" },
78
+    { "ring1",       "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_RING1},       INT_MIN, INT_MAX, 0, "test" },
79
+    { "ring2",       "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_RING2},       INT_MIN, INT_MAX, 0, "test" },
80
+    { "all",         "", 0, AV_OPT_TYPE_CONST, {.dbl=TEST_ALL},         INT_MIN, INT_MAX, 0, "test" },
81 81
 
82 82
     { NULL },
83 83
 };
... ...
@@ -57,12 +57,12 @@ typedef struct {
57 57
 #define OFFSET(x) offsetof(TestSourceContext, x)
58 58
 
59 59
 static const AVOption testsrc_options[]= {
60
-    { "size",     "set video size",     OFFSET(size),     FF_OPT_TYPE_STRING, {.str = "320x240"}, 0, 0 },
61
-    { "s",        "set video size",     OFFSET(size),     FF_OPT_TYPE_STRING, {.str = "320x240"}, 0, 0 },
62
-    { "rate",     "set video rate",     OFFSET(rate),     FF_OPT_TYPE_STRING, {.str = "25"},      0, 0 },
63
-    { "r",        "set video rate",     OFFSET(rate),     FF_OPT_TYPE_STRING, {.str = "25"},      0, 0 },
64
-    { "duration", "set video duration", OFFSET(duration), FF_OPT_TYPE_STRING, {.str = NULL},      0, 0 },
65
-    { "sar",      "set video sample aspect ratio", OFFSET(sar), FF_OPT_TYPE_RATIONAL, {.dbl= 1},  0, INT_MAX },
60
+    { "size",     "set video size",     OFFSET(size),     AV_OPT_TYPE_STRING, {.str = "320x240"}, 0, 0 },
61
+    { "s",        "set video size",     OFFSET(size),     AV_OPT_TYPE_STRING, {.str = "320x240"}, 0, 0 },
62
+    { "rate",     "set video rate",     OFFSET(rate),     AV_OPT_TYPE_STRING, {.str = "25"},      0, 0 },
63
+    { "r",        "set video rate",     OFFSET(rate),     AV_OPT_TYPE_STRING, {.str = "25"},      0, 0 },
64
+    { "duration", "set video duration", OFFSET(duration), AV_OPT_TYPE_STRING, {.str = NULL},      0, 0 },
65
+    { "sar",      "set video sample aspect ratio", OFFSET(sar), AV_OPT_TYPE_RATIONAL, {.dbl= 1},  0, INT_MAX },
66 66
     { NULL },
67 67
 };
68 68
 
... ...
@@ -78,7 +78,7 @@ typedef struct {
78 78
 
79 79
 
80 80
 static const AVOption options[] = {
81
-    { "use_odml", "use odml index", offsetof(AVIContext, use_odml), FF_OPT_TYPE_INT, {.dbl = 1}, -1, 1, AV_OPT_FLAG_DECODING_PARAM},
81
+    { "use_odml", "use odml index", offsetof(AVIContext, use_odml), AV_OPT_TYPE_INT, {.dbl = 1}, -1, 1, AV_OPT_FLAG_DECODING_PARAM},
82 82
     { NULL },
83 83
 };
84 84
 
... ...
@@ -80,20 +80,20 @@ enum var_name {
80 80
 #define OFFSET(x) offsetof(ModPlugContext, x)
81 81
 #define D AV_OPT_FLAG_DECODING_PARAM
82 82
 static const AVOption options[] = {
83
-    {"noise_reduction", "Enable noise reduction 0(off)-1(on)",  OFFSET(noise_reduction), FF_OPT_TYPE_INT, {.dbl = 0}, 0,       1, D},
84
-    {"reverb_depth",    "Reverb level 0(quiet)-100(loud)",      OFFSET(reverb_depth),    FF_OPT_TYPE_INT, {.dbl = 0}, 0,     100, D},
85
-    {"reverb_delay",    "Reverb delay in ms, usually 40-200ms", OFFSET(reverb_delay),    FF_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, D},
86
-    {"bass_amount",     "XBass level 0(quiet)-100(loud)",       OFFSET(bass_amount),     FF_OPT_TYPE_INT, {.dbl = 0}, 0,     100, D},
87
-    {"bass_range",      "XBass cutoff in Hz 10-100",            OFFSET(bass_range),      FF_OPT_TYPE_INT, {.dbl = 0}, 0,     100, D},
88
-    {"surround_depth",  "Surround level 0(quiet)-100(heavy)",   OFFSET(surround_depth),  FF_OPT_TYPE_INT, {.dbl = 0}, 0,     100, D},
89
-    {"surround_delay",  "Surround delay in ms, usually 5-40ms", OFFSET(surround_delay),  FF_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, D},
83
+    {"noise_reduction", "Enable noise reduction 0(off)-1(on)",  OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.dbl = 0}, 0,       1, D},
84
+    {"reverb_depth",    "Reverb level 0(quiet)-100(loud)",      OFFSET(reverb_depth),    AV_OPT_TYPE_INT, {.dbl = 0}, 0,     100, D},
85
+    {"reverb_delay",    "Reverb delay in ms, usually 40-200ms", OFFSET(reverb_delay),    AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, D},
86
+    {"bass_amount",     "XBass level 0(quiet)-100(loud)",       OFFSET(bass_amount),     AV_OPT_TYPE_INT, {.dbl = 0}, 0,     100, D},
87
+    {"bass_range",      "XBass cutoff in Hz 10-100",            OFFSET(bass_range),      AV_OPT_TYPE_INT, {.dbl = 0}, 0,     100, D},
88
+    {"surround_depth",  "Surround level 0(quiet)-100(heavy)",   OFFSET(surround_depth),  AV_OPT_TYPE_INT, {.dbl = 0}, 0,     100, D},
89
+    {"surround_delay",  "Surround delay in ms, usually 5-40ms", OFFSET(surround_delay),  AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, D},
90 90
     {"max_size",        "Max file size supported (in bytes). Default is 5MB. Set to 0 for no limit (not recommended)",
91
-     OFFSET(max_size), FF_OPT_TYPE_INT, {.dbl = FF_MODPLUG_DEF_FILE_SIZE}, 0, FF_MODPLUG_MAX_FILE_SIZE, D},
92
-    {"video_stream_expr", "Color formula",                                  OFFSET(color_eval),     FF_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D},
93
-    {"video_stream",      "Make demuxer output a video stream",             OFFSET(video_stream),   FF_OPT_TYPE_INT, {.dbl = 0},   0,   1, D},
94
-    {"video_stream_w",    "Video stream width in char (one char = 8x8px)",  OFFSET(w),              FF_OPT_TYPE_INT, {.dbl = 30}, 20, 512, D},
95
-    {"video_stream_h",    "Video stream height in char (one char = 8x8px)", OFFSET(h),              FF_OPT_TYPE_INT, {.dbl = 30}, 20, 512, D},
96
-    {"video_stream_ptxt", "Print speed, tempo, order, ... in video stream", OFFSET(print_textinfo), FF_OPT_TYPE_INT, {.dbl = 1},   0,   1, D},
91
+     OFFSET(max_size), AV_OPT_TYPE_INT, {.dbl = FF_MODPLUG_DEF_FILE_SIZE}, 0, FF_MODPLUG_MAX_FILE_SIZE, D},
92
+    {"video_stream_expr", "Color formula",                                  OFFSET(color_eval),     AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D},
93
+    {"video_stream",      "Make demuxer output a video stream",             OFFSET(video_stream),   AV_OPT_TYPE_INT, {.dbl = 0},   0,   1, D},
94
+    {"video_stream_w",    "Video stream width in char (one char = 8x8px)",  OFFSET(w),              AV_OPT_TYPE_INT, {.dbl = 30}, 20, 512, D},
95
+    {"video_stream_h",    "Video stream height in char (one char = 8x8px)", OFFSET(h),              AV_OPT_TYPE_INT, {.dbl = 30}, 20, 512, D},
96
+    {"video_stream_ptxt", "Print speed, tempo, order, ... in video stream", OFFSET(print_textinfo), AV_OPT_TYPE_INT, {.dbl = 1},   0,   1, D},
97 97
     {NULL},
98 98
 };
99 99
 
... ...
@@ -72,7 +72,7 @@ typedef struct {
72 72
 
73 73
 static const AVOption options[] = {
74 74
     { "oggpagesize", "Set preferred Ogg page size.",
75
-      offsetof(OGGContext, pref_size), FF_OPT_TYPE_INT, {.dbl = 0}, 0, MAX_PAGE_SIZE, AV_OPT_FLAG_ENCODING_PARAM},
75
+      offsetof(OGGContext, pref_size), AV_OPT_TYPE_INT, {.dbl = 0}, 0, MAX_PAGE_SIZE, AV_OPT_FLAG_ENCODING_PARAM},
76 76
     { NULL },
77 77
 };
78 78
 
... ...
@@ -189,10 +189,10 @@ static int seg_write_trailer(struct AVFormatContext *s)
189 189
 #define OFFSET(x) offsetof(SegmentContext, x)
190 190
 #define E AV_OPT_FLAG_ENCODING_PARAM
191 191
 static const AVOption options[] = {
192
-    { "container_format", "container format used for the segments", OFFSET(format), FF_OPT_TYPE_STRING, {.str = "nut"},  0, 0, E },
193
-    { "segment_time",     "segment lenght in seconds",              OFFSET(time),   FF_OPT_TYPE_FLOAT,  {.dbl = 2},      0, FLT_MAX, E },
194
-    { "segment_pattern",  "pattern to use in segment files",        OFFSET(pattern),FF_OPT_TYPE_STRING, {.str = "%03d"}, 0, 0, E },
195
-    { "segment_basename", "basename to use in segment files",       OFFSET(path   ),FF_OPT_TYPE_STRING, {.str = NULL},   0, 0, E },
192
+    { "container_format", "container format used for the segments", OFFSET(format), AV_OPT_TYPE_STRING, {.str = "nut"},  0, 0, E },
193
+    { "segment_time",     "segment lenght in seconds",              OFFSET(time),   AV_OPT_TYPE_FLOAT,  {.dbl = 2},      0, FLT_MAX, E },
194
+    { "segment_pattern",  "pattern to use in segment files",        OFFSET(pattern),AV_OPT_TYPE_STRING, {.str = "%03d"}, 0, 0, E },
195
+    { "segment_basename", "basename to use in segment files",       OFFSET(path   ),AV_OPT_TYPE_STRING, {.str = NULL},   0, 0, E },
196 196
     { NULL },
197 197
 };
198 198
 
... ...
@@ -36,21 +36,21 @@
36 36
 //TODO split options array out?
37 37
 #define OFFSET(x) offsetof(SwrContext,x)
38 38
 static const AVOption options[]={
39
-{"ich",  "input channel count", OFFSET( in.ch_count   ), FF_OPT_TYPE_INT, {.dbl=2}, 1, SWR_CH_MAX, 0},
40
-{"och", "output channel count", OFFSET(out.ch_count   ), FF_OPT_TYPE_INT, {.dbl=2}, 1, SWR_CH_MAX, 0},
41
-{"isr",  "input sample rate"  , OFFSET( in_sample_rate), FF_OPT_TYPE_INT, {.dbl=48000}, 1, INT_MAX, 0},
42
-{"osr", "output sample rate"  , OFFSET(out_sample_rate), FF_OPT_TYPE_INT, {.dbl=48000}, 1, INT_MAX, 0},
43
-//{"ip" ,  "input planar"       , OFFSET( in.planar     ), FF_OPT_TYPE_INT, {.dbl=0},    0,       1, 0},
44
-//{"op" , "output planar"       , OFFSET(out.planar     ), FF_OPT_TYPE_INT, {.dbl=0},    0,       1, 0},
45
-{"isf",  "input sample format", OFFSET( in_sample_fmt ), FF_OPT_TYPE_INT, {.dbl=AV_SAMPLE_FMT_S16}, 0, AV_SAMPLE_FMT_NB-1+256, 0},
46
-{"osf", "output sample format", OFFSET(out_sample_fmt ), FF_OPT_TYPE_INT, {.dbl=AV_SAMPLE_FMT_S16}, 0, AV_SAMPLE_FMT_NB-1+256, 0},
47
-{"tsf", "internal sample format", OFFSET(int_sample_fmt ), FF_OPT_TYPE_INT, {.dbl=AV_SAMPLE_FMT_NONE}, -1, AV_SAMPLE_FMT_FLT, 0},
48
-{"icl",  "input channel layout" , OFFSET( in_ch_layout), FF_OPT_TYPE_INT64, {.dbl=0}, 0, INT64_MAX, 0, "channel_layout"},
49
-{"ocl",  "output channel layout", OFFSET(out_ch_layout), FF_OPT_TYPE_INT64, {.dbl=0}, 0, INT64_MAX, 0, "channel_layout"},
50
-{"clev", "center mix level"     , OFFSET(clev)         , FF_OPT_TYPE_FLOAT, {.dbl=C_30DB}, 0, 4, 0},
51
-{"slev", "sourround mix level"  , OFFSET(slev)         , FF_OPT_TYPE_FLOAT, {.dbl=C_30DB}, 0, 4, 0},
52
-{"flags", NULL                  , OFFSET(flags)        , FF_OPT_TYPE_FLAGS, {.dbl=0}, 0,  UINT_MAX, 0, "flags"},
53
-{"res", "force resampling", 0, FF_OPT_TYPE_CONST, {.dbl=SWR_FLAG_RESAMPLE}, INT_MIN, INT_MAX, 0, "flags"},
39
+{"ich",  "input channel count", OFFSET( in.ch_count   ), AV_OPT_TYPE_INT, {.dbl=2}, 1, SWR_CH_MAX, 0},
40
+{"och", "output channel count", OFFSET(out.ch_count   ), AV_OPT_TYPE_INT, {.dbl=2}, 1, SWR_CH_MAX, 0},
41
+{"isr",  "input sample rate"  , OFFSET( in_sample_rate), AV_OPT_TYPE_INT, {.dbl=48000}, 1, INT_MAX, 0},
42
+{"osr", "output sample rate"  , OFFSET(out_sample_rate), AV_OPT_TYPE_INT, {.dbl=48000}, 1, INT_MAX, 0},
43
+//{"ip" ,  "input planar"       , OFFSET( in.planar     ), AV_OPT_TYPE_INT, {.dbl=0},    0,       1, 0},
44
+//{"op" , "output planar"       , OFFSET(out.planar     ), AV_OPT_TYPE_INT, {.dbl=0},    0,       1, 0},
45
+{"isf",  "input sample format", OFFSET( in_sample_fmt ), AV_OPT_TYPE_INT, {.dbl=AV_SAMPLE_FMT_S16}, 0, AV_SAMPLE_FMT_NB-1+256, 0},
46
+{"osf", "output sample format", OFFSET(out_sample_fmt ), AV_OPT_TYPE_INT, {.dbl=AV_SAMPLE_FMT_S16}, 0, AV_SAMPLE_FMT_NB-1+256, 0},
47
+{"tsf", "internal sample format", OFFSET(int_sample_fmt ), AV_OPT_TYPE_INT, {.dbl=AV_SAMPLE_FMT_NONE}, -1, AV_SAMPLE_FMT_FLT, 0},
48
+{"icl",  "input channel layout" , OFFSET( in_ch_layout), AV_OPT_TYPE_INT64, {.dbl=0}, 0, INT64_MAX, 0, "channel_layout"},
49
+{"ocl",  "output channel layout", OFFSET(out_ch_layout), AV_OPT_TYPE_INT64, {.dbl=0}, 0, INT64_MAX, 0, "channel_layout"},
50
+{"clev", "center mix level"     , OFFSET(clev)         , AV_OPT_TYPE_FLOAT, {.dbl=C_30DB}, 0, 4, 0},
51
+{"slev", "sourround mix level"  , OFFSET(slev)         , AV_OPT_TYPE_FLOAT, {.dbl=C_30DB}, 0, 4, 0},
52
+{"flags", NULL                  , OFFSET(flags)        , AV_OPT_TYPE_FLAGS, {.dbl=0}, 0,  UINT_MAX, 0, "flags"},
53
+{"res", "force resampling", 0, AV_OPT_TYPE_CONST, {.dbl=SWR_FLAG_RESAMPLE}, INT_MIN, INT_MAX, 0, "flags"},
54 54
 
55 55
 {0}
56 56
 };