66 |
#include <stdlib.h> |
#include <stdlib.h> |
67 |
#include <string.h> |
#include <string.h> |
68 |
#include <math.h> |
#include <math.h> |
69 |
#ifndef _MSC_VER |
#ifndef WIN32 |
70 |
#include <sys/time.h> |
#include <sys/time.h> |
71 |
#else |
#else |
72 |
#include <time.h> |
#include <time.h> |
205 |
double totaldectime=0.; |
double totaldectime=0.; |
206 |
|
|
207 |
long totalsize=0; |
long totalsize=0; |
208 |
long hints_size; |
long hints_size = 0; |
209 |
int status; |
int status; |
210 |
int bigendian; |
int bigendian = 0; |
211 |
|
|
212 |
long m4v_size; |
long m4v_size = 0; |
213 |
long frame_type[ABS_MAXFRAMENR]; |
long frame_type[ABS_MAXFRAMENR]; |
214 |
int Iframes=0, Pframes=0, use_assembler=0; |
int Iframes=0, Pframes=0, use_assembler=0; |
215 |
double framepsnr[ABS_MAXFRAMENR]; |
double framepsnr[ABS_MAXFRAMENR]; |
413 |
bigendian = 1; |
bigendian = 1; |
414 |
else |
else |
415 |
bigendian = 0; |
bigendian = 0; |
416 |
|
totalsize = 0; |
417 |
|
|
418 |
/***************************************************************************** |
/***************************************************************************** |
419 |
* Main loop |
* Main loop |
637 |
/* Return time elapsed time in miliseconds since the program started */ |
/* Return time elapsed time in miliseconds since the program started */ |
638 |
static double msecond() |
static double msecond() |
639 |
{ |
{ |
640 |
#ifndef _MSC_VER |
#ifndef WIN32 |
641 |
struct timeval tv; |
struct timeval tv; |
642 |
gettimeofday(&tv, 0); |
gettimeofday(&tv, 0); |
643 |
return tv.tv_sec*1.0e3 + tv.tv_usec * 1.0e-3; |
return tv.tv_sec*1.0e3 + tv.tv_usec * 1.0e-3; |
853 |
|
|
854 |
if(use_assembler) { |
if(use_assembler) { |
855 |
|
|
856 |
#ifdef ARCH_IA64 |
#ifdef ARCH_IS_IA64 |
857 |
xinit.cpu_flags = XVID_CPU_FORCE | XVID_CPU_IA64; |
xinit.cpu_flags = XVID_CPU_FORCE | XVID_CPU_IA64; |
858 |
#else |
#else |
859 |
xinit.cpu_flags = 0; |
xinit.cpu_flags = 0; |
915 |
xframe.length = -1; /* this is written by the routine */ |
xframe.length = -1; /* this is written by the routine */ |
916 |
|
|
917 |
xframe.image = image; |
xframe.image = image; |
918 |
xframe.colorspace = XVID_CSP_YV12; /* defined in <xvid.h> */ |
xframe.colorspace = XVID_CSP_I420; /* defined in <xvid.h> */ |
919 |
|
|
920 |
xframe.intra = -1; /* let the codec decide between I-frame (1) and P-frame (0) */ |
xframe.intra = -1; /* let the codec decide between I-frame (1) and P-frame (0) */ |
921 |
|
|
997 |
xframe.length = m4v_size; |
xframe.length = m4v_size; |
998 |
xframe.image = out_buffer; |
xframe.image = out_buffer; |
999 |
xframe.stride = XDIM; |
xframe.stride = XDIM; |
1000 |
xframe.colorspace = XVID_CSP_YV12; /* XVID_CSP_USER is fastest (no memcopy involved) */ |
xframe.colorspace = XVID_CSP_I420; /* XVID_CSP_USER is fastest (no memcopy involved) */ |
1001 |
|
|
1002 |
xerr = xvid_decore(dec_handle, XVID_DEC_DECODE, &xframe, NULL); |
xerr = xvid_decore(dec_handle, XVID_DEC_DECODE, &xframe, NULL); |
1003 |
|
|