Skip to content

Commit

Permalink
build: postproc cleanup.
Browse files Browse the repository at this point in the history
This reverts 79f80f5, moves postproc along with the other libraries,
and fix the postproc dependency to libavutil.
  • Loading branch information
ubitux committed Dec 30, 2012
1 parent c77eb4e commit 518239c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 52 deletions.
48 changes: 2 additions & 46 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,6 @@ Optimization options (experts only):
--disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations
--disable-mipsfpu disable floating point MIPS optimizations
--disable-fast-unaligned consider unaligned accesses slow
--postproc-version=V build libpostproc version V.
Where V can be '$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO' or 'current'. [$postproc_version_default]
Developer options (useful when working on FFmpeg itself):
--enable-coverage build with test coverage instrumentation
Expand Down Expand Up @@ -1118,6 +1116,7 @@ LIBRARY_LIST="
avformat
avresample
avutil
postproc
swresample
swscale
"
Expand Down Expand Up @@ -1199,7 +1198,6 @@ CONFIG_LIST="
openal
openssl
pic
postproc
rdft
runtime_cpudetect
safe_bitstream_reader
Expand Down Expand Up @@ -1542,7 +1540,6 @@ CMDLINE_SET="
nm
optflags
pkg_config
postproc_version
progs_suffix
random_seed
samples
Expand Down Expand Up @@ -2015,7 +2012,7 @@ avdevice_deps="avutil avcodec avformat"
avfilter_deps="avutil"
avformat_deps="avutil avcodec"
avresample_deps="avutil"
postproc_deps="gpl"
postproc_deps="avutil gpl"
swscale_deps="avutil"

# programs
Expand Down Expand Up @@ -2047,7 +2044,6 @@ incdir_default='${prefix}/include'
libdir_default='${prefix}/lib'
mandir_default='${prefix}/share/man'
shlibdir_default="$libdir_default"
postproc_version_default="current"

# toolchain
ar_default="ar"
Expand All @@ -2074,17 +2070,10 @@ cpu="generic"
target_os_default=$(tolower $(uname -s))
host_os=$target_os_default

# alternative libpostproc version
ALT_PP_VER_MAJOR=51
ALT_PP_VER_MINOR=2
ALT_PP_VER_MICRO=101
ALT_PP_VER=$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO

# configurable options
enable $PROGRAM_LIST
enable $DOCUMENT_LIST
enable $(filter_out avresample $LIBRARY_LIST)
enable postproc
enable stripping

enable asm
Expand Down Expand Up @@ -2325,18 +2314,6 @@ if enabled cross_compile; then
die "Must specify target arch and OS when cross-compiling"
fi

set_default postproc_version

# Check if we should build alternative libpostproc version instead of current
if test "$postproc_version" = $ALT_PP_VER; then
LIBPOSTPROC_VERSION=$ALT_PP_VER
LIBPOSTPROC_VERSION_MAJOR=$ALT_PP_VER_MAJOR
LIBPOSTPROC_VERSION_MINOR=$ALT_PP_VER_MINOR
LIBPOSTPROC_VERSION_MICRO=$ALT_PP_VER_MICRO
elif test "$postproc_version" != current; then
die "Invalid argument to --postproc-version. See --help output."
fi

ar_default="${cross_prefix}${ar_default}"
cc_default="${cross_prefix}${cc_default}"
cxx_default="${cross_prefix}${cxx_default}"
Expand Down Expand Up @@ -4452,21 +4429,6 @@ get_version(){
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
}

get_version_old(){
name=$1
file=$source_path/$2
# This condition will be removed when we stop supporting old libpostproc versions
if ! test "$name" = LIBPOSTPROC || test "$postproc_version" = current; then
eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
fi
lcname=$(tolower $name)
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
}

get_version_old LIBPOSTPROC libpostproc/version.h

map 'get_version $v' $LIBRARY_LIST

cat > $TMPH <<EOF
Expand Down Expand Up @@ -4517,12 +4479,6 @@ cat > $TMPH <<EOF
#define AVUTIL_AVCONFIG_H
EOF

test "$postproc_version" != current && cat >> $TMPH <<EOF
#define LIBPOSTPROC_VERSION_MAJOR $LIBPOSTPROC_VERSION_MAJOR
#define LIBPOSTPROC_VERSION_MINOR $LIBPOSTPROC_VERSION_MINOR
#define LIBPOSTPROC_VERSION_MICRO $LIBPOSTPROC_VERSION_MICRO
EOF

print_config AV_HAVE_ $TMPH $HAVE_LIST_PUB

echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
Expand Down
4 changes: 0 additions & 4 deletions libpostproc/postprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,7 @@ static inline void postProcess(const uint8_t src[], int srcStride, uint8_t dst[]

/* -pp Command line Help
*/
#if LIBPOSTPROC_VERSION_INT < (52<<16)
const char *const pp_help=
#else
const char pp_help[] =
#endif
"Available postprocessing filters:\n"
"Filters Options\n"
"short long name short long option Description\n"
Expand Down
2 changes: 0 additions & 2 deletions libpostproc/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@

#include "libavutil/avutil.h"

#ifndef LIBPOSTPROC_VERSION_MAJOR
#define LIBPOSTPROC_VERSION_MAJOR 52
#define LIBPOSTPROC_VERSION_MINOR 2
#define LIBPOSTPROC_VERSION_MICRO 100
#endif

#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
LIBPOSTPROC_VERSION_MINOR, \
Expand Down

0 comments on commit 518239c

Please sign in to comment.