00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _RC_QUADRATIC_H_
00020 #define _RC_QUADRATIC_H_
00021
00022 #include "rc_types.h"
00023
00024
00025
00026 extern void rc_alloc_quadratic( ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic **p_quad );
00027 extern void rc_free_quadratic ( RCQuadratic **p_quad );
00028 extern void rc_copy_quadratic ( ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *dst, RCQuadratic *src );
00029
00030
00031 extern void rc_init_seq (ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen);
00032 extern void rc_init_GOP (ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int np, int nb);
00033 extern void rc_update_pict_frame (ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int nbits);
00034 extern void rc_init_pict (ImageParameters *p_Img, InputParameters *p_Inp,
00035 RCQuadratic *p_quad, RCGeneric *p_gen, int fieldpic, int topfield, int targetcomputation, float mult);
00036 extern void rc_update_pict (ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int nbits);
00037 extern void rc_update_picture (ImageParameters *p_Img, InputParameters *p_Inp, int bits);
00038
00039 extern int updateQPRC0(ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int topfield);
00040 extern int updateQPRC1(ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int topfield);
00041 extern int updateQPRC2(ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int topfield);
00042 extern int updateQPRC3(ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int topfield);
00043
00044
00045 extern void updateQPInterlace ( RCQuadratic *p_quad, RCGeneric *p_gen );
00046 extern void updateQPNonPicAFF ( seq_parameter_set_rbsp_t *active_sps, RCQuadratic *p_quad );
00047 extern void updateBottomField ( InputParameters *p_Inp, RCQuadratic *p_quad );
00048 extern int updateFirstP ( ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int topfield );
00049 extern int updateNegativeTarget( ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int topfield, int m_Qp );
00050 extern int updateFirstBU ( ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int topfield );
00051 extern void updateLastBU ( ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen, int topfield );
00052 extern void predictCurrPicMAD ( InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen );
00053 extern void updateModelQPBU ( ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, int m_Qp );
00054 extern void updateQPInterlaceBU ( RCQuadratic *p_quad, RCGeneric *p_gen );
00055 extern void updateModelQPFrame ( RCQuadratic *p_quad, int m_Bits );
00056
00057 extern void updateRCModel (ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen);
00058 extern void updateMADModel (ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, RCGeneric *p_gen);
00059 extern void RCModelEstimator (ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, int n_windowSize, Boolean *m_rgRejected);
00060 extern void MADModelEstimator(ImageParameters *p_Img, InputParameters *p_Inp, RCQuadratic *p_quad, int n_windowSize, Boolean *PictureRejected);
00061 extern int updateComplexity (ImageParameters *p_Img, RCQuadratic *p_quad, RCGeneric *p_gen, Boolean is_updated, int nbits );
00062 extern void updatePparams (RCQuadratic *p_quad, RCGeneric *p_gen, int complexity );
00063 extern void updateBparams (RCQuadratic *p_quad, RCGeneric *p_gen, int complexity );
00064
00065
00066 extern int rc_handle_mb ( Macroblock *currMB, int prev_mb);
00067 extern void rc_init_top_field ( ImageParameters *p_Img, InputParameters *p_Inp );
00068 extern void rc_init_bottom_field ( ImageParameters *p_Img, InputParameters *p_Inp, int TopFieldBits );
00069 extern void rc_init_frame_rdpic ( ImageParameters *p_Img, InputParameters *p_Inp, float rateRatio );
00070 extern void rc_allocate_memory ( ImageParameters *p_Img, InputParameters *p_Inp );
00071 extern void rc_free_memory ( ImageParameters *p_Img, InputParameters *p_Inp );
00072 extern void rc_update_mb_stats ( Macroblock *currMB);
00073 extern void rc_save_state ( ImageParameters *p_Img, InputParameters *p_Inp );
00074 extern void rc_restore_state ( ImageParameters *p_Img, InputParameters *p_Inp );
00075
00076 #endif