Commit 1d0d55da authored by Michael Niedermayer's avatar Michael Niedermayer

--disable-risky support

Originally committed as revision 1522 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 02d697aa
......@@ -82,6 +82,7 @@ LIBPREF="lib"
LIBSUF=".a"
SLIBPREF="lib"
SLIBSUF=".so"
risky="yes"
# OS specific
targetos=`uname -s`
......@@ -298,6 +299,8 @@ for opt do
;;
--disable-ffserver) ffserver="no"
;;
--disable-risky) risky="no"
;;
esac
done
......@@ -587,6 +590,7 @@ echo " --enable-gprof enable profiling with gprof [$gprof]"
echo " --disable-mpegaudio-hp faster (but less accurate)"
echo " mpegaudio decoding [default=no]"
echo " --disable-ffserver disable ffserver build"
echo " --disable-risky disables patent encumbered codecs"
echo ""
echo "NOTE: The object files are build at the place where configure is launched"
exit 1
......@@ -615,6 +619,7 @@ echo "vorbis enabled $vorbis"
echo "a52 support $a52"
echo "a52 dlopened $a52bin"
echo "Video hooking $vhook"
echo "risky / patent encumbered codecs $risky"
if test "$vhook" = "yes" ; then
echo "Imlib2 support $imlib2"
......@@ -842,6 +847,11 @@ if test "$ffserver" = "yes" ; then
echo "CONFIG_FFSERVER=yes" >> config.mak
fi
if test "$risky" = "yes" ; then
echo "#define CONFIG_RISKY 1" >> $TMPH
echo "CONFIG_RISKY=yes" >> config.mak
fi
echo "#define restrict $_restrict" >> $TMPH
# build tree in object directory if source path is different from current one
......
......@@ -11,14 +11,19 @@ CFLAGS= $(OPTFLAGS) -Wall -g -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_L
LDFLAGS= -g
OBJS= common.o utils.o mem.o allcodecs.o \
mpegvideo.o h263.o jrevdct.o jfdctfst.o jfdctint.o\
mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\
mpegaudio.o ac3enc.o mjpeg.o resample.o dsputil.o \
motion_est.o imgconvert.o imgresample.o msmpeg4.o \
mpeg12.o h263dec.o svq1.o rv10.o mpegaudiodec.o pcm.o simple_idct.o \
motion_est.o imgconvert.o imgresample.o \
mpeg12.o mpegaudiodec.o pcm.o simple_idct.o \
ratecontrol.o adpcm.o eval.o dv.o error_resilience.o \
wmadec.o fft.o mdct.o mace.o huffyuv.o
fft.o mdct.o mace.o huffyuv.o
ASM_OBJS=
# codecs which are patented in some non free countries like the us
ifeq ($(CONFIG_RISKY),yes)
OBJS+= h263.o msmpeg4.o h263dec.o svq1.o rv10.o wmadec.o
endif
# currently using liba52 for ac3 decoding
ifeq ($(CONFIG_AC3),yes)
OBJS+= a52dec.o
......
......@@ -44,22 +44,25 @@ void avcodec_register_all(void)
register_avcodec(&oggvorbis_decoder);
#endif
register_avcodec(&mpeg1video_encoder);
#ifdef CONFIG_RISKY
register_avcodec(&h263_encoder);
register_avcodec(&h263p_encoder);
register_avcodec(&rv10_encoder);
register_avcodec(&mjpeg_encoder);
register_avcodec(&mpeg4_encoder);
register_avcodec(&msmpeg4v1_encoder);
register_avcodec(&msmpeg4v2_encoder);
register_avcodec(&msmpeg4v3_encoder);
register_avcodec(&wmv1_encoder);
register_avcodec(&wmv2_encoder);
#endif
register_avcodec(&mjpeg_encoder);
register_avcodec(&huffyuv_encoder);
#endif /* CONFIG_ENCODERS */
register_avcodec(&rawvideo_codec);
/* decoders */
#ifdef CONFIG_DECODERS
#ifdef CONFIG_RISKY
register_avcodec(&h263_decoder);
register_avcodec(&mpeg4_decoder);
register_avcodec(&msmpeg4v1_decoder);
......@@ -67,18 +70,19 @@ void avcodec_register_all(void)
register_avcodec(&msmpeg4v3_decoder);
register_avcodec(&wmv1_decoder);
register_avcodec(&wmv2_decoder);
register_avcodec(&mpeg_decoder);
register_avcodec(&h263i_decoder);
register_avcodec(&rv10_decoder);
register_avcodec(&svq1_decoder);
register_avcodec(&wmav1_decoder);
register_avcodec(&wmav2_decoder);
#endif
register_avcodec(&mpeg_decoder);
register_avcodec(&dvvideo_decoder);
register_avcodec(&dvaudio_decoder);
register_avcodec(&mjpeg_decoder);
register_avcodec(&mjpegb_decoder);
register_avcodec(&mp2_decoder);
register_avcodec(&mp3_decoder);
register_avcodec(&wmav1_decoder);
register_avcodec(&wmav2_decoder);
register_avcodec(&mace3_decoder);
register_avcodec(&mace6_decoder);
register_avcodec(&huffyuv_decoder);
......
......@@ -2210,44 +2210,6 @@ static VLC dc_lum, dc_chrom;
static VLC sprite_trajectory;
static VLC mb_type_b_vlc;
void init_rl(RLTable *rl)
{
INT8 max_level[MAX_RUN+1], max_run[MAX_LEVEL+1];
UINT8 index_run[MAX_RUN+1];
int last, run, level, start, end, i;
/* compute max_level[], max_run[] and index_run[] */
for(last=0;last<2;last++) {
if (last == 0) {
start = 0;
end = rl->last;
} else {
start = rl->last;
end = rl->n;
}
memset(max_level, 0, MAX_RUN + 1);
memset(max_run, 0, MAX_LEVEL + 1);
memset(index_run, rl->n, MAX_RUN + 1);
for(i=start;i<end;i++) {
run = rl->table_run[i];
level = rl->table_level[i];
if (index_run[run] == rl->n)
index_run[run] = i;
if (level > max_level[run])
max_level[run] = level;
if (run > max_run[level])
max_run[level] = run;
}
rl->max_level[last] = av_malloc(MAX_RUN + 1);
memcpy(rl->max_level[last], max_level, MAX_RUN + 1);
rl->max_run[last] = av_malloc(MAX_LEVEL + 1);
memcpy(rl->max_run[last], max_run, MAX_LEVEL + 1);
rl->index_run[last] = av_malloc(MAX_RUN + 1);
memcpy(rl->index_run[last], index_run, MAX_RUN + 1);
}
}
void init_vlc_rl(RLTable *rl)
{
int i, q;
......
This diff is collapsed.
......@@ -11,9 +11,14 @@ CFLAGS= $(OPTFLAGS) -Wall -g -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_
OBJS= utils.o cutils.o allformats.o
# mux and demuxes
OBJS+=mpeg.o mpegts.o ffm.o crc.o img.o raw.o rm.o asf.o \
OBJS+=mpeg.o mpegts.o ffm.o crc.o img.o raw.o rm.o \
avienc.o avidec.o wav.o swf.o au.o gif.o mov.o jpeg.o dv.o \
yuv4mpeg.o
ifeq ($(CONFIG_RISKY),yes)
OBJS+= asf.o
endif
# image formats
OBJS+= pnm.o yuv.o
# file I/O
......
......@@ -35,7 +35,9 @@ void av_register_all(void)
img_init();
raw_init();
rm_init();
#ifdef CONFIG_RISKY
asf_init();
#endif
avienc_init();
avidec_init();
wav_init();
......
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