Commit c27fc14b authored by Yaowu Xu's avatar Yaowu Xu

Port folder renaming changes from AOM

Manually cherry-picked commits:
ceef0583 libvpx->libaom part2
3d26d916 libvpx -> libaom
cfea7dd7 vp10/ -> av1/
3a8eff73 Fix a build issue for a test
bf4202ed Rename vpx to aom

Change-Id: I1b0eb5a40796e3aaf41c58984b4229a439a597dc
parent b1fb998c

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -45,8 +45,8 @@
/ivfdec.dox
/ivfenc
/ivfenc.dox
/libvpx.so*
/libvpx.ver
/libaom.so*
/libaom.ver
/samples.dox
/test_intra_pred_speed
/test_libvpx
......
......@@ -33,13 +33,13 @@ COMPILING THE APPLICATIONS/LIBRARIES:
$ mkdir build
$ cd build
$ ../libvpx/configure <options>
$ ../libaom/configure <options>
$ make
3. Configuration options
The 'configure' script supports a number of options. The --help option can be
used to get a list of supported options:
$ ../libvpx/configure --help
$ ../libaom/configure --help
4. Cross development
For cross development, the most notable option is the --target option. The
......@@ -108,7 +108,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
toolchain, the following command could be used (note, POSIX SH syntax, adapt
to your shell as necessary):
$ CROSS=mipsel-linux-uclibc- ../libvpx/configure
$ CROSS=mipsel-linux-uclibc- ../libaom/configure
In addition, the executables to be invoked can be overridden by specifying the
environment variables: CC, AR, LD, AS, STRIP, NM. Additional flags can be
......@@ -125,7 +125,7 @@ VP8/VP9 TEST VECTORS:
LIBVPX_TEST_DATA_PATH environment variable can be used.
$ ./configure --enable-unit-tests
$ LIBVPX_TEST_DATA_PATH=../libvpx-test-data make testdata
$ LIBVPX_TEST_DATA_PATH=../-test-data make testdata
CODE STYLE:
The coding style used by this project is enforced with clang-format using the
......
This diff is collapsed.
/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/*!\file
* \brief Provides the high level interface to wrap decoder algorithms.
*
*/
#include <stdarg.h>
#include <stdlib.h>
#include "aom/vpx_integer.h"
#include "aom/internal/vpx_codec_internal.h"
#include "vpx_version.h"
#define SAVE_STATUS(ctx, var) (ctx ? (ctx->err = var) : var)
int vpx_codec_version(void) { return VERSION_PACKED; }
const char *vpx_codec_version_str(void) { return VERSION_STRING_NOSP; }
const char *vpx_codec_version_extra_str(void) { return VERSION_EXTRA; }
const char *vpx_codec_iface_name(vpx_codec_iface_t *iface) {
return iface ? iface->name : "<invalid interface>";
}
const char *vpx_codec_err_to_string(vpx_codec_err_t err) {
switch (err) {
case VPX_CODEC_OK: return "Success";
case VPX_CODEC_ERROR: return "Unspecified internal error";
case VPX_CODEC_MEM_ERROR: return "Memory allocation error";
case VPX_CODEC_ABI_MISMATCH: return "ABI version mismatch";
case VPX_CODEC_INCAPABLE:
return "Codec does not implement requested capability";
case VPX_CODEC_UNSUP_BITSTREAM:
return "Bitstream not supported by this decoder";
case VPX_CODEC_UNSUP_FEATURE:
return "Bitstream required feature not supported by this decoder";
case VPX_CODEC_CORRUPT_FRAME: return "Corrupt frame detected";
case VPX_CODEC_INVALID_PARAM: return "Invalid parameter";
case VPX_CODEC_LIST_END: return "End of iterated list";
}
return "Unrecognized error code";
}
const char *vpx_codec_error(vpx_codec_ctx_t *ctx) {
return (ctx) ? vpx_codec_err_to_string(ctx->err)
: vpx_codec_err_to_string(VPX_CODEC_INVALID_PARAM);
}
const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx) {
if (ctx && ctx->err)
return ctx->priv ? ctx->priv->err_detail : ctx->err_detail;
return NULL;
}
vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx) {
vpx_codec_err_t res;
if (!ctx)
res = VPX_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv)
res = VPX_CODEC_ERROR;
else {
ctx->iface->destroy((vpx_codec_alg_priv_t *)ctx->priv);
ctx->iface = NULL;
ctx->name = NULL;
ctx->priv = NULL;
res = VPX_CODEC_OK;
}
return SAVE_STATUS(ctx, res);
}
vpx_codec_caps_t vpx_codec_get_caps(vpx_codec_iface_t *iface) {
return (iface) ? iface->caps : 0;
}
vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...) {
vpx_codec_err_t res;
if (!ctx || !ctrl_id)
res = VPX_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv || !ctx->iface->ctrl_maps)
res = VPX_CODEC_ERROR;
else {
vpx_codec_ctrl_fn_map_t *entry;
res = VPX_CODEC_ERROR;
for (entry = ctx->iface->ctrl_maps; entry && entry->fn; entry++) {
if (!entry->ctrl_id || entry->ctrl_id == ctrl_id) {
va_list ap;
va_start(ap, ctrl_id);
res = entry->fn((vpx_codec_alg_priv_t *)ctx->priv, ap);
va_end(ap);
break;
}
}
}
return SAVE_STATUS(ctx, res);
}
void vpx_internal_error(struct vpx_internal_error_info *info,
vpx_codec_err_t error, const char *fmt, ...) {
va_list ap;
info->error_code = error;
info->has_detail = 0;
if (fmt) {
size_t sz = sizeof(info->detail);
info->has_detail = 1;
va_start(ap, fmt);
vsnprintf(info->detail, sz - 1, fmt, ap);
va_end(ap);
info->detail[sz - 1] = '\0';
}
if (info->setjmp) longjmp(info->jmp, info->error_code);
}
/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/*!\file
* \brief Provides the high level interface to wrap decoder algorithms.
*
*/
#include <string.h>
#include "aom/internal/vpx_codec_internal.h"
#define SAVE_STATUS(ctx, var) (ctx ? (ctx->err = var) : var)
static vpx_codec_alg_priv_t *get_alg_priv(vpx_codec_ctx_t *ctx) {
return (vpx_codec_alg_priv_t *)ctx->priv;
}
vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx,
vpx_codec_iface_t *iface,
const vpx_codec_dec_cfg_t *cfg,
vpx_codec_flags_t flags, int ver) {
vpx_codec_err_t res;
if (ver != VPX_DECODER_ABI_VERSION)
res = VPX_CODEC_ABI_MISMATCH;
else if (!ctx || !iface)
res = VPX_CODEC_INVALID_PARAM;
else if (iface->abi_version != VPX_CODEC_INTERNAL_ABI_VERSION)
res = VPX_CODEC_ABI_MISMATCH;
else if ((flags & VPX_CODEC_USE_POSTPROC) &&
!(iface->caps & VPX_CODEC_CAP_POSTPROC))
res = VPX_CODEC_INCAPABLE;
else if ((flags & VPX_CODEC_USE_ERROR_CONCEALMENT) &&
!(iface->caps & VPX_CODEC_CAP_ERROR_CONCEALMENT))
res = VPX_CODEC_INCAPABLE;
else if ((flags & VPX_CODEC_USE_INPUT_FRAGMENTS) &&
!(iface->caps & VPX_CODEC_CAP_INPUT_FRAGMENTS))
res = VPX_CODEC_INCAPABLE;
else if (!(iface->caps & VPX_CODEC_CAP_DECODER))
res = VPX_CODEC_INCAPABLE;
else {
memset(ctx, 0, sizeof(*ctx));
ctx->iface = iface;
ctx->name = iface->name;
ctx->priv = NULL;
ctx->init_flags = flags;
ctx->config.dec = cfg;
res = ctx->iface->init(ctx, NULL);
if (res) {
ctx->err_detail = ctx->priv ? ctx->priv->err_detail : NULL;
vpx_codec_destroy(ctx);
}
}
return SAVE_STATUS(ctx, res);
}
vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface,
const uint8_t *data,
unsigned int data_sz,
vpx_codec_stream_info_t *si) {
vpx_codec_err_t res;
if (!iface || !data || !data_sz || !si ||
si->sz < sizeof(vpx_codec_stream_info_t))
res = VPX_CODEC_INVALID_PARAM;
else {
/* Set default/unknown values */
si->w = 0;
si->h = 0;
res = iface->dec.peek_si(data, data_sz, si);
}
return res;
}
vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx,
vpx_codec_stream_info_t *si) {
vpx_codec_err_t res;
if (!ctx || !si || si->sz < sizeof(vpx_codec_stream_info_t))
res = VPX_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv)
res = VPX_CODEC_ERROR;
else {