1 /****************************************************************************** 2 * 3 * Copyright (C) 2015 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ***************************************************************************** 18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19 */ 20 21 /** 22 ******************************************************************************* 23 * @file 24 * ih264e_sei.h 25 * 26 * @brief 27 * This file contains function declarations for sei message encoding 28 * 29 * @author 30 * 31 * 32 * @remarks 33 * None 34 * 35 ******************************************************************************* 36 */ 37 38 #ifndef ENCODER_IH264E_SEI_H_ 39 #define ENCODER_IH264E_SEI_H_ 40 41 42 /*****************************************************************************/ 43 /* INTERFACE STRUCTURE DEFINITIONS */ 44 /*****************************************************************************/ 45 typedef enum 46 { 47 /* SEI PREFIX */ 48 49 IH264_SEI_MASTERING_DISP_COL_VOL = 137, 50 IH264_SEI_CONTENT_LIGHT_LEVEL_DATA = 144, 51 IH264_SEI_AMBIENT_VIEWING_ENVIRONMENT = 148, 52 IH264_SEI_CONTENT_COLOR_VOLUME = 149, 53 IH264_SEI_SHUTTER_INTERVAL_INFO = 205 54 }IH264_SEI_TYPE; 55 56 /*****************************************************************************/ 57 /* Function Declarations */ 58 /*****************************************************************************/ 59 60 /** 61 ****************************************************************************** 62 * 63 * @brief Generates Mastering Display Color Volume (Supplemental Enhancement Information ) 64 * 65 * @par Description 66 * Parse Supplemental Enhancement Information 67 * 68 * @param[in] ps_sei_mdcl 69 * pointer to structure containing mdcv SEI data 70 * 71 * @param[in] ps_bitstrm 72 * pointer to bitstream context (handle) 73 * 74 * @return success or failure error code 75 * 76 ****************************************************************************** 77 */ 78 IH264E_ERROR_T ih264e_put_sei_mdcv_params(sei_mdcv_params_t *ps_sei_mdcv, 79 bitstrm_t *ps_bitstrm); 80 81 /** 82 ****************************************************************************** 83 * 84 * @brief Stores content light level info in bitstream 85 * 86 * @par Description 87 * Parse Supplemental Enhancement Information 88 * 89 * @param[in] ps_sei_cll 90 * pointer to structure containing cll sei data 91 * 92 * @param[in] ps_bitstrm 93 * pointer to bitstream context (handle) 94 * 95 * @return success or failure error code 96 * 97 ****************************************************************************** 98 */ 99 IH264E_ERROR_T ih264e_put_sei_cll_params(sei_cll_params_t *ps_sei_cll, 100 bitstrm_t *ps_bitstrm); 101 102 /** 103 ****************************************************************************** 104 * 105 * @brief Stores ambient viewing environment info in bitstream 106 * 107 * @par Description 108 * Parse Supplemental Enhancement Information 109 * 110 * @param[in] ps_bitstrm 111 * pointer to bitstream context (handle) 112 * 113 * @param[in] ps_sei_ave 114 * pointer to ambient viewing environment info 115 * 116 * @return success or failure error code 117 * 118 ****************************************************************************** 119 */ 120 IH264E_ERROR_T ih264e_put_sei_ave_params(sei_ave_params_t *ps_sei_ave, 121 bitstrm_t *ps_bitstrm); 122 123 /** 124 ****************************************************************************** 125 * 126 * @brief Generates Content Color Volume info (Supplemental Enhancement Information ) 127 * 128 * @par Description 129 * Parse Supplemental Enhancement Information 130 * 131 * @param[in] ps_bitstrm 132 * pointer to bitstream context (handle) 133 * 134 * @param[in] ps_sei_ccv 135 * pointer to structure containing ccv SEI data 136 * 137 * @return success or failure error code 138 * 139 ****************************************************************************** 140 */ 141 IH264E_ERROR_T ih264e_put_sei_ccv_params(sei_ccv_params_t *ps_sei_ccv, 142 bitstrm_t *ps_bitstrm); 143 144 /** 145 ****************************************************************************** 146 * 147 * @brief Generates SEI (Supplemental Enhancement Information ) 148 * 149 * @par Description 150 * Parse Supplemental Enhancement Information 151 * 152 * @param[in] e_payload_type 153 * Determines the type of SEI msg 154 * 155 * @param[in] ps_bitstrm 156 * pointer to bitstream context (handle) 157 * 158 * @param[in] ps_sei 159 * pointer to structure containing SEI data 160 * 161 * @return success or failure error code 162 * 163 ****************************************************************************** 164 */ 165 IH264E_ERROR_T ih264e_put_sei_msg(IH264_SEI_TYPE e_payload_type, 166 sei_params_t *ps_sei_params, 167 bitstrm_t *ps_bitstrm); 168 169 /** 170 ****************************************************************************** 171 * 172 * @brief Signal shutter interval info in the bitstream 173 * 174 * @par Description 175 * Parse Supplemental Enhancement Information 176 * 177 * @param[in] ps_bitstrm 178 * pointer to bitstream context (handle) 179 * 180 * @param[in] ps_sei_sii 181 * pointer to shutter interval info 182 * 183 * @return success or failure error code 184 * 185 ****************************************************************************** 186 */ 187 IH264E_ERROR_T ih264e_put_sei_sii_params(sei_sii_params_t *ps_sei_sii, bitstrm_t *ps_bitstrm); 188 189 #endif /* ENCODER_IH264E_SEI_H_ */ 190