19cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao/*Copyright (c) 2012, The Linux Foundation. All rights reserved. 29cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 39cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoRedistribution and use in source and binary forms, with or without 49cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raomodification, are permitted provided that the following conditions are 59cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raomet: 69cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao * Redistributions of source code must retain the above copyright 79cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao notice, this list of conditions and the following disclaimer. 89cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao * Redistributions in binary form must reproduce the above 99cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao copyright notice, this list of conditions and the following 109cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao disclaimer in the documentation and/or other materials provided 119cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao with the distribution. 129cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao * Neither the name of The Linux Foundation nor the names of its 139cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao contributors may be used to endorse or promote products derived 149cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao from this software without specific prior written permission. 159cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 169cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoTHIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 179cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 189cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 199cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 209cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoBE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 219cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 229cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 239cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoBUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 249cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 259cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoOR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 269cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini RaoIF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/ 279cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 289cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao#ifndef __QOMX_EXTENSIONS_H__ 299cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao#define __QOMX_EXTENSIONS_H__ 309cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 319cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao#ifdef __cplusplus 329cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raoextern "C" { 339cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao#endif 349cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 359cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao#include <OMX_Image.h> 369cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao#include <qexif.h> 379cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 389cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao/** qomx_image_eventd 399cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* Qcom specific events extended from OMX_EVENT 409cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @ OMX_EVENT_THUMBNAIL_DROPPED - Indicates that the thumbnail 419cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* size id too big to be included 429cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* in the exif and will be 439cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* dropped 449cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao**/ 459cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raotypedef enum { 469cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_EVENT_THUMBNAIL_DROPPED = OMX_EventVendorStartUnused+1 479cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao} QOMX_IMAGE_EXT_EVENTS; 489cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 49125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson/** 50125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson* The following macros defines the string to be used for 51125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson* getting the extension indices. 52125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson**/ 53125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson#define QOMX_IMAGE_EXT_EXIF_NAME "OMX.QCOM.image.exttype.exif" 54125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson#define QOMX_IMAGE_EXT_THUMBNAIL_NAME "OMX.QCOM.image.exttype.thumbnail" 55125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson#define QOMX_IMAGE_EXT_BUFFER_OFFSET_NAME "OMX.QCOM.image.exttype.bufferOffset" 56125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson#define QOMX_IMAGE_EXT_MOBICAT_NAME "OMX.QCOM.image.exttype.mobicat" 5724ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar#define QOMX_IMAGE_EXT_ENCODING_MODE_NAME "OMX.QCOM.image.encoding.mode" 588fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao#define QOMX_IMAGE_EXT_WORK_BUFFER_NAME "OMX.QCOM.image.exttype.workbuffer" 59792dafbe7db197ca61a2202218a596d74576021bKamen Kirov#define QOMX_IMAGE_EXT_METADATA_NAME "OMX.QCOM.image.exttype.metadata" 60dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov#define QOMX_IMAGE_EXT_META_ENC_KEY_NAME "OMX.QCOM.image.exttype.metaEncKey" 61db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov#define QOMX_IMAGE_EXT_MEM_OPS_NAME "OMX.QCOM.image.exttype.mem_ops" 626b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov#define QOMX_IMAGE_EXT_JPEG_SPEED_NAME "OMX.QCOM.image.exttype.jpeg.speed" 639cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 649cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao/** QOMX_IMAGE_EXT_INDEXTYPE 659cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* This enum is an extension of the OMX_INDEXTYPE enum and 669cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* specifies Qcom supported extention indexes. These indexes are 679cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* associated with the extension names and can be used as 689cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* Indexes in the SetParameter and Getparameter functins to set 699cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* or get values from qcom specific data structures 709cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao**/ 719cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raotypedef enum { 729cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao //Name: OMX.QCOM.image.exttype.exif 739cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao QOMX_IMAGE_EXT_EXIF = 0x07F00000, 749cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 759cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao //Name: OMX.QCOM.image.exttype.thumbnail 769cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao QOMX_IMAGE_EXT_THUMBNAIL = 0x07F00001, 779cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 78125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson //Name: OMX.QCOM.image.exttype.bufferOffset 799cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao QOMX_IMAGE_EXT_BUFFER_OFFSET = 0x07F00002, 809cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 819cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao //Name: OMX.QCOM.image.exttype.mobicat 829cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao QOMX_IMAGE_EXT_MOBICAT = 0x07F00003, 839cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 8424ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar //Name: OMX.QCOM.image.encoding.approach 8524ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar QOMX_IMAGE_EXT_ENCODING_MODE = 0x07F00004, 8624ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar 878fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao //Name: OMX.QCOM.image.exttype.workbuffer 88db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov QOMX_IMAGE_EXT_WORK_BUFFER = 0x07F00005, 89792dafbe7db197ca61a2202218a596d74576021bKamen Kirov 90ac7dcd93e282ac3406aa40074e41ead0afeb2a40Ken Tat //Name: OMX.QCOM.image.exttype.metadata 91ac7dcd93e282ac3406aa40074e41ead0afeb2a40Ken Tat QOMX_IMAGE_EXT_METADATA = 0x07F00008, 92ac7dcd93e282ac3406aa40074e41ead0afeb2a40Ken Tat 93dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov //Name: OMX.QCOM.image.exttype.metaEncKey 94dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov QOMX_IMAGE_EXT_META_ENC_KEY = 0x07F00009, 95dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov 96db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov //Name: OMX.QCOM.image.exttype.memOps 97db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov QOMX_IMAGE_EXT_MEM_OPS = 0x07F0000A, 98db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov 996b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov //Name: OMX.QCOM.image.exttype.jpeg.speed 1006b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov QOMX_IMAGE_EXT_JPEG_SPEED = 0x07F000B, 1016b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov 1029cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao} QOMX_IMAGE_EXT_INDEXTYPE; 1039cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 1049cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao/** QOMX_BUFFER_INFO 1059cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* The structure specifies informaton 1069cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* associated with the buffers and should be passed as appData 1079cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* in UseBuffer calls to the OMX component with buffer specific 1089cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* data. @ fd - FD of the buffer allocated. If the buffer is 1099cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* allocated on the heap, it can be zero. 1109cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @offset - Buffer offset 1119cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao**/ 1129cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 1139cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raotypedef struct { 1149cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 fd; 1159cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 offset; 1169cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao} QOMX_BUFFER_INFO; 1179cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 1189cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao/** QEXIF_INFO_DATA 1199cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* The basic exif structure used to construct 1209cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* information for a single exif tag. 1219cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @tag_entry 1229cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @tag_id 1239cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao**/ 1249cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raotypedef struct{ 1259cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao exif_tag_entry_t tag_entry; 1269cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao exif_tag_id_t tag_id; 1279cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao} QEXIF_INFO_DATA; 1289cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 1299cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao/**QOMX_EXIF_INFO 1309cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* The structure contains an array of exif tag 1319cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* structures(qexif_info_data) and should be passed to the OMX 1329cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* layer by the OMX client using the extension index. 1339cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @exif_data - Array of exif tags 1349cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @numOfEntries - Number of exif tags entries being passed in 1359cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* the array 1369cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao**/ 1379cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raotypedef struct { 1389cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao QEXIF_INFO_DATA *exif_data; 1399cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 numOfEntries; 1409cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao} QOMX_EXIF_INFO; 1419cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 1429cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao/**QOMX_YUV_FRAME_INFO 1439cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* The structre contains all the offsets 1449cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* associated with the Y and cbcr buffers. 1459cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @yOffset - Offset within the Y buffer 1469cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @cbcrOffset - Offset within the cb/cr buffer. The array 1479cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* should be populated in order depending on cb 1489cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* first or cr first in case of planar data. For 1499cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* pseusoplanar, only the first array element 1509cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* needs to be filled and the secnd element should 1519cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* be set to zero. 1529cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @cbcrStartOffset - Start offset of the cb/cr buffer starting 1539cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* starting from the Y buffer. The array 1549cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* should be populated in order depending on 1559cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* cb first or cr first in case of planar 1569cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* data. For pseusoplanar, only the first 1579cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* array element needs to be filled and the 1589cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* secnd element should be set to zero. 1599cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao**/ 1609cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raotypedef struct { 1619cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 yOffset; 1629cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 cbcrOffset[2]; 1639cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 cbcrStartOffset[2]; 1649cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao} QOMX_YUV_FRAME_INFO; 1659cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 1669cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao/** qomx_thumbnail_info 1679cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* Includes all information associated with the thumbnail 1689cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @input_width - Width of the input thumbnail buffer 1699cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @input_height - Heighr of the input thumbnail buffer 1709cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @scaling_enabled - Flag indicating if thumbnail scaling is 1719cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* enabled. 172396b7a958424b05ea66e76da1518745e1a975913Ashwini Rao* @quality - JPEG Q factor value in the range of 1-100. A factor of 1 173444bb19a83ca980d492d36d69b7e32dc1dfeda1bEmilian Peev * produces the smallest, worst quality images, and a factor 174444bb19a83ca980d492d36d69b7e32dc1dfeda1bEmilian Peev * of 100 produces the largest, best quality images. A 175444bb19a83ca980d492d36d69b7e32dc1dfeda1bEmilian Peev * typical default is 75 for small good quality images. 1769cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @crop_info - Includes the crop width, crop height, 1779cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* horizontal and vertical offsets. 1789cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @output_width - Output Width of the the thumbnail. This is 1799cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* the width after scaling if scaling is enabled 1809cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* or width after cropping if only cropping is 1819cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* enabled or same same input width otherwise 1829cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @output_height - Output height of the thumbnail. This is 1839cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* the height after scaling if scaling is enabled 1849cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* or height after cropping if only cropping is 1859cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* enabled or same same input height otherwise 1869cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao**/ 1879cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raotypedef struct { 1889cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 input_width; 1899cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 input_height; 1909cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U8 scaling_enabled; 191396b7a958424b05ea66e76da1518745e1a975913Ashwini Rao OMX_U32 quality; 1929cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_CONFIG_RECTTYPE crop_info; 1939cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 output_width; 1949cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 output_height; 1954671dba0e9e92c691391ed9ba39591611a1a1f78Kamen Kirov QOMX_YUV_FRAME_INFO tmbOffset; 1965d30f3d00b3db3789b67b80afdeebf792f782074Shwetha Kotekar OMX_U32 rotation; 1979cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao} QOMX_THUMBNAIL_INFO; 1989cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 1999cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao/**qomx_mobicat 2009cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* Mobicat data to padded tot he OMX layer 2019cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @mobicatData - Mobicate data 2029cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao* @mobicatDataLength - length of the mobicat data 2039cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao**/ 2049cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Raotypedef struct { 2059cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U8 *mobicatData; 2069cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao OMX_U32 mobicatDataLength; 2079cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao} QOMX_MOBICAT; 2089cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 2098fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao/**qomx_workbuffer 2108fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao* Ion buffer to be used for the H/W encoder 2118fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao* @fd - FD of the buffer allocated 2128fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao* @vaddr - Buffer address 2138fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao**/ 2148fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Raotypedef struct { 2158fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao int fd; 2168fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao uint8_t *vaddr; 217ac7dcd93e282ac3406aa40074e41ead0afeb2a40Ken Tat uint32_t length; 2188fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao} QOMX_WORK_BUFFER; 2198fb728eb6718c1588feac7ed4b9487d184ce87efAshwini Rao 220792dafbe7db197ca61a2202218a596d74576021bKamen Kirov/**QOMX_METADATA 221792dafbe7db197ca61a2202218a596d74576021bKamen Kirov * 222792dafbe7db197ca61a2202218a596d74576021bKamen Kirov * meta data to be set in EXIF 223792dafbe7db197ca61a2202218a596d74576021bKamen Kirov */ 224792dafbe7db197ca61a2202218a596d74576021bKamen Kirovtypedef struct { 225792dafbe7db197ca61a2202218a596d74576021bKamen Kirov OMX_U8 *metadata; 226792dafbe7db197ca61a2202218a596d74576021bKamen Kirov OMX_U32 metaPayloadSize; 227792dafbe7db197ca61a2202218a596d74576021bKamen Kirov} QOMX_METADATA; 228792dafbe7db197ca61a2202218a596d74576021bKamen Kirov 229dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov/**QOMX_META_ENC_KEY 230dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov * 231dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov * meta data encryption key 232dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov */ 233dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirovtypedef struct { 234dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov OMX_U8 *metaKey; 235dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov OMX_U32 keyLen; 236dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov} QOMX_META_ENC_KEY; 237dc566007b991754f4750a47bd81d0e4eccf9ebcbKamen Kirov 238125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson/** QOMX_IMG_COLOR_FORMATTYPE 239125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson* This enum is an extension of the OMX_COLOR_FORMATTYPE enum. 240125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson* It specifies Qcom supported color formats. 241125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson**/ 242125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilsontypedef enum QOMX_IMG_COLOR_FORMATTYPE { 243125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYVU420SemiPlanar = OMX_COLOR_FormatVendorStartUnused + 0x300, 244125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYVU422SemiPlanar, 245125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYVU422SemiPlanar_h1v2, 246125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYUV422SemiPlanar_h1v2, 247125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYVU444SemiPlanar, 248125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYUV444SemiPlanar, 249125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYVU420Planar, 250125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYVU422Planar, 251125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYVU422Planar_h1v2, 252125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYUV422Planar_h1v2, 253125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYVU444Planar, 254125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson OMX_QCOM_IMG_COLOR_FormatYUV444Planar 255125ebab941d2cf5f4fc9c95543f7802c3bad5d46Sunid Wilson} QOMX_IMG_COLOR_FORMATTYPE; 2569cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 25724ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar/** QOMX_ENCODING_MODE 25824ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar* This enum is used to select parallel encoding 25924ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar* or sequential encoding for the thumbnail and 26024ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar* main image 26124ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar**/ 26224ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekartypedef enum { 26324ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar OMX_Serial_Encoding, 26424ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar OMX_Parallel_Encoding 26524ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar} QOMX_ENCODING_MODE; 26624ae54125a94ae1cdf84c4bf0cba341e7fefbf37Shwetha Kotekar 267db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov 268db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov/**omx_jpeg_ouput_buf_t 269db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov* Structure describing jpeg output buffer 270db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov* @handle - Handle to the containing class 271db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov* @mem_hdl - Handle to camera memory struct 272db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov* @vaddr - Buffer address 273db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov* @size - Buffer size 274db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov* @fd - file descriptor 275db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov**/ 276db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirovtypedef struct { 277db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov void *handle; 278db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov void *mem_hdl; 279db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov int8_t isheap; 280db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov int size; /*input*/ 281db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov void *vaddr; 282db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov int fd; 283db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov} omx_jpeg_ouput_buf_t; 284db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov 285db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov/** QOMX_MEM_OPS 286db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov* Structure holding the function pointers to 287db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov* buffer memory operations 288db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov* @get_memory - function to allocate buffer memory 289db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov**/ 290db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirovtypedef struct { 291db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov int (*get_memory)( omx_jpeg_ouput_buf_t *p_out_buf); 292db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov} QOMX_MEM_OPS; 293db72ea895ec3ba37bc9280d9de30e0c35a8f1df3Kamen Kirov 2946b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov/** QOMX_JPEG_SPEED_MODE 2956b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov* Enum specifying the values for the jpeg 2966b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov* speed mode setting 2976b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov**/ 2986b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirovtypedef enum { 2996b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov QOMX_JPEG_SPEED_MODE_NORMAL, 3006b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov QOMX_JPEG_SPEED_MODE_HIGH 3016b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov} QOMX_JPEG_SPEED_MODE; 3026b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov 3036b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov/** QOMX_JPEG_SPEED 3046b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov* Structure used to set the jpeg speed mode 3056b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov* parameter 3066b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov* @speedMode - jpeg speed mode 3076b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov**/ 3086b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirovtypedef struct { 3096b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov QOMX_JPEG_SPEED_MODE speedMode; 3106b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov} QOMX_JPEG_SPEED; 3116b358a2e8a29e7d7a6152c3957c231c54503c87eKamen Kirov 3129cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao#ifdef __cplusplus 3139cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao } 3149cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao#endif 3159cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao 3169cfd2a032b6da0a1e8cf7be61c44448cad67ca3aAshwini Rao#endif 317