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 __RK_VENC_RC_H__ 18 #define __RK_VENC_RC_H__ 19 20 #include "rk_type.h" 21 22 #define MPP_ENC_MIN_BPS (SZ_1K) 23 #define MPP_ENC_MAX_BPS (SZ_1M * 200) 24 25 /* Rate control parameter */ 26 typedef enum MppEncRcMode_e { 27 MPP_ENC_RC_MODE_VBR, 28 MPP_ENC_RC_MODE_CBR, 29 MPP_ENC_RC_MODE_FIXQP, 30 MPP_ENC_RC_MODE_AVBR, 31 MPP_ENC_RC_MODE_BUTT 32 } MppEncRcMode; 33 34 typedef enum MppEncRcPriority_e { 35 MPP_ENC_RC_BY_BITRATE_FIRST, 36 MPP_ENC_RC_BY_FRM_SIZE_FIRST, 37 MPP_ENC_RC_PRIORITY_BUTT 38 } MppEncRcPriority; 39 40 typedef enum MppEncRcDropFrmMode_e { 41 MPP_ENC_RC_DROP_FRM_DISABLED, 42 MPP_ENC_RC_DROP_FRM_NORMAL, 43 MPP_ENC_RC_DROP_FRM_PSKIP, 44 MPP_ENC_RC_DROP_FRM_BUTT 45 } MppEncRcDropFrmMode; 46 47 typedef enum MppEncRcSuperFrameMode_t { 48 MPP_ENC_RC_SUPER_FRM_NONE, 49 MPP_ENC_RC_SUPER_FRM_DROP, 50 MPP_ENC_RC_SUPER_FRM_REENC, 51 MPP_ENC_RC_SUPER_FRM_BUTT 52 } MppEncRcSuperFrameMode; 53 54 typedef enum MppEncRcGopMode_e { 55 MPP_ENC_RC_NORMAL_P, 56 MPP_ENC_RC_SMART_P, 57 MPP_ENC_RC_GOP_MODE_BUTT, 58 } MppEncRcGopMode; 59 60 #endif /*__RK_VENC_RC_H__*/ 61