Conflicts: libavfilter/avfilter.c libavfilter/vf_drawtext.c libavfilter/vf_lut.c libavfilter/vf_select.c libavfilter/vf_setpts.c libavfilter/vsrc_color.c libavfilter/vsrc_movie.c
Unified · Split
| @@ -90,7 +90,7 @@ static int get_sample_rate(const char *samplerate) · 89 unmodified lines | |||
| 90 | return FFMAX(ret, 0); | 90 | return FFMAX(ret, 0); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | static av_cold int init(AVFilterContext *ctx, const char *args) | 93 | static av_cold int init(AVFilterContext *ctx) |
| 94 | { | 94 | { |
| 95 | AFormatContext *s = ctx->priv; | 95 | AFormatContext *s = ctx->priv; |
| 96 | 96 | ||
| @@ -483,7 +483,7 @@ fail: · 482 unmodified lines | |||
| 483 | return ret; | 483 | return ret; |
| 484 | } | 484 | } |
| 485 | 485 | ||
| 486 | static int init(AVFilterContext *ctx, const char *args) | 486 | static int init(AVFilterContext *ctx) |
| 487 | { | 487 | { |
| 488 | MixContext *s = ctx->priv; | 488 | MixContext *s = ctx->priv; |
| 489 | int i; | 489 | int i; |
| @@ -60,7 +60,7 @@ static const AVOption asyncts_options[] = { · 59 unmodified lines | |||
| 60 | 60 | ||
| 61 | AVFILTER_DEFINE_CLASS(asyncts); | 61 | AVFILTER_DEFINE_CLASS(asyncts); |
| 62 | 62 | ||
| 63 | static int init(AVFilterContext *ctx, const char *args) | 63 | static int init(AVFilterContext *ctx) |
| 64 | { | 64 | { |
| 65 | ASyncContext *s = ctx->priv; | 65 | ASyncContext *s = ctx->priv; |
| 66 | 66 | ||
| @@ -120,7 +120,7 @@ static int get_channel(char **map, uint64_t *ch, char delim) · 119 unmodified lines | |||
| 120 | return 0; | 120 | return 0; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | static av_cold int channelmap_init(AVFilterContext *ctx, const char *args) | 123 | static av_cold int channelmap_init(AVFilterContext *ctx) |
| 124 | { | 124 | { |
| 125 | ChannelMapContext *s = ctx->priv; | 125 | ChannelMapContext *s = ctx->priv; |
| 126 | int ret = 0; | 126 | int ret = 0; |
| @@ -49,7 +49,7 @@ static const AVOption channelsplit_options[] = { · 48 unmodified lines | |||
| 49 | 49 | ||
| 50 | AVFILTER_DEFINE_CLASS(channelsplit); | 50 | AVFILTER_DEFINE_CLASS(channelsplit); |
| 51 | 51 | ||
| 52 | static int init(AVFilterContext *ctx, const char *arg) | 52 | static int init(AVFilterContext *ctx) |
| 53 | { | 53 | { |
| 54 | ChannelSplitContext *s = ctx->priv; | 54 | ChannelSplitContext *s = ctx->priv; |
| 55 | int nb_channels; | 55 | int nb_channels; |
| @@ -187,7 +187,7 @@ static int parse_maps(AVFilterContext *ctx) · 186 unmodified lines | |||
| 187 | return 0; | 187 | return 0; |
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | static int join_init(AVFilterContext *ctx, const char *args) | 190 | static int join_init(AVFilterContext *ctx) |
| 191 | { | 191 | { |
| 192 | JoinContext *s = ctx->priv; | 192 | JoinContext *s = ctx->priv; |
| 193 | int ret, i; | 193 | int ret, i; |
| @@ -56,7 +56,7 @@ static const AVOption volume_options[] = { · 55 unmodified lines | |||
| 56 | 56 | ||
| 57 | AVFILTER_DEFINE_CLASS(volume); | 57 | AVFILTER_DEFINE_CLASS(volume); |
| 58 | 58 | ||
| 59 | static av_cold int init(AVFilterContext *ctx, const char *args) | 59 | static av_cold int init(AVFilterContext *ctx) |
| 60 | { | 60 | { |
| 61 | VolumeContext *vol = ctx->priv; | 61 | VolumeContext *vol = ctx->priv; |
| 62 | 62 | ||
| @@ -838,9 +838,9 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 837 unmodified lines | |||
| 838 | } | 838 | } |
| 839 | 839 | ||
| 840 | if (filter->filter->init_opaque) | 840 | if (filter->filter->init_opaque) |
| 841 | ret = filter->filter->init_opaque(filter, args, opaque); | 841 | ret = filter->filter->init_opaque(filter, opaque); |
| 842 | else if (filter->filter->init) | 842 | else if (filter->filter->init) |
| 843 | ret = filter->filter->init(filter, args); | 843 | ret = filter->filter->init(filter); |
| 844 | else if (filter->filter->init_dict) | 844 | else if (filter->filter->init_dict) |
| 845 | ret = filter->filter->init_dict(filter, &options); | 845 | ret = filter->filter->init_dict(filter, &options); |
| 846 | if (ret < 0) | 846 | if (ret < 0) |
| @@ -441,10 +441,10 @@ typedef struct AVFilter { · 440 unmodified lines | |||
| 441 | */ | 441 | */ |
| 442 | 442 | ||
| 443 | /** | 443 | /** |
| 444 | * Filter initialization function. Args contains the user-supplied | 444 | * Filter initialization function. Called when all the options have been |
| 445 | * parameters. FIXME: maybe an AVOption-based system would be better? | 445 | * set. |
| 446 | */ | 446 | */ |
| 447 | int (*init)(AVFilterContext *ctx, const char *args); | 447 | int (*init)(AVFilterContext *ctx); |
| 448 | 448 | ||
| 449 | /** | 449 | /** |
| 450 | * Should be set instead of init by the filters that want to pass a | 450 | * Should be set instead of init by the filters that want to pass a |
| @@ -289,7 +289,7 @@ int av_buffersrc_buffer(AVFilterContext *ctx, AVFilterBufferRef *buf) · 288 unmodified lines | |||
| 289 | } | 289 | } |
| 290 | #endif | 290 | #endif |
| 291 | 291 | ||
| 292 | static av_cold int init_video(AVFilterContext *ctx, const char *args) | 292 | static av_cold int init_video(AVFilterContext *ctx) |
| 293 | { | 293 | { |
| 294 | BufferSourceContext *c = ctx->priv; | 294 | BufferSourceContext *c = ctx->priv; |
| 295 | 295 | ||
| @@ -352,7 +352,7 @@ static const AVOption abuffer_options[] = { · 56 unmodified lines | |||
| 352 | 352 | ||
| 353 | AVFILTER_DEFINE_CLASS(abuffer); | 353 | AVFILTER_DEFINE_CLASS(abuffer); |
| 354 | 354 | ||
| 355 | static av_cold int init_audio(AVFilterContext *ctx, const char *args) | 355 | static av_cold int init_audio(AVFilterContext *ctx) |
| 356 | { | 356 | { |
| 357 | BufferSourceContext *s = ctx->priv; | 357 | BufferSourceContext *s = ctx->priv; |
| 358 | int ret = 0; | 358 | int ret = 0; |
| @@ -51,7 +51,7 @@ typedef struct { · 50 unmodified lines | |||
| 51 | int allocated_samples; ///< number of samples out was allocated for | 51 | int allocated_samples; ///< number of samples out was allocated for |
| 52 | } FifoContext; | 52 | } FifoContext; |
| 53 | 53 | ||
| 54 | static av_cold int init(AVFilterContext *ctx, const char *args) | 54 | static av_cold int init(AVFilterContext *ctx) |
| 55 | { | 55 | { |
| 56 | FifoContext *fifo = ctx->priv; | 56 | FifoContext *fifo = ctx->priv; |
| 57 | fifo->last = &fifo->root; | 57 | fifo->last = &fifo->root; |
| @@ -39,7 +39,7 @@ typedef struct SplitContext { · 38 unmodified lines | |||
| 39 | int nb_outputs; | 39 | int nb_outputs; |
| 40 | } SplitContext; | 40 | } SplitContext; |
| 41 | 41 | ||
| 42 | static int split_init(AVFilterContext *ctx, const char *args) | 42 | static int split_init(AVFilterContext *ctx) |
| 43 | { | 43 | { |
| 44 | SplitContext *s = ctx->priv; | 44 | SplitContext *s = ctx->priv; |
| 45 | int i; | 45 | int i; |
| @@ -45,7 +45,7 @@ typedef struct { · 44 unmodified lines | |||
| 45 | } AspectContext; | 45 | } AspectContext; |
| 46 | 46 | ||
| 47 | #if FF_API_OLD_FILTER_OPTS | 47 | #if FF_API_OLD_FILTER_OPTS |
| 48 | static av_cold int init(AVFilterContext *ctx, const char *args) | 48 | static av_cold int init(AVFilterContext *ctx) |
| 49 | { | 49 | { |
| 50 | AspectContext *s = ctx->priv; | 50 | AspectContext *s = ctx->priv; |
| 51 | 51 | ||
| @@ -78,7 +78,7 @@ typedef struct { · 77 unmodified lines | |||
| 78 | #define V 2 | 78 | #define V 2 |
| 79 | #define A 3 | 79 | #define A 3 |
| 80 | 80 | ||
| 81 | static av_cold int init(AVFilterContext *ctx, const char *args) | 81 | static av_cold int init(AVFilterContext *ctx) |
| 82 | { | 82 | { |
| 83 | BoxBlurContext *boxblur = ctx->priv; | 83 | BoxBlurContext *boxblur = ctx->priv; |
| 84 | 84 | ||
| @@ -84,7 +84,7 @@ static int checkline(void *ctx, const unsigned char *src, int stride, int len, i · 83 unmodified lines | |||
| 84 | return total; | 84 | return total; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | static av_cold int init(AVFilterContext *ctx, const char *args) | 87 | static av_cold int init(AVFilterContext *ctx) |
| 88 | { | 88 | { |
| 89 | CropDetectContext *cd = ctx->priv; | 89 | CropDetectContext *cd = ctx->priv; |
| 90 | 90 | ||
| @@ -168,7 +168,7 @@ static int query_formats(AVFilterContext *ctx) · 167 unmodified lines | |||
| 168 | return 0; | 168 | return 0; |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | static av_cold int init(AVFilterContext *ctx, const char *args) | 171 | static av_cold int init(AVFilterContext *ctx) |
| 172 | { | 172 | { |
| 173 | DelogoContext *delogo = ctx->priv; | 173 | DelogoContext *delogo = ctx->priv; |
| 174 | 174 | ||
| @@ -45,7 +45,7 @@ typedef struct { · 44 unmodified lines | |||
| 45 | int vsub, hsub; ///< chroma subsampling | 45 | int vsub, hsub; ///< chroma subsampling |
| 46 | } DrawBoxContext; | 46 | } DrawBoxContext; |
| 47 | 47 | ||
| 48 | static av_cold int init(AVFilterContext *ctx, const char *args) | 48 | static av_cold int init(AVFilterContext *ctx) |
| 49 | { | 49 | { |
| 50 | DrawBoxContext *drawbox = ctx->priv; | 50 | DrawBoxContext *drawbox = ctx->priv; |
| 51 | uint8_t rgba_color[4]; | 51 | uint8_t rgba_color[4]; |
| @@ -416,7 +416,7 @@ static int load_textfile(AVFilterContext *ctx) · 415 unmodified lines | |||
| 416 | return 0; | 416 | return 0; |
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | static av_cold int init(AVFilterContext *ctx, const char *args) | 419 | static av_cold int init(AVFilterContext *ctx) |
| 420 | { | 420 | { |
| 421 | int err; | 421 | int err; |
| 422 | DrawTextContext *dtext = ctx->priv; | 422 | DrawTextContext *dtext = ctx->priv; |
| @@ -63,7 +63,7 @@ typedef struct { · 62 unmodified lines | |||
| 63 | 63 | ||
| 64 | } FadeContext; | 64 | } FadeContext; |
| 65 | 65 | ||
| 66 | static av_cold int init(AVFilterContext *ctx, const char *args) | 66 | static av_cold int init(AVFilterContext *ctx) |
| 67 | { | 67 | { |
| 68 | FadeContext *fade = ctx->priv; | 68 | FadeContext *fade = ctx->priv; |
| 69 | 69 | ||
| @@ -48,7 +48,7 @@ typedef struct { · 47 unmodified lines | |||
| 48 | 48 | ||
| 49 | #define AV_PIX_FMT_NAME_MAXSIZE 32 | 49 | #define AV_PIX_FMT_NAME_MAXSIZE 32 |
| 50 | 50 | ||
| 51 | static av_cold int init(AVFilterContext *ctx, const char *args) | 51 | static av_cold int init(AVFilterContext *ctx) |
| 52 | { | 52 | { |
| 53 | FormatContext *format = ctx->priv; | 53 | FormatContext *format = ctx->priv; |
| 54 | const char *cur, *sep; | 54 | const char *cur, *sep; |
| @@ -70,7 +70,7 @@ static const AVOption fps_options[] = { · 69 unmodified lines | |||
| 70 | 70 | ||
| 71 | AVFILTER_DEFINE_CLASS(fps); | 71 | AVFILTER_DEFINE_CLASS(fps); |
| 72 | 72 | ||
| 73 | static av_cold int init(AVFilterContext *ctx, const char *args) | 73 | static av_cold int init(AVFilterContext *ctx) |
| 74 | { | 74 | { |
| 75 | FPSContext *s = ctx->priv; | 75 | FPSContext *s = ctx->priv; |
| 76 | 76 | ||
| @@ -328,7 +328,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx, · 327 unmodified lines | |||
| 328 | return 0; | 328 | return 0; |
| 329 | } | 329 | } |
| 330 | 330 | ||
| 331 | static av_cold int filter_init(AVFilterContext *ctx, const char *args) | 331 | static av_cold int filter_init(AVFilterContext *ctx) |
| 332 | { | 332 | { |
| 333 | Frei0rContext *frei0r = ctx->priv; | 333 | Frei0rContext *frei0r = ctx->priv; |
| 334 | 334 | ||
| @@ -454,7 +454,7 @@ AVFilter avfilter_vf_frei0r = { · 119 unmodified lines | |||
| 454 | .outputs = avfilter_vf_frei0r_outputs, | 454 | .outputs = avfilter_vf_frei0r_outputs, |
| 455 | }; | 455 | }; |
| 456 | 456 | ||
| 457 | static av_cold int source_init(AVFilterContext *ctx, const char *args) | 457 | static av_cold int source_init(AVFilterContext *ctx) |
| 458 | { | 458 | { |
| 459 | Frei0rContext *frei0r = ctx->priv; | 459 | Frei0rContext *frei0r = ctx->priv; |
| 460 | AVRational frame_rate_q; | 460 | AVRational frame_rate_q; |
| @@ -121,7 +121,7 @@ static void filter(GradFunContext *ctx, uint8_t *dst, const uint8_t *src, int wi · 120 unmodified lines | |||
| 121 | } | 121 | } |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | static av_cold int init(AVFilterContext *ctx, const char *args) | 124 | static av_cold int init(AVFilterContext *ctx) |
| 125 | { | 125 | { |
| 126 | GradFunContext *gf = ctx->priv; | 126 | GradFunContext *gf = ctx->priv; |
| 127 | 127 | ||
| @@ -181,7 +181,7 @@ static int16_t *precalc_coefs(double dist25, int depth) · 180 unmodified lines | |||
| 181 | #define PARAM2_DEFAULT 3.0 | 181 | #define PARAM2_DEFAULT 3.0 |
| 182 | #define PARAM3_DEFAULT 6.0 | 182 | #define PARAM3_DEFAULT 6.0 |
| 183 | 183 | ||
| 184 | static int init(AVFilterContext *ctx, const char *args) | 184 | static int init(AVFilterContext *ctx) |
| 185 | { | 185 | { |
| 186 | HQDN3DContext *hqdn3d = ctx->priv; | 186 | HQDN3DContext *hqdn3d = ctx->priv; |
| 187 | 187 | ||
| @@ -317,7 +317,7 @@ static OCVFilterEntry ocv_filter_entries[] = { · 316 unmodified lines | |||
| 317 | { "smooth", sizeof(SmoothContext), smooth_init, NULL, smooth_end_frame_filter }, | 317 | { "smooth", sizeof(SmoothContext), smooth_init, NULL, smooth_end_frame_filter }, |
| 318 | }; | 318 | }; |
| 319 | 319 | ||
| 320 | static av_cold int init(AVFilterContext *ctx, const char *args) | 320 | static av_cold int init(AVFilterContext *ctx) |
| 321 | { | 321 | { |
| 322 | OCVContext *ocv = ctx->priv; | 322 | OCVContext *ocv = ctx->priv; |
| 323 | int i; | 323 | int i; |
| @@ -354,7 +354,7 @@ static const AVFilterPad outputs[] = { · 353 unmodified lines | |||
| 354 | #define lut_options options | 354 | #define lut_options options |
| 355 | AVFILTER_DEFINE_CLASS(lut); | 355 | AVFILTER_DEFINE_CLASS(lut); |
| 356 | 356 | ||
| 357 | static int lut_init(AVFilterContext *ctx, const char *args) | 357 | static int lut_init(AVFilterContext *ctx) |
| 358 | { | 358 | { |
| 359 | return 0; | 359 | return 0; |
| 360 | } | 360 | } |
| @@ -367,7 +367,7 @@ DEFINE_LUT_FILTER(lut, "Compute and apply a lookup table to the RGB/YUV input vi · 6 unmodified lines | |||
| 367 | #define lutyuv_options options | 367 | #define lutyuv_options options |
| 368 | AVFILTER_DEFINE_CLASS(lutyuv); | 368 | AVFILTER_DEFINE_CLASS(lutyuv); |
| 369 | 369 | ||
| 370 | static int lutyuv_init(AVFilterContext *ctx, const char *args) | 370 | static int lutyuv_init(AVFilterContext *ctx) |
| 371 | { | 371 | { |
| 372 | LutContext *lut = ctx->priv; | 372 | LutContext *lut = ctx->priv; |
| 373 | 373 | ||
| @@ -384,7 +384,7 @@ DEFINE_LUT_FILTER(lutyuv, "Compute and apply a lookup table to the YUV input vid · 10 unmodified lines | |||
| 384 | #define lutrgb_options options | 384 | #define lutrgb_options options |
| 385 | AVFILTER_DEFINE_CLASS(lutrgb); | 385 | AVFILTER_DEFINE_CLASS(lutrgb); |
| 386 | 386 | ||
| 387 | static int lutrgb_init(AVFilterContext *ctx, const char *args) | 387 | static int lutrgb_init(AVFilterContext *ctx) |
| 388 | { | 388 | { |
| 389 | LutContext *lut = ctx->priv; | 389 | LutContext *lut = ctx->priv; |
| 390 | 390 | ||
| @@ -405,7 +405,7 @@ static const AVOption negate_options[] = { · 14 unmodified lines | |||
| 405 | 405 | ||
| 406 | AVFILTER_DEFINE_CLASS(negate); | 406 | AVFILTER_DEFINE_CLASS(negate); |
| 407 | 407 | ||
| 408 | static int negate_init(AVFilterContext *ctx, const char *args) | 408 | static int negate_init(AVFilterContext *ctx) |
| 409 | { | 409 | { |
| 410 | LutContext *lut = ctx->priv; | 410 | LutContext *lut = ctx->priv; |
| 411 | int i; | 411 | int i; |
| @@ -421,7 +421,7 @@ static int negate_init(AVFilterContext *ctx, const char *args) · 9 unmodified lines | |||
| 421 | } | 421 | } |
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | return lut_init(ctx, NULL); | 424 | return lut_init(ctx); |
| 425 | } | 425 | } |
| 426 | 426 | ||
| 427 | DEFINE_LUT_FILTER(negate, "Negate input video."); | 427 | DEFINE_LUT_FILTER(negate, "Negate input video."); |
| @@ -94,7 +94,7 @@ typedef struct { · 93 unmodified lines | |||
| 94 | FFDrawColor color; | 94 | FFDrawColor color; |
| 95 | } PadContext; | 95 | } PadContext; |
| 96 | 96 | ||
| 97 | static av_cold int init(AVFilterContext *ctx, const char *args) | 97 | static av_cold int init(AVFilterContext *ctx) |
| 98 | { | 98 | { |
| 99 | PadContext *pad = ctx->priv; | 99 | PadContext *pad = ctx->priv; |
| 100 | 100 | ||
| @@ -92,7 +92,7 @@ typedef struct { · 91 unmodified lines | |||
| 92 | char *flags_str; | 92 | char *flags_str; |
| 93 | } ScaleContext; | 93 | } ScaleContext; |
| 94 | 94 | ||
| 95 | static av_cold int init(AVFilterContext *ctx, const char *args) | 95 | static av_cold int init(AVFilterContext *ctx) |
| 96 | { | 96 | { |
| 97 | ScaleContext *scale = ctx->priv; | 97 | ScaleContext *scale = ctx->priv; |
| 98 | int ret; | 98 | int ret; |
| @@ -143,7 +143,7 @@ static void set_filter_param(FilterParam *fp, int msize_x, int msize_y, float am · 142 unmodified lines | |||
| 143 | fp->halfscale = 1 << (fp->scalebits - 1); | 143 | fp->halfscale = 1 << (fp->scalebits - 1); |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | static av_cold int init(AVFilterContext *ctx, const char *args) | 146 | static av_cold int init(AVFilterContext *ctx) |
| 147 | { | 147 | { |
| 148 | UnsharpContext *unsharp = ctx->priv; | 148 | UnsharpContext *unsharp = ctx->priv; |
| 149 | 149 | ||
| @@ -500,7 +500,7 @@ static void test_fill_picture(AVFilterContext *ctx, AVFrame *frame) · 499 unmodified lines | |||
| 500 | } | 500 | } |
| 501 | } | 501 | } |
| 502 | 502 | ||
| 503 | static av_cold int test_init(AVFilterContext *ctx, const char *args) | 503 | static av_cold int test_init(AVFilterContext *ctx) |
| 504 | { | 504 | { |
| 505 | TestSourceContext *test = ctx->priv; | 505 | TestSourceContext *test = ctx->priv; |
| 506 | 506 | ||
| @@ -604,7 +604,7 @@ static void rgbtest_fill_picture(AVFilterContext *ctx, AVFrame *frame) · 97 unmodified lines | |||
| 604 | } | 604 | } |
| 605 | } | 605 | } |
| 606 | 606 | ||
| 607 | static av_cold int rgbtest_init(AVFilterContext *ctx, const char *args) | 607 | static av_cold int rgbtest_init(AVFilterContext *ctx) |
| 608 | { | 608 | { |
| 609 | TestSourceContext *test = ctx->priv; | 609 | TestSourceContext *test = ctx->priv; |
| 610 | 610 | ||