my @incoming_array;
+my @imported_functions;
+
# Perl trim function to remove whitespace from the start and end of the string
sub trim($)
{
# Make function visible to linker, and make additional symbol with
# prepended underscore
s/EXPORT\s+\|([\$\w]*)\|/.globl _$1\n\t.globl $1/;
- s/IMPORT\s+\|([\$\w]*)\|/.globl $1/;
+
+ # Prepend imported functions with _
+ if (s/IMPORT\s+\|([\$\w]*)\|/.globl $1/)
+ {
+ $function = trim($1);
+ push(@imported_functions, $function);
+ }
+
+ foreach $function (@imported_functions)
+ {
+ s/$function/_$function/;
+ }
# No vertical bars required; make additional symbol with prepended
# underscore
tgt_isa=x86_64
tgt_os=darwin10
;;
+ *darwin11*)
+ tgt_isa=x86_64
+ tgt_os=darwin11
+ ;;
*mingw32*|*cygwin*)
[ -z "$tgt_isa" ] && tgt_isa=x86
tgt_os=win32
if [ -d "/Developer/SDKs/MacOSX10.6.sdk" ]; then
osx_sdk_dir="/Developer/SDKs/MacOSX10.6.sdk"
fi
+ if [ -d "/Developer/SDKs/MacOSX10.7.sdk" ]; then
+ osx_sdk_dir="/Developer/SDKs/MacOSX10.7.sdk"
+ fi
case ${toolchain} in
*-darwin8-*)
add_ldflags "-isysroot ${osx_sdk_dir}"
add_ldflags "-mmacosx-version-min=10.6"
;;
+ *-darwin11-*)
+ add_cflags "-isysroot ${osx_sdk_dir}"
+ add_cflags "-mmacosx-version-min=10.7"
+ add_ldflags "-isysroot ${osx_sdk_dir}"
+ add_ldflags "-mmacosx-version-min=10.7"
+ ;;
esac
# Handle Solaris variants. Solaris 10 needs -lposix4
TOOLCHAIN_PATH=${SDK_PATH}/usr/bin
CC=${TOOLCHAIN_PATH}/gcc
AR=${TOOLCHAIN_PATH}/ar
- LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-gcc-4.2.1
+ LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-llvm-gcc-4.2
AS=${TOOLCHAIN_PATH}/as
STRIP=${TOOLCHAIN_PATH}/strip
NM=${TOOLCHAIN_PATH}/nm
add_cflags -arch ${tgt_isa}
add_ldflags -arch_only ${tgt_isa}
- add_cflags "-isysroot ${SDK_PATH}/SDKs/iPhoneOS4.3.sdk"
+ add_cflags "-isysroot ${SDK_PATH}/SDKs/iPhoneOS5.0.sdk"
# This should be overridable
- alt_libc=${SDK_PATH}/SDKs/iPhoneOS4.3.sdk
+ alt_libc=${SDK_PATH}/SDKs/iPhoneOS5.0.sdk
# Add the paths for the alternate libc
- for d in usr/include usr/include/gcc/darwin/4.2/ usr/lib/gcc/arm-apple-darwin10/4.2.1/include/; do
+ for d in usr/include; do
try_dir="${alt_libc}/${d}"
[ -d "${try_dir}" ] && add_cflags -I"${try_dir}"
done
all_platforms="${all_platforms} x86-win32-vs9"
all_platforms="${all_platforms} x86_64-darwin9-gcc"
all_platforms="${all_platforms} x86_64-darwin10-gcc"
+all_platforms="${all_platforms} x86_64-darwin11-gcc"
all_platforms="${all_platforms} x86_64-linux-gcc"
all_platforms="${all_platforms} x86_64-linux-icc"
all_platforms="${all_platforms} x86_64-solaris-gcc"
if (cpi->active_worst_quality <= cpi->active_best_quality)
cpi->active_worst_quality = cpi->active_best_quality + 1;
+ if(cpi->active_worst_quality > 127)
+ cpi->active_worst_quality = 127;
}
// Unbuffered mode (eg. video conferencing)
else
static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
const vpx_codec_enc_cfg_t *cfg,
- const struct vp8_extracfg *vp8_cfg)
+ const struct vp8_extracfg *vp8_cfg,
+ int finalize)
{
RANGE_CHECK(cfg, g_w, 1, 16383); /* 14 bits available */
RANGE_CHECK(cfg, g_h, 1, 16383); /* 14 bits available */
RANGE_CHECK_HI(vp8_cfg, arnr_strength, 6);
RANGE_CHECK(vp8_cfg, arnr_type, 1, 3);
RANGE_CHECK(vp8_cfg, cq_level, 0, 63);
+ if(finalize && cfg->rc_end_usage == VPX_CQ)
+ RANGE_CHECK(vp8_cfg, cq_level,
+ cfg->rc_min_quantizer, cfg->rc_max_quantizer);
#if !(CONFIG_REALTIME_ONLY)
if (cfg->g_pass == VPX_RC_LAST_PASS)
if ((cfg->g_lag_in_frames > ctx->cfg.g_lag_in_frames))
ERROR("Cannot increase lag_in_frames");
- res = validate_config(ctx, cfg, &ctx->vp8_cfg);
+ res = validate_config(ctx, cfg, &ctx->vp8_cfg, 0);
if (!res)
{
}
- res = validate_config(ctx, &ctx->cfg, &xcfg);
+ res = validate_config(ctx, &ctx->cfg, &xcfg, 0);
if (!res)
{
vp8_initialize();
- res = validate_config(priv, &priv->cfg, &priv->vp8_cfg);
+ res = validate_config(priv, &priv->cfg, &priv->vp8_cfg, 0);
if (!res)
{
if (img)
res = validate_img(ctx, img);
+ if (!res)
+ res = validate_config(ctx, &ctx->cfg, &ctx->vp8_cfg, 1);
+
pick_quickcompress_mode(ctx, duration, deadline);
vpx_codec_pkt_list_init(&ctx->pkt_list);