Not the input link. The function does nothing with the link except extract the private context from it.
Unified · Split
| @@ -622,9 +622,8 @@ static int request_frame_ref(AVFilterLink *outlink) · 621 unmodified lines | ||
| 622 | 622 | return ff_request_frame(outlink->src->inputs[1]); |
| 623 | 623 | } |
| 624 | 624 | |
| 625 | −static int scale_slice(AVFilterLink *link, AVFrame *out_buf, AVFrame *cur_pic, struct SwsContext *sws, int y, int h, int mul, int field) | |
| 625 | +static int scale_slice(ScaleContext *scale, AVFrame *out_buf, AVFrame *cur_pic, struct SwsContext *sws, int y, int h, int mul, int field) | |
| 626 | 626 | { |
| 627 | − ScaleContext *scale = link->dst->priv; | |
| 628 | 627 | const uint8_t *in[4]; |
| 629 | 628 | uint8_t *out[4]; |
| 630 | 629 | int in_stride[4],out_stride[4]; |
| @@ -792,8 +791,8 @@ scale: · 161 unmodified lines | ||
| 792 | 791 | INT_MAX); |
| 793 | 792 | |
| 794 | 793 | if (scale->interlaced>0 || (scale->interlaced<0 && in->interlaced_frame)) { |
| 795 | − scale_slice(link, out, in, scale->isws[0], 0, (link->h+1)/2, 2, 0); | |
| 796 | − scale_slice(link, out, in, scale->isws[1], 0, link->h /2, 2, 1); | |
| 794 | + scale_slice(scale, out, in, scale->isws[0], 0, (link->h+1)/2, 2, 0); | |
| 795 | + scale_slice(scale, out, in, scale->isws[1], 0, link->h /2, 2, 1); | |
| 797 | 796 | } else if (scale->nb_slices) { |
| 798 | 797 | int i, slice_h, slice_start, slice_end = 0; |
| 799 | 798 | const int nb_slices = FFMIN(scale->nb_slices, link->h); |
| @@ -801,10 +800,10 @@ scale: · 1 unmodified line | ||
| 801 | 800 | slice_start = slice_end; |
| 802 | 801 | slice_end = (link->h * (i+1)) / nb_slices; |
| 803 | 802 | slice_h = slice_end - slice_start; |
| 804 | − scale_slice(link, out, in, scale->sws, slice_start, slice_h, 1, 0); | |
| 803 | + scale_slice(scale, out, in, scale->sws, slice_start, slice_h, 1, 0); | |
| 805 | 804 | } |
| 806 | 805 | } else { |
| 807 | − scale_slice(link, out, in, scale->sws, 0, link->h, 1, 0); | |
| 806 | + scale_slice(scale, out, in, scale->sws, 0, link->h, 1, 0); | |
| 808 | 807 | } |
| 809 | 808 | |
| 810 | 809 | av_frame_free(&in); |