summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2015-02-24 17:20:53 +0100
committerWim Taymans <wtaymans@redhat.com>2015-02-24 17:29:18 +0100
commit5744b7995c8361cc1e481aed1bf0e0f853ed312b (patch)
tree8b2a0fbda1794225b435b5f2de43be94391992cb
parentcb5ec197da5fb4087020a01cf9c4a6699bf0803f (diff)
video-converter: fix chroma subsampling
Also adjust the output line number with the offset.
-rw-r--r--gst-libs/gst/video/video-converter.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c
index 097364e01..9eda3f488 100644
--- a/gst-libs/gst/video/video-converter.c
+++ b/gst-libs/gst/video/video-converter.c
@@ -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);