Commit caa336b4 authored by Michael Niedermayer's avatar Michael Niedermayer

common.c -> bitstream.c (and the single non bitstream func -> utils.c)

common.h -> common.h/bitstream.h

Originally committed as revision 3777 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 61436073
......@@ -9,7 +9,7 @@ VPATH=$(SRC_PATH)/libavcodec
# NOTE: -I.. is needed to include config.h
CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
OBJS= common.o utils.o mem.o allcodecs.o \
OBJS= bitstream.o utils.o mem.o allcodecs.o \
mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\
mpegaudio.o ac3enc.o mjpeg.o resample.o resample2.o dsputil.o \
motion_est.o imgconvert.o imgresample.o \
......
......@@ -24,7 +24,7 @@
//#define DEBUG
//#define DEBUG_BITALLOC
#include "avcodec.h"
#include "bitstream.h"
#include "ac3.h"
typedef struct AC3EncodeContext {
......
......@@ -21,29 +21,12 @@
*/
/**
* @file common.c
* common internal api.
* @file bitstream.c
* bitstream api.
*/
#include "avcodec.h"
const uint8_t ff_sqrt_tab[128]={
0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11
};
const uint8_t ff_log2_tab[256]={
0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
};
#include "bitstream.h"
void align_put_bits(PutBitContext *s)
{
......@@ -302,7 +285,3 @@ void free_vlc(VLC *vlc)
av_free(vlc->table);
}
int64_t ff_gcd(int64_t a, int64_t b){
if(b) return ff_gcd(b, a%b);
else return a;
}
This diff is collapsed.
......@@ -26,6 +26,7 @@
#include <string.h>
#include "common.h"
#include "bitstream.h"
#include "cabac.h"
const uint8_t ff_h264_lps_range[64][4]= {
......
This diff is collapsed.
......@@ -25,6 +25,7 @@
*/
#include "common.h"
#include "bitstream.h"
#include "avcodec.h"
#include "dsputil.h"
#include "rangecoder.h"
......
......@@ -34,6 +34,7 @@
#include <limits.h>
#include "avcodec.h"
#include "bitstream.h"
#include "golomb.h"
#undef NDEBUG
......
......@@ -22,6 +22,7 @@
#include <limits.h>
#include "avcodec.h"
#include "common.h"
#include "bitstream.h"
/**
* G.726 11bit float.
......
......@@ -27,6 +27,7 @@
*/
#include "common.h"
#include "bitstream.h"
#include "avcodec.h"
#include "dsputil.h"
......
......@@ -41,6 +41,7 @@
#include <stdlib.h>
#include "common.h"
#include "bitstream.h"
#include "avcodec.h"
#ifdef CONFIG_ZLIB
......
......@@ -23,6 +23,7 @@
*/
#include "avcodec.h"
#include "bitstream.h"
#include "mpegaudio.h"
/* currently, cannot change these constants (need to modify
......
......@@ -24,6 +24,7 @@
//#define DEBUG
#include "avcodec.h"
#include "bitstream.h"
#include "mpegaudio.h"
#include "dsputil.h"
......
......@@ -27,6 +27,7 @@
#define AVCODEC_MPEGVIDEO_H
#include "dsputil.h"
#include "bitstream.h"
#define FRAME_SKIPED 100 ///< return value for header parsers if frame is not coded
......
......@@ -17,6 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "avcodec.h"
#include "bitstream.h"
#include "golomb.h"
/**
......
......@@ -31,6 +31,24 @@
#include <stdarg.h>
#include <limits.h>
const uint8_t ff_sqrt_tab[128]={
0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11
};
const uint8_t ff_log2_tab[256]={
0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
};
void avcodec_default_free_buffers(AVCodecContext *s);
void *av_mallocz(unsigned int size)
......@@ -881,6 +899,11 @@ int64_t av_rescale(int64_t a, int64_t b, int64_t c){
return av_rescale_rnd(a, b, c, AV_ROUND_NEAR_INF);
}
int64_t ff_gcd(int64_t a, int64_t b){
if(b) return ff_gcd(b, a%b);
else return a;
}
/* av_log API */
static int av_log_level = AV_LOG_DEBUG;
......
......@@ -32,6 +32,7 @@
*/
#include "avcodec.h"
#include "bitstream.h"
#include "dsputil.h"
/* size of blocks */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment