Linux Game Programming for PC & Embedded Systems using SDL
Presented by
Fore June
Author of Windows Fan, Linux Fan

A simple video codec.

codecio.h
runhuf.h
encode.h
decode.h
dct_video.h
common.h
fbitios.h
avilib.h
vcodec.cpp
runhuf.cpp
encode.cpp
decode.cpp
dct_video.cpp
fbitios.cpp
Makefile
sample_video.avi ( not zipped )
avilib.o ( not zipped )



fbitios.h:
//fbitios.h
#ifndef FBITIOS_H
#define FBITIOS_H

#include	<stdio.h>
#include	<stdlib.h>
#include	<iostream>
#include 	<fstream>
#include	<string.h>
#include 	<set>
#include	<bitset>

using namespace std;

typedef	unsigned int	ui;
typedef unsigned long	ul;
typedef	unsigned char	uc;

class  bitFileIO{
private:
  bitset<32> ins;
  bitset<32> outs;
  fstream ifs, ofs;
  int ins_pos;
  int outs_pos;
  int progress_indicator;
  enum { max_bits = 32 };
public:
  bitFileIO();
  bitFileIO ( char *argv_in,  char *argv_out );		//constructors
  bitFileIO ( char *argv_out, int in_out );
//  bitFileIO ( FILE *fp, int in_out );
  int  inputBit();		//input one bit from file
  void outputBit( int bit );  	//output one bit to file
  long  inputBits( int n );  	//input n bits from file
  void outputBits ( ul data, int n );	//output n bits to file
  void closeOutput();		//close_output
  void closeInput();		//close input
};

#endif