/////////////////// int init_decoder() { int ret; xvid_gbl_init_t xvid_gbl_init; xvid_dec_create_t xvid_dec_create; /* Reset the structure with zeros */ memset(&xvid_gbl_init, 0, sizeof(xvid_gbl_init_t)); memset(&xvid_dec_create, 0, sizeof(xvid_dec_create_t)); /*------------------------------------------------------------------------ * XviD core initialization *----------------------------------------------------------------------*/ XDIM = 0 ; YDIM = 0 ; FORMAT = 0 ; CSP = XVID_CSP_BGR; BPP = 3; dec_handle = NULL ; mp4_buffer = NULL ; out_buffer = NULL ; mp4_ptr = NULL ; /* Version */ xvid_gbl_init.version = XVID_VERSION; /* Assembly setting */ xvid_gbl_init.cpu_flags = 0; // use assembly optimized xvid_gbl_init.debug = 0 ; // set debug level 0, no debug output xvid_global(NULL, 0, &xvid_gbl_init, NULL);//XVID 初始化 /*-----------------------------------------------