1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef TV_METADATA_PQ_H 17 #define TV_METADATA_PQ_H 18 19 #include <stdint.h> 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 struct TvVideoWindow { 26 uint16_t x; 27 uint16_t y; 28 uint16_t width; 29 uint16_t height; 30 uint8_t size; 31 }; 32 33 // tv metadata format for transmit 34 #pragma pack(push, 1) 35 struct TvPQMetadata { 36 uint16_t sceneTag; 37 uint8_t uiFrameCnt; 38 uint8_t vidFrameCnt; 39 uint8_t vidFps; 40 uint16_t vidWinX; 41 uint16_t vidWinY; 42 uint16_t vidWinWidth; 43 uint16_t vidWinHeight; 44 uint8_t vidWinSize; 45 uint16_t vidVdhWidth; 46 uint16_t vidVdhHeight; 47 uint8_t scaleMode : 4; 48 uint8_t dpPixFmt : 4; 49 uint8_t colorimetry : 4; 50 uint8_t hdr : 4; 51 uint16_t hdrLuminance; 52 uint16_t hdrRatio; 53 uint8_t reserved[4]; 54 }; 55 #pragma pack(pop) 56 57 #ifdef __cplusplus 58 } 59 #endif 60 61 #endif // TV_METADATA_PQ_H