Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
790c9ca7
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
790c9ca7
编写于
8月 08, 2006
作者:
L
Luca Abeni
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Enable swscale usage in ffmpeg
Originally committed as revision 5959 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
b9b18fbd
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
81 addition
and
1 deletion
+81
-1
Makefile
Makefile
+21
-0
configure
configure
+50
-0
libavcodec/Makefile
libavcodec/Makefile
+8
-1
libavcodec/imgconvert.c
libavcodec/imgconvert.c
+2
-0
未找到文件。
Makefile
浏览文件 @
790c9ca7
...
...
@@ -11,6 +11,10 @@ CFLAGS=$(OPTFLAGS) -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil \
-D_FILE_OFFSET_BITS
=
64
-D_LARGEFILE_SOURCE
-D_ISOC9X_SOURCE
LDFLAGS
+=
-g
ifeq
($(CONFIG_SWSCALER),yes)
CFLAGS
:=
-I
$(SRC_PATH)
/libswscale
$(CFLAGS)
endif
MANPAGES
=
doc/ffmpeg.1
PROGS_G
+=
ffmpeg_g
$(EXESUF)
PROGS
+=
ffmpeg
$(EXESUF)
...
...
@@ -58,6 +62,11 @@ SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
FFLIBDIRS
=
-L
./libavformat
-L
./libavcodec
-L
./libavutil
FFLIBS
=
-lavformat
$(BUILDSUF)
-lavcodec
$(BUILDSUF)
-lavutil
$(BUILDSUF)
ifeq
($(CONFIG_SWSCALER),yes)
FFLIBDIRS
+=
-L
./libswscale
FFLIBS
+=
-lswscale
$(BUILDSUF)
endif
all
:
version.h lib $(PROGS_G) $(PROGS) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC)
lib
:
...
...
@@ -67,6 +76,9 @@ lib:
ifeq
($(CONFIG_PP),yes)
$(MAKE)
-C
libpostproc all
endif
ifeq
($(CONFIG_SWSCALER),yes)
$(MAKE)
-C
libswscale all
endif
ffmpeg_g$(EXESUF)
:
ffmpeg.o cmdutils.o .libs
$(CC)
$(FFLIBDIRS)
$(LDFLAGS)
-o
$@
ffmpeg.o cmdutils.o
$(FFLIBS)
$(EXTRALIBS)
...
...
@@ -141,6 +153,10 @@ install-libs:
ifeq
($(CONFIG_PP),yes)
$(MAKE)
-C
libpostproc install-libs
endif
ifeq
($(CONFIG_SWSCALER),yes)
$(MAKE)
-C
libswscale install-libs
endif
ifeq
($(BUILD_SHARED),yes)
-$(LDCONFIG)
endif
...
...
@@ -152,6 +168,9 @@ install-headers:
ifeq
($(CONFIG_PP),yes)
$(MAKE)
-C
libpostproc install-headers
endif
ifeq
($(CONFIG_SWSCALER),yes)
$(MAKE)
-C
libswscale install-headers
endif
uninstall
:
uninstall-progs uninstall-libs uninstall-headers uninstall-man uninstall-vhook
...
...
@@ -202,6 +221,7 @@ clean:
$(MAKE)
-C
libavcodec clean
$(MAKE)
-C
libavformat clean
$(MAKE)
-C
libpostproc clean
$(MAKE)
-C
libswscale clean
$(MAKE)
-C
tests clean
$(MAKE)
-C
vhook clean
$(MAKE)
-C
doc clean
...
...
@@ -214,6 +234,7 @@ distclean: clean
$(MAKE)
-C
libavcodec distclean
$(MAKE)
-C
libavformat distclean
$(MAKE)
-C
libpostproc distclean
$(MAKE)
-C
libswscale distclean
$(MAKE)
-C
tests distclean
$(MAKE)
-C
vhook distclean
rm
-f
.depend version.h config.
*
*
.pc
...
...
configure
浏览文件 @
790c9ca7
...
...
@@ -57,6 +57,7 @@ show_help(){
echo
" --enable-pthreads use pthreads [default=no]"
echo
" --enable-dc1394 enable IIDC-1394 grabbing using libdc1394"
echo
" and libraw1394 [default=no]"
echo
" --enable-swscaler software scaler support [default=no]"
echo
" --enable-gpl allow use of GPL code, the resulting libav*"
echo
" and ffmpeg will be under GPL [default=no]"
echo
""
...
...
@@ -464,6 +465,7 @@ amr_nb_fixed="no"
amr_if2
=
"no"
sunmlib
=
"no"
pthreads
=
"no"
swscaler
=
"no"
gpl
=
"no"
memalignhack
=
"no"
...
...
@@ -802,6 +804,8 @@ for opt do
;;
--enable-pthreads
)
pthreads
=
"yes"
;;
--enable-swscaler
)
swscaler
=
"yes"
;;
--enable-gpl
)
gpl
=
"yes"
;;
--enable-memalign-hack
)
memalignhack
=
"yes"
...
...
@@ -963,6 +967,10 @@ EOF
fi
fi
if
test
"
$swscaler
"
!=
"no"
;
then
echo
"The software scaler is under GPL and --enable-gpl is not specified."
fail
=
"yes"
fi
if
test
"
$fail
"
=
"yes"
;
then
exit
1
...
...
@@ -1501,6 +1509,7 @@ echo "a52 support $a52"
echo
"a52 dlopened
$a52bin
"
echo
"DTS support
$dts
"
echo
"pp support
$pp
"
echo
"Software Scaler enabled
$swscaler
"
echo
"debug symbols
$debug
"
echo
"strip symbols
$dostrip
"
echo
"optimize
$optimize
"
...
...
@@ -1718,6 +1727,7 @@ if test "$vhook" = "yes" ; then
echo
"#define HAVE_VHOOK 1"
>>
$TMPH
fi
sws_version
=
`
grep
'#define LIBSWSCALE_VERSION '
"
$source_path
/libswscale/swscale.h"
|
sed
's/[^0-9\.]//g'
`
pp_version
=
`
grep
'#define LIBPOSTPROC_VERSION '
"
$source_path
/libpostproc/postprocess.h"
|
sed
's/[^0-9\.]//g'
`
lavc_version
=
`
grep
'#define LIBAVCODEC_VERSION '
"
$source_path
/libavcodec/avcodec.h"
|
sed
's/[^0-9\.]//g'
`
lavf_version
=
`
grep
'#define LIBAVFORMAT_VERSION '
"
$source_path
/libavformat/avformat.h"
|
sed
's/[^0-9\.]//g'
`
...
...
@@ -1737,6 +1747,8 @@ if test "$lshared" = "yes" ; then
echo
"LAVFVERSION=
$lavf_version
"
>>
config.mak
echo
"LAVUMAJOR=
${
lavu_version
%%.*
}
"
>>
config.mak
echo
"LAVUVERSION=
$lavu_version
"
>>
config.mak
echo
"SWSMAJOR=
${
sws_version
%%.*
}
"
>>
config.mak
echo
"SWSVERSION=
$sws_version
"
>>
config.mak
echo
"SLIBNAME=
${
SLIBNAME
}
"
>>
config.mak
echo
"SLIBNAME_WITH_VERSION=
${
SLIBNAME_WITH_VERSION
}
"
>>
config.mak
echo
"SLIBNAME_WITH_MAJOR=
${
SLIBNAME_WITH_MAJOR
}
"
>>
config.mak
...
...
@@ -1791,6 +1803,11 @@ if test "$pp" = "yes" ; then
echo
"CONFIG_PP=yes"
>>
config.mak
fi
if
test
"
$swscaler
"
=
"yes"
;
then
echo
"#define CONFIG_SWSCALER 1"
>>
$TMPH
echo
"CONFIG_SWSCALER=yes"
>>
config.mak
fi
# MPEG audio high precision mode
if
test
"
$mpegaudio_hp
"
=
"yes"
;
then
echo
"#define CONFIG_MPEGAUDIO_HP 1"
>>
$TMPH
...
...
@@ -2011,6 +2028,7 @@ if test "$source_path_used" = "yes" ; then
libavcodec/liba52
\
libpostproc
\
libavutil
\
libswscale
\
tests
\
vhook
\
"
...
...
@@ -2020,6 +2038,7 @@ if test "$source_path_used" = "yes" ; then
libavcodec/Makefile
\
libpostproc/Makefile
\
libavutil/Makefile
\
libswscale/Makefile
\
tests/Makefile
\
vhook/Makefile
\
doc/Makefile
\
...
...
@@ -2219,3 +2238,34 @@ Conflicts:
Libs:
\$
{libdir}/
${
LIBPREF
}
postproc
${
LIBSUF
}
Cflags: -I
\$
{includedir}
EOF
# libswscale.pc
cat
<<
EOF
>libswscale.pc
prefix=
$PREFIX
exec_prefix=
\$
{prefix}
libdir=
\$
{exec_prefix}/lib
includedir=
\$
{prefix}/include
Name: libswscale
Description: FFmpeg image rescaling library
Version:
$sws_version
Requires:
$pkg_requires
libavutil =
$lavu_version
Conflicts:
Libs: -L
\$
{libdir} -lswscale
Cflags: -I
\$
{includedir} -I
\$
{includedir}/swscale
EOF
cat
<<
EOF
>libswscale-uninstalled.pc
prefix=
exec_prefix=
libdir=
\$
{pcfiledir}/libswscale
includedir=
\$
{pcfiledir}/libswscale
Name: libswscale
Description: FFmpeg image rescaling library
Version:
$sws_version
Requires:
$pkg_requires
libavutil =
$lavu_version
Conflicts:
Libs:
\$
{libdir}/
${
LIBPREF
}
swscale
${
LIBSUF
}
Cflags: -I
\$
{includedir}
EOF
libavcodec/Makefile
浏览文件 @
790c9ca7
...
...
@@ -11,7 +11,7 @@ CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavutil \
OBJS
=
bitstream.o utils.o allcodecs.o
\
mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o
\
mjpeg.o resample.o resample2.o dsputil.o
\
motion_est.o imgconvert.o
imgresample.o
\
motion_est.o imgconvert.o
\
mpeg12.o mpegaudiodec.o simple_idct.o
\
ratecontrol.o eval.o error_resilience.o
\
fft.o mdct.o raw.o golomb.o cabac.o
\
...
...
@@ -22,6 +22,9 @@ OBJS= bitstream.o utils.o allcodecs.o \
HEADERS
=
avcodec.h
ifneq
($(CONFIG_SWSCALER),yes)
HEADERS
+=
swscale.h
endif
OBJS-$(CONFIG_AASC_DECODER)
+=
aasc.o
OBJS-$(CONFIG_AC3_ENCODER)
+=
ac3enc.o
...
...
@@ -277,6 +280,10 @@ OBJS-$(HAVE_BEOSTHREADS) += beosthread.o
OBJS-$(HAVE_XVMC_ACCEL)
+=
xvmcvideo.o
ifneq
($(CONFIG_SWSCALER),yes)
OBJS
+=
imgresample.o
endif
# i386 mmx specific stuff
ifeq
($(TARGET_MMX),yes)
OBJS
+=
i386/fdct_mmx.o i386/cputest.o
\
...
...
libavcodec/imgconvert.c
浏览文件 @
790c9ca7
...
...
@@ -2048,6 +2048,7 @@ int img_pad(AVPicture *dst, const AVPicture *src, int height, int width, int pix
return
0
;
}
#ifndef CONFIG_SWSCALER
/* XXX: always use linesize. Return -1 if not supported */
int
img_convert
(
AVPicture
*
dst
,
int
dst_pix_fmt
,
const
AVPicture
*
src
,
int
src_pix_fmt
,
...
...
@@ -2289,6 +2290,7 @@ int img_convert(AVPicture *dst, int dst_pix_fmt,
avpicture_free
(
tmp
);
return
ret
;
}
#endif
/* NOTE: we scan all the pixels to have an exact information */
static
int
get_alpha_info_pal8
(
const
AVPicture
*
src
,
int
width
,
int
height
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录