| @@ -53,6 +53,7 @@ static const AVOption tinterlace_options[] = { · 52 unmodified lines |
| 53 | {"complex_filter", "enable complex vertical low-pass filter", 0, AV_OPT_TYPE_CONST, {.i64 = TINTERLACE_FLAG_CVLPF},INT_MIN, INT_MAX, FLAGS, "flags" }, | 53 | {"complex_filter", "enable complex vertical low-pass filter", 0, AV_OPT_TYPE_CONST, {.i64 = TINTERLACE_FLAG_CVLPF},INT_MIN, INT_MAX, FLAGS, "flags" }, |
| 54 | {"cvlpf", "enable complex vertical low-pass filter", 0, AV_OPT_TYPE_CONST, {.i64 = TINTERLACE_FLAG_CVLPF},INT_MIN, INT_MAX, FLAGS, "flags" }, | 54 | {"cvlpf", "enable complex vertical low-pass filter", 0, AV_OPT_TYPE_CONST, {.i64 = TINTERLACE_FLAG_CVLPF},INT_MIN, INT_MAX, FLAGS, "flags" }, |
| 55 | {"exact_tb", "force a timebase which can represent timestamps exactly", 0, AV_OPT_TYPE_CONST, {.i64 = TINTERLACE_FLAG_EXACT_TB}, INT_MIN, INT_MAX, FLAGS, "flags" }, | 55 | {"exact_tb", "force a timebase which can represent timestamps exactly", 0, AV_OPT_TYPE_CONST, {.i64 = TINTERLACE_FLAG_EXACT_TB}, INT_MIN, INT_MAX, FLAGS, "flags" }, |
| | 56 | {"bypass_il", "bypass already interlaced frames", 0, AV_OPT_TYPE_CONST, {.i64 = TINTERLACE_FLAG_BYPASS_IL}, INT_MIN, INT_MAX, FLAGS, "flags" }, |
| 56 | | 57 | |
| 57 | {NULL} | 58 | {NULL} |
| 58 | }; | 59 | }; |
| @@ -439,6 +440,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref) · 380 unmodified lines |
| 439 | * halving the frame rate and preserving image height */ | 440 | * halving the frame rate and preserving image height */ |
| 440 | case MODE_INTERLEAVE_TOP: /* top field first */ | 441 | case MODE_INTERLEAVE_TOP: /* top field first */ |
| 441 | case MODE_INTERLEAVE_BOTTOM: /* bottom field first */ | 442 | case MODE_INTERLEAVE_BOTTOM: /* bottom field first */ |
| | 443 | if ((tinterlace->flags & TINTERLACE_FLAG_BYPASS_IL) && cur->interlaced_frame) { |
| | 444 | av_log(ctx, AV_LOG_WARNING, |
| | 445 | "video is already interlaced, adjusting framerate only\n"); |
| | 446 | out = av_frame_clone(cur); |
| | 447 | if (!out) |
| | 448 | return AVERROR(ENOMEM); |
| | 449 | out->pts /= 2; // adjust pts to new framerate |
| | 450 | ret = ff_filter_frame(outlink, out); |
| | 451 | return ret; |
| | 452 | } |
| 442 | tff = tinterlace->mode == MODE_INTERLEAVE_TOP; | 453 | tff = tinterlace->mode == MODE_INTERLEAVE_TOP; |
| 443 | out = ff_get_video_buffer(outlink, outlink->w, outlink->h); | 454 | out = ff_get_video_buffer(outlink, outlink->w, outlink->h); |
| 444 | if (!out) | 455 | if (!out) |