static gpointer __mmplayer_capture_thread(gpointer data);
static void __csc_tiled_to_linear_crop(unsigned char *yuv420_dest, unsigned char *nv12t_src, int yuv420_width, int yuv420_height, int left, int top, int right, int buttom);
static int __tile_4x2_read(int x_size, int y_size, int x_pos, int y_pos);
-static int __mm_player_convert_colorspace(mm_player_t* player, unsigned char* src_data, mm_util_img_format src_fmt, unsigned int src_w, unsigned int src_h, mm_util_img_format dst_fmt);
+static int __mm_player_convert_colorspace(mm_player_t* player, unsigned char* src_data, mm_util_color_format_e src_fmt, unsigned int src_w, unsigned int src_h, mm_util_color_format_e dst_fmt);
#ifdef CAPTURE_OUTPUT_DUMP
static void capture_output_dump(mm_player_t* player);
#endif
memcpy(src_buffer+linear_y_plane_size, linear_uv_plane, linear_uv_plane_size);
/* NV12 linear to RGB888 */
- ret = __mm_player_convert_colorspace(player, src_buffer, MM_UTIL_IMG_FMT_NV12,
- width, height, MM_UTIL_IMG_FMT_RGB888);
+ ret = __mm_player_convert_colorspace(player, src_buffer, MM_UTIL_COLOR_NV12,
+ width, height, MM_UTIL_COLOR_RGB24);
if (ret != MM_ERROR_NONE) {
LOGE("failed to convert nv12 linear");
}
/* NV12 -> RGB888 */
- ret = __mm_player_convert_colorspace(player, (unsigned char*)src_buffer, MM_UTIL_IMG_FMT_NV12,
- player->captured.width[0], player->captured.height[0], MM_UTIL_IMG_FMT_RGB888);
+ ret = __mm_player_convert_colorspace(player, (unsigned char*)src_buffer, MM_UTIL_COLOR_NV12,
+ player->captured.width[0], player->captured.height[0], MM_UTIL_COLOR_RGB24);
if (ret != MM_ERROR_NONE) {
LOGE("failed to convert nv12 linear");
goto ERROR;
}
/* I420 -> RGB888 */
- ret = __mm_player_convert_colorspace(player, (unsigned char*)src_buffer, MM_UTIL_IMG_FMT_I420,
- player->captured.width[0], player->captured.height[0], MM_UTIL_IMG_FMT_RGB888);
+ ret = __mm_player_convert_colorspace(player, (unsigned char*)src_buffer, MM_UTIL_COLOR_I420,
+ player->captured.width[0], player->captured.height[0], MM_UTIL_COLOR_RGB24);
if (ret != MM_ERROR_NONE) {
LOGE("failed to convert I420 linear");
goto ERROR;
LOGD("orientation value = %d user_angle = %d", orientation, user_angle);
- ret = __mmplayer_handle_orientation(player, orientation, MM_UTIL_IMG_FMT_RGB888);
+ ret = __mmplayer_handle_orientation(player, orientation, MM_UTIL_COLOR_RGB24);
if (ret != MM_ERROR_NONE) {
LOGE("failed to convert nv12 linear");
goto ERROR;
GstStructure *structure = NULL;
GstMapInfo mapinfo = GST_MAP_INFO_INIT;
GstMemory *memory = NULL;
- mm_util_img_format src_fmt = MM_UTIL_IMG_FMT_YUV420;
- mm_util_img_format dst_fmt = MM_UTIL_IMG_FMT_RGB888; // fixed
+ mm_util_color_format_e src_fmt = MM_UTIL_COLOR_YUV420;
+ mm_util_color_format_e dst_fmt = MM_UTIL_COLOR_RGB24; // fixed
MMPLAYER_FENTER();
switch (GST_VIDEO_INFO_FORMAT(&format_info)) {
case GST_VIDEO_FORMAT_I420:
- src_fmt = MM_UTIL_IMG_FMT_I420;
+ src_fmt = MM_UTIL_COLOR_I420;
player->captured.width[1] = player->captured.width[2] = src_width>>1;
player->captured.height[1] = player->captured.width[2] = src_height>>1;
break;
case GST_VIDEO_FORMAT_BGRA:
- src_fmt = MM_UTIL_IMG_FMT_BGRA8888;
+ src_fmt = MM_UTIL_COLOR_BGRA;
break;
case GST_VIDEO_FORMAT_BGRx:
- src_fmt = MM_UTIL_IMG_FMT_BGRX8888;
+ src_fmt = MM_UTIL_COLOR_BGRX;
break;
default:
LOGE("unknown format to capture\n");
}
static int
-__mm_player_convert_colorspace(mm_player_t* player, unsigned char* src_data, mm_util_img_format src_fmt, unsigned int src_w, unsigned int src_h, mm_util_img_format dst_fmt)
+__mm_player_convert_colorspace(mm_player_t* player, unsigned char* src_data, mm_util_color_format_e src_fmt, unsigned int src_w, unsigned int src_h, mm_util_color_format_e dst_fmt)
{
unsigned char *dst_data = NULL;
unsigned int dst_size;