Support YUV decoding for JPEG
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / image-loader-input.h
index 830b33c..80d7b61 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TIZEN_PLATFORM_IMAGE_LOADER_INPUT_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -63,6 +63,7 @@ struct Input
 };
 
 using LoadBitmapFunction       = bool (*)(const Dali::ImageLoader::Input& input, Dali::Devel::PixelBuffer& pixelData);
+using LoadPlanesFunction       = bool (*)(const Dali::ImageLoader::Input& input, std::vector<Dali::Devel::PixelBuffer>& pixelBuffers);
 using LoadBitmapHeaderFunction = bool (*)(const Dali::ImageLoader::Input& input, unsigned int& width, unsigned int& height);
 
 /**
@@ -70,12 +71,13 @@ using LoadBitmapHeaderFunction = bool (*)(const Dali::ImageLoader::Input& input,
  */
 struct BitmapLoader
 {
-  unsigned char                      magicByte1; ///< The first byte in the file should be this
-  unsigned char                      magicByte2; ///< The second byte in the file should be this
-  LoadBitmapFunction                 loader;     ///< The function which decodes the file
-  LoadBitmapHeaderFunction           header;     ///< The function which decodes the header of the file
-  Dali::Integration::Bitmap::Profile profile;    ///< The kind of bitmap to be created
-                                                 ///  (addressable packed pixels or an opaque compressed blob).
+  unsigned char                      magicByte1;    ///< The first byte in the file should be this
+  unsigned char                      magicByte2;    ///< The second byte in the file should be this
+  LoadBitmapFunction                 loader;        ///< The function which decodes the file
+  LoadPlanesFunction                 planeLoader;   ///< The function which decodes the file to each plane
+  LoadBitmapHeaderFunction           header;        ///< The function which decodes the header of the file
+  Dali::Integration::Bitmap::Profile profile;       ///< The kind of bitmap to be created
+                                                    ///  (addressable packed pixels or an opaque compressed blob).
 };
 
 } // namespace ImageLoader