void Spatial_Prediction _ANSI_ARGS_((void));
/* store.c */
+void FreeStaticBuffer _ANSI_ARGS_((void));
void Write_Frame _ANSI_ARGS_((unsigned char *src[], int frame));
#ifdef DISPLAY
if(fd)
{
os->InFd = fd;
- return 1; //success
+ return 1; /*success*/
}
else
os->InFd = NULL;
if(fd)
{
os->OutFd = fd;
- return 1; //success
+ return 1; /*success*/
}
else
os->OutFd = NULL;
int my_printf(const char *format, ...)
{
- //return printf(format, ...);
va_list argptr;
int ret;
int my_sprintf(char *str, const char *format, ...)
{
- //return sprintf(str, format, ...);
va_list argptr;
int ret;
int my_fprintf(const char *format, ...)
{
- //return fprintf(stderr, format, ...);
va_list argptr;
int ret;
static void DeInitialize_Decoder()
{
- free(Clip-384); // WTF !!!
+ free(Clip-384); /* I love magic number */
}
-/* mostly IMPLEMENTAION specific rouintes */
+/* mostly IMPLEMENTAION specific routines */
static void Initialize_Sequence()
{
int cc, size;
" -f store/display interlaced video in frame format\n"
" -g concatenated file format for substitution method (-x)\n"
" -in file information & statistics report (n: level)\n"
-" -l file file name pattern for lower layer sequence\n"
-" (for spatial scalability)\n"
+" -l file file name pattern for lower layer sequence\n");
+printf(" (for spatial scalability)\n"
" -on file output format (0:YUV 1:SIF 2:TGA 3:PPM 4:X11 5:X11HiQ)\n"
" -q disable warnings to stderr\n"
" -r use double precision reference IDCT\n"
" -t enable low level tracing to stdout\n"
" -u file print user_data to stdio or file\n"
" -vn verbose output (n: level)\n"
-" -x file filename pattern of picture substitution sequence\n\n"
-"File patterns: for sequential filenames, \"printf\" style, e.g. rec%%d\n"
+" -x file filename pattern of picture substitution sequence\n\n");
+printf("File patterns: for sequential filenames, \"printf\" style, e.g. rec%%d\n"
" or rec%%d%%c for fieldwise storage\n"
"Levels: 0:none 1:sequence 2:picture 3:slice 4:macroblock 5:block\n\n"
"Example: mpeg2decode -b bitstream.mpg -f -r -o0 rec%%d\n"
{
int i;
- /* First clenup the static buffer in store.c */
+ /* First cleanup the static buffer in store.c */
FreeStaticBuffer();
/* clear flags */
FILE* OutFd;
} ostream;
-//int my_open(char *filename);
int my_printf(const char *format, ...);
int my_fprintf(const char *format, ...);
int my_sprintf(char *str, const char *format, ...);
void my_exit(int status);
-//ostream *my_fopen(const char *path, const char *mode);
int my_fopenr(const char *path, const char *mode, istream *os);
int my_fopen(const char *path, const char *mode, ostream *os);
int my_fseek(ostream *stream, long offset, int whence);
static unsigned char obfr[OBFRSIZE];
static unsigned char *optr;
static ostream *outfile;
-unsigned char *static_malloc[6] = {0,0,0,0,0,0}; //worse case there is 6 buffer in this impl unit.
+unsigned char *static_malloc[6] = {0,0,0,0,0,0}; /*worse case there is 6 buffer in this impl unit.*/
void FreeStaticBuffer()
{
{
int i, j;
unsigned char *p;
+ ostream file;
if (!Quiet_Flag)
my_fprintf("saving %s\n",name);
- //if ((outfile = open(name,O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,0666))==-1)
- ostream file;
outfile = &file;
if(!my_fopen(name, "wb", outfile))
{
int i,j;
unsigned char *py, *pu, *pv;
static unsigned char *u422, *v422;
+ ostream file;
if (chroma_format==CHROMA444)
Error("4:4:4 not supported for SIF format");
if (!Quiet_Flag)
my_fprintf("saving %s\n",outname);
- //if ((outfile = open(outname,O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,0666))==-1)
- ostream file;
outfile = &file;
if(!my_fopen(outname, "wb", outfile))
{
static unsigned char tga24[14] = {0,0,2,0,0,0,0, 0,0,0,0,0,24,32};
char header[FILENAME_LENGTH];
static unsigned char *u422, *v422, *u444, *v444;
+ ostream file;
if (chroma_format==CHROMA444)
{
if (!Quiet_Flag)
my_fprintf("saving %s\n",outname);
- //if ((outfile = open(outname,O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,0666))==-1)
- ostream file;
outfile = &file;
if(! my_fopen(outname, "wb", outfile))
{