1 /****************************************************************************** 2 * 3 * Copyright (C) 2022 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 * isvce_cavlc.h 25 * 26 * @brief 27 * This file contains enumerations, macros and extern declarations of H264 28 * cavlc tables 29 * 30 * @author 31 * ittiam 32 * 33 * @remarks 34 * none 35 ****************************************************************************** 36 */ 37 38 #ifndef _ISVCE_CAVLC_H_ 39 #define _ISVCE_CAVLC_H_ 40 41 #include "ih264_typedefs.h" 42 #include "isvce_defs.h" 43 #include "isvce_structs.h" 44 45 /*****************************************************************************/ 46 /* Function macro definitions */ 47 /*****************************************************************************/ 48 49 /*****************************************************************************/ 50 /* Extern Function Declarations */ 51 /*****************************************************************************/ 52 53 /** 54 ******************************************************************************* 55 * 56 * @brief 57 * This function generates CAVLC coded bit stream for an Intra Slice. 58 * 59 * @description 60 * The mb syntax layer for intra slices constitutes luma mb mode, luma sub modes 61 * (if present), mb qp delta, coded block pattern, chroma mb mode and 62 * luma/chroma residue. These syntax elements are written as directed by table 63 * 7.3.5 of h264 specification. 64 * 65 * @param[in] ps_ent_ctxt 66 * pointer to entropy context 67 * 68 * @returns error code 69 * 70 * @remarks none 71 * 72 ******************************************************************************* 73 */ 74 IH264E_ERROR_T isvce_write_islice_mb_cavlc(isvce_entropy_ctxt_t *ps_ent_ctxt); 75 76 /** 77 ******************************************************************************* 78 * 79 * @brief 80 * This function generates CAVLC coded bit stream for Inter slices 81 * 82 * @description 83 * The mb syntax layer for inter slices constitutes luma mb mode, luma sub modes 84 * (if present), mb qp delta, coded block pattern, chroma mb mode and 85 * luma/chroma residue. These syntax elements are written as directed by table 86 * 7.3.5 of h264 specification 87 * 88 * @param[in] ps_ent_ctxt 89 * pointer to entropy context 90 * 91 * @returns error code 92 * 93 * @remarks none 94 * 95 ******************************************************************************* 96 */ 97 IH264E_ERROR_T isvce_write_pslice_mb_cavlc(isvce_entropy_ctxt_t *ps_ent_ctxt); 98 99 /** 100 ******************************************************************************* 101 * 102 * @brief 103 * This function generates CAVLC coded bit stream for Inter(B) slices 104 * 105 * @description 106 * The mb syntax layer for inter slices constitutes luma mb mode, luma sub modes 107 * (if present), mb qp delta, coded block pattern, chroma mb mode and 108 * luma/chroma residue. These syntax elements are written as directed by table 109 * 7.3.5 of h264 specification 110 * 111 * @param[in] ps_ent_ctxt 112 * pointer to entropy context 113 * 114 * @returns error code 115 * 116 * @remarks none 117 * 118 ******************************************************************************* 119 */ 120 IH264E_ERROR_T isvce_write_bslice_mb_cavlc(isvce_entropy_ctxt_t *ps_ent_ctxt); 121 122 #if ENABLE_RE_ENC_AS_SKIP 123 IH264E_ERROR_T isvce_reencode_as_skip_frame_cavlc(isvce_entropy_ctxt_t *ps_entropy); 124 #endif 125 126 #endif 127