⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssbsipvideodivxmp4_vars.h

📁 6410BSP1
💻 H
📖 第 1 页 / 共 2 页
字号:


    int no_of_sprite_warping_points;
    int warping_points[4][2];
    int sprite_warping_accuracy;
    int sprite_brightness_change;
    int sprite_brightness_change_factor;
                                                     // the ac rescaling have been applied to avoid to repeat it
    // 3.11 specific values
    short (*dc_chrom_table) (MP4_STREAM*);
    short (*dc_lum_table) (MP4_STREAM*);
    event_t (*ac_inter_table) (MP4_STREAM*);
    event_t (*ac_intra_chrom_table) (MP4_STREAM*);
    event_t (*ac_intra_lum_table) (MP4_STREAM*);
    void (*mv_table) (MP4_STREAM*, int*, int*);
    short (*get_cbp) (MP4_STREAM*);
    int has_skips;
    int vol_mode; /* see comment in mp4_header_311.c */                                                     
    int switch_rounding;
        // the ac rescaling have been applied to avoid to repeat it

    // interlace
    int top_field_first;
    int alternate_vertical_scan_flag;
    int dct_type;
    int field_prediction;
    int forward_top_field_reference;
    int forward_bottom_field_reference;
    int backward_top_field_reference;
    int backward_bottom_field_reference;

} mp4_header;


typedef struct 
{
  char corners[4];
  char top[DEC_MBC];
  char bottom[DEC_MBC];
  char left[DEC_MBR];
  char right[DEC_MBR];

} mp4_edge_info;




typedef struct
{
    unsigned int* deviations[3];
    unsigned char* history1;
    unsigned char* history2;
} DERING_INFO;



typedef struct
{
    int64_t mmw_brightness;
    int64_t mmw_contrast;
    int64_t mmw_saturation;
    int brightness;
    int contrast;
    int saturation;
} GAMMA_ADJUSTMENT;


typedef struct
{
    int X0, Y0;
    short XX, YX, XY, YY;
    int rounder1, rounder2;
    int64_t shifter;
} AFFINE_TRANSFORM;

struct _REFERENCE;

typedef int (VldProc)(struct _REFERENCE * ref,unsigned int * zigzag,int * i,int * m);
typedef VldProc * VldProcPtr;

typedef int (VldProcIntra)(struct _REFERENCE * ref,unsigned int * zigzag,int * i,short * Quantblock);
typedef VldProcIntra * VldProcIntraPtr;
struct _MP4_STATE_;
typedef void (SsbSipVideoDivXReconFunc)(struct _MP4_STATE_* mp4_state, unsigned char *src, unsigned char *dst,
                          int lx, int lx_dst, int x, int y, int dx, int dy, int interlaced);
typedef SsbSipVideoDivXReconFunc* ReconFuncPtr;
typedef void (SsbSipVideoDivXReconBlockFunc)(struct _MP4_STATE_* mp4_state, unsigned char *src, unsigned char *dst,
                          int lx, int lx_dst, int x, int y, int dx, int dy, int chrom, int interlaced);
typedef SsbSipVideoDivXReconBlockFunc* ReconBlockFuncPtr;
typedef struct 
{
    int x, y;
}MotionVector;
#include "SsbSipVideoDivXyuv2rgb.h"

typedef struct _MP4_STATE_
{    
    int mb_xpos;
    int mb_ypos;
    int    coded_picture_width;
    int    coded_picture_height;
    int mb_xsize;
    int mb_ysize;
    int gmcFlag;
    int interlaced;
    int trd;
    int trb;
    int    horizontal_size;
    int    vertical_size;
    int edge_hor_start;
    int edge_ver_start;
    int    mb_width;
    int    mb_height;


    int    chrom_width;
    int    chrom_height;
    unsigned int * zigzag;
#ifndef OPT_IDCT            
    unsigned int * ptrMaxFilledColsArray;
#endif
    VldProcPtr vld_inter_fun;
    VldProcIntraPtr vld_intra_fun;

    mp4_header hdr;



    int *modemap; // modemap[DEC_MBR+1][DEC_MBC+2]
    int *codedmap; //codedmap[DEC_MBR][DEC_MBC]
    short *cbp_store; // cbp_store[DEC_MBR+1][DEC_MBC+1]
    char *quant_store; // quant_store[DEC_MBR+1][DEC_MBC+1]
    MotionVector *MV; // MV[DEC_MBR+1][DEC_MBC+2][6][2]
//#ifndef _MFB_OPT_  made dummy to avaoid segmenattion fault
    MotionVector *MV_fowbak;
//#endif

    int *fieldpredictedmap; 
    int fieldpredictedmap_stride;
    char *fieldrefmap; 
    int fieldrefmap_stride;

    MotionVector (*MV_field)[6];

    int modemap_stride;
    int codedmap_stride;
    int cbp_store_stride;
    int quant_store_stride;
    int MV_stride;


    // b-vop


    unsigned char** frame_to_decode; 
    unsigned char** frame_to_display; // must create a delay when encounter the first B-VOP
    unsigned char** output_frame;   // always matches the frame we use as input for color conversion
    int prefixed; // avoid delay caused by B-VOPs using prefixed information, no_delay_frame_flag is on
    int history_prefixed; // there was a prefixed I-VOP, b_vop_grouping is on
    int preceding_vop_coding_type; 

    mp4_edge_info edge_info;   // This is necessary for 311 version


    ac_dc* coeff_pred;

#ifdef YUV2RGB
    yuv2rgbProcPtr convert_yuv;
    yuv2rgbProcPtr convert_yuv_fast;
    yuv2rgbProcPtr convert_yuv_generic;
    int bpp;
    int flag_invert;
#endif


    int pp_options;
    int postproc_level;


    int flag_keyframe; // indicates that the current frame is a keyframe
    int flag_smooth_playback; // delay one frame, copy B frames into private buffer, decode one frame at a time
    int flag_seek_bframe;
    int flag_buffered_bframe;
    char* buffered_bframe;
    int buffered_bframe_length;
    int flag_warmth;
    int flag_logo;
    /**
    flag_skip_decoding: allows the decoder to ignore the data and stop decoding for a while

    When the decoder receives skip_decoding set this flag to 1 and returns 0, when the decoder
    has this flag set to 1, if the frame received is a keyframe set this flag to 0 and decodes, otherwise
    returns 0.
    **/
    int flag_skip_decoding; 
    int multiplier;

    // user data info
    int userdata_codec_version;
    int userdata_build_number;
    int bad_header; /* Contains error returned when parsing last received VOL header */ 
    unsigned char * bmp;
    int stride;


    SsbSipVideoDivXCopyAreaProcPtr block_pointers[4];
    SsbSipVideoDivXCopyAreaProcPtr mblock_pointers[4];

    SsbSipVideoDivXCopyAreaProcPtr block_pointers_field[4];
    SsbSipVideoDivXCopyAreaProcPtr mblock_pointers_field[4];
    int trbi;
    int trdi;

    void (*MacroblockDisplay)(struct _REFERENCE *, int, int); // the function that is called each SsbSipVideoDivXmacroblock. can do nothing
    void (*MacroblockDisplayFinish)(struct _REFERENCE *, unsigned char *, unsigned int); // the function that is called in the end of each frame. Does YUV->RGB and preprocessing. Can call MacroblockDisplay2 and MacroblockDisplayFinish2.


    void (*set_gmc_mv) (struct _MP4_STATE_*);
    void (*SsbSipVideoDivXreconstruct_skip) (struct _REFERENCE*);


    ReconFuncPtr recon_16x16;
    ReconBlockFuncPtr recon_8x8_lum;
    ReconBlockFuncPtr recon_8x8_chr;

    int memory_cheat;
    int render_flag;

    int test_timeinc;


#ifdef DERING
    DERING_INFO di;
#endif

#ifdef WIN32
    __declspec(align(8))
#endif

#ifdef YUV2RGB
    GAMMA_ADJUSTMENT ga;
#endif

    AFFINE_TRANSFORM at_lum;
    AFFINE_TRANSFORM at_chrom;


#ifdef _ROUNDING_TYPE_TO_FILE
    FILE* rounding_type_file;
#endif


    logo_adder_t logo_adder;

#ifndef _DECORE
    char outputname[256];
    char infilename[256];
    int output_flag;
#endif

   int TimeBaseLast;
   int NonBVopTimeLast;
   unsigned char *pMbType;
   unsigned int packed_mode;


} 
MP4_STATE;

#ifdef OPT_MEM

typedef struct _REFERENCE
{    
    MP4_STREAM  *ld;
    MP4_STATE    *mp4_state;
    unsigned char *edged_ref[3];
    unsigned char *edged_for[3];
    unsigned char *edged_back[3];
    unsigned char *frame_ref[3];
    unsigned char *frame_for[3];
    unsigned char *frame_back[3];
    unsigned char *display_frame[3];


    void* (*alloc_fun) (uint32_t);
    void (*free_fun) (void*);
} REFERENCE;
#else

typedef struct _REFERENCE
{    
    unsigned char *edged_ref[3];
    unsigned char *edged_for[3];
    unsigned char *edged_back[3];
    unsigned char *frame_ref[3];
    unsigned char *frame_for[3];
    unsigned char *frame_back[3];
    unsigned char *display_frame[3];

    MP4_STATE    *mp4_state;
    MP4_STREAM  *ld;

    void* (*alloc_fun) (uint32_t);
    void (*free_fun) (void*);
} REFERENCE;

#endif
/** 
 *    prototypes of main SsbSipVideoDivXdecore functions
**/

int SsbSipVideoDivXdecore_frame (REFERENCE * ref, 
    const unsigned char *stream, 
    int length, 
    unsigned char *bmp, 
    unsigned int stride, 
    int render_flag,
    int just_vol_init,
    int skip_decoding);

int SsbSipVideoDivXdecore_alloc(REFERENCE * ref, void *cmm_handle);
int SsbSipVideoDivXdecore_dealloc(REFERENCE * ref);
int SsbSipVideoDivXdecore_release (REFERENCE * ref);
int SsbSipVideoDivXdecore_checkoutput(const DivXBitmapInfoHeader* pHeader);
int SsbSipVideoDivXdecore_setoutput(MP4_STATE * mp4_state, const DivXBitmapInfoHeader* pHeader); 
int SsbSipVideoDivXget_mp4picture (REFERENCE * ref, unsigned char *bmp, unsigned int stride, int render_flag);
int SsbSipVideoDivXget_notcoded_mp4picture (REFERENCE * ref, unsigned char *bmp, unsigned int stride, int render_flag);

/*
// -----------------------------------------------------------------------------
// Exported function Prototype
// -----------------------------------------------------------------------------
*/

typedef void (SsbSipVideoDivXdecore_cleanup_proc) ();
typedef SsbSipVideoDivXdecore_cleanup_proc* SsbSipVideoDivXdecore_cleanup_proc_ptr;
EXPORT SsbSipVideoDivXdecore_cleanup_proc_ptr SsbSipVideoDivXdecore_cleanup;    

EXPORT SsbSipVideoDivXdecore_cleanup_proc SsbSipVideoDivXdecore_cleanup_generic;
EXPORT SsbSipVideoDivXdecore_cleanup_proc SsbSipVideoDivXdecore_cleanup_mmx;
#ifdef __cplusplus
}
#endif

#endif // ___SSBSIPMP4_VARS_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -