diff options
author | Haejeong Kim <backto.kim@samsung.com> | 2017-09-11 17:13:58 +0900 |
---|---|---|
committer | Haejeong Kim <backto.kim@samsung.com> | 2017-09-11 17:13:58 +0900 |
commit | f1eca6de7e9e9a846f584b6818216b34a5b64963 (patch) | |
tree | 98694a50283412033af1d4ca20aa4be682892db2 | |
parent | ef1db0569cf370f8fd1dbd53b68791c1df5d5d5a (diff) | |
download | libmm-imgp-gstcs-f1eca6de7e9e9a846f584b6818216b34a5b64963.tar.gz libmm-imgp-gstcs-f1eca6de7e9e9a846f584b6818216b34a5b64963.tar.bz2 libmm-imgp-gstcs-f1eca6de7e9e9a846f584b6818216b34a5b64963.zip |
Apply tizen coding rulesubmit/tizen/20170912.034220accepted/tizen/unified/20170913.071142
Change-Id: Iba531c1d631fe5a550ab0dd68155b39697d7d64e
-rwxr-xr-x | gstcs/mm_util_gstcs.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/gstcs/mm_util_gstcs.c b/gstcs/mm_util_gstcs.c index d4d4a66..8290c45 100755 --- a/gstcs/mm_util_gstcs.c +++ b/gstcs/mm_util_gstcs.c @@ -737,39 +737,38 @@ mm_setup_image_size(const char* _format_label, int width, int height) { int size = 0; - if (strcmp(_format_label, "I420") == 0) { + if (strcmp(_format_label, "I420") == 0) size = (MM_UTIL_ROUND_UP_4(width) * MM_UTIL_ROUND_UP_2(height) + MM_UTIL_ROUND_UP_8(width) * MM_UTIL_ROUND_UP_2(height) /2); /*width * height *1.5; */ - } else if (strcmp(_format_label, "Y42B") == 0) { + else if (strcmp(_format_label, "Y42B") == 0) size = (MM_UTIL_ROUND_UP_4(width) * height + MM_UTIL_ROUND_UP_8(width) * height); /*width * height *2; */ - } else if (strcmp(_format_label, "YUV422") == 0) { + else if (strcmp(_format_label, "YUV422") == 0) size = (MM_UTIL_ROUND_UP_4(width) * height + MM_UTIL_ROUND_UP_8(width) * height); /*width * height *2; */ - } else if (strcmp(_format_label, "Y444") == 0) { + else if (strcmp(_format_label, "Y444") == 0) size = (MM_UTIL_ROUND_UP_4(width) * height * 3); /* width * height *3; */ - } else if (strcmp(_format_label, "YV12") == 0) { + else if (strcmp(_format_label, "YV12") == 0) size = (MM_UTIL_ROUND_UP_4(width) * MM_UTIL_ROUND_UP_2(height) + MM_UTIL_ROUND_UP_8(width) * MM_UTIL_ROUND_UP_2(height) / 2); /* width * height *1; */ - } else if (strcmp(_format_label, "NV12") == 0) { + else if (strcmp(_format_label, "NV12") == 0) size = (MM_UTIL_ROUND_UP_4(width) * MM_UTIL_ROUND_UP_2(height) * 1.5); /* width * height *1.5; */ - } else if (strcmp(_format_label, "RGB565") == 0) { + else if (strcmp(_format_label, "RGB565") == 0) size = (MM_UTIL_ROUND_UP_4(width) * 2 * height); /* width * height *2; */ - } else if (strcmp(_format_label, "RGB888") == 0) { + else if (strcmp(_format_label, "RGB888") == 0) size = (MM_UTIL_ROUND_UP_4(width) * 3 * height); /* width * height *3; */ - } else if (strcmp(_format_label, "BGR888") == 0) { + else if (strcmp(_format_label, "BGR888") == 0) size = (MM_UTIL_ROUND_UP_4(width) * 3 * height); /* width * height *3; */ - } else if (strcmp(_format_label, "UYVY") == 0) { + else if (strcmp(_format_label, "UYVY") == 0) size = (MM_UTIL_ROUND_UP_2(width) * 2 * height); /* width * height *2; */ - } else if (strcmp(_format_label, "YUYV") == 0) { + else if (strcmp(_format_label, "YUYV") == 0) size = (MM_UTIL_ROUND_UP_2(width) * 2 * height); /* width * height *2; */ - } else if (strcmp(_format_label, "ARGB8888") == 0) { + else if (strcmp(_format_label, "ARGB8888") == 0) size = width * height *4; - } else if (strcmp(_format_label, "BGRA8888") == 0) { + else if (strcmp(_format_label, "BGRA8888") == 0) size = width * height *4; - } else if (strcmp(_format_label, "RGBA8888") == 0) { + else if (strcmp(_format_label, "RGBA8888") == 0) size = width * height *4; - } else if (strcmp(_format_label, "ABGR8888") == 0) { + else if (strcmp(_format_label, "ABGR8888") == 0) size = width * height *4; - } else if (strcmp(_format_label, "BGRX") == 0) { + else if (strcmp(_format_label, "BGRX") == 0) size = width * height *4; - } gstcs_debug("file_size: %d\n", size); |