1 /* 2 * Copyright 2015 Rockchip Electronics Co. LTD 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef __H264E_PPS_H__ 18 #define __H264E_PPS_H__ 19 20 #include "mpp_packet.h" 21 #include "mpp_enc_cfg.h" 22 23 #include "h264_syntax.h" 24 25 typedef struct H264ePps_t { 26 RK_U32 pps_id; 27 RK_U32 sps_id; 28 29 // 0 - CAVLC 1 - CABAC 30 RK_S32 entropy_coding_mode; 31 32 RK_S32 bottom_field_pic_order_in_frame_present; 33 RK_S32 num_slice_groups; 34 35 RK_S32 num_ref_idx_l0_default_active; 36 RK_S32 num_ref_idx_l1_default_active; 37 38 RK_S32 weighted_pred; 39 RK_S32 weighted_bipred_idc; 40 41 RK_S32 pic_init_qp; 42 RK_S32 pic_init_qs; 43 44 RK_S32 chroma_qp_index_offset; 45 RK_S32 second_chroma_qp_index_offset_present; 46 RK_S32 second_chroma_qp_index_offset; 47 48 RK_S32 deblocking_filter_control; 49 RK_S32 constrained_intra_pred; 50 RK_S32 redundant_pic_cnt; 51 52 RK_S32 transform_8x8_mode; 53 54 // Only support flat and default scaling list 55 RK_S32 pic_scaling_matrix_present; //TODO: replaced with scaling_list_mode 56 RK_S32 use_default_scaling_matrix[H264_SCALING_MATRIX_TYPE_BUTT]; 57 } H264ePps; 58 59 #ifdef __cplusplus 60 extern "C" { 61 #endif 62 63 MPP_RET h264e_pps_update(H264ePps *pps, MppEncCfgSet *cfg); 64 MPP_RET h264e_pps_to_packet(H264ePps *pps, MppPacket packet, RK_S32 *offset, RK_S32 *len); 65 MPP_RET h264e_pps_dump(H264ePps *pps); 66 67 #ifdef __cplusplus 68 } 69 #endif 70 71 #endif /* __H264E_PPS_H__ */ 72