159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong/* ------------------------------------------------------------------ 259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * Copyright (C) 1998-2009 PacketVideo 359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * 459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * Licensed under the Apache License, Version 2.0 (the "License"); 559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * you may not use this file except in compliance with the License. 659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * You may obtain a copy of the License at 759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * 859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * http://www.apache.org/licenses/LICENSE-2.0 959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * 1059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * Unless required by applicable law or agreed to in writing, software 1159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * distributed under the License is distributed on an "AS IS" BASIS, 1259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 1359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * express or implied. 1459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * See the License for the specific language governing permissions 1559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * and limitations under the License. 1659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong * ------------------------------------------------------------------- 1759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong */ 1859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#ifndef _MP4ENC_LIB_H_ 1959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#define _MP4ENC_LIB_H_ 2059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 2159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#include "mp4def.h" // typedef 2259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#include "mp4lib_int.h" // main video structure 2359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 2459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#ifdef __cplusplus 2559f566c4ec3dfc097ad8163523e522280b27e5c3James Dongextern "C" 2659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong{ 2759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#endif 2859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 2959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in vop.c */ 3059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS EncodeVop(VideoEncData *video); 3159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS EncodeSlice(VideoEncData *video); 3259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS EncodeVideoPacketHeader(VideoEncData *video, int MB_number, 3359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong int quant_scale, Int insert); 3459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#ifdef ALLOW_VOP_NOT_CODED 3559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS EncodeVopNotCoded(VideoEncData *video, UChar *bstream, Int *size, ULong modTime); 3659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#endif 3759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 3859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in combined_decode.c */ 3959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS EncodeFrameCombinedMode(VideoEncData *video); 4059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS EncodeSliceCombinedMode(VideoEncData *video); 4159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 4259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in datapart_decode.c */ 4359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS EncodeFrameDataPartMode(VideoEncData *video); 4459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS EncodeSliceDataPartMode(VideoEncData *video); 4559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 4659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in fastcodeMB.c */ 4759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 4859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong//void m4v_memset(void *adr_dst, uint8 value, uint32 size); 4959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 5059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS CodeMB_H263(VideoEncData *video, approxDCT *function, Int offsetQP, Int ncoefblck[]); 5159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#ifndef NO_MPEG_QUANT 5259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS CodeMB_MPEG(VideoEncData *video, approxDCT *function, Int offsetQP, Int ncoefblck[]); 5359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#endif 5459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int getBlockSAV(Short block[]); 5559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int Sad8x8(UChar *rec, UChar *prev, Int lx); 5659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int getBlockSum(UChar *rec, Int lx); 5759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 5859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in dct.c */ 5959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void blockIdct(Short *block); 6059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void blockIdct_SSE(Short *input); 6159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void BlockDCTEnc(Short *blockData, Short *blockCoeff); 6259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 6359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /*---- FastQuant.c -----*/ 6459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int cal_dc_scalerENC(Int QP, Int type) ; 6559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int BlockQuantDequantH263Inter(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam, 6659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, 6759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int dctMode, Int comp, Int dummy, UChar shortHeader); 6859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 6959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int BlockQuantDequantH263Intra(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam, 7059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, 7159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int dctMode, Int comp, Int dc_scaler, UChar shortHeader); 7259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 7359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int BlockQuantDequantH263DCInter(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam, 7459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong UChar *bitmaprow, UInt *bitmapzz, Int dummy, UChar shortHeader); 7559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 7659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int BlockQuantDequantH263DCIntra(Short *rcoeff, Short *qcoeff, struct QPstruct *QuantParam, 7759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong UChar *bitmaprow, UInt *bitmapzz, Int dc_scaler, UChar shortHeader); 7859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 7959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#ifndef NO_MPEG_QUANT 8059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int BlockQuantDequantMPEGInter(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat, 8159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, 8259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int DctMode, Int comp, Int dc_scaler); 8359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 8459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int BlockQuantDequantMPEGIntra(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat, 8559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, 8659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int DctMode, Int comp, Int dc_scaler); 8759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 8859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int BlockQuantDequantMPEGDCInter(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat, 8959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, Int dummy); 9059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 9159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int BlockQuantDequantMPEGDCIntra(Short *rcoeff, Short *qcoeff, Int QP, Int *qmat, 9259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong UChar bitmapcol[ ], UChar *bitmaprow, UInt *bitmapzz, Int dc_scaler); 9359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#endif 9459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 9559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /*---- FastIDCT.c -----*/ 9659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void BlockIDCTMotionComp(Short *block, UChar *bitmapcol, UChar bitmaprow, 9759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int dctMode, UChar *rec, UChar *prev, Int lx_intra_zeroMV); 9859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 9959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 10059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in motion_comp.c */ 10159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void getMotionCompensatedMB(VideoEncData *video, Int ind_x, Int ind_y, Int offset); 10259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void EncPrediction_INTER(Int xpred, Int ypred, UChar *c_prev, UChar *c_rec, 10359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int width, Int round1); 10459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 10559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void EncPrediction_INTER4V(Int xpred, Int ypred, MOT *mot, UChar *c_prev, UChar *c_rec, 10659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int width, Int round1); 10759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 10859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void EncPrediction_Chrom(Int xpred, Int ypred, UChar *cu_prev, UChar *cv_prev, UChar *cu_rec, 10959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong UChar *cv_rec, Int pitch_uv, Int width_uv, Int height_uv, Int round1); 11059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 11159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void get_MB(UChar *c_prev, UChar *c_prev_u , UChar *c_prev_v, 11259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Short mb[6][64], Int width, Int width_uv); 11359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 11459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void PutSkippedBlock(UChar *rec, UChar *prev, Int lx); 11559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 11659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in motion_est.c */ 11759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void MotionEstimation(VideoEncData *video); 11859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#ifdef HTFM 11959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void InitHTFM(VideoEncData *video, HTFM_Stat *htfm_stat, double *newvar, Int *collect); 12059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void UpdateHTFM(VideoEncData *video, double *newvar, double *exp_lamda, HTFM_Stat *htfm_stat); 12159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#endif 12259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 12359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in ME_utils.c */ 12459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void ChooseMode_C(UChar *Mode, UChar *cur, Int lx, Int min_SAD); 12559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void ChooseMode_MMX(UChar *Mode, UChar *cur, Int lx, Int min_SAD); 12659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void GetHalfPelMBRegion_C(UChar *cand, UChar *hmem, Int lx); 12759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void GetHalfPelMBRegion_SSE(UChar *cand, UChar *hmem, Int lx); 12859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void GetHalfPelBlkRegion(UChar *cand, UChar *hmem, Int lx); 12959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void PaddingEdge(Vop *padVop); 13059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void ComputeMBSum_C(UChar *cur, Int lx, MOT *mot_mb); 13159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void ComputeMBSum_MMX(UChar *cur, Int lx, MOT *mot_mb); 13259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void ComputeMBSum_SSE(UChar *cur, Int lx, MOT *mot_mb); 13359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void GetHalfPelMBRegionPadding(UChar *ncand, UChar *hmem, Int lx, Int *reptl); 13459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void GetHalfPelBlkRegionPadding(UChar *ncand, UChar *hmem, Int lx, Int *reptl); 13559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 13659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in findhalfpel.c */ 13759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void FindHalfPelMB(VideoEncData *video, UChar *cur, MOT *mot, UChar *ncand, 13859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int xpos, Int ypos, Int *xhmin, Int *yhmin, Int hp_guess); 13959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int FindHalfPelBlk(VideoEncData *video, UChar *cur, MOT *mot, Int sad16, UChar *ncand8[], 14059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong UChar *mode, Int xpos, Int ypos, Int *xhmin, Int *yhmin, UChar *hp_mem); 14159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 14259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 14359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in sad.c */ 14459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HalfPel_Cxhyh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 14559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HalfPel_Cyh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 14659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HalfPel_Cxh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 14759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HalfPel_MMX(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 14859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HalfPel_SSE(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 14959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_Blk_HalfPel_C(UChar *ref, UChar *blk, Int dmin, Int lx, Int rx, Int xh, Int yh, void *extra_info); 15059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_Blk_HalfPel_MMX(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info); 15159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_Blk_HalfPel_SSE(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info); 15259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_Macroblock_C(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 15359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_Macroblock_MMX(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 15459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_Macroblock_SSE(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 15559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_Block_C(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info); 15659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_Block_MMX(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info); 15759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_Block_SSE(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info); 15859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 15959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#ifdef HTFM /* Hypothesis Testing Fast Matching */ 16059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HP_HTFM_Collectxhyh(UChar *ref, UChar *blk, Int dmin_x, void *extra_info); 16159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HP_HTFM_Collectyh(UChar *ref, UChar *blk, Int dmin_x, void *extra_info); 16259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HP_HTFM_Collectxh(UChar *ref, UChar *blk, Int dmin_x, void *extra_info); 16359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HP_HTFMxhyh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 16459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HP_HTFMyh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 16559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HP_HTFMxh(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 16659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HTFM_Collect(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 16759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_HTFM(UChar *ref, UChar *blk, Int dmin_lx, void *extra_info); 16859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#endif 16959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* on-the-fly padding */ 17059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_Blk_PADDING(UChar *ref, UChar *cur, Int dmin, Int lx, void *extra_info); 17159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_PADDING(UChar *ref, UChar *cur, Int dmin, Int lx, void *extra_info); 17259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#ifdef HTFM 17359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_PADDING_HTFM_Collect(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info); 17459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int SAD_MB_PADDING_HTFM(UChar *ref, UChar *blk, Int dmin, Int lx, void *extra_info); 17559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#endif 17659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 17759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in rate_control.c */ 17859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* These are APIs to rate control exposed to core encoder module. */ 17959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS RC_Initialize(void *video); 18059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS RC_VopQPSetting(VideoEncData *video, rateControl *rc[]); 18159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS RC_VopUpdateStat(VideoEncData *video, rateControl *rc); 18259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS RC_MBQPSetting(VideoEncData *video, rateControl *rc, Int start_packet_header); 18359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS RC_MBUpdateStat(VideoEncData *video, rateControl *rc, Int Bi, Int Hi); 18459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS RC_Cleanup(rateControl *rc[], Int numLayers); 18559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 18659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int RC_GetSkipNextFrame(VideoEncData *video, Int currLayer); 18759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong Int RC_GetRemainingVops(VideoEncData *video, Int currLayer); 18859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void RC_ResetSkipNextFrame(VideoEncData *video, Int currLayer); 18959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS RC_UpdateBuffer(VideoEncData *video, Int currLayer, Int num_skip); 19059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong PV_STATUS RC_UpdateBXRCParams(void *input); 19159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 19259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 19359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong /* defined in vlc_encode.c */ 19459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void MBVlcEncodeDataPar_I_VOP(VideoEncData *video, Int ncoefblck[], void *blkCodePtr); 19559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void MBVlcEncodeDataPar_P_VOP(VideoEncData *video, Int ncoefblck[], void *blkCodePtr); 19659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void MBVlcEncodeCombined_I_VOP(VideoEncData *video, Int ncoefblck[], void *blkCodePtr); 19759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void MBVlcEncodeCombined_P_VOP(VideoEncData *video, Int ncoefblck[], void *blkCodePtr); 19859f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void BlockCodeCoeff_ShortHeader(RunLevelBlock *RLB, BitstreamEncVideo *bs, Int j_start, Int j_stop, UChar Mode); 19959f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void BlockCodeCoeff_RVLC(RunLevelBlock *RLB, BitstreamEncVideo *bs, Int j_start, Int j_stop, UChar Mode); 20059f566c4ec3dfc097ad8163523e522280b27e5c3James Dong void BlockCodeCoeff_Normal(RunLevelBlock *RLB, BitstreamEncVideo *bs, Int j_start, Int j_stop, UChar Mode); 20159f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 20259f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#ifdef __cplusplus 20359f566c4ec3dfc097ad8163523e522280b27e5c3James Dong} 20459f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#endif 20559f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 20659f566c4ec3dfc097ad8163523e522280b27e5c3James Dong#endif /* _MP4ENC_LIB_H_ */ 20759f566c4ec3dfc097ad8163523e522280b27e5c3James Dong 208