mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-05 22:25:55 +00:00
video-converter: Don't upsample/downsample/dither invalid lines
This is a fallout from the conversion to support multiple threads. convert->upsample_p is never NULL now, it's always an allocated array of n_threads potentially-null pointers. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1043>
This commit is contained in:
parent
fd41fca7f3
commit
1517b7043d
|
@ -2892,7 +2892,7 @@ do_upsample_lines (GstLineCache * cache, gint idx, gint out_line, gint in_line,
|
||||||
gst_line_cache_get_lines (cache->prev, idx, out_line, start_line,
|
gst_line_cache_get_lines (cache->prev, idx, out_line, start_line,
|
||||||
n_lines);
|
n_lines);
|
||||||
|
|
||||||
if (convert->upsample) {
|
if (convert->upsample[idx]) {
|
||||||
GST_DEBUG ("doing upsample %d-%d %p", start_line, start_line + n_lines - 1,
|
GST_DEBUG ("doing upsample %d-%d %p", start_line, start_line + n_lines - 1,
|
||||||
lines[0]);
|
lines[0]);
|
||||||
gst_video_chroma_resample (convert->upsample[idx], lines,
|
gst_video_chroma_resample (convert->upsample[idx], lines,
|
||||||
|
@ -3093,7 +3093,7 @@ do_downsample_lines (GstLineCache * cache, gint idx, gint out_line,
|
||||||
gst_line_cache_get_lines (cache->prev, idx, out_line, start_line,
|
gst_line_cache_get_lines (cache->prev, idx, out_line, start_line,
|
||||||
n_lines);
|
n_lines);
|
||||||
|
|
||||||
if (convert->downsample) {
|
if (convert->downsample[idx]) {
|
||||||
GST_DEBUG ("downsample line %d %d-%d %p", in_line, start_line,
|
GST_DEBUG ("downsample line %d %d-%d %p", in_line, start_line,
|
||||||
start_line + n_lines - 1, lines[0]);
|
start_line + n_lines - 1, lines[0]);
|
||||||
gst_video_chroma_resample (convert->downsample[idx], lines,
|
gst_video_chroma_resample (convert->downsample[idx], lines,
|
||||||
|
@ -3116,7 +3116,7 @@ do_dither_lines (GstLineCache * cache, gint idx, gint out_line, gint in_line,
|
||||||
lines = gst_line_cache_get_lines (cache->prev, idx, out_line, in_line, 1);
|
lines = gst_line_cache_get_lines (cache->prev, idx, out_line, in_line, 1);
|
||||||
destline = lines[0];
|
destline = lines[0];
|
||||||
|
|
||||||
if (convert->dither) {
|
if (convert->dither[idx]) {
|
||||||
GST_DEBUG ("Dither line %d %p", in_line, destline);
|
GST_DEBUG ("Dither line %d %p", in_line, destline);
|
||||||
gst_video_dither_line (convert->dither[idx], destline, 0, out_line,
|
gst_video_dither_line (convert->dither[idx], destline, 0, out_line,
|
||||||
convert->out_width);
|
convert->out_width);
|
||||||
|
|
Loading…
Reference in a new issue