1 /****************************************************************************** 2 * 3 * Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore 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 /** 19 ******************************************************************************* 20 * @file 21 * ihevcd_nal.h 22 * 23 * @brief 24 * Header for NAL related function 25 * 26 * @author 27 * Harish 28 * 29 * @par List of Functions: 30 * 31 * @remarks 32 * None 33 * 34 ******************************************************************************* 35 */ 36 37 #ifndef _IHEVCD_NAL_H_ 38 #define _IHEVCD_NAL_H_ 39 /** 40 * Minimum size of start code including NAL type 41 */ 42 43 #define MIN_START_CODE_LEN 4 44 /** 45 * Start code prefix byte - 1 46 */ 47 #define START_CODE_PREFIX_BYTE 1 48 49 /** 50 * Emulation prevention byte - 3 51 */ 52 53 #define EMULATION_PREVENT_BYTE 3 54 /** 55 * Minimum number of zeros before start code 56 */ 57 #define NUM_ZEROS_BEFORE_START_CODE 2 58 59 60 WORD32 ihevcd_nal_search_start_code(UWORD8 *pu1_buf, WORD32 bytes_remaining); 61 62 IHEVCD_ERROR_T ihevcd_nal_remv_emuln_bytes(UWORD8 *pu1_src, 63 UWORD8 *pu1_dst, 64 WORD32 bytes_remaining, 65 WORD32 *pi4_nal_len, 66 WORD32 *pi4_dst_len); 67 68 IHEVCD_ERROR_T ihevcd_nal_unit(codec_t *ps_codec); 69 #endif /* _IHEVCD_NAL_H_ */ 70