summaryrefslogtreecommitdiff
path: root/gstcs/mm_util_gstcs.c
diff options
context:
space:
mode:
authorhj kim <backto.kim@samsung.com>2018-02-12 18:15:22 +0900
committerhj kim <backto.kim@samsung.com>2018-02-12 18:15:22 +0900
commit74a3d53eb6d1efcd68a9d6e59317817f8577b8cb (patch)
tree5ee8f5f4e72e92ffb9060bf30121f68f81e574cb /gstcs/mm_util_gstcs.c
parent8ce5eba6da993f98134c2f7f7cf2de1bbc2eed51 (diff)
downloadlibmm-imgp-gstcs-74a3d53eb6d1efcd68a9d6e59317817f8577b8cb.tar.gz
libmm-imgp-gstcs-74a3d53eb6d1efcd68a9d6e59317817f8577b8cb.tar.bz2
libmm-imgp-gstcs-74a3d53eb6d1efcd68a9d6e59317817f8577b8cb.zip
Remove useless code. Don't need to check colospace. YUV's w/h is alwasy same as stride/elevation
Change-Id: I417ec48df97c8c4a3b72c53d133aa2f17f8d4d65
Diffstat (limited to 'gstcs/mm_util_gstcs.c')
-rwxr-xr-xgstcs/mm_util_gstcs.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/gstcs/mm_util_gstcs.c b/gstcs/mm_util_gstcs.c
index 8cdc877..ab10568 100755
--- a/gstcs/mm_util_gstcs.c
+++ b/gstcs/mm_util_gstcs.c
@@ -262,8 +262,6 @@ static void _mm_set_capabilities(image_format_s* __format)
return;
}
- gstcs_debug("colorspace: %s(%d)\n", __format->colorspace, strlen(__format->colorspace));
-
videoFormat = _mm_get_video_format(__format->format_label);
__format->caps = gst_caps_new_simple("video/x-raw",
@@ -497,14 +495,14 @@ _mm_imgp_gstcs_processing(gstreamer_s* pGstreamer_s, unsigned char *src, unsigne
gst_app_src_set_caps(GST_APP_SRC(pGstreamer_s->appsrc), input_format->caps);
gst_app_sink_set_caps(GST_APP_SINK(pGstreamer_s->appsink), output_format->caps);
- if (((input_format->width != input_format->stride) || (input_format->height != input_format->elevation)) &&
- ((strcmp(input_format->colorspace, "RGB") == 0) || (strcmp(input_format->colorspace, "RGBA") == 0))) {
+ if ((input_format->width != input_format->stride) || (input_format->height != input_format->elevation)) {
gstcs_debug("Start _mm_push_buffer_into_pipeline_new");
ret = _mm_push_buffer_into_pipeline_new(input_format, src, pGstreamer_s);
} else {
gstcs_debug("Start mm_push_buffer_into_pipeline");
ret = _mm_push_buffer_into_pipeline(pImgp_info, src, pGstreamer_s);
}
+
if (ret != GSTCS_ERROR_NONE) {
gstcs_error("ERROR - mm_push_buffer_into_pipeline ");
gst_object_unref(pGstreamer_s->pipeline);
@@ -556,13 +554,9 @@ _mm_imgp_gstcs_processing(gstreamer_s* pGstreamer_s, unsigned char *src, unsigne
gst_buffer_map(pGstreamer_s->output_buffer, &mapinfo, GST_MAP_READ);
int buffer_size = mapinfo.size;
int calc_buffer_size = 0;
- if (((pImgp_info->dst_width != (unsigned int)(output_format->stride)) || (pImgp_info->dst_height != (unsigned int)(output_format->elevation))) &&
- ((strcmp(input_format->colorspace, "RGB") == 0) || (strcmp(input_format->colorspace, "RGBA") == 0))) {
- gstcs_debug("calculate image size with stride & elevation");
- calc_buffer_size = mm_setup_image_size(pImgp_info->output_format_label, output_format->stride, output_format->elevation);
- } else {
- calc_buffer_size = mm_setup_image_size(pImgp_info->output_format_label, pImgp_info->dst_width, pImgp_info->dst_height);
- }
+
+ calc_buffer_size = mm_setup_image_size(pImgp_info->output_format_label, output_format->stride, output_format->elevation);
+
gstcs_debug("buffer size: %d, calc: %d\n", buffer_size, calc_buffer_size);
if (buffer_size != calc_buffer_size) {
gstcs_debug("Buffer size is different \n");