helper: try to dump all formats to a raw file 10/174310/1
authorBoram Park <boram1288.park@samsung.com>
Fri, 30 Mar 2018 01:51:55 +0000 (10:51 +0900)
committerBoram Park <boram1288.park@samsung.com>
Fri, 30 Mar 2018 03:48:51 +0000 (12:48 +0900)
Change-Id: Id2aa867fe19930aa01d5c3d73e1156b28aa45dd5

src/tdm_helper.c

index 61971e5..0c8b336 100644 (file)
@@ -44,7 +44,7 @@
 
 #define PNG_DEPTH 8
 
-static const char *file_exts[2] = {"png", "yuv"};
+static const char *file_exts[2] = {"png", "raw"};
 
 int tdm_dump_enable;
 char *tdm_debug_dump_dir;
@@ -332,9 +332,14 @@ tdm_helper_dump_buffer(tbm_surface_h buffer, const char *file)
                                                         0);
                break;
        default:
-               TDM_ERR("can't dump %c%c%c%c buffer", FOURCC_STR(info.format));
-               tbm_surface_unmap(buffer);
-               return;
+               _tdm_helper_dump_raw((const char*)temp,
+                                                        info.planes[0].ptr,
+                                                        info.planes[0].size,
+                                                        info.planes[1].ptr,
+                                                        info.planes[1].size,
+                                                        info.planes[2].ptr,
+                                                        info.planes[2].size);
+               break;
        }
 
        tbm_surface_unmap(buffer);