use src_pos when creating capture converter 95/115395/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Sat, 18 Feb 2017 02:03:04 +0000 (11:03 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Sat, 18 Feb 2017 02:03:10 +0000 (11:03 +0900)
Change-Id: I43fde15bc364f14c8291ad9a1ed021d8a0ef48cf
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/tdm_sprd_capture.c

index aed0be5..09a5dba 100644 (file)
@@ -488,11 +488,15 @@ _tdm_sprd_capture_oneshot_composite_layers_sw(tdm_sprd_capture_data *capture_dat
                        tdm_pos scale_pos = {.x = pos_x, .y = layer_info.dst_pos.y,
                                           .w = ((width + pos_x) <= output_width ? width : output_width - pos_x),
                                           .h = layer_info.src_config.pos.h};
+                       tdm_pos src_pos = layer_info.src_config.pos;
                        tdm_pos dst_pos = capture_data->info.dst_config.pos;
-                       TDM_DBG("src_pos (x)(y)+(w)+(h) (%d)(%d)+(%d)+(%d)", scale_pos.x, scale_pos.y,
-                                       scale_pos.w, scale_pos.h);
+
+                       TDM_DBG("src_pos (x)(y)+(w)+(h) (%d)(%d)+(%d)+(%d)", src_pos.x, src_pos.y,
+                                       src_pos.w, src_pos.h);
                        TDM_DBG("dst_pos (x)(y)+(w)+(h) (%d)(%d)+(%d)+(%d)", dst_pos.x, dst_pos.y,
                                        dst_pos.w, dst_pos.h);
+                       TDM_DBG("scale_pos (x)(y)+(w)+(h) (%d)(%d)+(%d)+(%d)", scale_pos.x, scale_pos.y,
+                                       scale_pos.w, scale_pos.h);
                        if (dst_pos.w == 0 || dst_pos.h == 0) {
                                dst_pos.x = 0;
                                dst_pos.y = 0;
@@ -549,7 +553,7 @@ _tdm_sprd_capture_oneshot_composite_layers_sw(tdm_sprd_capture_data *capture_dat
                                        dst_pos.w, dst_pos.h);
 
                        tdm_err = _tdm_sprd_capture_make_converter(capture_data, surface, temp_buffer,
-                                                                                                          NULL, NULL, capture_data->info.transform,
+                                                                                                          &src_pos, NULL, capture_data->info.transform,
                                                                                                           &pp_tasks[i]);
                        if (tdm_err != TDM_ERROR_NONE) {
                                TDM_WRN("can't create converter");