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_SMTRC, 32 MPP_ENC_RC_MODE_SE, 33 MPP_ENC_RC_MODE_BUTT 34 } MppEncRcMode; 35 36 typedef enum MppEncSeMode_e { 37 MPP_ENC_SE_DISABLE = 0, // disable super encoder 38 MPP_ENC_SE_MODE_BAL, // balance mode 39 MPP_ENC_SE_MODE_QF, // quality first mode 40 MPP_ENC_SE_MODE_BF, // bitrate first mode 41 MPP_ENC_SE_MODE_EXTERNAL, // external se mode 42 MPP_ENC_SE_MODE_BUTT 43 } MppEncSeMode; 44 45 typedef enum MppEncRcPriority_e { 46 MPP_ENC_RC_BY_BITRATE_FIRST, 47 MPP_ENC_RC_BY_FRM_SIZE_FIRST, 48 MPP_ENC_RC_PRIORITY_BUTT 49 } MppEncRcPriority; 50 51 typedef enum MppEncRcDropFrmMode_e { 52 MPP_ENC_RC_DROP_FRM_DISABLED, 53 MPP_ENC_RC_DROP_FRM_NORMAL, 54 MPP_ENC_RC_DROP_FRM_PSKIP, 55 MPP_ENC_RC_DROP_FRM_BUTT 56 } MppEncRcDropFrmMode; 57 58 typedef enum MppEncRcSuperFrameMode_t { 59 MPP_ENC_RC_SUPER_FRM_NONE, 60 MPP_ENC_RC_SUPER_FRM_DROP, 61 MPP_ENC_RC_SUPER_FRM_REENC, 62 MPP_ENC_RC_SUPER_FRM_BUTT 63 } MppEncRcSuperFrameMode; 64 65 typedef enum MppEncRcGopMode_e { 66 MPP_ENC_RC_NORMAL_P, 67 MPP_ENC_RC_SMART_P, 68 MPP_ENC_RC_GOP_MODE_BUTT, 69 } MppEncRcGopMode; 70 71 typedef enum MppEncRcIntraRefreshMode_e { 72 MPP_ENC_RC_INTRA_REFRESH_ROW = 0, 73 MPP_ENC_RC_INTRA_REFRESH_COL, 74 MPP_ENC_RC_INTRA_REFRESH_BUTT 75 } MppEncRcRefreshMode; 76 77 #endif /*__RK_VENC_RC_H__*/ 78