mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-13 02:45:35 +00:00
video-scaler: fix YUY2 scaling some more
Take into account the different steps between Y and UV when calculating the line size for vertical resampling or else we might not resample enough pixels and leave bad lines. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=747790
This commit is contained in:
parent
8f82ee70f9
commit
0588c9a53f
1 changed files with 10 additions and 3 deletions
|
@ -1480,16 +1480,23 @@ gst_video_scaler_2d (GstVideoScaler * hscale, GstVideoScaler * vscale,
|
|||
vfunc (vscale, lines, LINE (dest, dest_stride, i), i, width, n_elems);
|
||||
}
|
||||
} else {
|
||||
guint vx, vw;
|
||||
guint vx, vw, w1;
|
||||
guint h_taps;
|
||||
|
||||
h_taps = hscale->resampler.max_taps;
|
||||
w1 = x + width - 1;
|
||||
|
||||
vx = (hscale->inc * x) >> 16;
|
||||
vx = MIN (vx, hscale->resampler.offset[x]);
|
||||
vw = (hscale->inc * (x + width)) >> 16;
|
||||
vw = MAX (vw,
|
||||
hscale->resampler.offset[x + width - 1] + (mult * h_taps));
|
||||
if (hscale->merged) {
|
||||
if ((w1 & 1) == hscale->out_y_offset)
|
||||
vw = MAX (vw, hscale->resampler.offset[w1] + (2 * h_taps));
|
||||
else
|
||||
vw = MAX (vw, hscale->resampler.offset[w1] + (4 * h_taps));
|
||||
} else {
|
||||
vw = MAX (vw, hscale->resampler.offset[w1] + h_taps);
|
||||
}
|
||||
vw += 1;
|
||||
|
||||
if (vscale->tmpwidth < vw)
|
||||
|
|
Loading…
Reference in a new issue