3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* - Console based test application - |
* - Console based test application - |
5 |
* |
* |
6 |
* Copyright(C) 2002-2003 Christoph Lampert |
* Copyright(C) 2002-2003 Christoph Lampert <gruel@web.de> |
7 |
|
* 2002-2003 Edouard Gomez <ed.gomez@free.fr> |
8 |
|
* 2003 Peter Ross <pross@xvid.org> |
9 |
* |
* |
10 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
11 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
21 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 |
* |
* |
24 |
* $Id: xvid_encraw.c,v 1.11.2.25 2003-05-17 13:21:26 suxen_drol Exp $ |
* $Id: xvid_encraw.c,v 1.11.2.27 2003-06-09 13:49:25 edgomez Exp $ |
25 |
* |
* |
26 |
****************************************************************************/ |
****************************************************************************/ |
27 |
|
|
34 |
* The program is plain C and needs no libraries except for libxvidcore, |
* The program is plain C and needs no libraries except for libxvidcore, |
35 |
* and maths-lib. |
* and maths-lib. |
36 |
* |
* |
37 |
|
* Use ./xvid_encraw -help for a list of options |
38 |
|
* |
39 |
************************************************************************/ |
************************************************************************/ |
40 |
|
|
41 |
#include <stdio.h> |
#include <stdio.h> |
325 |
ARG_OUTPUTFILE = argv[i]; |
ARG_OUTPUTFILE = argv[i]; |
326 |
} else if (strcmp("-vop_debug", argv[i]) == 0) { |
} else if (strcmp("-vop_debug", argv[i]) == 0) { |
327 |
ARG_VOPDEBUG = 1; |
ARG_VOPDEBUG = 1; |
|
|
|
328 |
} else if (strcmp("-help", argv[i])) { |
} else if (strcmp("-help", argv[i])) { |
329 |
usage(); |
usage(); |
330 |
return (0); |
return (0); |
662 |
fprintf(stderr, " -packed : packed mode\n"); |
fprintf(stderr, " -packed : packed mode\n"); |
663 |
fprintf(stderr, " -lumimasking : use lumimasking algorithm\n"); |
fprintf(stderr, " -lumimasking : use lumimasking algorithm\n"); |
664 |
fprintf(stderr, " -stats : print stats about encoded frames\n"); |
fprintf(stderr, " -stats : print stats about encoded frames\n"); |
665 |
fprintf(stderr, " -debug : print all MB dquants\n"); |
fprintf(stderr, " -debug : activates xvidcore internal debugging output\n"); |
666 |
|
fprintf(stderr, " -vop_debug : print some info directly into encoded frames\n"); |
667 |
fprintf(stderr, " -help : prints this help message\n"); |
fprintf(stderr, " -help : prints this help message\n"); |
668 |
fprintf(stderr, "\n"); |
fprintf(stderr, "\n"); |
669 |
fprintf(stderr, "NB: You can define %d zones repeating the -z[qw] option as many times as needed.\n", MAX_ZONES); |
fprintf(stderr, "NB: You can define %d zones repeating the -z[qw] option as many times as needed.\n", MAX_ZONES); |
817 |
/* Set version -- version checking will done by xvidcore */ |
/* Set version -- version checking will done by xvidcore */ |
818 |
memset(&xvid_gbl_init, 0, sizeof(xvid_gbl_init)); |
memset(&xvid_gbl_init, 0, sizeof(xvid_gbl_init)); |
819 |
xvid_gbl_init.version = XVID_VERSION; |
xvid_gbl_init.version = XVID_VERSION; |
|
printf("0x%x\n", ARG_DEBUG); |
|
820 |
xvid_gbl_init.debug = ARG_DEBUG; |
xvid_gbl_init.debug = ARG_DEBUG; |
821 |
|
|
822 |
|
|
897 |
xvid_enc_create.num_plugins++; |
xvid_enc_create.num_plugins++; |
898 |
} |
} |
899 |
|
|
900 |
/* if (ARG_DEBUG) { |
#if 0 |
901 |
|
if (ARG_DEBUG) { |
902 |
plugins[xvid_enc_create.num_plugins].func = rawenc_debug; |
plugins[xvid_enc_create.num_plugins].func = rawenc_debug; |
903 |
plugins[xvid_enc_create.num_plugins].param = NULL; |
plugins[xvid_enc_create.num_plugins].param = NULL; |
904 |
xvid_enc_create.num_plugins++; |
xvid_enc_create.num_plugins++; |
905 |
}*/ |
} |
906 |
|
#endif |
907 |
|
|
908 |
/* No fancy thread tests */ |
/* No fancy thread tests */ |
909 |
xvid_enc_create.num_threads = 0; |
xvid_enc_create.num_threads = 0; |
918 |
} |
} |
919 |
|
|
920 |
/* Maximum key frame interval */ |
/* Maximum key frame interval */ |
|
|
|
921 |
if (ARG_MAXKEYINTERVAL > 0) { |
if (ARG_MAXKEYINTERVAL > 0) { |
922 |
xvid_enc_create.max_key_interval = ARG_MAXKEYINTERVAL; |
xvid_enc_create.max_key_interval = ARG_MAXKEYINTERVAL; |
923 |
}else { |
}else { |