mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
video-converter: fix chroma subsampling
Also adjust the output line number with the offset.
This commit is contained in:
parent
cb5ec197da
commit
5744b7995c
1 changed files with 4 additions and 2 deletions
|
@ -2161,8 +2161,8 @@ get_dest_line (GstLineCache * cache, gint idx, gpointer user_data)
|
|||
|
||||
cline = CLAMP (idx, 0, convert->out_maxheight - 1);
|
||||
|
||||
GST_DEBUG ("get dest line %d", cline);
|
||||
line = FRAME_GET_LINE (convert->dest, cline);
|
||||
GST_DEBUG ("get dest line %d %p", cline, line);
|
||||
|
||||
if (convert->borderline) {
|
||||
gint r_border = (out_x + convert->out_width) * pstride;
|
||||
|
@ -2212,8 +2212,10 @@ do_upsample_lines (GstLineCache * cache, gint out_line, gint in_line,
|
|||
|
||||
n_lines = convert->up_n_lines;
|
||||
start_line = in_line;
|
||||
if (start_line < n_lines + convert->up_offset)
|
||||
if (start_line < n_lines + convert->up_offset) {
|
||||
start_line += convert->up_offset;
|
||||
out_line += convert->up_offset;
|
||||
}
|
||||
|
||||
/* get the lines needed for chroma upsample */
|
||||
lines = gst_line_cache_get_lines (cache->prev, out_line, start_line, n_lines);
|
||||
|
|
Loading…
Reference in a new issue