| /* |
| * libhdr-common-header/hdrInterface.h |
| * |
| * Copyright 2018 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. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| #ifndef __HDR_INTERFACE_H__ |
| #define __HDR_INTERFACE_H__ |
| |
| #include <hardware/exynos/hdr10pMetaInterface.h> |
| |
| enum RenderSource { |
| REND_ORI = 0, |
| REND_GPU, |
| REND_G2D, |
| REND_MAX, |
| }; |
| |
| enum HdrHwId { |
| HDR_HW_DPU = 0, |
| HDR_HW_G2D, |
| HDR_HW_MAX, |
| }; |
| |
| enum HdrCapa { |
| HDR_CAPA_INNER = 0, |
| HDR_CAPA_OUTER, |
| HDR_CAPA_MAX, |
| }; |
| |
| enum HdrBpc { |
| HDR_BPC_8 = 0, |
| HDR_BPC_10, |
| HDR_BPC_FP16, |
| HDR_BPC_MAX, |
| }; |
| enum HdrErrFlag { |
| HDR_ERR_NO = 0, /* OK - NO ERROR */ |
| HDR_ERR_INVAL, /* INVALID VALUE */ |
| HDR_ERR_PTR, /* POINTER ERROR */ |
| HDR_ERR_NOPERM, /* NOT PERMITTED */ |
| HDR_ERR_MAX, |
| }; |
| |
| struct hdrCoefParcel { |
| void *hdrCoef; |
| }; |
| |
| struct HdrTargetInfo { |
| int dataspace; |
| unsigned int min_luminance; |
| unsigned int max_luminance; |
| enum HdrBpc bpc; |
| enum HdrCapa hdr_capa; |
| }; |
| |
| class hdrInterface { |
| public: |
| virtual ~hdrInterface() {} |
| static hdrInterface *createInstance(const char __attribute__((unused)) *docname); |
| virtual int setTargetInfo(struct HdrTargetInfo __attribute__((unused)) *tInfo) { return 0; } |
| virtual int sethdr10pMetaInterface(class hdr10pMetaInterface __attribute__((unused)) *hdr10pMetaIf) { return 0; } |
| virtual int initHdrCoefBuildup(enum HdrHwId __attribute__((unused)) hw_id) { return 0; } |
| virtual int getHdrCoefSize(enum HdrHwId __attribute__((unused)) hw_id) { return 0; } |
| virtual void setHDRlayer(bool __attribute__((unused)) hasHdr) {} |
| virtual void setRenderIntent(int __attribute__((unused)) rendIntent) {} |
| virtual void setSensorInfo(float __attribute__((unused)) max, float __attribute__((unused)) val) {} |
| |
| virtual int setLayerInfo( int __attribute__((unused)) layer_index, int __attribute__((unused)) dataspace, |
| void __attribute__((unused)) *static_metadata, int __attribute__((unused)) static_len, |
| void __attribute__((unused)) *dynamic_metadata, int __attribute__((unused)) dynamic_len, |
| bool __attribute__((unused)) premult_alpha, enum HdrBpc __attribute__((unused)) bpc, |
| enum RenderSource __attribute__((unused)) source, float __attribute__((unused)) *tf_matrix, |
| bool __attribute__((unused)) bypass) { return 0; } |
| virtual int getHdrCoefData(enum HdrHwId __attribute__((unused)) hw_id, int __attribute__((unused)) layer_index, |
| struct hdrCoefParcel __attribute__((unused)) *parcel) { return 0; } |
| virtual int getHdrCoefData(enum HdrHwId __attribute__((unused)) hw_id, struct hdrCoefParcel __attribute__((unused)) *parcel) { return 0; } |
| |
| virtual void setLogLevel(int __attribute__((unused)) log_level) {} |
| }; |
| |
| #endif /* __HDR_INTERFACE_H__ */ |