mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
video/converter: increase the number of cache lines for resampling
The exising hardcoded max default does not account for the possible -1 offset when retrieving lines for resampling. As a result, when another chain has the same number of cache lines (4), the resample operation would be attempting to generate 5 lines with a cache size of 4 and would overwrite the first cache line. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/821 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/938>
This commit is contained in:
parent
831199a808
commit
d4ff62700d
1 changed files with 4 additions and 2 deletions
|
@ -851,7 +851,8 @@ chain_upsample (GstVideoConverter * convert, GstLineCache * prev, gint idx)
|
|||
prev = convert->upsample_lines[idx] = gst_line_cache_new (prev);
|
||||
prev->write_input = TRUE;
|
||||
prev->pass_alloc = TRUE;
|
||||
prev->n_lines = 4;
|
||||
/* XXX: why this hardcoded value? */
|
||||
prev->n_lines = 5;
|
||||
prev->stride = convert->current_pstride * convert->current_width;
|
||||
gst_line_cache_set_need_line_func (prev,
|
||||
do_upsample_lines, idx, convert, NULL);
|
||||
|
@ -1959,7 +1960,8 @@ chain_downsample (GstVideoConverter * convert, GstLineCache * prev, gint idx)
|
|||
prev = convert->downsample_lines[idx] = gst_line_cache_new (prev);
|
||||
prev->write_input = TRUE;
|
||||
prev->pass_alloc = TRUE;
|
||||
prev->n_lines = 4;
|
||||
/* XXX: why this hardcoded value? */
|
||||
prev->n_lines = 5;
|
||||
prev->stride = convert->current_pstride * convert->current_width;
|
||||
gst_line_cache_set_need_line_func (prev,
|
||||
do_downsample_lines, idx, convert, NULL);
|
||||
|
|
Loading…
Reference in a new issue