diff --git a/.gitignore b/.gitignore index b4cec23a7375209ff9aa63e0cffa264ffab0a94f..4358b9c40a5d0f10d12758a4627bf9f6cbb32ac3 100644 --- a/.gitignore +++ b/.gitignore @@ -39,8 +39,8 @@ /examples/vp8cx_set_ref /examples/vp9_lossless_encoder /examples/vp9_spatial_scalable_encoder -/examples/vpx_temporal_scalable_patterns -/examples/vpx_temporal_svc_encoder +/examples/aom_temporal_scalable_patterns +/examples/aom_temporal_svc_encoder /ivfdec /ivfdec.dox /ivfenc @@ -52,14 +52,14 @@ /test_libaom /vp8_api1_migration.dox /vp[89x]_rtcd.h -/vpx.pc -/vpx_config.c -/vpx_config.h -/vpx_dsp_rtcd.h -/vpx_scale_rtcd.h -/vpx_version.h -/vpxdec -/vpxdec.dox -/vpxenc -/vpxenc.dox +/aom.pc +/aom_config.c +/aom_config.h +/aom_dsp_rtcd.h +/aom_scale_rtcd.h +/aom_version.h +/aomdec +/aomdec.dox +/aomenc +/aomenc.dox TAGS diff --git a/CHANGELOG b/CHANGELOG index 7746cc6c4f9c22b0053a79cbb3124da21914f759..4f233d5930321e051d287df59aec99d954722ed9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,7 +6,7 @@ This release is ABI incompatible with 1.4.0. It drops deprecated VP8 controls and adds a variety of VP9 controls for testing. - The vpxenc utility now prefers VP9 by default. + The aomenc utility now prefers VP9 by default. - Enhancements: Faster VP9 encoding and decoding @@ -45,7 +45,7 @@ The VP9 encoder in this release is not feature complete. Users interested in the encoder are advised to use the git master branch and discuss issues on - libvpx mailing lists. + libaom mailing lists. - Upgrading: This release is ABI and API compatible with Duclair (v1.0.0). Users @@ -56,7 +56,7 @@ Get rid of bashisms in the main build scripts Added usage info on command line options Add lossless compression mode - Dll build of libvpx + Dll build of libaom Add additional Mac OS X targets: 10.7, 10.8 and 10.9 (darwin11-13) Add option to disable documentation configure: add --enable-external-build support @@ -64,11 +64,11 @@ configure: support mingw-w64 configure: support hardfloat armv7 CHOSTS configure: add support for android x86 - Add estimated completion time to vpxenc - Don't exit on decode errors in vpxenc - vpxenc: support scaling prior to encoding - vpxdec: support scaling output - vpxenc: improve progress indicators with --skip + Add estimated completion time to aomenc + Don't exit on decode errors in aomenc + aomenc: support scaling prior to encoding + aomdec: support scaling output + aomenc: improve progress indicators with --skip msvs: Don't link to winmm.lib Add a new script for producing vcxproj files Produce Visual Studio 10 and 11 project files @@ -100,7 +100,7 @@ - Enhancements: VP8 optimizations for MIPS dspr2 - vpxenc: add -quiet option + aomenc: add -quiet option - Speed: Encoder and decoder speed is consistent with the Eider release. @@ -138,10 +138,10 @@ is more computationally intensive than the spatial one. This release removes support for a legacy, decode only API that was - supported, but deprecated, at the initial release of libvpx + supported, but deprecated, at the initial release of libaom (v0.9.0). This is not expected to have any impact. If you are impacted, you can apply a reversion to commit 2bf8fb58 locally. - Please update to the latest libvpx API if you are affected. + Please update to the latest libaom API if you are affected. - Enhancements: Adds a motion compensated temporal denoiser to the encoder, which @@ -155,17 +155,17 @@ OS/2 support SunCC support - Changing resolution with vpx_codec_enc_config_set() is now + Changing resolution with aom_codec_enc_config_set() is now supported. Previously, reinitializing the codec was required to change the input resolution. - The vpxenc application has initial support for producing multiple + The aomenc application has initial support for producing multiple encodes from the same input in one call. Resizing is not yet supported, but varying other codec parameters is. Use -- to delineate output streams. Options persist from one stream to the next. - Also, the vpxenc application will now use a keyframe interval of + Also, the aomenc application will now use a keyframe interval of 5 seconds by default. Use the --kf-max-dist option to override. - Speed: @@ -202,7 +202,7 @@ enhancement (MFQE) in sections of the frame where there is motion. (#392) - Fixed corruption issues when vpx_codec_enc_config_set() was called + Fixed corruption issues when aom_codec_enc_config_set() was called with spatial resampling enabled. Fixed a decoder error introduced in Duclair where the segmentation @@ -215,9 +215,9 @@ v0.9.7, so all users of that release are encouraged to upgrade. - Upgrading: - This release is ABI incompatible with prior releases of libvpx, so the + This release is ABI incompatible with prior releases of libaom, so the "major" version number has been bumped to 1. You must recompile your - applications against the latest version of the libvpx headers. The + applications against the latest version of the libaom headers. The API remains compatible, and this should not require code changes in most applications. @@ -268,7 +268,7 @@ Cayuga) given a frame with corrupt partition sizes. A bounded out of bounds read was discovered affecting all - versions of libvpx. Given an multipartition input frame that + versions of libaom. Given an multipartition input frame that is truncated between the mode/mv partition and the first residiual paritition (in the block of partition offsets), up to 3 extra bytes could have been read from the source buffer. @@ -296,16 +296,16 @@ notes in this document for that release. - Enhancements: - Stereo 3D format support for vpxenc + Stereo 3D format support for aomenc Runtime detection of available processor cores. Allow specifying --end-usage by enum name - vpxdec: test for frame corruption - vpxenc: add quantizer histogram display - vpxenc: add rate histogram display + aomdec: test for frame corruption + aomenc: add quantizer histogram display + aomenc: add rate histogram display Set VPX_FRAME_IS_DROPPABLE update configure for ios sdk 4.3 Avoid text relocations in ARM vp8 decoder - Generate a vpx.pc file for pkg-config. + Generate a aom.pc file for pkg-config. New ways of passing encoded data between encoder and decoder. - Speed: @@ -366,7 +366,7 @@ Fix semaphore emulation, spin-wait intrinsics on Windows Fix build with xcode4 and simplify GLOBAL. Mark ARM asm objects as allowing a non-executable stack. - Fix vpxenc encoding incorrect webm file header on big endian + Fix aomenc encoding incorrect webm file header on big endian 2011-03-07 v0.9.6 "Bali" @@ -378,7 +378,7 @@ document for that release. - Enhancements: - vpxenc --psnr shows a summary when encode completes + aomenc --psnr shows a summary when encode completes --tune=ssim option to enable activity masking improved postproc visualizations for development updated support for Apple iOS to SDK 4.2 @@ -451,9 +451,9 @@ - Upgrading: This release incorporates backwards-incompatible changes to the - ivfenc and ivfdec tools. These tools are now called vpxenc and vpxdec. + ivfenc and ivfdec tools. These tools are now called aomenc and aomdec. - vpxdec + aomdec * the -q (quiet) option has been removed, and replaced with -v (verbose). the output is quiet by default. Use -v to see the version number of the binary. @@ -466,13 +466,13 @@ options must be specified. $ ivfdec -o OUTPUT INPUT - $ vpxdec --i420 -o OUTPUT INPUT + $ aomdec --i420 -o OUTPUT INPUT * If an output file is not specified, the default is to write Y4M to stdout. This makes piping more natural. $ ivfdec -y -o - INPUT | ... - $ vpxdec INPUT | ... + $ aomdec INPUT | ... * The output file has additional flexibility for formatting the filename. It supports escape characters for constructing a @@ -480,33 +480,33 @@ replaces the -p option. To get the equivalent: $ ivfdec -p frame INPUT - $ vpxdec --i420 -o frame-%wx%h-%4.i420 INPUT + $ aomdec --i420 -o frame-%wx%h-%4.i420 INPUT - vpxenc + aomenc * The output file must be specified with -o, rather than as the last argument. $ ivfenc <options> INPUT OUTPUT - $ vpxenc <options> -o OUTPUT INPUT + $ aomenc <options> -o OUTPUT INPUT * The output defaults to webm. To get IVF output, use the --ivf option. $ ivfenc <options> INPUT OUTPUT.ivf - $ vpxenc <options> -o OUTPUT.ivf --ivf INPUT + $ aomenc <options> -o OUTPUT.ivf --ivf INPUT - Enhancements: - ivfenc and ivfdec have been renamed to vpxenc, vpxdec. - vpxdec supports .webm input - vpxdec writes .y4m by default - vpxenc writes .webm output by default - vpxenc --psnr now shows the average/overall PSNR at the end + ivfenc and ivfdec have been renamed to aomenc, aomdec. + aomdec supports .webm input + aomdec writes .y4m by default + aomenc writes .webm output by default + aomenc --psnr now shows the average/overall PSNR at the end ARM platforms now support runtime cpu detection - vpxdec visualizations added for motion vectors, block modes, references - vpxdec now silent by default - vpxdec --progress shows frame-by-frame timing information - vpxenc supports the distinction between --fps and --timebase + aomdec visualizations added for motion vectors, block modes, references + aomdec now silent by default + aomdec --progress shows frame-by-frame timing information + aomenc supports the distinction between --fps and --timebase NASM is now a supported assembler configure: enable PIC for shared libs by default configure: add --enable-small @@ -521,7 +521,7 @@ Build fixes for darwin-icc - Speed: - 20-40% (average 28%) improvement in libvpx decoder speed, + 20-40% (average 28%) improvement in libaom decoder speed, including: Rewrite vp8_short_walsh4x4_sse2() Optimizations on the loopfilters. diff --git a/aom/vpx_codec.h b/aom/aom_codec.h similarity index 78% rename from aom/vpx_codec.h rename to aom/aom_codec.h index 8ae27afb7d9873699031c5183b73383c0683bc37..385c59012532725e82c8741d497582b6805d9963 100644 --- a/aom/vpx_codec.h +++ b/aom/aom_codec.h @@ -23,18 +23,18 @@ * video codec algorithm. * * An application instantiates a specific codec instance by using - * vpx_codec_init() and a pointer to the algorithm's interface structure: + * aom_codec_init() and a pointer to the algorithm's interface structure: * <pre> * my_app.c: - * extern vpx_codec_iface_t my_codec; + * extern aom_codec_iface_t my_codec; * { - * vpx_codec_ctx_t algo; - * res = vpx_codec_init(&algo, &my_codec); + * aom_codec_ctx_t algo; + * res = aom_codec_init(&algo, &my_codec); * } * </pre> * * Once initialized, the instance is manged using other functions from - * the vpx_codec_* family. + * the aom_codec_* family. */ #ifndef VPX_VPX_CODEC_H_ #define VPX_VPX_CODEC_H_ @@ -43,8 +43,8 @@ extern "C" { #endif -#include "./vpx_integer.h" -#include "./vpx_image.h" +#include "./aom_integer.h" +#include "./aom_image.h" /*!\brief Decorator indicating a function is deprecated */ #ifndef DEPRECATED @@ -139,17 +139,17 @@ typedef enum { */ VPX_CODEC_LIST_END -} vpx_codec_err_t; +} aom_codec_err_t; /*! \brief Codec capabilities bitfield * * Each codec advertises the capabilities it supports as part of its - * ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces + * ::aom_codec_iface_t interface structure. Capabilities are extra interfaces * or functionality, and are not required to be supported. * * The available flags are specified by VPX_CODEC_CAP_* defines. */ -typedef long vpx_codec_caps_t; +typedef long aom_codec_caps_t; #define VPX_CODEC_CAP_DECODER 0x1 /**< Is a decoder */ #define VPX_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */ @@ -160,27 +160,27 @@ typedef long vpx_codec_caps_t; * * The available flags are specified by VPX_CODEC_USE_* defines. */ -typedef long vpx_codec_flags_t; +typedef long aom_codec_flags_t; /*!\brief Codec interface structure. * * Contains function pointers and other data private to the codec * implementation. This structure is opaque to the application. */ -typedef const struct vpx_codec_iface vpx_codec_iface_t; +typedef const struct aom_codec_iface aom_codec_iface_t; /*!\brief Codec private data structure. * * Contains data private to the codec implementation. This structure is opaque * to the application. */ -typedef struct vpx_codec_priv vpx_codec_priv_t; +typedef struct aom_codec_priv aom_codec_priv_t; /*!\brief Iterator * * Opaque storage used for iterating over lists. */ -typedef const void *vpx_codec_iter_t; +typedef const void *aom_codec_iter_t; /*!\brief Codec context structure * @@ -190,39 +190,39 @@ typedef const void *vpx_codec_iter_t; * may reference the 'name' member to get a printable description of the * algorithm. */ -typedef struct vpx_codec_ctx { +typedef struct aom_codec_ctx { const char *name; /**< Printable interface name */ - vpx_codec_iface_t *iface; /**< Interface pointers */ - vpx_codec_err_t err; /**< Last returned error */ + aom_codec_iface_t *iface; /**< Interface pointers */ + aom_codec_err_t err; /**< Last returned error */ const char *err_detail; /**< Detailed info, if available */ - vpx_codec_flags_t init_flags; /**< Flags passed at init time */ + aom_codec_flags_t init_flags; /**< Flags passed at init time */ union { /**< Decoder Configuration Pointer */ - const struct vpx_codec_dec_cfg *dec; + const struct aom_codec_dec_cfg *dec; /**< Encoder Configuration Pointer */ - const struct vpx_codec_enc_cfg *enc; + const struct aom_codec_enc_cfg *enc; const void *raw; } config; /**< Configuration pointer aliasing union */ - vpx_codec_priv_t *priv; /**< Algorithm private storage */ -} vpx_codec_ctx_t; + aom_codec_priv_t *priv; /**< Algorithm private storage */ +} aom_codec_ctx_t; /*!\brief Bit depth for codec * * * This enumeration determines the bit depth of the codec. */ -typedef enum vpx_bit_depth { +typedef enum aom_bit_depth { VPX_BITS_8 = 8, /**< 8 bits */ VPX_BITS_10 = 10, /**< 10 bits */ VPX_BITS_12 = 12, /**< 12 bits */ -} vpx_bit_depth_t; +} aom_bit_depth_t; /* * Library Version Number Interface * * For example, see the following sample return values: - * vpx_codec_version() (1<<16 | 2<<8 | 3) - * vpx_codec_version_str() "v1.2.3-rc1-16-gec6a1ba" - * vpx_codec_version_extra_str() "rc1-16-gec6a1ba" + * aom_codec_version() (1<<16 | 2<<8 | 3) + * aom_codec_version_str() "v1.2.3-rc1-16-gec6a1ba" + * aom_codec_version_extra_str() "rc1-16-gec6a1ba" */ /*!\brief Return the version information (as an integer) @@ -235,7 +235,7 @@ typedef enum vpx_bit_depth { * in the future. * */ -int vpx_codec_version(void); +int aom_codec_version(void); #define VPX_VERSION_MAJOR(v) \ ((v >> 16) & 0xff) /**< extract major from packed version */ #define VPX_VERSION_MINOR(v) \ @@ -244,13 +244,13 @@ int vpx_codec_version(void); ((v >> 0) & 0xff) /**< extract patch from packed version */ /*!\brief Return the version major number */ -#define vpx_codec_version_major() ((vpx_codec_version() >> 16) & 0xff) +#define aom_codec_version_major() ((aom_codec_version() >> 16) & 0xff) /*!\brief Return the version minor number */ -#define vpx_codec_version_minor() ((vpx_codec_version() >> 8) & 0xff) +#define aom_codec_version_minor() ((aom_codec_version() >> 8) & 0xff) /*!\brief Return the version patch number */ -#define vpx_codec_version_patch() ((vpx_codec_version() >> 0) & 0xff) +#define aom_codec_version_patch() ((aom_codec_version() >> 0) & 0xff) /*!\brief Return the version information (as a string) * @@ -261,24 +261,24 @@ int vpx_codec_version(void); * release candidates, prerelease versions, etc. * */ -const char *vpx_codec_version_str(void); +const char *aom_codec_version_str(void); /*!\brief Return the version information (as a string) * * Returns a printable "extra string". This is the component of the string * returned - * by vpx_codec_version_str() following the three digit version number. + * by aom_codec_version_str() following the three digit version number. * */ -const char *vpx_codec_version_extra_str(void); +const char *aom_codec_version_extra_str(void); /*!\brief Return the build configuration * * Returns a printable string containing an encoded version of the build - * configuration. This may be useful to vpx support. + * configuration. This may be useful to aom support. * */ -const char *vpx_codec_build_config(void); +const char *aom_codec_build_config(void); /*!\brief Return the name for a given interface * @@ -287,7 +287,7 @@ const char *vpx_codec_build_config(void); * \param[in] iface Interface pointer * */ -const char *vpx_codec_iface_name(vpx_codec_iface_t *iface); +const char *aom_codec_iface_name(aom_codec_iface_t *iface); /*!\brief Convert error number to printable string * @@ -299,7 +299,7 @@ const char *vpx_codec_iface_name(vpx_codec_iface_t *iface); * \param[in] err Error number. * */ -const char *vpx_codec_err_to_string(vpx_codec_err_t err); +const char *aom_codec_err_to_string(aom_codec_err_t err); /*!\brief Retrieve error synopsis for codec context * @@ -311,7 +311,7 @@ const char *vpx_codec_err_to_string(vpx_codec_err_t err); * \param[in] ctx Pointer to this instance's context. * */ -const char *vpx_codec_error(vpx_codec_ctx_t *ctx); +const char *aom_codec_error(aom_codec_ctx_t *ctx); /*!\brief Retrieve detailed error information for codec context * @@ -323,7 +323,7 @@ const char *vpx_codec_error(vpx_codec_ctx_t *ctx); * \retval NULL * No detailed information is available. */ -const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx); +const char *aom_codec_error_detail(aom_codec_ctx_t *ctx); /* REQUIRED FUNCTIONS * @@ -342,7 +342,7 @@ const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx); * \retval #VPX_CODEC_MEM_ERROR * Memory allocation failed. */ -vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx); +aom_codec_err_t aom_codec_destroy(aom_codec_ctx_t *ctx); /*!\brief Get the capabilities of an algorithm. * @@ -351,7 +351,7 @@ vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx); * \param[in] iface Pointer to the algorithm interface * */ -vpx_codec_caps_t vpx_codec_get_caps(vpx_codec_iface_t *iface); +aom_codec_caps_t aom_codec_get_caps(aom_codec_iface_t *iface); /*!\brief Control algorithm * @@ -365,7 +365,7 @@ vpx_codec_caps_t vpx_codec_get_caps(vpx_codec_iface_t *iface); * be dispatched. * * Note that this function should not be used directly. Call the - * #vpx_codec_control wrapper macro instead. + * #aom_codec_control wrapper macro instead. * * \param[in] ctx Pointer to this instance's context * \param[in] ctrl_id Algorithm specific control identifier @@ -377,30 +377,30 @@ vpx_codec_caps_t vpx_codec_get_caps(vpx_codec_iface_t *iface); * \retval #VPX_CODEC_INVALID_PARAM * The data was not valid. */ -vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...); +aom_codec_err_t aom_codec_control_(aom_codec_ctx_t *ctx, int ctrl_id, ...); #if defined(VPX_DISABLE_CTRL_TYPECHECKS) && VPX_DISABLE_CTRL_TYPECHECKS -#define vpx_codec_control(ctx, id, data) vpx_codec_control_(ctx, id, data) +#define aom_codec_control(ctx, id, data) aom_codec_control_(ctx, id, data) #define VPX_CTRL_USE_TYPE(id, typ) #define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) #define VPX_CTRL_VOID(id, typ) #else -/*!\brief vpx_codec_control wrapper macro +/*!\brief aom_codec_control wrapper macro * * This macro allows for type safe conversions across the variadic parameter - * to vpx_codec_control_(). + * to aom_codec_control_(). * * \internal * It works by dispatching the call to the control function through a wrapper * function named with the id parameter. */ -#define vpx_codec_control(ctx, id, data) \ - vpx_codec_control_##id(ctx, id, data) /**<\hideinitializer*/ +#define aom_codec_control(ctx, id, data) \ + aom_codec_control_##id(ctx, id, data) /**<\hideinitializer*/ -/*!\brief vpx_codec_control type definition macro +/*!\brief aom_codec_control type definition macro * * This macro allows for type safe conversions across the variadic parameter - * to vpx_codec_control_(). It defines the type of the argument for a given + * to aom_codec_control_(). It defines the type of the argument for a given * control identifier. * * \internal @@ -409,15 +409,15 @@ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...); * function. */ #define VPX_CTRL_USE_TYPE(id, typ) \ - static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *, int, typ) \ + static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *, int, typ) \ UNUSED; \ \ - static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *ctx, \ + static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *ctx, \ int ctrl_id, typ data) { \ - return vpx_codec_control_(ctx, ctrl_id, data); \ + return aom_codec_control_(ctx, ctrl_id, data); \ } /**<\hideinitializer*/ -/*!\brief vpx_codec_control deprecated type definition macro +/*!\brief aom_codec_control deprecated type definition macro * * Like #VPX_CTRL_USE_TYPE, but indicates that the specified control is * deprecated and should not be used. Consult the documentation for your @@ -428,18 +428,18 @@ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...); * wrapper to the type-unsafe internal function. */ #define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \ - DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \ - vpx_codec_ctx_t *, int, typ) DEPRECATED UNUSED; \ + DECLSPEC_DEPRECATED static aom_codec_err_t aom_codec_control_##id( \ + aom_codec_ctx_t *, int, typ) DEPRECATED UNUSED; \ \ - DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \ - vpx_codec_ctx_t *ctx, int ctrl_id, typ data) { \ - return vpx_codec_control_(ctx, ctrl_id, data); \ + DECLSPEC_DEPRECATED static aom_codec_err_t aom_codec_control_##id( \ + aom_codec_ctx_t *ctx, int ctrl_id, typ data) { \ + return aom_codec_control_(ctx, ctrl_id, data); \ } /**<\hideinitializer*/ -/*!\brief vpx_codec_control void type definition macro +/*!\brief aom_codec_control void type definition macro * * This macro allows for type safe conversions across the variadic parameter - * to vpx_codec_control_(). It indicates that a given control identifier takes + * to aom_codec_control_(). It indicates that a given control identifier takes * no argument. * * \internal @@ -447,12 +447,12 @@ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...); * type-unsafe internal function. */ #define VPX_CTRL_VOID(id) \ - static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *, int) \ + static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *, int) \ UNUSED; \ \ - static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *ctx, \ + static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *ctx, \ int ctrl_id) { \ - return vpx_codec_control_(ctx, ctrl_id); \ + return aom_codec_control_(ctx, ctrl_id); \ } /**<\hideinitializer*/ #endif diff --git a/aom/vpx_codec.mk b/aom/aom_codec.mk similarity index 55% rename from aom/vpx_codec.mk rename to aom/aom_codec.mk index 9cf4ac4f2d33caab2dfdc18c5438bcc2dec2a977..8ac60334fec2212c6b3882be1fd9ac96f6458cd8 100644 --- a/aom/vpx_codec.mk +++ b/aom/aom_codec.mk @@ -21,23 +21,23 @@ API_SRCS-$(CONFIG_VP10_DECODER) += vp8dx.h API_DOC_SRCS-$(CONFIG_VP10_DECODER) += vp8.h API_DOC_SRCS-$(CONFIG_VP10_DECODER) += vp8dx.h -API_DOC_SRCS-yes += vpx_codec.h -API_DOC_SRCS-yes += vpx_decoder.h -API_DOC_SRCS-yes += vpx_encoder.h -API_DOC_SRCS-yes += vpx_frame_buffer.h -API_DOC_SRCS-yes += vpx_image.h +API_DOC_SRCS-yes += aom_codec.h +API_DOC_SRCS-yes += aom_decoder.h +API_DOC_SRCS-yes += aom_encoder.h +API_DOC_SRCS-yes += aom_frame_buffer.h +API_DOC_SRCS-yes += aom_image.h -API_SRCS-yes += src/vpx_decoder.c -API_SRCS-yes += vpx_decoder.h -API_SRCS-yes += src/vpx_encoder.c -API_SRCS-yes += vpx_encoder.h -API_SRCS-yes += internal/vpx_codec_internal.h -API_SRCS-yes += internal/vpx_psnr.h -API_SRCS-yes += src/vpx_codec.c -API_SRCS-yes += src/vpx_image.c -API_SRCS-yes += src/vpx_psnr.c -API_SRCS-yes += vpx_codec.h -API_SRCS-yes += vpx_codec.mk -API_SRCS-yes += vpx_frame_buffer.h -API_SRCS-yes += vpx_image.h -API_SRCS-yes += vpx_integer.h +API_SRCS-yes += src/aom_decoder.c +API_SRCS-yes += aom_decoder.h +API_SRCS-yes += src/aom_encoder.c +API_SRCS-yes += aom_encoder.h +API_SRCS-yes += internal/aom_codec_internal.h +API_SRCS-yes += internal/aom_psnr.h +API_SRCS-yes += src/aom_codec.c +API_SRCS-yes += src/aom_image.c +API_SRCS-yes += src/aom_psnr.c +API_SRCS-yes += aom_codec.h +API_SRCS-yes += aom_codec.mk +API_SRCS-yes += aom_frame_buffer.h +API_SRCS-yes += aom_image.h +API_SRCS-yes += aom_integer.h diff --git a/aom/vpx_decoder.h b/aom/aom_decoder.h similarity index 85% rename from aom/vpx_decoder.h rename to aom/aom_decoder.h index 972a09d93cf29d3aeaa602883e2f3bd932c5ab1a..d718054734d9485a3c8d85705b1730790f15351d 100644 --- a/aom/vpx_decoder.h +++ b/aom/aom_decoder.h @@ -30,8 +30,8 @@ extern "C" { #endif -#include "./vpx_codec.h" -#include "./vpx_frame_buffer.h" +#include "./aom_codec.h" +#include "./aom_frame_buffer.h" /*!\brief Current ABI version number * @@ -47,7 +47,7 @@ extern "C" { /*! \brief Decoder capabilities bitfield * * Each decoder advertises the capabilities it supports as part of its - * ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces + * ::aom_codec_iface_t interface structure. Capabilities are extra interfaces * or functionality, and are not required to be supported by a decoder. * * The available flags are specified by VPX_CODEC_CAP_* defines. @@ -86,12 +86,12 @@ extern "C" { * stream. Algorithms may extend this structure with data specific * to their bitstream by setting the sz member appropriately. */ -typedef struct vpx_codec_stream_info { +typedef struct aom_codec_stream_info { unsigned int sz; /**< Size of this structure */ unsigned int w; /**< Width (or 0 for unknown/default) */ unsigned int h; /**< Height (or 0 for unknown/default) */ unsigned int is_kf; /**< Current frame is a keyframe */ -} vpx_codec_stream_info_t; +} aom_codec_stream_info_t; /* REQUIRED FUNCTIONS * @@ -104,16 +104,16 @@ typedef struct vpx_codec_stream_info { * This structure is used to pass init time configuration options to the * decoder. */ -typedef struct vpx_codec_dec_cfg { +typedef struct aom_codec_dec_cfg { unsigned int threads; /**< Maximum number of threads to use, default 1 */ unsigned int w; /**< Width */ unsigned int h; /**< Height */ -} vpx_codec_dec_cfg_t; /**< alias for struct vpx_codec_dec_cfg */ +} aom_codec_dec_cfg_t; /**< alias for struct aom_codec_dec_cfg */ /*!\brief Initialize a decoder instance * * Initializes a decoder context using the given interface. Applications - * should call the vpx_codec_dec_init convenience macro instead of this + * should call the aom_codec_dec_init convenience macro instead of this * function directly, to ensure that the ABI version number parameter * is properly initialized. * @@ -132,17 +132,17 @@ typedef struct vpx_codec_dec_cfg { * \retval #VPX_CODEC_MEM_ERROR * Memory allocation failed. */ -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); +aom_codec_err_t aom_codec_dec_init_ver(aom_codec_ctx_t *ctx, + aom_codec_iface_t *iface, + const aom_codec_dec_cfg_t *cfg, + aom_codec_flags_t flags, int ver); -/*!\brief Convenience macro for vpx_codec_dec_init_ver() +/*!\brief Convenience macro for aom_codec_dec_init_ver() * * Ensures the ABI version parameter is properly set. */ -#define vpx_codec_dec_init(ctx, iface, cfg, flags) \ - vpx_codec_dec_init_ver(ctx, iface, cfg, flags, VPX_DECODER_ABI_VERSION) +#define aom_codec_dec_init(ctx, iface, cfg, flags) \ + aom_codec_dec_init_ver(ctx, iface, cfg, flags, VPX_DECODER_ABI_VERSION) /*!\brief Parse stream info from a buffer * @@ -161,10 +161,10 @@ vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx, * \retval #VPX_CODEC_OK * Bitstream is parsable and stream information updated */ -vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface, +aom_codec_err_t aom_codec_peek_stream_info(aom_codec_iface_t *iface, const uint8_t *data, unsigned int data_sz, - vpx_codec_stream_info_t *si); + aom_codec_stream_info_t *si); /*!\brief Return information about the current stream. * @@ -179,8 +179,8 @@ vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface, * \retval #VPX_CODEC_OK * Bitstream is parsable and stream information updated */ -vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx, - vpx_codec_stream_info_t *si); +aom_codec_err_t aom_codec_get_stream_info(aom_codec_ctx_t *ctx, + aom_codec_stream_info_t *si); /*!\brief Decode data * @@ -209,10 +209,10 @@ vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx, * * \return Returns #VPX_CODEC_OK if the coded data was processed completely * and future pictures can be decoded without error. Otherwise, - * see the descriptions of the other error codes in ::vpx_codec_err_t + * see the descriptions of the other error codes in ::aom_codec_err_t * for recoverability capabilities. */ -vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx, const uint8_t *data, +aom_codec_err_t aom_codec_decode(aom_codec_ctx_t *ctx, const uint8_t *data, unsigned int data_sz, void *user_priv, long deadline); @@ -223,8 +223,8 @@ vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx, const uint8_t *data, * complete when this function returns NULL. * * The list of available frames becomes valid upon completion of the - * vpx_codec_decode call, and remains valid until the next call to - * vpx_codec_decode. + * aom_codec_decode call, and remains valid until the next call to + * aom_codec_decode. * * \param[in] ctx Pointer to this instance's context * \param[in,out] iter Iterator storage, initialized to NULL @@ -232,7 +232,7 @@ vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx, const uint8_t *data, * \return Returns a pointer to an image, if one is ready for display. Frames * produced will always be in PTS (presentation time stamp) order. */ -vpx_image_t *vpx_codec_get_frame(vpx_codec_ctx_t *ctx, vpx_codec_iter_t *iter); +aom_image_t *aom_codec_get_frame(aom_codec_ctx_t *ctx, aom_codec_iter_t *iter); /*!\defgroup cap_put_frame Frame-Based Decoding Functions * @@ -249,8 +249,8 @@ vpx_image_t *vpx_codec_get_frame(vpx_codec_ctx_t *ctx, vpx_codec_iter_t *iter); * This callback is invoked by the decoder to notify the application of * the availability of decoded image data. */ -typedef void (*vpx_codec_put_frame_cb_fn_t)(void *user_priv, - const vpx_image_t *img); +typedef void (*aom_codec_put_frame_cb_fn_t)(void *user_priv, + const aom_image_t *img); /*!\brief Register for notification of frame completion. * @@ -267,8 +267,8 @@ typedef void (*vpx_codec_put_frame_cb_fn_t)(void *user_priv, * Decoder context not initialized, or algorithm not capable of * posting slice completion. */ -vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx, - vpx_codec_put_frame_cb_fn_t cb, +aom_codec_err_t aom_codec_register_put_frame_cb(aom_codec_ctx_t *ctx, + aom_codec_put_frame_cb_fn_t cb, void *user_priv); /*!@} - end defgroup cap_put_frame */ @@ -288,10 +288,10 @@ vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx, * This callback is invoked by the decoder to notify the application of * the availability of partially decoded image data. The */ -typedef void (*vpx_codec_put_slice_cb_fn_t)(void *user_priv, - const vpx_image_t *img, - const vpx_image_rect_t *valid, - const vpx_image_rect_t *update); +typedef void (*aom_codec_put_slice_cb_fn_t)(void *user_priv, + const aom_image_t *img, + const aom_image_rect_t *valid, + const aom_image_rect_t *update); /*!\brief Register for notification of slice completion. * @@ -308,8 +308,8 @@ typedef void (*vpx_codec_put_slice_cb_fn_t)(void *user_priv, * Decoder context not initialized, or algorithm not capable of * posting slice completion. */ -vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx, - vpx_codec_put_slice_cb_fn_t cb, +aom_codec_err_t aom_codec_register_put_slice_cb(aom_codec_ctx_t *ctx, + aom_codec_put_slice_cb_fn_t cb, void *user_priv); /*!@} - end defgroup cap_put_slice*/ @@ -352,9 +352,9 @@ vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx, * #VPX_MAXIMUM_WORK_BUFFERS external frame * buffers. */ -vpx_codec_err_t vpx_codec_set_frame_buffer_functions( - vpx_codec_ctx_t *ctx, vpx_get_frame_buffer_cb_fn_t cb_get, - vpx_release_frame_buffer_cb_fn_t cb_release, void *cb_priv); +aom_codec_err_t aom_codec_set_frame_buffer_functions( + aom_codec_ctx_t *ctx, aom_get_frame_buffer_cb_fn_t cb_get, + aom_release_frame_buffer_cb_fn_t cb_release, void *cb_priv); /*!@} - end defgroup cap_external_frame_buffer */ diff --git a/aom/vpx_encoder.h b/aom/aom_encoder.h similarity index 89% rename from aom/vpx_encoder.h rename to aom/aom_encoder.h index 079ff29c7a4ce100293a93d0d446a6b28c4a61ac..8b44c4ec4fe86cbe5441c9ff3ec05e1b06ff785c 100644 --- a/aom/vpx_encoder.h +++ b/aom/aom_encoder.h @@ -30,7 +30,7 @@ extern "C" { #endif -#include "./vpx_codec.h" +#include "./aom_codec.h" /*! Temporal Scalability: Maximum length of the sequence defining frame * layer membership @@ -69,7 +69,7 @@ extern "C" { /*! \brief Encoder capabilities bitfield * * Each encoder advertises the capabilities it supports as part of its - * ::vpx_codec_iface_t interface structure. Capabilities are extra + * ::aom_codec_iface_t interface structure. Capabilities are extra * interfaces or functionality, and are not required to be supported * by an encoder. * @@ -104,17 +104,17 @@ extern "C" { * * This structure is able to hold a reference to any fixed size buffer. */ -typedef struct vpx_fixed_buf { +typedef struct aom_fixed_buf { void *buf; /**< Pointer to the data */ size_t sz; /**< Length of the buffer, in chars */ -} vpx_fixed_buf_t; /**< alias for struct vpx_fixed_buf */ +} aom_fixed_buf_t; /**< alias for struct aom_fixed_buf */ /*!\brief Time Stamp Type * * An integer, which when multiplied by the stream's time base, provides * the absolute time of a sample. */ -typedef int64_t vpx_codec_pts_t; +typedef int64_t aom_codec_pts_t; /*!\brief Compressed Frame Flags * @@ -123,7 +123,7 @@ typedef int64_t vpx_codec_pts_t; * can be used by an algorithm to provide additional detail, for example to * support frame types that are codec specific (MPEG-1 D-frames for example) */ -typedef uint32_t vpx_codec_frame_flags_t; +typedef uint32_t aom_codec_frame_flags_t; #define VPX_FRAME_IS_KEY 0x1 /**< frame is the start of a GOP */ #define VPX_FRAME_IS_DROPPABLE 0x2 /**< frame can be dropped without affecting the stream (no future frame depends @@ -137,9 +137,9 @@ typedef uint32_t vpx_codec_frame_flags_t; * * These flags define which error resilient features to enable in the * encoder. The flags are specified through the - * vpx_codec_enc_cfg::g_error_resilient variable. + * aom_codec_enc_cfg::g_error_resilient variable. */ -typedef uint32_t vpx_codec_er_flags_t; +typedef uint32_t aom_codec_er_flags_t; #define VPX_ERROR_RESILIENT_DEFAULT 0x1 /**< Improve resiliency against losses of whole frames */ #define VPX_ERROR_RESILIENT_PARTITIONS 0x2 @@ -151,10 +151,10 @@ typedef uint32_t vpx_codec_er_flags_t; /*!\brief Encoder output packet variants * * This enumeration lists the different kinds of data packets that can be - * returned by calls to vpx_codec_get_cx_data(). Algorithms \ref MAY + * returned by calls to aom_codec_get_cx_data(). Algorithms \ref MAY * extend this list to provide additional functionality. */ -enum vpx_codec_cx_pkt_kind { +enum aom_codec_cx_pkt_kind { VPX_CODEC_CX_FRAME_PKT, /**< Compressed video frame */ VPX_CODEC_STATS_PKT, /**< Two-pass statistics for this frame */ VPX_CODEC_FPMB_STATS_PKT, /**< first pass mb statistics for this frame */ @@ -173,17 +173,17 @@ enum vpx_codec_cx_pkt_kind { * This structure contains the different kinds of output data the encoder * may produce while compressing a frame. */ -typedef struct vpx_codec_cx_pkt { - enum vpx_codec_cx_pkt_kind kind; /**< packet variant */ +typedef struct aom_codec_cx_pkt { + enum aom_codec_cx_pkt_kind kind; /**< packet variant */ union { struct { void *buf; /**< compressed data buffer */ size_t sz; /**< length of compressed data */ - vpx_codec_pts_t pts; /**< time stamp to show frame + aom_codec_pts_t pts; /**< time stamp to show frame (in timebase units) */ unsigned long duration; /**< duration to show frame (in timebase units) */ - vpx_codec_frame_flags_t flags; /**< flags for this frame */ + aom_codec_frame_flags_t flags; /**< flags for this frame */ int partition_id; /**< the partition id defines the decoding order of the partitions. Only @@ -191,19 +191,19 @@ typedef struct vpx_codec_cx_pkt { mode is enabled. First partition has id 0.*/ } frame; /**< data for compressed frame packet */ - vpx_fixed_buf_t twopass_stats; /**< data for two-pass packet */ - vpx_fixed_buf_t firstpass_mb_stats; /**< first pass mb packet */ - struct vpx_psnr_pkt { + aom_fixed_buf_t twopass_stats; /**< data for two-pass packet */ + aom_fixed_buf_t firstpass_mb_stats; /**< first pass mb packet */ + struct aom_psnr_pkt { unsigned int samples[4]; /**< Number of samples, total/y/u/v */ uint64_t sse[4]; /**< sum squared error, total/y/u/v */ double psnr[4]; /**< PSNR, total/y/u/v */ } psnr; /**< data for PSNR packet */ - vpx_fixed_buf_t raw; /**< data for arbitrary packets */ + aom_fixed_buf_t raw; /**< data for arbitrary packets */ // Spatial SVC is still experimental and may be removed before the next // ABI bump. #if VPX_ENCODER_ABI_VERSION > (5 + VPX_CODEC_ABI_VERSION) size_t layer_sizes[VPX_SS_MAX_LAYERS]; - struct vpx_psnr_pkt layer_psnr[VPX_SS_MAX_LAYERS]; + struct aom_psnr_pkt layer_psnr[VPX_SS_MAX_LAYERS]; #endif /* This packet size is fixed to allow codecs to extend this @@ -211,9 +211,9 @@ typedef struct vpx_codec_cx_pkt { * i.e., if it's smaller than 128 bytes, you can store in the * packet list directly. */ - char pad[128 - sizeof(enum vpx_codec_cx_pkt_kind)]; /**< fixed sz */ + char pad[128 - sizeof(enum aom_codec_cx_pkt_kind)]; /**< fixed sz */ } data; /**< packet data */ -} vpx_codec_cx_pkt_t; /**< alias for struct vpx_codec_cx_pkt */ +} aom_codec_cx_pkt_t; /**< alias for struct aom_codec_cx_pkt */ /*!\brief Encoder return output buffer callback * @@ -222,33 +222,33 @@ typedef struct vpx_codec_cx_pkt { */ // putting the definitions here for now. (agrange: find if there // is a better place for this) -typedef void (*vpx_codec_enc_output_cx_pkt_cb_fn_t)(vpx_codec_cx_pkt_t *pkt, +typedef void (*aom_codec_enc_output_cx_pkt_cb_fn_t)(aom_codec_cx_pkt_t *pkt, void *user_data); /*!\brief Callback function pointer / user data pair storage */ -typedef struct vpx_codec_enc_output_cx_cb_pair { - vpx_codec_enc_output_cx_pkt_cb_fn_t output_cx_pkt; /**< Callback function */ +typedef struct aom_codec_enc_output_cx_cb_pair { + aom_codec_enc_output_cx_pkt_cb_fn_t output_cx_pkt; /**< Callback function */ void *user_priv; /**< Pointer to private data */ -} vpx_codec_priv_output_cx_pkt_cb_pair_t; +} aom_codec_priv_output_cx_pkt_cb_pair_t; /*!\brief Rational Number * * This structure holds a fractional value. */ -typedef struct vpx_rational { +typedef struct aom_rational { int num; /**< fraction numerator */ int den; /**< fraction denominator */ -} vpx_rational_t; /**< alias for struct vpx_rational */ +} aom_rational_t; /**< alias for struct aom_rational */ /*!\brief Multi-pass Encoding Pass */ -enum vpx_enc_pass { +enum aom_enc_pass { VPX_RC_ONE_PASS, /**< Single pass mode */ VPX_RC_FIRST_PASS, /**< First pass of multi-pass mode */ VPX_RC_LAST_PASS /**< Final pass of multi-pass mode */ }; /*!\brief Rate control mode */ -enum vpx_rc_mode { +enum aom_rc_mode { VPX_VBR, /**< Variable Bit Rate (VBR) mode */ VPX_CBR, /**< Constant Bit Rate (CBR) mode */ VPX_CQ, /**< Constrained Quality (CQ) mode */ @@ -263,7 +263,7 @@ enum vpx_rc_mode { * This name is confusing for this behavior, so the new symbols to be used * are VPX_KF_AUTO and VPX_KF_DISABLED. */ -enum vpx_kf_mode { +enum aom_kf_mode { VPX_KF_FIXED, /**< deprecated, implies VPX_KF_DISABLED */ VPX_KF_AUTO, /**< Encoder determines optimal placement automatically */ VPX_KF_DISABLED = 0 /**< Encoder does not place keyframes. */ @@ -271,12 +271,12 @@ enum vpx_kf_mode { /*!\brief Encoded Frame Flags * - * This type indicates a bitfield to be passed to vpx_codec_encode(), defining + * This type indicates a bitfield to be passed to aom_codec_encode(), defining * per-frame boolean values. By convention, bits common to all codecs will be * named VPX_EFLAG_*, and bits specific to an algorithm will be named * /algo/_eflag_*. The lower order 16 bits are reserved for common use. */ -typedef long vpx_enc_frame_flags_t; +typedef long aom_enc_frame_flags_t; #define VPX_EFLAG_FORCE_KF (1 << 0) /**< Force this frame to be a keyframe */ /*!\brief Encoder configuration structure @@ -285,7 +285,7 @@ typedef long vpx_enc_frame_flags_t; * across all codecs. This doesn't imply that all codecs support all features, * however. */ -typedef struct vpx_codec_enc_cfg { +typedef struct aom_codec_enc_cfg { /* * generic settings (g) */ @@ -339,9 +339,9 @@ typedef struct vpx_codec_enc_cfg { * * This value identifies the bit_depth of the codec, * Only certain bit-depths are supported as identified in the - * vpx_bit_depth_t enum. + * aom_bit_depth_t enum. */ - vpx_bit_depth_t g_bit_depth; + aom_bit_depth_t g_bit_depth; /*!\brief Bit-depth of the input frames * @@ -363,7 +363,7 @@ typedef struct vpx_codec_enc_cfg { * \ref RECOMMENDED method is to set the timebase to that of the parent * container or multimedia framework (ex: 1/1000 for ms, as in FLV). */ - struct vpx_rational g_timebase; + struct aom_rational g_timebase; /*!\brief Enable error resilient modes. * @@ -371,14 +371,14 @@ typedef struct vpx_codec_enc_cfg { * it should enable to take measures for streaming over lossy or noisy * links. */ - vpx_codec_er_flags_t g_error_resilient; + aom_codec_er_flags_t g_error_resilient; /*!\brief Multi-pass Encoding Mode * * This value should be set to the current phase for multi-pass encoding. * For single pass, set to #VPX_RC_ONE_PASS. */ - enum vpx_enc_pass g_pass; + enum aom_enc_pass g_pass; /*!\brief Allow lagged encoding * @@ -406,7 +406,7 @@ typedef struct vpx_codec_enc_cfg { * trade-off is often acceptable, but for many applications is not. It can * be disabled in these cases. * - * Note that not all codecs support this feature. All vpx VPx codecs do. + * Note that not all codecs support this feature. All aom VPx codecs do. * For other codecs, consult the documentation for that algorithm. * * This threshold is described as a percentage of the target data buffer. @@ -463,21 +463,21 @@ typedef struct vpx_codec_enc_cfg { * bandwidth link, as from a local disk, where higher variations in * bitrate are acceptable. */ - enum vpx_rc_mode rc_end_usage; + enum aom_rc_mode rc_end_usage; /*!\brief Two-pass stats buffer. * * A buffer containing all of the stats packets produced in the first * pass, concatenated. */ - vpx_fixed_buf_t rc_twopass_stats_in; + aom_fixed_buf_t rc_twopass_stats_in; /*!\brief first pass mb stats buffer. * * A buffer containing all of the first pass mb stats packets produced * in the first pass, concatenated. */ - vpx_fixed_buf_t rc_firstpass_mb_stats_in; + aom_fixed_buf_t rc_firstpass_mb_stats_in; /*!\brief Target data rate * @@ -495,7 +495,7 @@ typedef struct vpx_codec_enc_cfg { * encoded image. The range of valid values for the quantizer is codec * specific. Consult the documentation for the codec to determine the * values to use. To determine the range programmatically, call - * vpx_codec_enc_config_default() with a usage value of 0. + * aom_codec_enc_config_default() with a usage value of 0. */ unsigned int rc_min_quantizer; @@ -505,7 +505,7 @@ typedef struct vpx_codec_enc_cfg { * encoded image. The range of valid values for the quantizer is codec * specific. Consult the documentation for the codec to determine the * values to use. To determine the range programmatically, call - * vpx_codec_enc_config_default() with a usage value of 0. + * aom_codec_enc_config_default() with a usage value of 0. */ unsigned int rc_max_quantizer; @@ -609,7 +609,7 @@ typedef struct vpx_codec_enc_cfg { * fixed interval, or determine the optimal placement automatically * (as governed by the #kf_min_dist and #kf_max_dist parameters) */ - enum vpx_kf_mode kf_mode; + enum aom_kf_mode kf_mode; /*!\brief Keyframe minimum interval * @@ -707,25 +707,25 @@ typedef struct vpx_codec_enc_cfg { * */ int temporal_layering_mode; -} vpx_codec_enc_cfg_t; /**< alias for struct vpx_codec_enc_cfg */ +} aom_codec_enc_cfg_t; /**< alias for struct aom_codec_enc_cfg */ /*!\brief vp9 svc extra configure parameters * * This defines max/min quantizers and scale factors for each layer * */ -typedef struct vpx_svc_parameters { +typedef struct aom_svc_parameters { int max_quantizers[VPX_MAX_LAYERS]; /**< Max Q for each layer */ int min_quantizers[VPX_MAX_LAYERS]; /**< Min Q for each layer */ int scaling_factor_num[VPX_MAX_LAYERS]; /**< Scaling factor-numerator */ int scaling_factor_den[VPX_MAX_LAYERS]; /**< Scaling factor-denominator */ int temporal_layering_mode; /**< Temporal layering mode */ -} vpx_svc_extra_cfg_t; +} aom_svc_extra_cfg_t; /*!\brief Initialize an encoder instance * * Initializes a encoder context using the given interface. Applications - * should call the vpx_codec_enc_init convenience macro instead of this + * should call the aom_codec_enc_init convenience macro instead of this * function directly, to ensure that the ABI version number parameter * is properly initialized. * @@ -744,22 +744,22 @@ typedef struct vpx_svc_parameters { * \retval #VPX_CODEC_MEM_ERROR * Memory allocation failed. */ -vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx, - vpx_codec_iface_t *iface, - const vpx_codec_enc_cfg_t *cfg, - vpx_codec_flags_t flags, int ver); +aom_codec_err_t aom_codec_enc_init_ver(aom_codec_ctx_t *ctx, + aom_codec_iface_t *iface, + const aom_codec_enc_cfg_t *cfg, + aom_codec_flags_t flags, int ver); -/*!\brief Convenience macro for vpx_codec_enc_init_ver() +/*!\brief Convenience macro for aom_codec_enc_init_ver() * * Ensures the ABI version parameter is properly set. */ -#define vpx_codec_enc_init(ctx, iface, cfg, flags) \ - vpx_codec_enc_init_ver(ctx, iface, cfg, flags, VPX_ENCODER_ABI_VERSION) +#define aom_codec_enc_init(ctx, iface, cfg, flags) \ + aom_codec_enc_init_ver(ctx, iface, cfg, flags, VPX_ENCODER_ABI_VERSION) /*!\brief Initialize multi-encoder instance * * Initializes multi-encoder context using the given interface. - * Applications should call the vpx_codec_enc_init_multi convenience macro + * Applications should call the aom_codec_enc_init_multi convenience macro * instead of this function directly, to ensure that the ABI version number * parameter is properly initialized. * @@ -776,16 +776,16 @@ vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx, * \retval #VPX_CODEC_MEM_ERROR * Memory allocation failed. */ -vpx_codec_err_t vpx_codec_enc_init_multi_ver( - vpx_codec_ctx_t *ctx, vpx_codec_iface_t *iface, vpx_codec_enc_cfg_t *cfg, - int num_enc, vpx_codec_flags_t flags, vpx_rational_t *dsf, int ver); +aom_codec_err_t aom_codec_enc_init_multi_ver( + aom_codec_ctx_t *ctx, aom_codec_iface_t *iface, aom_codec_enc_cfg_t *cfg, + int num_enc, aom_codec_flags_t flags, aom_rational_t *dsf, int ver); -/*!\brief Convenience macro for vpx_codec_enc_init_multi_ver() +/*!\brief Convenience macro for aom_codec_enc_init_multi_ver() * * Ensures the ABI version parameter is properly set. */ -#define vpx_codec_enc_init_multi(ctx, iface, cfg, num_enc, flags, dsf) \ - vpx_codec_enc_init_multi_ver(ctx, iface, cfg, num_enc, flags, dsf, \ +#define aom_codec_enc_init_multi(ctx, iface, cfg, num_enc, flags, dsf) \ + aom_codec_enc_init_multi_ver(ctx, iface, cfg, num_enc, flags, dsf, \ VPX_ENCODER_ABI_VERSION) /*!\brief Get a default configuration @@ -807,8 +807,8 @@ vpx_codec_err_t vpx_codec_enc_init_multi_ver( * \retval #VPX_CODEC_INVALID_PARAM * A parameter was NULL, or the usage value was not recognized. */ -vpx_codec_err_t vpx_codec_enc_config_default(vpx_codec_iface_t *iface, - vpx_codec_enc_cfg_t *cfg, +aom_codec_err_t aom_codec_enc_config_default(aom_codec_iface_t *iface, + aom_codec_enc_cfg_t *cfg, unsigned int reserved); /*!\brief Set or change configuration @@ -825,8 +825,8 @@ vpx_codec_err_t vpx_codec_enc_config_default(vpx_codec_iface_t *iface, * \retval #VPX_CODEC_INVALID_PARAM * A parameter was NULL, or the usage value was not recognized. */ -vpx_codec_err_t vpx_codec_enc_config_set(vpx_codec_ctx_t *ctx, - const vpx_codec_enc_cfg_t *cfg); +aom_codec_err_t aom_codec_enc_config_set(aom_codec_ctx_t *ctx, + const aom_codec_enc_cfg_t *cfg); /*!\brief Get global stream headers * @@ -839,7 +839,7 @@ vpx_codec_err_t vpx_codec_enc_config_set(vpx_codec_ctx_t *ctx, * \retval Non-NULL * Pointer to buffer containing global header packet */ -vpx_fixed_buf_t *vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx); +aom_fixed_buf_t *aom_codec_get_global_headers(aom_codec_ctx_t *ctx); #define VPX_DL_REALTIME (1) /**< deadline parameter analogous to VPx REALTIME mode. */ @@ -866,8 +866,8 @@ vpx_fixed_buf_t *vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx); * When the last frame has been passed to the encoder, this function should * continue to be called, with the img parameter set to NULL. This will * signal the end-of-stream condition to the encoder and allow it to encode - * any held buffers. Encoding is complete when vpx_codec_encode() is called - * and vpx_codec_get_cx_data() returns no data. + * any held buffers. Encoding is complete when aom_codec_encode() is called + * and aom_codec_get_cx_data() returns no data. * * \param[in] ctx Pointer to this instance's context * \param[in] img Image data to encode, NULL to flush. @@ -883,9 +883,9 @@ vpx_fixed_buf_t *vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx); * \retval #VPX_CODEC_INVALID_PARAM * A parameter was NULL, the image format is unsupported, etc. */ -vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx, const vpx_image_t *img, - vpx_codec_pts_t pts, unsigned long duration, - vpx_enc_frame_flags_t flags, +aom_codec_err_t aom_codec_encode(aom_codec_ctx_t *ctx, const aom_image_t *img, + aom_codec_pts_t pts, unsigned long duration, + aom_enc_frame_flags_t flags, unsigned long deadline); /*!\brief Set compressed data output buffer @@ -919,7 +919,7 @@ vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx, const vpx_image_t *img, * buffer. * * Applications \ref MUSTNOT call this function during iteration of - * vpx_codec_get_cx_data(). + * aom_codec_get_cx_data(). * * \param[in] ctx Pointer to this instance's context * \param[in] buf Buffer to store compressed data into @@ -931,8 +931,8 @@ vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx, const vpx_image_t *img, * \retval #VPX_CODEC_INVALID_PARAM * A parameter was NULL, the image format is unsupported, etc. */ -vpx_codec_err_t vpx_codec_set_cx_data_buf(vpx_codec_ctx_t *ctx, - const vpx_fixed_buf_t *buf, +aom_codec_err_t aom_codec_set_cx_data_buf(aom_codec_ctx_t *ctx, + const aom_fixed_buf_t *buf, unsigned int pad_before, unsigned int pad_after); @@ -940,7 +940,7 @@ vpx_codec_err_t vpx_codec_set_cx_data_buf(vpx_codec_ctx_t *ctx, * * Iterates over a list of data packets to be passed from the encoder to the * application. The different kinds of packets available are enumerated in - * #vpx_codec_cx_pkt_kind. + * #aom_codec_cx_pkt_kind. * * #VPX_CODEC_CX_FRAME_PKT packets should be passed to the application's * muxer. Multiple compressed frames may be in the list. @@ -950,7 +950,7 @@ vpx_codec_err_t vpx_codec_set_cx_data_buf(vpx_codec_ctx_t *ctx, * not recognize or support. * * The data buffers returned from this function are only guaranteed to be - * valid until the application makes another call to any vpx_codec_* function. + * valid until the application makes another call to any aom_codec_* function. * * \param[in] ctx Pointer to this instance's context * \param[in,out] iter Iterator storage, initialized to NULL @@ -959,8 +959,8 @@ vpx_codec_err_t vpx_codec_set_cx_data_buf(vpx_codec_ctx_t *ctx, * two-pass statistics, etc.) or NULL to signal end-of-list. * */ -const vpx_codec_cx_pkt_t *vpx_codec_get_cx_data(vpx_codec_ctx_t *ctx, - vpx_codec_iter_t *iter); +const aom_codec_cx_pkt_t *aom_codec_get_cx_data(aom_codec_ctx_t *ctx, + aom_codec_iter_t *iter); /*!\brief Get Preview Frame * @@ -974,7 +974,7 @@ const vpx_codec_cx_pkt_t *vpx_codec_get_cx_data(vpx_codec_ctx_t *ctx, * available. * */ -const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx); +const aom_image_t *aom_codec_get_preview_frame(aom_codec_ctx_t *ctx); /*!@} - end defgroup encoder*/ #ifdef __cplusplus diff --git a/aom/vpx_frame_buffer.h b/aom/aom_frame_buffer.h similarity index 83% rename from aom/vpx_frame_buffer.h rename to aom/aom_frame_buffer.h index 247768d5ad0cf13c29593397732d4a6b8ff9a566..ce4d64a9ee5635467947136d00f47fa8291c62d0 100644 --- a/aom/vpx_frame_buffer.h +++ b/aom/aom_frame_buffer.h @@ -20,7 +20,7 @@ extern "C" { #endif -#include "./vpx_integer.h" +#include "./aom_integer.h" /*!\brief The maximum number of work buffers used by libaom. * Support maximum 4 threads to decode video in parallel. @@ -37,11 +37,11 @@ extern "C" { * * This structure holds allocated frame buffers used by the decoder. */ -typedef struct vpx_codec_frame_buffer { +typedef struct aom_codec_frame_buffer { uint8_t *data; /**< Pointer to the data buffer */ size_t size; /**< Size of data in bytes */ void *priv; /**< Frame's private data */ -} vpx_codec_frame_buffer_t; +} aom_codec_frame_buffer_t; /*!\brief get frame buffer callback prototype * @@ -52,17 +52,17 @@ typedef struct vpx_codec_frame_buffer { * to the allocated size. The application does not need to align the allocated * data. The callback is triggered when the decoder needs a frame buffer to * decode a compressed image into. This function may be called more than once - * for every call to vpx_codec_decode. The application may set fb->priv to + * for every call to aom_codec_decode. The application may set fb->priv to * some data which will be passed back in the ximage and the release function * call. |fb| is guaranteed to not be NULL. On success the callback must * return 0. Any failure the callback must return a value less than 0. * * \param[in] priv Callback's private data * \param[in] new_size Size in bytes needed by the buffer - * \param[in,out] fb Pointer to vpx_codec_frame_buffer_t + * \param[in,out] fb Pointer to aom_codec_frame_buffer_t */ -typedef int (*vpx_get_frame_buffer_cb_fn_t)(void *priv, size_t min_size, - vpx_codec_frame_buffer_t *fb); +typedef int (*aom_get_frame_buffer_cb_fn_t)(void *priv, size_t min_size, + aom_codec_frame_buffer_t *fb); /*!\brief release frame buffer callback prototype * @@ -72,10 +72,10 @@ typedef int (*vpx_get_frame_buffer_cb_fn_t)(void *priv, size_t min_size, * a value less than 0. * * \param[in] priv Callback's private data - * \param[in] fb Pointer to vpx_codec_frame_buffer_t + * \param[in] fb Pointer to aom_codec_frame_buffer_t */ -typedef int (*vpx_release_frame_buffer_cb_fn_t)(void *priv, - vpx_codec_frame_buffer_t *fb); +typedef int (*aom_release_frame_buffer_cb_fn_t)(void *priv, + aom_codec_frame_buffer_t *fb); #ifdef __cplusplus } // extern "C" diff --git a/aom/vpx_image.h b/aom/aom_image.h similarity index 89% rename from aom/vpx_image.h rename to aom/aom_image.h index 86d31607cddb3081332485182bccfbc9d9a65833..16c1c30714e106727ed7e41ba78db8d62e233034 100644 --- a/aom/vpx_image.h +++ b/aom/aom_image.h @@ -10,7 +10,7 @@ */ /*!\file - * \brief Describes the vpx image descriptor and associated operations + * \brief Describes the aom image descriptor and associated operations * */ #ifndef VPX_VPX_IMAGE_H_ @@ -36,7 +36,7 @@ extern "C" { #define VPX_IMG_FMT_HIGHBITDEPTH 0x800 /**< Image uses 16bit framebuffer. */ /*!\brief List of supported image formats */ -typedef enum vpx_img_fmt { +typedef enum aom_img_fmt { VPX_IMG_FMT_NONE, VPX_IMG_FMT_RGB24, /**< 24 bit per pixel packed RGB */ VPX_IMG_FMT_RGB32, /**< 32 bit per pixel packed 0RGB */ @@ -55,7 +55,7 @@ typedef enum vpx_img_fmt { VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 1, /**< planar YVU */ VPX_IMG_FMT_I420 = VPX_IMG_FMT_PLANAR | 2, VPX_IMG_FMT_VPXYV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | - 3, /** < planar 4:2:0 format with vpx color space */ + 3, /** < planar 4:2:0 format with aom color space */ VPX_IMG_FMT_VPXI420 = VPX_IMG_FMT_PLANAR | 4, VPX_IMG_FMT_I422 = VPX_IMG_FMT_PLANAR | 5, VPX_IMG_FMT_I444 = VPX_IMG_FMT_PLANAR | 6, @@ -65,10 +65,10 @@ typedef enum vpx_img_fmt { VPX_IMG_FMT_I42216 = VPX_IMG_FMT_I422 | VPX_IMG_FMT_HIGHBITDEPTH, VPX_IMG_FMT_I44416 = VPX_IMG_FMT_I444 | VPX_IMG_FMT_HIGHBITDEPTH, VPX_IMG_FMT_I44016 = VPX_IMG_FMT_I440 | VPX_IMG_FMT_HIGHBITDEPTH -} vpx_img_fmt_t; /**< alias for enum vpx_img_fmt */ +} aom_img_fmt_t; /**< alias for enum aom_img_fmt */ /*!\brief List of supported color spaces */ -typedef enum vpx_color_space { +typedef enum aom_color_space { VPX_CS_UNKNOWN = 0, /**< Unknown */ VPX_CS_BT_601 = 1, /**< BT.601 */ VPX_CS_BT_709 = 2, /**< BT.709 */ @@ -77,19 +77,19 @@ typedef enum vpx_color_space { VPX_CS_BT_2020 = 5, /**< BT.2020 */ VPX_CS_RESERVED = 6, /**< Reserved */ VPX_CS_SRGB = 7 /**< sRGB */ -} vpx_color_space_t; /**< alias for enum vpx_color_space */ +} aom_color_space_t; /**< alias for enum aom_color_space */ /*!\brief List of supported color range */ -typedef enum vpx_color_range { +typedef enum aom_color_range { VPX_CR_STUDIO_RANGE = 0, /**< Y [16..235], UV [16..240] */ VPX_CR_FULL_RANGE = 1 /**< YUV/RGB [0..255] */ -} vpx_color_range_t; /**< alias for enum vpx_color_range */ +} aom_color_range_t; /**< alias for enum aom_color_range */ /**\brief Image Descriptor */ -typedef struct vpx_image { - vpx_img_fmt_t fmt; /**< Image Format */ - vpx_color_space_t cs; /**< Color Space */ - vpx_color_range_t range; /**< Color Range */ +typedef struct aom_image { + aom_img_fmt_t fmt; /**< Image Format */ + aom_color_space_t cs; /**< Color Space */ + aom_color_range_t range; /**< Color Range */ /* Image storage dimensions */ unsigned int w; /**< Stored image width */ @@ -131,15 +131,15 @@ typedef struct vpx_image { int self_allocd; /**< private */ void *fb_priv; /**< Frame buffer data associated with the image. */ -} vpx_image_t; /**< alias for struct vpx_image */ +} aom_image_t; /**< alias for struct aom_image */ /**\brief Representation of a rectangle on a surface */ -typedef struct vpx_image_rect { +typedef struct aom_image_rect { unsigned int x; /**< leftmost column */ unsigned int y; /**< topmost row */ unsigned int w; /**< width */ unsigned int h; /**< height */ -} vpx_image_rect_t; /**< alias for struct vpx_image_rect */ +} aom_image_rect_t; /**< alias for struct aom_image_rect */ /*!\brief Open a descriptor, allocating storage for the underlying image * @@ -159,7 +159,7 @@ typedef struct vpx_image_rect { * parameter is non-null, the value of the img parameter will be * returned. */ -vpx_image_t *vpx_img_alloc(vpx_image_t *img, vpx_img_fmt_t fmt, +aom_image_t *aom_img_alloc(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int align); @@ -182,7 +182,7 @@ vpx_image_t *vpx_img_alloc(vpx_image_t *img, vpx_img_fmt_t fmt, * parameter is non-null, the value of the img parameter will be * returned. */ -vpx_image_t *vpx_img_wrap(vpx_image_t *img, vpx_img_fmt_t fmt, unsigned int d_w, +aom_image_t *aom_img_wrap(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int align, unsigned char *img_data); @@ -199,7 +199,7 @@ vpx_image_t *vpx_img_wrap(vpx_image_t *img, vpx_img_fmt_t fmt, unsigned int d_w, * * \return 0 if the requested rectangle is valid, nonzero otherwise. */ -int vpx_img_set_rect(vpx_image_t *img, unsigned int x, unsigned int y, +int aom_img_set_rect(aom_image_t *img, unsigned int x, unsigned int y, unsigned int w, unsigned int h); /*!\brief Flip the image vertically (top for bottom) @@ -209,7 +209,7 @@ int vpx_img_set_rect(vpx_image_t *img, unsigned int x, unsigned int y, * * \param[in] img Image descriptor */ -void vpx_img_flip(vpx_image_t *img); +void aom_img_flip(aom_image_t *img); /*!\brief Close an image descriptor * @@ -217,7 +217,7 @@ void vpx_img_flip(vpx_image_t *img); * * \param[in] img Image descriptor */ -void vpx_img_free(vpx_image_t *img); +void aom_img_free(aom_image_t *img); #ifdef __cplusplus } // extern "C" diff --git a/aom/vpx_integer.h b/aom/aom_integer.h similarity index 100% rename from aom/vpx_integer.h rename to aom/aom_integer.h diff --git a/aom/exports_com b/aom/exports_com index 2ab05099f81acc795c0978c2728c8fbb2b4485c8..0c79fa124b1c18bff6bda80cf17d389d368952df 100644 --- a/aom/exports_com +++ b/aom/exports_com @@ -1,16 +1,16 @@ -text vpx_codec_build_config -text vpx_codec_control_ -text vpx_codec_destroy -text vpx_codec_err_to_string -text vpx_codec_error -text vpx_codec_error_detail -text vpx_codec_get_caps -text vpx_codec_iface_name -text vpx_codec_version -text vpx_codec_version_extra_str -text vpx_codec_version_str -text vpx_img_alloc -text vpx_img_flip -text vpx_img_free -text vpx_img_set_rect -text vpx_img_wrap +text aom_codec_build_config +text aom_codec_control_ +text aom_codec_destroy +text aom_codec_err_to_string +text aom_codec_error +text aom_codec_error_detail +text aom_codec_get_caps +text aom_codec_iface_name +text aom_codec_version +text aom_codec_version_extra_str +text aom_codec_version_str +text aom_img_alloc +text aom_img_flip +text aom_img_free +text aom_img_set_rect +text aom_img_wrap diff --git a/aom/exports_dec b/aom/exports_dec index c694ebae1284bc77a27938914c11bd67d9e7bf83..de8fe449a953b2bc8895015b2fdc5746c84c8d23 100644 --- a/aom/exports_dec +++ b/aom/exports_dec @@ -1,8 +1,8 @@ -text vpx_codec_dec_init_ver -text vpx_codec_decode -text vpx_codec_get_frame -text vpx_codec_get_stream_info -text vpx_codec_peek_stream_info -text vpx_codec_register_put_frame_cb -text vpx_codec_register_put_slice_cb -text vpx_codec_set_frame_buffer_functions +text aom_codec_dec_init_ver +text aom_codec_decode +text aom_codec_get_frame +text aom_codec_get_stream_info +text aom_codec_peek_stream_info +text aom_codec_register_put_frame_cb +text aom_codec_register_put_slice_cb +text aom_codec_set_frame_buffer_functions diff --git a/aom/exports_enc b/aom/exports_enc index e4707ba10822a16c97373242e3da774b1a022f0a..4932c26f2c779ce716019fb1f0dcee0ffd853fd9 100644 --- a/aom/exports_enc +++ b/aom/exports_enc @@ -1,15 +1,15 @@ -text vpx_codec_enc_config_default -text vpx_codec_enc_config_set -text vpx_codec_enc_init_multi_ver -text vpx_codec_enc_init_ver -text vpx_codec_encode -text vpx_codec_get_cx_data -text vpx_codec_get_global_headers -text vpx_codec_get_preview_frame -text vpx_codec_set_cx_data_buf -text vpx_svc_dump_statistics -text vpx_svc_encode -text vpx_svc_get_message -text vpx_svc_init -text vpx_svc_release -text vpx_svc_set_options +text aom_codec_enc_config_default +text aom_codec_enc_config_set +text aom_codec_enc_init_multi_ver +text aom_codec_enc_init_ver +text aom_codec_encode +text aom_codec_get_cx_data +text aom_codec_get_global_headers +text aom_codec_get_preview_frame +text aom_codec_set_cx_data_buf +text aom_svc_dump_statistics +text aom_svc_encode +text aom_svc_get_message +text aom_svc_init +text aom_svc_release +text aom_svc_set_options diff --git a/aom/internal/vpx_codec_internal.h b/aom/internal/aom_codec_internal.h similarity index 68% rename from aom/internal/vpx_codec_internal.h rename to aom/internal/aom_codec_internal.h index be86e802623213680a4ebd270f7090586bf7bf26..5744088462313a9363f7212d14c39d5ac088807e 100644 --- a/aom/internal/vpx_codec_internal.h +++ b/aom/internal/aom_codec_internal.h @@ -20,7 +20,7 @@ * into the global namespace: * <pre> * my_codec.c: - * vpx_codec_iface_t my_codec = { + * aom_codec_iface_t my_codec = { * "My Codec v1.0", * VPX_CODEC_ALG_ABI_VERSION, * ... @@ -28,23 +28,23 @@ * </pre> * * An application instantiates a specific decoder instance by using - * vpx_codec_init() and a pointer to the algorithm's interface structure: + * aom_codec_init() and a pointer to the algorithm's interface structure: * <pre> * my_app.c: - * extern vpx_codec_iface_t my_codec; + * extern aom_codec_iface_t my_codec; * { - * vpx_codec_ctx_t algo; - * res = vpx_codec_init(&algo, &my_codec); + * aom_codec_ctx_t algo; + * res = aom_codec_init(&algo, &my_codec); * } * </pre> * * Once initialized, the instance is manged using other functions from - * the vpx_codec_* family. + * the aom_codec_* family. */ #ifndef VPX_INTERNAL_VPX_CODEC_INTERNAL_H_ #define VPX_INTERNAL_VPX_CODEC_INTERNAL_H_ -#include "../vpx_decoder.h" -#include "../vpx_encoder.h" +#include "../aom_decoder.h" +#include "../aom_encoder.h" #include <stdarg.h> #ifdef __cplusplus @@ -61,13 +61,13 @@ extern "C" { */ #define VPX_CODEC_INTERNAL_ABI_VERSION (5) /**<\hideinitializer*/ -typedef struct vpx_codec_alg_priv vpx_codec_alg_priv_t; -typedef struct vpx_codec_priv_enc_mr_cfg vpx_codec_priv_enc_mr_cfg_t; +typedef struct aom_codec_alg_priv aom_codec_alg_priv_t; +typedef struct aom_codec_priv_enc_mr_cfg aom_codec_priv_enc_mr_cfg_t; /*!\brief init function pointer prototype * * Performs algorithm-specific initialization of the decoder context. This - * function is called by the generic vpx_codec_init() wrapper function, so + * function is called by the generic aom_codec_init() wrapper function, so * plugins implementing this interface may trust the input parameters to be * properly initialized. * @@ -77,13 +77,13 @@ typedef struct vpx_codec_priv_enc_mr_cfg vpx_codec_priv_enc_mr_cfg_t; * \retval #VPX_CODEC_MEM_ERROR * Memory operation failed. */ -typedef vpx_codec_err_t (*vpx_codec_init_fn_t)( - vpx_codec_ctx_t *ctx, vpx_codec_priv_enc_mr_cfg_t *data); +typedef aom_codec_err_t (*aom_codec_init_fn_t)( + aom_codec_ctx_t *ctx, aom_codec_priv_enc_mr_cfg_t *data); /*!\brief destroy function pointer prototype * * Performs algorithm-specific destruction of the decoder context. This - * function is called by the generic vpx_codec_destroy() wrapper function, + * function is called by the generic aom_codec_destroy() wrapper function, * so plugins implementing this interface may trust the input parameters * to be properly initialized. * @@ -93,12 +93,12 @@ typedef vpx_codec_err_t (*vpx_codec_init_fn_t)( * \retval #VPX_CODEC_MEM_ERROR * Memory operation failed. */ -typedef vpx_codec_err_t (*vpx_codec_destroy_fn_t)(vpx_codec_alg_priv_t *ctx); +typedef aom_codec_err_t (*aom_codec_destroy_fn_t)(aom_codec_alg_priv_t *ctx); /*!\brief parse stream info function pointer prototype * * Performs high level parsing of the bitstream. This function is called by the - * generic vpx_codec_peek_stream_info() wrapper function, so plugins + * generic aom_codec_peek_stream_info() wrapper function, so plugins * implementing this interface may trust the input parameters to be properly * initialized. * @@ -112,9 +112,9 @@ typedef vpx_codec_err_t (*vpx_codec_destroy_fn_t)(vpx_codec_alg_priv_t *ctx); * \retval #VPX_CODEC_OK * Bitstream is parsable and stream information updated */ -typedef vpx_codec_err_t (*vpx_codec_peek_si_fn_t)(const uint8_t *data, +typedef aom_codec_err_t (*aom_codec_peek_si_fn_t)(const uint8_t *data, unsigned int data_sz, - vpx_codec_stream_info_t *si); + aom_codec_stream_info_t *si); /*!\brief Return information about the current stream. * @@ -129,8 +129,8 @@ typedef vpx_codec_err_t (*vpx_codec_peek_si_fn_t)(const uint8_t *data, * \retval #VPX_CODEC_OK * Bitstream is parsable and stream information updated */ -typedef vpx_codec_err_t (*vpx_codec_get_si_fn_t)(vpx_codec_alg_priv_t *ctx, - vpx_codec_stream_info_t *si); +typedef aom_codec_err_t (*aom_codec_get_si_fn_t)(aom_codec_alg_priv_t *ctx, + aom_codec_stream_info_t *si); /*!\brief control function pointer prototype * @@ -138,7 +138,7 @@ typedef vpx_codec_err_t (*vpx_codec_get_si_fn_t)(vpx_codec_alg_priv_t *ctx, * instance. This can be used to implement features specific to a particular * algorithm. * - * This function is called by the generic vpx_codec_control() wrapper + * This function is called by the generic aom_codec_control() wrapper * function, so plugins implementing this interface may trust the input * parameters to be properly initialized. However, this interface does not * provide type safety for the exchanged data or assign meanings to the @@ -154,31 +154,31 @@ typedef vpx_codec_err_t (*vpx_codec_get_si_fn_t)(vpx_codec_alg_priv_t *ctx, * \retval #VPX_CODEC_OK * The internal state data was deserialized. */ -typedef vpx_codec_err_t (*vpx_codec_control_fn_t)(vpx_codec_alg_priv_t *ctx, +typedef aom_codec_err_t (*aom_codec_control_fn_t)(aom_codec_alg_priv_t *ctx, va_list ap); /*!\brief control function pointer mapping * * This structure stores the mapping between control identifiers and * implementing functions. Each algorithm provides a list of these - * mappings. This list is searched by the vpx_codec_control() wrapper + * mappings. This list is searched by the aom_codec_control() wrapper * function to determine which function to invoke. The special * value {0, NULL} is used to indicate end-of-list, and must be * present. The special value {0, <non-null>} can be used as a catch-all * mapping. This implies that ctrl_id values chosen by the algorithm * \ref MUST be non-zero. */ -typedef const struct vpx_codec_ctrl_fn_map { +typedef const struct aom_codec_ctrl_fn_map { int ctrl_id; - vpx_codec_control_fn_t fn; -} vpx_codec_ctrl_fn_map_t; + aom_codec_control_fn_t fn; +} aom_codec_ctrl_fn_map_t; /*!\brief decode data function pointer prototype * * Processes a buffer of coded data. If the processing results in a new * decoded frame becoming available, #VPX_CODEC_CB_PUT_SLICE and * #VPX_CODEC_CB_PUT_FRAME events are generated as appropriate. This - * function is called by the generic vpx_codec_decode() wrapper function, + * function is called by the generic aom_codec_decode() wrapper function, * so plugins implementing this interface may trust the input parameters * to be properly initialized. * @@ -190,10 +190,10 @@ typedef const struct vpx_codec_ctrl_fn_map { * * \return Returns #VPX_CODEC_OK if the coded data was processed completely * and future pictures can be decoded without error. Otherwise, - * see the descriptions of the other error codes in ::vpx_codec_err_t + * see the descriptions of the other error codes in ::aom_codec_err_t * for recoverability capabilities. */ -typedef vpx_codec_err_t (*vpx_codec_decode_fn_t)(vpx_codec_alg_priv_t *ctx, +typedef aom_codec_err_t (*aom_codec_decode_fn_t)(aom_codec_alg_priv_t *ctx, const uint8_t *data, unsigned int data_sz, void *user_priv, @@ -206,8 +206,8 @@ typedef vpx_codec_err_t (*vpx_codec_decode_fn_t)(vpx_codec_alg_priv_t *ctx, * complete when this function returns NULL. * * The list of available frames becomes valid upon completion of the - * vpx_codec_decode call, and remains valid until the next call to - * vpx_codec_decode. + * aom_codec_decode call, and remains valid until the next call to + * aom_codec_decode. * * \param[in] ctx Pointer to this instance's context * \param[in out] iter Iterator storage, initialized to NULL @@ -215,8 +215,8 @@ typedef vpx_codec_err_t (*vpx_codec_decode_fn_t)(vpx_codec_alg_priv_t *ctx, * \return Returns a pointer to an image, if one is ready for display. Frames * produced will always be in PTS (presentation time stamp) order. */ -typedef vpx_image_t *(*vpx_codec_get_frame_fn_t)(vpx_codec_alg_priv_t *ctx, - vpx_codec_iter_t *iter); +typedef aom_image_t *(*aom_codec_get_frame_fn_t)(aom_codec_alg_priv_t *ctx, + aom_codec_iter_t *iter); /*!\brief Pass in external frame buffers for the decoder to use. * @@ -244,90 +244,90 @@ typedef vpx_image_t *(*vpx_codec_get_frame_fn_t)(vpx_codec_alg_priv_t *ctx, * #VPX_MAXIMUM_WORK_BUFFERS external frame * buffers. */ -typedef vpx_codec_err_t (*vpx_codec_set_fb_fn_t)( - vpx_codec_alg_priv_t *ctx, vpx_get_frame_buffer_cb_fn_t cb_get, - vpx_release_frame_buffer_cb_fn_t cb_release, void *cb_priv); +typedef aom_codec_err_t (*aom_codec_set_fb_fn_t)( + aom_codec_alg_priv_t *ctx, aom_get_frame_buffer_cb_fn_t cb_get, + aom_release_frame_buffer_cb_fn_t cb_release, void *cb_priv); -typedef vpx_codec_err_t (*vpx_codec_encode_fn_t)(vpx_codec_alg_priv_t *ctx, - const vpx_image_t *img, - vpx_codec_pts_t pts, +typedef aom_codec_err_t (*aom_codec_encode_fn_t)(aom_codec_alg_priv_t *ctx, + const aom_image_t *img, + aom_codec_pts_t pts, unsigned long duration, - vpx_enc_frame_flags_t flags, + aom_enc_frame_flags_t flags, unsigned long deadline); -typedef const vpx_codec_cx_pkt_t *(*vpx_codec_get_cx_data_fn_t)( - vpx_codec_alg_priv_t *ctx, vpx_codec_iter_t *iter); +typedef const aom_codec_cx_pkt_t *(*aom_codec_get_cx_data_fn_t)( + aom_codec_alg_priv_t *ctx, aom_codec_iter_t *iter); -typedef vpx_codec_err_t (*vpx_codec_enc_config_set_fn_t)( - vpx_codec_alg_priv_t *ctx, const vpx_codec_enc_cfg_t *cfg); -typedef vpx_fixed_buf_t *(*vpx_codec_get_global_headers_fn_t)( - vpx_codec_alg_priv_t *ctx); +typedef aom_codec_err_t (*aom_codec_enc_config_set_fn_t)( + aom_codec_alg_priv_t *ctx, const aom_codec_enc_cfg_t *cfg); +typedef aom_fixed_buf_t *(*aom_codec_get_global_headers_fn_t)( + aom_codec_alg_priv_t *ctx); -typedef vpx_image_t *(*vpx_codec_get_preview_frame_fn_t)( - vpx_codec_alg_priv_t *ctx); +typedef aom_image_t *(*aom_codec_get_preview_frame_fn_t)( + aom_codec_alg_priv_t *ctx); -typedef vpx_codec_err_t (*vpx_codec_enc_mr_get_mem_loc_fn_t)( - const vpx_codec_enc_cfg_t *cfg, void **mem_loc); +typedef aom_codec_err_t (*aom_codec_enc_mr_get_mem_loc_fn_t)( + const aom_codec_enc_cfg_t *cfg, void **mem_loc); /*!\brief usage configuration mapping * * This structure stores the mapping between usage identifiers and * configuration structures. Each algorithm provides a list of these - * mappings. This list is searched by the vpx_codec_enc_config_default() + * mappings. This list is searched by the aom_codec_enc_config_default() * wrapper function to determine which config to return. The special value * {-1, {0}} is used to indicate end-of-list, and must be present. At least * one mapping must be present, in addition to the end-of-list. * */ -typedef const struct vpx_codec_enc_cfg_map { +typedef const struct aom_codec_enc_cfg_map { int usage; - vpx_codec_enc_cfg_t cfg; -} vpx_codec_enc_cfg_map_t; + aom_codec_enc_cfg_t cfg; +} aom_codec_enc_cfg_map_t; /*!\brief Decoder algorithm interface interface * * All decoders \ref MUST expose a variable of this type. */ -struct vpx_codec_iface { +struct aom_codec_iface { const char *name; /**< Identification String */ int abi_version; /**< Implemented ABI version */ - vpx_codec_caps_t caps; /**< Decoder capabilities */ - vpx_codec_init_fn_t init; /**< \copydoc ::vpx_codec_init_fn_t */ - vpx_codec_destroy_fn_t destroy; /**< \copydoc ::vpx_codec_destroy_fn_t */ - vpx_codec_ctrl_fn_map_t *ctrl_maps; /**< \copydoc ::vpx_codec_ctrl_fn_map_t */ - struct vpx_codec_dec_iface { - vpx_codec_peek_si_fn_t peek_si; /**< \copydoc ::vpx_codec_peek_si_fn_t */ - vpx_codec_get_si_fn_t get_si; /**< \copydoc ::vpx_codec_get_si_fn_t */ - vpx_codec_decode_fn_t decode; /**< \copydoc ::vpx_codec_decode_fn_t */ - vpx_codec_get_frame_fn_t - get_frame; /**< \copydoc ::vpx_codec_get_frame_fn_t */ - vpx_codec_set_fb_fn_t set_fb_fn; /**< \copydoc ::vpx_codec_set_fb_fn_t */ + aom_codec_caps_t caps; /**< Decoder capabilities */ + aom_codec_init_fn_t init; /**< \copydoc ::aom_codec_init_fn_t */ + aom_codec_destroy_fn_t destroy; /**< \copydoc ::aom_codec_destroy_fn_t */ + aom_codec_ctrl_fn_map_t *ctrl_maps; /**< \copydoc ::aom_codec_ctrl_fn_map_t */ + struct aom_codec_dec_iface { + aom_codec_peek_si_fn_t peek_si; /**< \copydoc ::aom_codec_peek_si_fn_t */ + aom_codec_get_si_fn_t get_si; /**< \copydoc ::aom_codec_get_si_fn_t */ + aom_codec_decode_fn_t decode; /**< \copydoc ::aom_codec_decode_fn_t */ + aom_codec_get_frame_fn_t + get_frame; /**< \copydoc ::aom_codec_get_frame_fn_t */ + aom_codec_set_fb_fn_t set_fb_fn; /**< \copydoc ::aom_codec_set_fb_fn_t */ } dec; - struct vpx_codec_enc_iface { + struct aom_codec_enc_iface { int cfg_map_count; - vpx_codec_enc_cfg_map_t - *cfg_maps; /**< \copydoc ::vpx_codec_enc_cfg_map_t */ - vpx_codec_encode_fn_t encode; /**< \copydoc ::vpx_codec_encode_fn_t */ - vpx_codec_get_cx_data_fn_t - get_cx_data; /**< \copydoc ::vpx_codec_get_cx_data_fn_t */ - vpx_codec_enc_config_set_fn_t - cfg_set; /**< \copydoc ::vpx_codec_enc_config_set_fn_t */ - vpx_codec_get_global_headers_fn_t - get_glob_hdrs; /**< \copydoc ::vpx_codec_get_global_headers_fn_t */ - vpx_codec_get_preview_frame_fn_t - get_preview; /**< \copydoc ::vpx_codec_get_preview_frame_fn_t */ - vpx_codec_enc_mr_get_mem_loc_fn_t - mr_get_mem_loc; /**< \copydoc ::vpx_codec_enc_mr_get_mem_loc_fn_t */ + aom_codec_enc_cfg_map_t + *cfg_maps; /**< \copydoc ::aom_codec_enc_cfg_map_t */ + aom_codec_encode_fn_t encode; /**< \copydoc ::aom_codec_encode_fn_t */ + aom_codec_get_cx_data_fn_t + get_cx_data; /**< \copydoc ::aom_codec_get_cx_data_fn_t */ + aom_codec_enc_config_set_fn_t + cfg_set; /**< \copydoc ::aom_codec_enc_config_set_fn_t */ + aom_codec_get_global_headers_fn_t + get_glob_hdrs; /**< \copydoc ::aom_codec_get_global_headers_fn_t */ + aom_codec_get_preview_frame_fn_t + get_preview; /**< \copydoc ::aom_codec_get_preview_frame_fn_t */ + aom_codec_enc_mr_get_mem_loc_fn_t + mr_get_mem_loc; /**< \copydoc ::aom_codec_enc_mr_get_mem_loc_fn_t */ } enc; }; /*!\brief Callback function pointer / user data pair storage */ -typedef struct vpx_codec_priv_cb_pair { +typedef struct aom_codec_priv_cb_pair { union { - vpx_codec_put_frame_cb_fn_t put_frame; - vpx_codec_put_slice_cb_fn_t put_slice; + aom_codec_put_frame_cb_fn_t put_frame; + aom_codec_put_slice_cb_fn_t put_slice; } u; void *user_priv; -} vpx_codec_priv_cb_pair_t; +} aom_codec_priv_cb_pair_t; /*!\brief Instance private storage * @@ -337,18 +337,18 @@ typedef struct vpx_codec_priv_cb_pair { * structure can be made the first member of the algorithm specific structure, * and the pointer cast to the proper type. */ -struct vpx_codec_priv { +struct aom_codec_priv { const char *err_detail; - vpx_codec_flags_t init_flags; + aom_codec_flags_t init_flags; struct { - vpx_codec_priv_cb_pair_t put_frame_cb; - vpx_codec_priv_cb_pair_t put_slice_cb; + aom_codec_priv_cb_pair_t put_frame_cb; + aom_codec_priv_cb_pair_t put_slice_cb; } dec; struct { - vpx_fixed_buf_t cx_data_dst_buf; + aom_fixed_buf_t cx_data_dst_buf; unsigned int cx_data_pad_before; unsigned int cx_data_pad_after; - vpx_codec_cx_pkt_t cx_data_pkt; + aom_codec_cx_pkt_t cx_data_pkt; unsigned int total_encoders; } enc; }; @@ -356,10 +356,10 @@ struct vpx_codec_priv { /* * Multi-resolution encoding internal configuration */ -struct vpx_codec_priv_enc_mr_cfg { +struct aom_codec_priv_enc_mr_cfg { unsigned int mr_total_resolutions; unsigned int mr_encoder_id; - struct vpx_rational mr_down_sampling_factor; + struct aom_rational mr_down_sampling_factor; void *mr_low_res_mode_info; }; @@ -383,44 +383,44 @@ struct vpx_codec_priv_enc_mr_cfg { * macro is provided to define this getter function automatically. */ #define CODEC_INTERFACE(id) \ - vpx_codec_iface_t *id(void) { return &id##_algo; } \ - vpx_codec_iface_t id##_algo + aom_codec_iface_t *id(void) { return &id##_algo; } \ + aom_codec_iface_t id##_algo /* Internal Utility Functions * * The following functions are intended to be used inside algorithms as - * utilities for manipulating vpx_codec_* data structures. + * utilities for manipulating aom_codec_* data structures. */ -struct vpx_codec_pkt_list { +struct aom_codec_pkt_list { unsigned int cnt; unsigned int max; - struct vpx_codec_cx_pkt pkts[1]; + struct aom_codec_cx_pkt pkts[1]; }; -#define vpx_codec_pkt_list_decl(n) \ +#define aom_codec_pkt_list_decl(n) \ union { \ - struct vpx_codec_pkt_list head; \ + struct aom_codec_pkt_list head; \ struct { \ - struct vpx_codec_pkt_list head; \ - struct vpx_codec_cx_pkt pkts[n]; \ + struct aom_codec_pkt_list head; \ + struct aom_codec_cx_pkt pkts[n]; \ } alloc; \ } -#define vpx_codec_pkt_list_init(m) \ +#define aom_codec_pkt_list_init(m) \ (m)->alloc.head.cnt = 0, \ (m)->alloc.head.max = sizeof((m)->alloc.pkts) / sizeof((m)->alloc.pkts[0]) -int vpx_codec_pkt_list_add(struct vpx_codec_pkt_list *, - const struct vpx_codec_cx_pkt *); +int aom_codec_pkt_list_add(struct aom_codec_pkt_list *, + const struct aom_codec_cx_pkt *); -const vpx_codec_cx_pkt_t *vpx_codec_pkt_list_get( - struct vpx_codec_pkt_list *list, vpx_codec_iter_t *iter); +const aom_codec_cx_pkt_t *aom_codec_pkt_list_get( + struct aom_codec_pkt_list *list, aom_codec_iter_t *iter); #include <stdio.h> #include <setjmp.h> -struct vpx_internal_error_info { - vpx_codec_err_t error_code; +struct aom_internal_error_info { + aom_codec_err_t error_code; int has_detail; char detail[80]; int setjmp; @@ -435,8 +435,8 @@ struct vpx_internal_error_info { #endif #endif -void vpx_internal_error(struct vpx_internal_error_info *info, - vpx_codec_err_t error, const char *fmt, +void aom_internal_error(struct aom_internal_error_info *info, + aom_codec_err_t error, const char *fmt, ...) CLANG_ANALYZER_NORETURN; #ifdef __cplusplus diff --git a/aom/internal/vpx_psnr.h b/aom/internal/aom_psnr.h similarity index 88% rename from aom/internal/vpx_psnr.h rename to aom/internal/aom_psnr.h index 010ca9f477c0f04f22d72ece220bd110dffc555c..b42b55d86ddc42490557ac7509115fb2cf257e80 100644 --- a/aom/internal/vpx_psnr.h +++ b/aom/internal/aom_psnr.h @@ -16,7 +16,7 @@ extern "C" { #endif -// TODO(dkovalev) change vpx_sse_to_psnr signature: double -> int64_t +// TODO(dkovalev) change aom_sse_to_psnr signature: double -> int64_t /*!\brief Converts SSE to PSNR * @@ -26,7 +26,7 @@ extern "C" { * \param[in] peak Max sample value * \param[in] sse Sum of squared errors */ -double vpx_sse_to_psnr(double samples, double peak, double sse); +double aom_sse_to_psnr(double samples, double peak, double sse); #ifdef __cplusplus } // extern "C" diff --git a/aom/src/vpx_codec.c b/aom/src/aom_codec.c similarity index 70% rename from aom/src/vpx_codec.c rename to aom/src/aom_codec.c index 53f20148beeef951b27c17a207d4eebc7faf2252..119bd1d99073d023b6098654ac9d747200aa0dae 100644 --- a/aom/src/vpx_codec.c +++ b/aom/src/aom_codec.c @@ -15,23 +15,23 @@ */ #include <stdarg.h> #include <stdlib.h> -#include "aom/vpx_integer.h" -#include "aom/internal/vpx_codec_internal.h" -#include "vpx_version.h" +#include "aom/aom_integer.h" +#include "aom/internal/aom_codec_internal.h" +#include "aom_version.h" #define SAVE_STATUS(ctx, var) (ctx ? (ctx->err = var) : var) -int vpx_codec_version(void) { return VERSION_PACKED; } +int aom_codec_version(void) { return VERSION_PACKED; } -const char *vpx_codec_version_str(void) { return VERSION_STRING_NOSP; } +const char *aom_codec_version_str(void) { return VERSION_STRING_NOSP; } -const char *vpx_codec_version_extra_str(void) { return VERSION_EXTRA; } +const char *aom_codec_version_extra_str(void) { return VERSION_EXTRA; } -const char *vpx_codec_iface_name(vpx_codec_iface_t *iface) { +const char *aom_codec_iface_name(aom_codec_iface_t *iface) { return iface ? iface->name : "<invalid interface>"; } -const char *vpx_codec_err_to_string(vpx_codec_err_t err) { +const char *aom_codec_err_to_string(aom_codec_err_t err) { switch (err) { case VPX_CODEC_OK: return "Success"; case VPX_CODEC_ERROR: return "Unspecified internal error"; @@ -51,27 +51,27 @@ const char *vpx_codec_err_to_string(vpx_codec_err_t err) { 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 *aom_codec_error(aom_codec_ctx_t *ctx) { + return (ctx) ? aom_codec_err_to_string(ctx->err) + : aom_codec_err_to_string(VPX_CODEC_INVALID_PARAM); } -const char *vpx_codec_error_detail(vpx_codec_ctx_t *ctx) { +const char *aom_codec_error_detail(aom_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; +aom_codec_err_t aom_codec_destroy(aom_codec_ctx_t *ctx) { + aom_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->destroy((aom_codec_alg_priv_t *)ctx->priv); ctx->iface = NULL; ctx->name = NULL; @@ -82,19 +82,19 @@ vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx) { return SAVE_STATUS(ctx, res); } -vpx_codec_caps_t vpx_codec_get_caps(vpx_codec_iface_t *iface) { +aom_codec_caps_t aom_codec_get_caps(aom_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; +aom_codec_err_t aom_codec_control_(aom_codec_ctx_t *ctx, int ctrl_id, ...) { + aom_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; + aom_codec_ctrl_fn_map_t *entry; res = VPX_CODEC_ERROR; @@ -103,7 +103,7 @@ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...) { va_list ap; va_start(ap, ctrl_id); - res = entry->fn((vpx_codec_alg_priv_t *)ctx->priv, ap); + res = entry->fn((aom_codec_alg_priv_t *)ctx->priv, ap); va_end(ap); break; } @@ -113,8 +113,8 @@ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...) { return SAVE_STATUS(ctx, res); } -void vpx_internal_error(struct vpx_internal_error_info *info, - vpx_codec_err_t error, const char *fmt, ...) { +void aom_internal_error(struct aom_internal_error_info *info, + aom_codec_err_t error, const char *fmt, ...) { va_list ap; info->error_code = error; diff --git a/aom/src/vpx_decoder.c b/aom/src/aom_decoder.c similarity index 74% rename from aom/src/vpx_decoder.c rename to aom/src/aom_decoder.c index ba64a87255c4130c15df061c3fb9b9b5b325410a..8356ee922225f4bc68c0da9d25aed383d69947fe 100644 --- a/aom/src/vpx_decoder.c +++ b/aom/src/aom_decoder.c @@ -14,19 +14,19 @@ * */ #include <string.h> -#include "aom/internal/vpx_codec_internal.h" +#include "aom/internal/aom_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; +static aom_codec_alg_priv_t *get_alg_priv(aom_codec_ctx_t *ctx) { + return (aom_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; +aom_codec_err_t aom_codec_dec_init_ver(aom_codec_ctx_t *ctx, + aom_codec_iface_t *iface, + const aom_codec_dec_cfg_t *cfg, + aom_codec_flags_t flags, int ver) { + aom_codec_err_t res; if (ver != VPX_DECODER_ABI_VERSION) res = VPX_CODEC_ABI_MISMATCH; @@ -56,21 +56,21 @@ vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx, res = ctx->iface->init(ctx, NULL); if (res) { ctx->err_detail = ctx->priv ? ctx->priv->err_detail : NULL; - vpx_codec_destroy(ctx); + aom_codec_destroy(ctx); } } return SAVE_STATUS(ctx, res); } -vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface, +aom_codec_err_t aom_codec_peek_stream_info(aom_codec_iface_t *iface, const uint8_t *data, unsigned int data_sz, - vpx_codec_stream_info_t *si) { - vpx_codec_err_t res; + aom_codec_stream_info_t *si) { + aom_codec_err_t res; if (!iface || !data || !data_sz || !si || - si->sz < sizeof(vpx_codec_stream_info_t)) + si->sz < sizeof(aom_codec_stream_info_t)) res = VPX_CODEC_INVALID_PARAM; else { /* Set default/unknown values */ @@ -83,11 +83,11 @@ vpx_codec_err_t vpx_codec_peek_stream_info(vpx_codec_iface_t *iface, 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; +aom_codec_err_t aom_codec_get_stream_info(aom_codec_ctx_t *ctx, + aom_codec_stream_info_t *si) { + aom_codec_err_t res; - if (!ctx || !si || si->sz < sizeof(vpx_codec_stream_info_t)) + if (!ctx || !si || si->sz < sizeof(aom_codec_stream_info_t)) res = VPX_CODEC_INVALID_PARAM; else if (!ctx->iface || !ctx->priv) res = VPX_CODEC_ERROR; @@ -102,10 +102,10 @@ vpx_codec_err_t vpx_codec_get_stream_info(vpx_codec_ctx_t *ctx, return SAVE_STATUS(ctx, res); } -vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx, const uint8_t *data, +aom_codec_err_t aom_codec_decode(aom_codec_ctx_t *ctx, const uint8_t *data, unsigned int data_sz, void *user_priv, long deadline) { - vpx_codec_err_t res; + aom_codec_err_t res; /* Sanity checks */ /* NULL data ptr allowed if data_sz is 0 too */ @@ -121,8 +121,8 @@ vpx_codec_err_t vpx_codec_decode(vpx_codec_ctx_t *ctx, const uint8_t *data, return SAVE_STATUS(ctx, res); } -vpx_image_t *vpx_codec_get_frame(vpx_codec_ctx_t *ctx, vpx_codec_iter_t *iter) { - vpx_image_t *img; +aom_image_t *aom_codec_get_frame(aom_codec_ctx_t *ctx, aom_codec_iter_t *iter) { + aom_image_t *img; if (!ctx || !iter || !ctx->iface || !ctx->priv) img = NULL; @@ -132,10 +132,10 @@ vpx_image_t *vpx_codec_get_frame(vpx_codec_ctx_t *ctx, vpx_codec_iter_t *iter) { return img; } -vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx, - vpx_codec_put_frame_cb_fn_t cb, +aom_codec_err_t aom_codec_register_put_frame_cb(aom_codec_ctx_t *ctx, + aom_codec_put_frame_cb_fn_t cb, void *user_priv) { - vpx_codec_err_t res; + aom_codec_err_t res; if (!ctx || !cb) res = VPX_CODEC_INVALID_PARAM; @@ -151,10 +151,10 @@ vpx_codec_err_t vpx_codec_register_put_frame_cb(vpx_codec_ctx_t *ctx, return SAVE_STATUS(ctx, res); } -vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx, - vpx_codec_put_slice_cb_fn_t cb, +aom_codec_err_t aom_codec_register_put_slice_cb(aom_codec_ctx_t *ctx, + aom_codec_put_slice_cb_fn_t cb, void *user_priv) { - vpx_codec_err_t res; + aom_codec_err_t res; if (!ctx || !cb) res = VPX_CODEC_INVALID_PARAM; @@ -170,10 +170,10 @@ vpx_codec_err_t vpx_codec_register_put_slice_cb(vpx_codec_ctx_t *ctx, return SAVE_STATUS(ctx, res); } -vpx_codec_err_t vpx_codec_set_frame_buffer_functions( - vpx_codec_ctx_t *ctx, vpx_get_frame_buffer_cb_fn_t cb_get, - vpx_release_frame_buffer_cb_fn_t cb_release, void *cb_priv) { - vpx_codec_err_t res; +aom_codec_err_t aom_codec_set_frame_buffer_functions( + aom_codec_ctx_t *ctx, aom_get_frame_buffer_cb_fn_t cb_get, + aom_release_frame_buffer_cb_fn_t cb_release, void *cb_priv) { + aom_codec_err_t res; if (!ctx || !cb_get || !cb_release) { res = VPX_CODEC_INVALID_PARAM; diff --git a/aom/src/vpx_encoder.c b/aom/src/aom_encoder.c similarity index 80% rename from aom/src/vpx_encoder.c rename to aom/src/aom_encoder.c index addc0007985f2a696164b1b51812defb74e04022..5ac56cc3899dca40cad475955166bcae7600a04a 100644 --- a/aom/src/vpx_encoder.c +++ b/aom/src/aom_encoder.c @@ -15,20 +15,20 @@ */ #include <limits.h> #include <string.h> -#include "vpx_config.h" -#include "aom/internal/vpx_codec_internal.h" +#include "aom_config.h" +#include "aom/internal/aom_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; +static aom_codec_alg_priv_t *get_alg_priv(aom_codec_ctx_t *ctx) { + return (aom_codec_alg_priv_t *)ctx->priv; } -vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx, - vpx_codec_iface_t *iface, - const vpx_codec_enc_cfg_t *cfg, - vpx_codec_flags_t flags, int ver) { - vpx_codec_err_t res; +aom_codec_err_t aom_codec_enc_init_ver(aom_codec_ctx_t *ctx, + aom_codec_iface_t *iface, + const aom_codec_enc_cfg_t *cfg, + aom_codec_flags_t flags, int ver) { + aom_codec_err_t res; if (ver != VPX_ENCODER_ABI_VERSION) res = VPX_CODEC_ABI_MISMATCH; @@ -53,17 +53,17 @@ vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx, if (res) { ctx->err_detail = ctx->priv ? ctx->priv->err_detail : NULL; - vpx_codec_destroy(ctx); + aom_codec_destroy(ctx); } } return SAVE_STATUS(ctx, res); } -vpx_codec_err_t vpx_codec_enc_init_multi_ver( - vpx_codec_ctx_t *ctx, vpx_codec_iface_t *iface, vpx_codec_enc_cfg_t *cfg, - int num_enc, vpx_codec_flags_t flags, vpx_rational_t *dsf, int ver) { - vpx_codec_err_t res = VPX_CODEC_OK; +aom_codec_err_t aom_codec_enc_init_multi_ver( + aom_codec_ctx_t *ctx, aom_codec_iface_t *iface, aom_codec_enc_cfg_t *cfg, + int num_enc, aom_codec_flags_t flags, aom_rational_t *dsf, int ver) { + aom_codec_err_t res = VPX_CODEC_OK; if (ver != VPX_ENCODER_ABI_VERSION) res = VPX_CODEC_ABI_MISMATCH; @@ -84,7 +84,7 @@ vpx_codec_err_t vpx_codec_enc_init_multi_ver( if (!(res = iface->enc.mr_get_mem_loc(cfg, &mem_loc))) { for (i = 0; i < num_enc; i++) { - vpx_codec_priv_enc_mr_cfg_t mr_cfg; + aom_codec_priv_enc_mr_cfg_t mr_cfg; /* Validate down-sampling factor. */ if (dsf->num < 1 || dsf->num > 4096 || dsf->den < 1 || @@ -116,13 +116,13 @@ vpx_codec_err_t vpx_codec_enc_init_multi_ver( const char *error_detail = ctx->priv ? ctx->priv->err_detail : NULL; /* Destroy current ctx */ ctx->err_detail = error_detail; - vpx_codec_destroy(ctx); + aom_codec_destroy(ctx); /* Destroy already allocated high-level ctx */ while (i) { ctx--; ctx->err_detail = error_detail; - vpx_codec_destroy(ctx); + aom_codec_destroy(ctx); i--; } } @@ -140,11 +140,11 @@ vpx_codec_err_t vpx_codec_enc_init_multi_ver( return SAVE_STATUS(ctx, res); } -vpx_codec_err_t vpx_codec_enc_config_default(vpx_codec_iface_t *iface, - vpx_codec_enc_cfg_t *cfg, +aom_codec_err_t aom_codec_enc_config_default(aom_codec_iface_t *iface, + aom_codec_enc_cfg_t *cfg, unsigned int usage) { - vpx_codec_err_t res; - vpx_codec_enc_cfg_map_t *map; + aom_codec_err_t res; + aom_codec_enc_cfg_map_t *map; int i; if (!iface || !cfg || usage > INT_MAX) @@ -186,11 +186,11 @@ static void FLOATING_POINT_INIT() {} static void FLOATING_POINT_RESTORE() {} #endif -vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx, const vpx_image_t *img, - vpx_codec_pts_t pts, unsigned long duration, - vpx_enc_frame_flags_t flags, +aom_codec_err_t aom_codec_encode(aom_codec_ctx_t *ctx, const aom_image_t *img, + aom_codec_pts_t pts, unsigned long duration, + aom_enc_frame_flags_t flags, unsigned long deadline) { - vpx_codec_err_t res = VPX_CODEC_OK; + aom_codec_err_t res = VPX_CODEC_OK; if (!ctx || (img && !duration)) res = VPX_CODEC_INVALID_PARAM; @@ -237,9 +237,9 @@ vpx_codec_err_t vpx_codec_encode(vpx_codec_ctx_t *ctx, const vpx_image_t *img, return SAVE_STATUS(ctx, res); } -const vpx_codec_cx_pkt_t *vpx_codec_get_cx_data(vpx_codec_ctx_t *ctx, - vpx_codec_iter_t *iter) { - const vpx_codec_cx_pkt_t *pkt = NULL; +const aom_codec_cx_pkt_t *aom_codec_get_cx_data(aom_codec_ctx_t *ctx, + aom_codec_iter_t *iter) { + const aom_codec_cx_pkt_t *pkt = NULL; if (ctx) { if (!iter) @@ -256,14 +256,14 @@ const vpx_codec_cx_pkt_t *vpx_codec_get_cx_data(vpx_codec_ctx_t *ctx, // If the application has specified a destination area for the // compressed data, and the codec has not placed the data there, // and it fits, copy it. - vpx_codec_priv_t *const priv = ctx->priv; + aom_codec_priv_t *const priv = ctx->priv; char *const dst_buf = (char *)priv->enc.cx_data_dst_buf.buf; if (dst_buf && pkt->data.raw.buf != dst_buf && pkt->data.raw.sz + priv->enc.cx_data_pad_before + priv->enc.cx_data_pad_after <= priv->enc.cx_data_dst_buf.sz) { - vpx_codec_cx_pkt_t *modified_pkt = &priv->enc.cx_data_pkt; + aom_codec_cx_pkt_t *modified_pkt = &priv->enc.cx_data_pkt; memcpy(dst_buf + priv->enc.cx_data_pad_before, pkt->data.raw.buf, pkt->data.raw.sz); @@ -283,8 +283,8 @@ const vpx_codec_cx_pkt_t *vpx_codec_get_cx_data(vpx_codec_ctx_t *ctx, return pkt; } -vpx_codec_err_t vpx_codec_set_cx_data_buf(vpx_codec_ctx_t *ctx, - const vpx_fixed_buf_t *buf, +aom_codec_err_t aom_codec_set_cx_data_buf(aom_codec_ctx_t *ctx, + const aom_fixed_buf_t *buf, unsigned int pad_before, unsigned int pad_after) { if (!ctx || !ctx->priv) return VPX_CODEC_INVALID_PARAM; @@ -303,8 +303,8 @@ vpx_codec_err_t vpx_codec_set_cx_data_buf(vpx_codec_ctx_t *ctx, return VPX_CODEC_OK; } -const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx) { - vpx_image_t *img = NULL; +const aom_image_t *aom_codec_get_preview_frame(aom_codec_ctx_t *ctx) { + aom_image_t *img = NULL; if (ctx) { if (!ctx->iface || !ctx->priv) @@ -320,8 +320,8 @@ const vpx_image_t *vpx_codec_get_preview_frame(vpx_codec_ctx_t *ctx) { return img; } -vpx_fixed_buf_t *vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx) { - vpx_fixed_buf_t *buf = NULL; +aom_fixed_buf_t *aom_codec_get_global_headers(aom_codec_ctx_t *ctx) { + aom_fixed_buf_t *buf = NULL; if (ctx) { if (!ctx->iface || !ctx->priv) @@ -337,9 +337,9 @@ vpx_fixed_buf_t *vpx_codec_get_global_headers(vpx_codec_ctx_t *ctx) { return buf; } -vpx_codec_err_t vpx_codec_enc_config_set(vpx_codec_ctx_t *ctx, - const vpx_codec_enc_cfg_t *cfg) { - vpx_codec_err_t res; +aom_codec_err_t aom_codec_enc_config_set(aom_codec_ctx_t *ctx, + const aom_codec_enc_cfg_t *cfg) { + aom_codec_err_t res; if (!ctx || !ctx->iface || !ctx->priv || !cfg) res = VPX_CODEC_INVALID_PARAM; @@ -351,8 +351,8 @@ vpx_codec_err_t vpx_codec_enc_config_set(vpx_codec_ctx_t *ctx, return SAVE_STATUS(ctx, res); } -int vpx_codec_pkt_list_add(struct vpx_codec_pkt_list *list, - const struct vpx_codec_cx_pkt *pkt) { +int aom_codec_pkt_list_add(struct aom_codec_pkt_list *list, + const struct aom_codec_cx_pkt *pkt) { if (list->cnt < list->max) { list->pkts[list->cnt++] = *pkt; return 0; @@ -361,15 +361,15 @@ int vpx_codec_pkt_list_add(struct vpx_codec_pkt_list *list, return 1; } -const vpx_codec_cx_pkt_t *vpx_codec_pkt_list_get( - struct vpx_codec_pkt_list *list, vpx_codec_iter_t *iter) { - const vpx_codec_cx_pkt_t *pkt; +const aom_codec_cx_pkt_t *aom_codec_pkt_list_get( + struct aom_codec_pkt_list *list, aom_codec_iter_t *iter) { + const aom_codec_cx_pkt_t *pkt; if (!(*iter)) { *iter = list->pkts; } - pkt = (const vpx_codec_cx_pkt_t *)*iter; + pkt = (const aom_codec_cx_pkt_t *)*iter; if ((size_t)(pkt - list->pkts) < list->cnt) *iter = pkt + 1; diff --git a/aom/src/vpx_image.c b/aom/src/aom_image.c similarity index 91% rename from aom/src/vpx_image.c rename to aom/src/aom_image.c index a6d7674ad592fb2f08fd8b0f23b7d3783b3cac4e..5ef51d12d84ac1869771b3680031b21e92f9bb60 100644 --- a/aom/src/vpx_image.c +++ b/aom/src/aom_image.c @@ -12,11 +12,11 @@ #include <stdlib.h> #include <string.h> -#include "aom/vpx_image.h" -#include "aom/vpx_integer.h" -#include "aom_mem/vpx_mem.h" +#include "aom/aom_image.h" +#include "aom/aom_integer.h" +#include "aom_mem/aom_mem.h" -static vpx_image_t *img_alloc_helper(vpx_image_t *img, vpx_img_fmt_t fmt, +static aom_image_t *img_alloc_helper(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int buf_align, unsigned int stride_align, @@ -100,13 +100,13 @@ static vpx_image_t *img_alloc_helper(vpx_image_t *img, vpx_img_fmt_t fmt, /* Allocate the new image */ if (!img) { - img = (vpx_image_t *)calloc(1, sizeof(vpx_image_t)); + img = (aom_image_t *)calloc(1, sizeof(aom_image_t)); if (!img) goto fail; img->self_allocd = 1; } else { - memset(img, 0, sizeof(vpx_image_t)); + memset(img, 0, sizeof(aom_image_t)); } img->img_data = img_data; @@ -118,7 +118,7 @@ static vpx_image_t *img_alloc_helper(vpx_image_t *img, vpx_img_fmt_t fmt, if (alloc_size != (size_t)alloc_size) goto fail; - img->img_data = (uint8_t *)vpx_memalign(buf_align, (size_t)alloc_size); + img->img_data = (uint8_t *)aom_memalign(buf_align, (size_t)alloc_size); img->img_data_owner = 1; } @@ -137,20 +137,20 @@ static vpx_image_t *img_alloc_helper(vpx_image_t *img, vpx_img_fmt_t fmt, img->stride[VPX_PLANE_U] = img->stride[VPX_PLANE_V] = stride_in_bytes >> xcs; /* Default viewport to entire image */ - if (!vpx_img_set_rect(img, 0, 0, d_w, d_h)) return img; + if (!aom_img_set_rect(img, 0, 0, d_w, d_h)) return img; fail: - vpx_img_free(img); + aom_img_free(img); return NULL; } -vpx_image_t *vpx_img_alloc(vpx_image_t *img, vpx_img_fmt_t fmt, +aom_image_t *aom_img_alloc(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int align) { return img_alloc_helper(img, fmt, d_w, d_h, align, align, NULL); } -vpx_image_t *vpx_img_wrap(vpx_image_t *img, vpx_img_fmt_t fmt, unsigned int d_w, +aom_image_t *aom_img_wrap(aom_image_t *img, aom_img_fmt_t fmt, unsigned int d_w, unsigned int d_h, unsigned int stride_align, unsigned char *img_data) { /* By setting buf_align = 1, we don't change buffer alignment in this @@ -158,7 +158,7 @@ vpx_image_t *vpx_img_wrap(vpx_image_t *img, vpx_img_fmt_t fmt, unsigned int d_w, return img_alloc_helper(img, fmt, d_w, d_h, 1, stride_align, img_data); } -int vpx_img_set_rect(vpx_image_t *img, unsigned int x, unsigned int y, +int aom_img_set_rect(aom_image_t *img, unsigned int x, unsigned int y, unsigned int w, unsigned int h) { unsigned char *data; @@ -208,7 +208,7 @@ int vpx_img_set_rect(vpx_image_t *img, unsigned int x, unsigned int y, return -1; } -void vpx_img_flip(vpx_image_t *img) { +void aom_img_flip(aom_image_t *img) { /* Note: In the calculation pointer adjustment calculation, we want the * rhs to be promoted to a signed type. Section 6.3.1.8 of the ISO C99 * standard indicates that if the adjustment parameter is unsigned, the @@ -231,9 +231,9 @@ void vpx_img_flip(vpx_image_t *img) { img->stride[VPX_PLANE_ALPHA] = -img->stride[VPX_PLANE_ALPHA]; } -void vpx_img_free(vpx_image_t *img) { +void aom_img_free(aom_image_t *img) { if (img) { - if (img->img_data && img->img_data_owner) vpx_free(img->img_data); + if (img->img_data && img->img_data_owner) aom_free(img->img_data); if (img->self_allocd) free(img); } diff --git a/aom/src/vpx_psnr.c b/aom/src/aom_psnr.c similarity index 88% rename from aom/src/vpx_psnr.c rename to aom/src/aom_psnr.c index b3a1d7bd00db1803e9727d01656c7cb1aa2d4b0a..2049921fd23049bea6d89f3724dd8bfaa7db1b83 100644 --- a/aom/src/vpx_psnr.c +++ b/aom/src/aom_psnr.c @@ -11,11 +11,11 @@ #include <math.h> -#include "aom/internal/vpx_psnr.h" +#include "aom/internal/aom_psnr.h" #define MAX_PSNR 100.0 -double vpx_sse_to_psnr(double samples, double peak, double sse) { +double aom_sse_to_psnr(double samples, double peak, double sse) { if (sse > 0.0) { const double psnr = 10.0 * log10(samples * peak * peak / sse); return psnr > MAX_PSNR ? MAX_PSNR : psnr; diff --git a/aom/src/svc_encodeframe.c b/aom/src/svc_encodeframe.c index 38d73b2bd597658782154b93006bd7e5e97b8b90..0d2637a61e6191f6c717b86eefe458179afbe2f4 100644 --- a/aom/src/svc_encodeframe.c +++ b/aom/src/svc_encodeframe.c @@ -22,11 +22,11 @@ #include <stdlib.h> #include <string.h> #define VPX_DISABLE_CTRL_TYPECHECKS 1 -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom/svc_context.h" #include "aom/vp8cx.h" -#include "aom/vpx_encoder.h" -#include "aom_mem/vpx_mem.h" +#include "aom/aom_encoder.h" +#include "aom_mem/aom_mem.h" #include "av1/common/onyxc_int.h" #ifdef __MINGW32__ @@ -71,7 +71,7 @@ static const int option_min_values[ALL_OPTION_TYPES] = { 0, 0, 1, 0 }; typedef struct FrameData { void *buf; // compressed data buffer size_t size; // length of compressed data - vpx_codec_frame_flags_t flags; /**< flags for this frame */ + aom_codec_frame_flags_t flags; /**< flags for this frame */ struct FrameData *next; } FrameData; @@ -125,7 +125,7 @@ static int svc_log(SvcContext *svc_ctx, SVC_LOG_LEVEL level, const char *fmt, return retval; } -static vpx_codec_err_t extract_option(LAYER_OPTION_TYPE type, char *input, +static aom_codec_err_t extract_option(LAYER_OPTION_TYPE type, char *input, int *value0, int *value1) { if (type == SCALE_FACTOR) { *value0 = strtol(input, &input, 10); @@ -146,13 +146,13 @@ static vpx_codec_err_t extract_option(LAYER_OPTION_TYPE type, char *input, return VPX_CODEC_OK; } -static vpx_codec_err_t parse_layer_options_from_string(SvcContext *svc_ctx, +static aom_codec_err_t parse_layer_options_from_string(SvcContext *svc_ctx, LAYER_OPTION_TYPE type, const char *input, int *option0, int *option1) { int i; - vpx_codec_err_t res = VPX_CODEC_OK; + aom_codec_err_t res = VPX_CODEC_OK; char *input_string; char *token; const char *delim = ","; @@ -191,13 +191,13 @@ static vpx_codec_err_t parse_layer_options_from_string(SvcContext *svc_ctx, * quantizers=<q1>,<q2>,... * svc_mode = [i|ip|alt_ip|gf] */ -static vpx_codec_err_t parse_options(SvcContext *svc_ctx, const char *options) { +static aom_codec_err_t parse_options(SvcContext *svc_ctx, const char *options) { char *input_string; char *option_name; char *option_value; char *input_ptr; SvcInternal_t *const si = get_svc_internal(svc_ctx); - vpx_codec_err_t res = VPX_CODEC_OK; + aom_codec_err_t res = VPX_CODEC_OK; int i, alt_ref_enabled = 0; if (options == NULL) return VPX_CODEC_OK; @@ -278,7 +278,7 @@ static vpx_codec_err_t parse_options(SvcContext *svc_ctx, const char *options) { return res; } -vpx_codec_err_t vpx_svc_set_options(SvcContext *svc_ctx, const char *options) { +aom_codec_err_t aom_svc_set_options(SvcContext *svc_ctx, const char *options) { SvcInternal_t *const si = get_svc_internal(svc_ctx); if (svc_ctx == NULL || options == NULL || si == NULL) { return VPX_CODEC_INVALID_PARAM; @@ -289,7 +289,7 @@ vpx_codec_err_t vpx_svc_set_options(SvcContext *svc_ctx, const char *options) { } void assign_layer_bitrates(const SvcContext *svc_ctx, - vpx_codec_enc_cfg_t *const enc_cfg) { + aom_codec_enc_cfg_t *const enc_cfg) { int i; const SvcInternal_t *const si = get_const_svc_internal(svc_ctx); int sl, tl, spatial_layer_target; @@ -373,10 +373,10 @@ void assign_layer_bitrates(const SvcContext *svc_ctx, } } -vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, - vpx_codec_iface_t *iface, - vpx_codec_enc_cfg_t *enc_cfg) { - vpx_codec_err_t res; +aom_codec_err_t aom_svc_init(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx, + aom_codec_iface_t *iface, + aom_codec_enc_cfg_t *enc_cfg) { + aom_codec_err_t res; int i, sl, tl; SvcInternal_t *const si = get_svc_internal(svc_ctx); if (svc_ctx == NULL || codec_ctx == NULL || iface == NULL || @@ -486,14 +486,14 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, enc_cfg->g_error_resilient = 1; // Initialize codec - res = vpx_codec_enc_init(codec_ctx, iface, enc_cfg, VPX_CODEC_USE_PSNR); + res = aom_codec_enc_init(codec_ctx, iface, enc_cfg, VPX_CODEC_USE_PSNR); if (res != VPX_CODEC_OK) { svc_log(svc_ctx, SVC_LOG_ERROR, "svc_enc_init error\n"); return res; } if (svc_ctx->spatial_layers > 1 || svc_ctx->temporal_layers > 1) { - vpx_codec_control(codec_ctx, VP9E_SET_SVC, 1); - vpx_codec_control(codec_ctx, VP9E_SET_SVC_PARAMETERS, &si->svc_params); + aom_codec_control(codec_ctx, VP9E_SET_SVC, 1); + aom_codec_control(codec_ctx, VP9E_SET_SVC_PARAMETERS, &si->svc_params); } return VPX_CODEC_OK; } @@ -502,12 +502,12 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, * Encode a frame into multiple layers * Create a superframe containing the individual layers */ -vpx_codec_err_t vpx_svc_encode(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, - struct vpx_image *rawimg, vpx_codec_pts_t pts, +aom_codec_err_t aom_svc_encode(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx, + struct aom_image *rawimg, aom_codec_pts_t pts, int64_t duration, int deadline) { - vpx_codec_err_t res; - vpx_codec_iter_t iter; - const vpx_codec_cx_pkt_t *cx_pkt; + aom_codec_err_t res; + aom_codec_iter_t iter; + const aom_codec_cx_pkt_t *cx_pkt; SvcInternal_t *const si = get_svc_internal(svc_ctx); if (svc_ctx == NULL || codec_ctx == NULL || si == NULL) { return VPX_CODEC_INVALID_PARAM; @@ -516,13 +516,13 @@ vpx_codec_err_t vpx_svc_encode(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, svc_log_reset(svc_ctx); res = - vpx_codec_encode(codec_ctx, rawimg, pts, (uint32_t)duration, 0, deadline); + aom_codec_encode(codec_ctx, rawimg, pts, (uint32_t)duration, 0, deadline); if (res != VPX_CODEC_OK) { return res; } // save compressed data iter = NULL; - while ((cx_pkt = vpx_codec_get_cx_data(codec_ctx, &iter))) { + while ((cx_pkt = aom_codec_get_cx_data(codec_ctx, &iter))) { switch (cx_pkt->kind) { #if VPX_ENCODER_ABI_VERSION > (5 + VPX_CODEC_ABI_VERSION) #if CONFIG_SPATIAL_SVC @@ -568,7 +568,7 @@ vpx_codec_err_t vpx_svc_encode(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, return VPX_CODEC_OK; } -const char *vpx_svc_get_message(const SvcContext *svc_ctx) { +const char *aom_svc_get_message(const SvcContext *svc_ctx) { const SvcInternal_t *const si = get_const_svc_internal(svc_ctx); if (svc_ctx == NULL || si == NULL) return NULL; return si->message_buffer; @@ -580,7 +580,7 @@ static double calc_psnr(double d) { } // dump accumulated statistics and reset accumulated values -const char *vpx_svc_dump_statistics(SvcContext *svc_ctx) { +const char *aom_svc_dump_statistics(SvcContext *svc_ctx) { int number_of_frames; int i, j; uint32_t bytes_total = 0; @@ -595,7 +595,7 @@ const char *vpx_svc_dump_statistics(SvcContext *svc_ctx) { svc_log_reset(svc_ctx); number_of_frames = si->psnr_pkt_received; - if (number_of_frames <= 0) return vpx_svc_get_message(svc_ctx); + if (number_of_frames <= 0) return aom_svc_get_message(svc_ctx); svc_log(svc_ctx, SVC_LOG_INFO, "\n"); for (i = 0; i < svc_ctx->spatial_layers; ++i) { @@ -635,10 +635,10 @@ const char *vpx_svc_dump_statistics(SvcContext *svc_ctx) { si->psnr_pkt_received = 0; svc_log(svc_ctx, SVC_LOG_INFO, "Total Bytes=[%u]\n", bytes_total); - return vpx_svc_get_message(svc_ctx); + return aom_svc_get_message(svc_ctx); } -void vpx_svc_release(SvcContext *svc_ctx) { +void aom_svc_release(SvcContext *svc_ctx) { SvcInternal_t *si; if (svc_ctx == NULL) return; // do not use get_svc_internal as it will unnecessarily allocate an diff --git a/aom/svc_context.h b/aom/svc_context.h index 7216749918108de3d9857634f60873de17847fae..4dcfe0ec7f88997d9dc1c04df986d365b02f83d1 100644 --- a/aom/svc_context.h +++ b/aom/svc_context.h @@ -18,7 +18,7 @@ #define VPX_SVC_CONTEXT_H_ #include "./vp8cx.h" -#include "./vpx_encoder.h" +#include "./aom_encoder.h" #ifdef __cplusplus extern "C" { @@ -42,7 +42,7 @@ typedef struct { int speed; // speed setting for codec int threads; int aqmode; // turns on aq-mode=3 (cyclic_refresh): 0=off, 1=on. - // private storage for vpx_svc_encode + // private storage for aom_svc_encode void *internal; } SvcContext; @@ -50,10 +50,10 @@ typedef struct { #define COMPONENTS 4 // psnr & sse statistics maintained for total, y, u, v typedef struct SvcInternal { - char options[OPTION_BUFFER_SIZE]; // set by vpx_svc_set_options + char options[OPTION_BUFFER_SIZE]; // set by aom_svc_set_options // values extracted from option, quantizers - vpx_svc_extra_cfg_t svc_params; + aom_svc_extra_cfg_t svc_params; int enable_auto_alt_ref[VPX_SS_MAX_LAYERS]; int bitrates[VPX_SS_MAX_LAYERS]; @@ -73,7 +73,7 @@ typedef struct SvcInternal { int use_multiple_frame_contexts; char message_buffer[2048]; - vpx_codec_ctx_t *codec_ctx; + aom_codec_ctx_t *codec_ctx; } SvcInternal_t; /** @@ -84,35 +84,35 @@ typedef struct SvcInternal { * scaling-factors=<n1>/<d1>,<n2>/<d2>,... * quantizers=<q1>,<q2>,... */ -vpx_codec_err_t vpx_svc_set_options(SvcContext *svc_ctx, const char *options); +aom_codec_err_t aom_svc_set_options(SvcContext *svc_ctx, const char *options); /** * initialize SVC encoding */ -vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, - vpx_codec_iface_t *iface, - vpx_codec_enc_cfg_t *cfg); +aom_codec_err_t aom_svc_init(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx, + aom_codec_iface_t *iface, + aom_codec_enc_cfg_t *cfg); /** * encode a frame of video with multiple layers */ -vpx_codec_err_t vpx_svc_encode(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx, - struct vpx_image *rawimg, vpx_codec_pts_t pts, +aom_codec_err_t aom_svc_encode(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx, + struct aom_image *rawimg, aom_codec_pts_t pts, int64_t duration, int deadline); /** * finished with svc encoding, release allocated resources */ -void vpx_svc_release(SvcContext *svc_ctx); +void aom_svc_release(SvcContext *svc_ctx); /** * dump accumulated statistics and reset accumulated values */ -const char *vpx_svc_dump_statistics(SvcContext *svc_ctx); +const char *aom_svc_dump_statistics(SvcContext *svc_ctx); /** * get status message from previous encode */ -const char *vpx_svc_get_message(const SvcContext *svc_ctx); +const char *aom_svc_get_message(const SvcContext *svc_ctx); #ifdef __cplusplus } // extern "C" diff --git a/aom/vp8.h b/aom/vp8.h index 741def71478e2d54d56deede144a5a231b731abe..d9413f315a3d391c501bd55a1672f7510b64fd0e 100644 --- a/aom/vp8.h +++ b/aom/vp8.h @@ -11,7 +11,7 @@ /*!\defgroup vp8 VP8 * \ingroup codecs - * VP8 is vpx's newest video compression algorithm that uses motion + * VP8 is aom's newest video compression algorithm that uses motion * compensated prediction, Discrete Cosine Transform (DCT) coding of the * prediction error signal and context dependent entropy coding techniques * based on arithmetic principles. It features: @@ -31,8 +31,8 @@ #ifndef VPX_VP8_H_ #define VPX_VP8_H_ -#include "./vpx_codec.h" -#include "./vpx_image.h" +#include "./aom_codec.h" +#include "./aom_image.h" #ifdef __cplusplus extern "C" { @@ -98,20 +98,20 @@ typedef struct vp8_postproc_cfg { * * The set of macros define the type of VP8 reference frames */ -typedef enum vpx_ref_frame_type { +typedef enum aom_ref_frame_type { VP8_LAST_FRAME = 1, VP8_GOLD_FRAME = 2, VP8_ALTR_FRAME = 4 -} vpx_ref_frame_type_t; +} aom_ref_frame_type_t; /*!\brief reference frame data struct * * Define the data struct to access vp8 reference frames. */ -typedef struct vpx_ref_frame { - vpx_ref_frame_type_t frame_type; /**< which reference frame */ - vpx_image_t img; /**< reference frame data in image format */ -} vpx_ref_frame_t; +typedef struct aom_ref_frame { + aom_ref_frame_type_t frame_type; /**< which reference frame */ + aom_image_t img; /**< reference frame data in image format */ +} aom_ref_frame_t; /*!\brief VP9 specific reference frame data struct * @@ -119,7 +119,7 @@ typedef struct vpx_ref_frame { */ typedef struct vp9_ref_frame { int idx; /**< frame index to get (input) */ - vpx_image_t img; /**< img structure to populate (output) */ + aom_image_t img; /**< img structure to populate (output) */ } vp9_ref_frame_t; /*!\cond */ @@ -127,9 +127,9 @@ typedef struct vp9_ref_frame { * * defines the data type for each of VP8 decoder control function requires */ -VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, vpx_ref_frame_t *) +VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, aom_ref_frame_t *) #define VPX_CTRL_VP8_SET_REFERENCE -VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, vpx_ref_frame_t *) +VPX_CTRL_USE_TYPE(VP8_COPY_REFERENCE, aom_ref_frame_t *) #define VPX_CTRL_VP8_COPY_REFERENCE VPX_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *) #define VPX_CTRL_VP8_SET_POSTPROC diff --git a/aom/vp8cx.h b/aom/vp8cx.h index 547f9fec6573165851e3be56c8e16117111ac197..882d084377547804541c32bde1737ae38d6acc0b 100644 --- a/aom/vp8cx.h +++ b/aom/vp8cx.h @@ -17,11 +17,11 @@ * @{ */ #include "./vp8.h" -#include "./vpx_encoder.h" +#include "./aom_encoder.h" /*!\file * \brief Provides definitions for using VP8 or VP9 encoder algorithm within the - * vpx Codec Interface. + * aom Codec Interface. */ #ifdef __cplusplus @@ -33,8 +33,8 @@ extern "C" { * This interface provides the capability to encode raw VP10 streams. * @{ */ -extern vpx_codec_iface_t vpx_codec_vp10_cx_algo; -extern vpx_codec_iface_t *vpx_codec_vp10_cx(void); +extern aom_codec_iface_t aom_codec_vp10_cx_algo; +extern aom_codec_iface_t *aom_codec_vp10_cx(void); /*!@} - end algorithm interface member group*/ /* @@ -112,7 +112,7 @@ extern vpx_codec_iface_t *vpx_codec_vp10_cx(void); * This set of macros define the control functions available for VPx * encoder interface. * - * \sa #vpx_codec_control + * \sa #aom_codec_control */ enum vp8e_enc_control_id { /*!\brief Codec control function to pass an ROI map to encoder. @@ -219,7 +219,7 @@ enum vp8e_enc_control_id { /*!\brief Codec control function to set constrained quality level. * - * \attention For this value to be used vpx_codec_enc_cfg_t::g_usage must be + * \attention For this value to be used aom_codec_enc_cfg_t::g_usage must be * set to #VPX_CQ. * \note Valid range: 0..63 * @@ -465,8 +465,8 @@ enum vp8e_enc_control_id { VP9E_SET_SVC_PARAMETERS, /*!\brief Codec control function to set svc layer for spatial and temporal. - * \note Valid ranges: 0..#vpx_codec_enc_cfg::ss_number_layers for spatial - * layer and 0..#vpx_codec_enc_cfg::ts_number_layers for + * \note Valid ranges: 0..#aom_codec_enc_cfg::ss_number_layers for spatial + * layer and 0..#aom_codec_enc_cfg::ts_number_layers for * temporal layer. * * Supported in codecs: VP9 @@ -558,7 +558,7 @@ enum vp8e_enc_control_id { /*!\brief Codec control function to set the frame flags and buffer indices * for spatial layers. The frame flags and buffer indices are set using the - * struct #vpx_svc_ref_frame_config defined below. + * struct #aom_svc_ref_frame_config defined below. * * Supported in codecs: VP9 */ @@ -573,11 +573,11 @@ enum vp8e_enc_control_id { VP9E_SET_RENDER_SIZE, }; -/*!\brief vpx 1-D scaling mode +/*!\brief aom 1-D scaling mode * - * This set of constants define 1-D vpx scaling modes + * This set of constants define 1-D aom scaling modes */ -typedef enum vpx_scaling_mode_1d { +typedef enum aom_scaling_mode_1d { VP8E_NORMAL = 0, VP8E_FOURFIVE = 1, VP8E_THREEFIVE = 2, @@ -611,13 +611,13 @@ typedef enum vp9e_temporal_layering_mode { VP9E_TEMPORAL_LAYERING_MODE_0212 = 3 } VP9E_TEMPORAL_LAYERING_MODE; -/*!\brief vpx region of interest map +/*!\brief aom region of interest map * * These defines the data structures for the region of interest map * */ -typedef struct vpx_roi_map { +typedef struct aom_roi_map { /*! An id between 0 and 3 for each 16x16 region within a frame. */ unsigned char *roi_map; unsigned int rows; /**< Number of rows. */ @@ -629,31 +629,31 @@ typedef struct vpx_roi_map { int delta_lf[4]; /**< Loop filter deltas. */ /*! Static breakout threshold for each segment. */ unsigned int static_threshold[4]; -} vpx_roi_map_t; +} aom_roi_map_t; -/*!\brief vpx active region map +/*!\brief aom active region map * * These defines the data structures for active region map * */ -typedef struct vpx_active_map { +typedef struct aom_active_map { unsigned char *active_map; /**< specify an on (1) or off (0) each 16x16 region within a frame */ unsigned int rows; /**< number of rows */ unsigned int cols; /**< number of cols */ -} vpx_active_map_t; +} aom_active_map_t; -/*!\brief vpx image scaling mode +/*!\brief aom image scaling mode * * This defines the data structure for image scaling mode * */ -typedef struct vpx_scaling_mode { +typedef struct aom_scaling_mode { VPX_SCALING_MODE h_scaling_mode; /**< horizontal scaling mode */ VPX_SCALING_MODE v_scaling_mode; /**< vertical scaling mode */ -} vpx_scaling_mode_t; +} aom_scaling_mode_t; /*!\brief VP8 token partition mode * @@ -674,14 +674,14 @@ typedef enum { VPX_CONTENT_DEFAULT, VPX_CONTENT_SCREEN, VPX_CONTENT_INVALID -} vpx_tune_content; +} aom_tune_content; /*!\brief VP8 model tuning parameters * * Changes the encoder to tune for certain types of input material. * */ -typedef enum { VPX_TUNE_PSNR, VPX_TUNE_SSIM } vpx_tune_metric; +typedef enum { VPX_TUNE_PSNR, VPX_TUNE_SSIM } aom_tune_metric; /*!\brief vp9 svc layer parameters * @@ -690,10 +690,10 @@ typedef enum { VPX_TUNE_PSNR, VPX_TUNE_SSIM } vpx_tune_metric; * temporal layer id for the current frame. * */ -typedef struct vpx_svc_layer_id { +typedef struct aom_svc_layer_id { int spatial_layer_id; /**< Spatial layer id number. */ int temporal_layer_id; /**< Temporal layer id number. */ -} vpx_svc_layer_id_t; +} aom_svc_layer_id_t; /*!\brief vp9 svc frame flag parameters. * @@ -703,12 +703,12 @@ typedef struct vpx_svc_layer_id { * flags and buffer indices for each spatial layer for the current (super)frame. * */ -typedef struct vpx_svc_ref_frame_config { +typedef struct aom_svc_ref_frame_config { int frame_flags[VPX_TS_MAX_LAYERS]; /**< Frame flags. */ int lst_fb_idx[VPX_TS_MAX_LAYERS]; /**< Last buffer index. */ int gld_fb_idx[VPX_TS_MAX_LAYERS]; /**< Golden buffer index. */ int alt_fb_idx[VPX_TS_MAX_LAYERS]; /**< Altref buffer index. */ -} vpx_svc_ref_frame_config_t; +} aom_svc_ref_frame_config_t; /*!\cond */ /*!\brief VP8 encoder control function parameter type @@ -722,11 +722,11 @@ VPX_CTRL_USE_TYPE(VP8E_SET_FRAME_FLAGS, int) #define VPX_CTRL_VP8E_SET_FRAME_FLAGS VPX_CTRL_USE_TYPE(VP8E_SET_TEMPORAL_LAYER_ID, int) #define VPX_CTRL_VP8E_SET_TEMPORAL_LAYER_ID -VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, vpx_roi_map_t *) +VPX_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, aom_roi_map_t *) #define VPX_CTRL_VP8E_SET_ROI_MAP -VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, vpx_active_map_t *) +VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, aom_active_map_t *) #define VPX_CTRL_VP8E_SET_ACTIVEMAP -VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, vpx_scaling_mode_t *) +VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, aom_scaling_mode_t *) #define VPX_CTRL_VP8E_SET_SCALEMODE VPX_CTRL_USE_TYPE(VP9E_SET_SVC, int) @@ -735,7 +735,7 @@ VPX_CTRL_USE_TYPE(VP9E_SET_SVC_PARAMETERS, void *) #define VPX_CTRL_VP9E_SET_SVC_PARAMETERS VPX_CTRL_USE_TYPE(VP9E_REGISTER_CX_CALLBACK, void *) #define VPX_CTRL_VP9E_REGISTER_CX_CALLBACK -VPX_CTRL_USE_TYPE(VP9E_SET_SVC_LAYER_ID, vpx_svc_layer_id_t *) +VPX_CTRL_USE_TYPE(VP9E_SET_SVC_LAYER_ID, aom_svc_layer_id_t *) #define VPX_CTRL_VP9E_SET_SVC_LAYER_ID VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int) @@ -757,7 +757,7 @@ VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH, unsigned int) #define VPX_CTRL_VP8E_SET_ARNR_STRENGTH VPX_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ARNR_TYPE, unsigned int) #define VPX_CTRL_VP8E_SET_ARNR_TYPE -VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* vpx_tune_metric */ +VPX_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* aom_tune_metric */ #define VPX_CTRL_VP8E_SET_TUNING VPX_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL, unsigned int) #define VPX_CTRL_VP8E_SET_CQ_LEVEL @@ -771,7 +771,7 @@ VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *) #define VPX_CTRL_VP8E_GET_LAST_QUANTIZER VPX_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *) #define VPX_CTRL_VP8E_GET_LAST_QUANTIZER_64 -VPX_CTRL_USE_TYPE(VP9E_GET_SVC_LAYER_ID, vpx_svc_layer_id_t *) +VPX_CTRL_USE_TYPE(VP9E_GET_SVC_LAYER_ID, aom_svc_layer_id_t *) #define VPX_CTRL_VP9E_GET_SVC_LAYER_ID VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int) @@ -811,7 +811,7 @@ VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int) VPX_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY, unsigned int) #define VPX_CTRL_VP9E_SET_NOISE_SENSITIVITY -VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* vpx_tune_content */ +VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* aom_tune_content */ #define VPX_CTRL_VP9E_SET_TUNE_CONTENT VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_SPACE, int) @@ -823,13 +823,13 @@ VPX_CTRL_USE_TYPE(VP9E_SET_MIN_GF_INTERVAL, unsigned int) VPX_CTRL_USE_TYPE(VP9E_SET_MAX_GF_INTERVAL, unsigned int) #define VPX_CTRL_VP9E_SET_MAX_GF_INTERVAL -VPX_CTRL_USE_TYPE(VP9E_GET_ACTIVEMAP, vpx_active_map_t *) +VPX_CTRL_USE_TYPE(VP9E_GET_ACTIVEMAP, aom_active_map_t *) #define VPX_CTRL_VP9E_GET_ACTIVEMAP VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_RANGE, int) #define VPX_CTRL_VP9E_SET_COLOR_RANGE -VPX_CTRL_USE_TYPE(VP9E_SET_SVC_REF_FRAME_CONFIG, vpx_svc_ref_frame_config_t *) +VPX_CTRL_USE_TYPE(VP9E_SET_SVC_REF_FRAME_CONFIG, aom_svc_ref_frame_config_t *) #define VPX_CTRL_VP9E_SET_SVC_REF_FRAME_CONFIG VPX_CTRL_USE_TYPE(VP9E_SET_RENDER_SIZE, int *) diff --git a/aom/vp8dx.h b/aom/vp8dx.h index fde11349eb3e5cedaf63df843bb1e46aac54a277..307d217a25975e177b89cd1aa24952725bf233ac 100644 --- a/aom/vp8dx.h +++ b/aom/vp8dx.h @@ -15,7 +15,7 @@ * @{ */ /*!\file - * \brief Provides definitions for using VP8 or VP9 within the vpx Decoder + * \brief Provides definitions for using VP8 or VP9 within the aom Decoder * interface. */ #ifndef VPX_VP8DX_H_ @@ -33,8 +33,8 @@ extern "C" { * This interface provides the capability to decode VP10 streams. * @{ */ -extern vpx_codec_iface_t vpx_codec_vp10_dx_algo; -extern vpx_codec_iface_t *vpx_codec_vp10_dx(void); +extern aom_codec_iface_t aom_codec_vp10_dx_algo; +extern aom_codec_iface_t *aom_codec_vp10_dx(void); /*!@} - end algorithm interface member group*/ /*!\enum vp8_dec_control_id @@ -43,7 +43,7 @@ extern vpx_codec_iface_t *vpx_codec_vp10_dx(void); * This set of macros define the control functions available for the VP8 * decoder interface. * - * \sa #vpx_codec_control + * \sa #aom_codec_control */ enum vp8_dec_control_id { /** control function to get info on which reference frames were updated @@ -60,7 +60,7 @@ enum vp8_dec_control_id { VP8D_GET_LAST_REF_USED, /** decryption function to decrypt encoded buffer data immediately - * before decoding. Takes a vpx_decrypt_init, which contains + * before decoding. Takes a aom_decrypt_init, which contains * a callback function and opaque context pointer. */ VPXD_SET_DECRYPTOR, @@ -109,24 +109,24 @@ enum vp8_dec_control_id { /** Decrypt n bytes of data from input -> output, using the decrypt_state * passed in VPXD_SET_DECRYPTOR. */ -typedef void (*vpx_decrypt_cb)(void *decrypt_state, const unsigned char *input, +typedef void (*aom_decrypt_cb)(void *decrypt_state, const unsigned char *input, unsigned char *output, int count); /*!\brief Structure to hold decryption state * * Defines a structure to hold the decryption state and access function. */ -typedef struct vpx_decrypt_init { +typedef struct aom_decrypt_init { /*! Decrypt callback. */ - vpx_decrypt_cb decrypt_cb; + aom_decrypt_cb decrypt_cb; /*! Decryption state. */ void *decrypt_state; -} vpx_decrypt_init; +} aom_decrypt_init; -/*!\brief A deprecated alias for vpx_decrypt_init. +/*!\brief A deprecated alias for aom_decrypt_init. */ -typedef vpx_decrypt_init vp8_decrypt_init; +typedef aom_decrypt_init vp8_decrypt_init; /*!\cond */ /*!\brief VP8 decoder control function parameter type @@ -142,9 +142,9 @@ VPX_CTRL_USE_TYPE(VP8D_GET_FRAME_CORRUPTED, int *) #define VPX_CTRL_VP8D_GET_FRAME_CORRUPTED VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_USED, int *) #define VPX_CTRL_VP8D_GET_LAST_REF_USED -VPX_CTRL_USE_TYPE(VPXD_SET_DECRYPTOR, vpx_decrypt_init *) +VPX_CTRL_USE_TYPE(VPXD_SET_DECRYPTOR, aom_decrypt_init *) #define VPX_CTRL_VPXD_SET_DECRYPTOR -VPX_CTRL_USE_TYPE(VP8D_SET_DECRYPTOR, vpx_decrypt_init *) +VPX_CTRL_USE_TYPE(VP8D_SET_DECRYPTOR, aom_decrypt_init *) #define VPX_CTRL_VP8D_SET_DECRYPTOR VPX_CTRL_USE_TYPE(VP9D_GET_DISPLAY_SIZE, int *) #define VPX_CTRL_VP9D_GET_DISPLAY_SIZE diff --git a/aom_dsp/vpx_convolve.c b/aom_dsp/aom_convolve.c similarity index 90% rename from aom_dsp/vpx_convolve.c rename to aom_dsp/aom_convolve.c index 2f91df6c4e83422eb05fa2803bc3676fdc8f8ddb..233e8502073a6d46d5c27f84573063519bb004f7 100644 --- a/aom_dsp/vpx_convolve.c +++ b/aom_dsp/aom_convolve.c @@ -12,12 +12,12 @@ #include <assert.h> #include <string.h> -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" -#include "aom_dsp/vpx_convolve.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_dsp/vpx_filter.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" +#include "aom_dsp/aom_convolve.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_dsp/aom_filter.h" #include "aom_ports/mem.h" static void convolve_horiz(const uint8_t *src, ptrdiff_t src_stride, @@ -154,7 +154,7 @@ static int get_filter_offset(const int16_t *f, const InterpKernel *base) { return (int)((const InterpKernel *)(intptr_t)f - base); } -void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -169,7 +169,7 @@ void vpx_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, w, h); } -void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -184,7 +184,7 @@ void vpx_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, x_step_q4, w, h); } -void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -199,7 +199,7 @@ void vpx_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, w, h); } -void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -214,7 +214,7 @@ void vpx_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, y_step_q4, w, h); } -void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { @@ -228,7 +228,7 @@ void vpx_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, filters_y, y0_q4, y_step_q4, w, h); } -void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { @@ -237,12 +237,12 @@ void vpx_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, assert(w <= 64); assert(h <= 64); - vpx_convolve8_c(src, src_stride, temp, 64, filter_x, x_step_q4, filter_y, + aom_convolve8_c(src, src_stride, temp, 64, filter_x, x_step_q4, filter_y, y_step_q4, w, h); - vpx_convolve_avg_c(temp, 64, dst, dst_stride, NULL, 0, NULL, 0, w, h); + aom_convolve_avg_c(temp, 64, dst, dst_stride, NULL, 0, NULL, 0, w, h); } -void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int filter_x_stride, const int16_t *filter_y, int filter_y_stride, int w, int h) { @@ -260,7 +260,7 @@ void vpx_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, } } -void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int filter_x_stride, const int16_t *filter_y, int filter_y_stride, int w, int h) { @@ -279,53 +279,53 @@ void vpx_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, } } -void vpx_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_scaled_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { - vpx_convolve8_horiz_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, + aom_convolve8_horiz_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } -void vpx_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_scaled_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { - vpx_convolve8_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, + aom_convolve8_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } -void vpx_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_scaled_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { - vpx_convolve8_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, + aom_convolve8_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } -void vpx_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_scaled_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { - vpx_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } -void vpx_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_scaled_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { - vpx_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } -void vpx_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { - vpx_convolve8_avg_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, + aom_convolve8_avg_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } @@ -464,7 +464,7 @@ static void highbd_convolve(const uint8_t *src, ptrdiff_t src_stride, bd); } -void vpx_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -478,7 +478,7 @@ void vpx_highbd_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, x_step_q4, w, h, bd); } -void vpx_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, @@ -492,7 +492,7 @@ void vpx_highbd_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, x_step_q4, w, h, bd); } -void vpx_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -506,7 +506,7 @@ void vpx_highbd_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, y_step_q4, w, h, bd); } -void vpx_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, @@ -520,7 +520,7 @@ void vpx_highbd_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, y_step_q4, w, h, bd); } -void vpx_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -535,7 +535,7 @@ void vpx_highbd_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, filters_y, y0_q4, y_step_q4, w, h, bd); } -void vpx_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, +void aom_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -545,13 +545,13 @@ void vpx_highbd_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, assert(w <= 64); assert(h <= 64); - vpx_highbd_convolve8_c(src, src_stride, CONVERT_TO_BYTEPTR(temp), 64, + aom_highbd_convolve8_c(src, src_stride, CONVERT_TO_BYTEPTR(temp), 64, filter_x, x_step_q4, filter_y, y_step_q4, w, h, bd); - vpx_highbd_convolve_avg_c(CONVERT_TO_BYTEPTR(temp), 64, dst, dst_stride, NULL, + aom_highbd_convolve_avg_c(CONVERT_TO_BYTEPTR(temp), 64, dst, dst_stride, NULL, 0, NULL, 0, w, h, bd); } -void vpx_highbd_convolve_copy_c(const uint8_t *src8, ptrdiff_t src_stride, +void aom_highbd_convolve_copy_c(const uint8_t *src8, ptrdiff_t src_stride, uint8_t *dst8, ptrdiff_t dst_stride, const int16_t *filter_x, int filter_x_stride, const int16_t *filter_y, int filter_y_stride, @@ -572,7 +572,7 @@ void vpx_highbd_convolve_copy_c(const uint8_t *src8, ptrdiff_t src_stride, } } -void vpx_highbd_convolve_avg_c(const uint8_t *src8, ptrdiff_t src_stride, +void aom_highbd_convolve_avg_c(const uint8_t *src8, ptrdiff_t src_stride, uint8_t *dst8, ptrdiff_t dst_stride, const int16_t *filter_x, int filter_x_stride, const int16_t *filter_y, int filter_y_stride, diff --git a/aom_dsp/vpx_convolve.h b/aom_dsp/aom_convolve.h similarity index 96% rename from aom_dsp/vpx_convolve.h rename to aom_dsp/aom_convolve.h index b327ecc7ffaf4498d553d785e873bda2bd5f09f6..1fc4af4f6ff3c0ccde5d2cf3b35c86d93616f1de 100644 --- a/aom_dsp/vpx_convolve.h +++ b/aom_dsp/aom_convolve.h @@ -11,8 +11,8 @@ #ifndef VPX_DSP_VPX_CONVOLVE_H_ #define VPX_DSP_VPX_CONVOLVE_H_ -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { diff --git a/aom_dsp/vpx_dsp.mk b/aom_dsp/aom_dsp.mk similarity index 85% rename from aom_dsp/vpx_dsp.mk rename to aom_dsp/aom_dsp.mk index 8549d16e17d0e15c779fa35dfeb90371474596fc..fcc04c2a062bf7aec0f440962a7b40bea434aa66 100644 --- a/aom_dsp/vpx_dsp.mk +++ b/aom_dsp/aom_dsp.mk @@ -8,8 +8,8 @@ ## be found in the AUTHORS file in the root of the source tree. ## -DSP_SRCS-yes += vpx_dsp.mk -DSP_SRCS-yes += vpx_dsp_common.h +DSP_SRCS-yes += aom_dsp.mk +DSP_SRCS-yes += aom_dsp_common.h DSP_SRCS-$(HAVE_MSA) += mips/macros_msa.h @@ -42,7 +42,7 @@ ifeq ($(CONFIG_USE_X86INC),yes) DSP_SRCS-$(HAVE_SSE) += x86/intrapred_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/intrapred_sse2.asm DSP_SRCS-$(HAVE_SSSE3) += x86/intrapred_ssse3.asm -DSP_SRCS-$(HAVE_SSSE3) += x86/vpx_subpixel_8t_ssse3.asm +DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_ssse3.asm endif # CONFIG_USE_X86INC ifeq ($(CONFIG_VPX_HIGHBITDEPTH),yes) @@ -63,52 +63,52 @@ DSP_SRCS-$(HAVE_DSPR2) += mips/common_dspr2.h DSP_SRCS-$(HAVE_DSPR2) += mips/common_dspr2.c # interpolation filters -DSP_SRCS-yes += vpx_convolve.c -DSP_SRCS-yes += vpx_convolve.h -DSP_SRCS-yes += vpx_filter.h +DSP_SRCS-yes += aom_convolve.c +DSP_SRCS-yes += aom_convolve.h +DSP_SRCS-yes += aom_filter.h DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64) += x86/convolve.h -DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64) += x86/vpx_asm_stubs.c -DSP_SRCS-$(HAVE_SSE2) += x86/vpx_subpixel_8t_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/vpx_subpixel_bilinear_sse2.asm -DSP_SRCS-$(HAVE_SSSE3) += x86/vpx_subpixel_8t_ssse3.asm -DSP_SRCS-$(HAVE_SSSE3) += x86/vpx_subpixel_bilinear_ssse3.asm -DSP_SRCS-$(HAVE_AVX2) += x86/vpx_subpixel_8t_intrin_avx2.c -DSP_SRCS-$(HAVE_SSSE3) += x86/vpx_subpixel_8t_intrin_ssse3.c +DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64) += x86/aom_asm_stubs.c +DSP_SRCS-$(HAVE_SSE2) += x86/aom_subpixel_8t_sse2.asm +DSP_SRCS-$(HAVE_SSE2) += x86/aom_subpixel_bilinear_sse2.asm +DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_ssse3.asm +DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_bilinear_ssse3.asm +DSP_SRCS-$(HAVE_AVX2) += x86/aom_subpixel_8t_intrin_avx2.c +DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_intrin_ssse3.c ifeq ($(CONFIG_VPX_HIGHBITDEPTH),yes) -DSP_SRCS-$(HAVE_SSE2) += x86/vpx_high_subpixel_8t_sse2.asm -DSP_SRCS-$(HAVE_SSE2) += x86/vpx_high_subpixel_bilinear_sse2.asm +DSP_SRCS-$(HAVE_SSE2) += x86/aom_high_subpixel_8t_sse2.asm +DSP_SRCS-$(HAVE_SSE2) += x86/aom_high_subpixel_bilinear_sse2.asm endif ifeq ($(CONFIG_USE_X86INC),yes) -DSP_SRCS-$(HAVE_SSE2) += x86/vpx_convolve_copy_sse2.asm +DSP_SRCS-$(HAVE_SSE2) += x86/aom_convolve_copy_sse2.asm endif ifeq ($(HAVE_NEON_ASM),yes) -DSP_SRCS-yes += arm/vpx_convolve_copy_neon_asm$(ASM) -DSP_SRCS-yes += arm/vpx_convolve8_avg_neon_asm$(ASM) -DSP_SRCS-yes += arm/vpx_convolve8_neon_asm$(ASM) -DSP_SRCS-yes += arm/vpx_convolve_avg_neon_asm$(ASM) -DSP_SRCS-yes += arm/vpx_convolve_neon.c +DSP_SRCS-yes += arm/aom_convolve_copy_neon_asm$(ASM) +DSP_SRCS-yes += arm/aom_convolve8_avg_neon_asm$(ASM) +DSP_SRCS-yes += arm/aom_convolve8_neon_asm$(ASM) +DSP_SRCS-yes += arm/aom_convolve_avg_neon_asm$(ASM) +DSP_SRCS-yes += arm/aom_convolve_neon.c else ifeq ($(HAVE_NEON),yes) -DSP_SRCS-yes += arm/vpx_convolve_copy_neon.c -DSP_SRCS-yes += arm/vpx_convolve8_avg_neon.c -DSP_SRCS-yes += arm/vpx_convolve8_neon.c -DSP_SRCS-yes += arm/vpx_convolve_avg_neon.c -DSP_SRCS-yes += arm/vpx_convolve_neon.c +DSP_SRCS-yes += arm/aom_convolve_copy_neon.c +DSP_SRCS-yes += arm/aom_convolve8_avg_neon.c +DSP_SRCS-yes += arm/aom_convolve8_neon.c +DSP_SRCS-yes += arm/aom_convolve_avg_neon.c +DSP_SRCS-yes += arm/aom_convolve_neon.c endif # HAVE_NEON endif # HAVE_NEON_ASM # common (msa) -DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_avg_horiz_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_avg_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_avg_vert_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_horiz_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_vert_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve_avg_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve_copy_msa.c -DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve_msa.h +DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_avg_horiz_msa.c +DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_avg_msa.c +DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_avg_vert_msa.c +DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_horiz_msa.c +DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_msa.c +DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve8_vert_msa.c +DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve_avg_msa.c +DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve_copy_msa.c +DSP_SRCS-$(HAVE_MSA) += mips/aom_convolve_msa.h # common (dspr2) DSP_SRCS-$(HAVE_DSPR2) += mips/convolve_common_dspr2.h @@ -345,7 +345,7 @@ endif # CONFIG_ENCODERS DSP_SRCS-no += $(DSP_SRCS_REMOVE-yes) -DSP_SRCS-yes += vpx_dsp_rtcd.c -DSP_SRCS-yes += vpx_dsp_rtcd_defs.pl +DSP_SRCS-yes += aom_dsp_rtcd.c +DSP_SRCS-yes += aom_dsp_rtcd_defs.pl -$(eval $(call rtcd_h_template,vpx_dsp_rtcd,aom_dsp/vpx_dsp_rtcd_defs.pl)) +$(eval $(call rtcd_h_template,aom_dsp_rtcd,aom_dsp/aom_dsp_rtcd_defs.pl)) diff --git a/aom_dsp/vpx_dsp_common.h b/aom_dsp/aom_dsp_common.h similarity index 95% rename from aom_dsp/vpx_dsp_common.h rename to aom_dsp/aom_dsp_common.h index 971b57fc44b7e82140614b9aca7502e25b210028..54a3c327d44c438e41d86bcc62ca7f6070edb05a 100644 --- a/aom_dsp/vpx_dsp_common.h +++ b/aom_dsp/aom_dsp_common.h @@ -12,9 +12,9 @@ #ifndef VPX_DSP_COMMON_H_ #define VPX_DSP_COMMON_H_ -#include "./vpx_config.h" -#include "aom/vpx_integer.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" #ifdef __cplusplus diff --git a/aom_dsp/vpx_dsp_rtcd.c b/aom_dsp/aom_dsp_rtcd.c similarity index 79% rename from aom_dsp/vpx_dsp_rtcd.c rename to aom_dsp/aom_dsp_rtcd.c index 0d6140099c83f6094bf9e676c6b66c6249dd5348..11a57d3822e98a9d17b0d415d56b210ba04ffbbc 100644 --- a/aom_dsp/vpx_dsp_rtcd.c +++ b/aom_dsp/aom_dsp_rtcd.c @@ -8,9 +8,9 @@ * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" +#include "./aom_config.h" #define RTCD_C -#include "./vpx_dsp_rtcd.h" -#include "aom_ports/vpx_once.h" +#include "./aom_dsp_rtcd.h" +#include "aom_ports/aom_once.h" -void vpx_dsp_rtcd() { once(setup_rtcd_internal); } +void aom_dsp_rtcd() { once(setup_rtcd_internal); } diff --git a/aom_dsp/aom_dsp_rtcd_defs.pl b/aom_dsp/aom_dsp_rtcd_defs.pl new file mode 100644 index 0000000000000000000000000000000000000000..2c504a9fd62881bbf53a1086258ed3dcfdf04159 --- /dev/null +++ b/aom_dsp/aom_dsp_rtcd_defs.pl @@ -0,0 +1,1919 @@ +sub aom_dsp_forward_decls() { +print <<EOF +/* + * DSP + */ + +#include "aom/aom_integer.h" +#include "aom_dsp/aom_dsp_common.h" + +EOF +} +forward_decls qw/aom_dsp_forward_decls/; + +# x86inc.asm had specific constraints. break it out so it's easy to disable. +# zero all the variables to avoid tricky else conditions. +$mmx_x86inc = $sse_x86inc = $sse2_x86inc = $ssse3_x86inc = $avx_x86inc = + $avx2_x86inc = ''; +$mmx_x86_64_x86inc = $sse_x86_64_x86inc = $sse2_x86_64_x86inc = + $ssse3_x86_64_x86inc = $avx_x86_64_x86inc = $avx2_x86_64_x86inc = ''; +if (aom_config("CONFIG_USE_X86INC") eq "yes") { + $mmx_x86inc = 'mmx'; + $sse_x86inc = 'sse'; + $sse2_x86inc = 'sse2'; + $ssse3_x86inc = 'ssse3'; + $avx_x86inc = 'avx'; + $avx2_x86inc = 'avx2'; + if ($opts{arch} eq "x86_64") { + $mmx_x86_64_x86inc = 'mmx'; + $sse_x86_64_x86inc = 'sse'; + $sse2_x86_64_x86inc = 'sse2'; + $ssse3_x86_64_x86inc = 'ssse3'; + $avx_x86_64_x86inc = 'avx'; + $avx2_x86_64_x86inc = 'avx2'; + } +} + +# optimizations which depend on multiple features +$avx2_ssse3 = ''; +if ((aom_config("HAVE_AVX2") eq "yes") && (aom_config("HAVE_SSSE3") eq "yes")) { + $avx2_ssse3 = 'avx2'; +} + +# functions that are 64 bit only. +$mmx_x86_64 = $sse2_x86_64 = $ssse3_x86_64 = $avx_x86_64 = $avx2_x86_64 = ''; +if ($opts{arch} eq "x86_64") { + $mmx_x86_64 = 'mmx'; + $sse2_x86_64 = 'sse2'; + $ssse3_x86_64 = 'ssse3'; + $avx_x86_64 = 'avx'; + $avx2_x86_64 = 'avx2'; +} + +# +# Intra prediction +# + +add_proto qw/void aom_d207_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d207_predictor_4x4/, "$ssse3_x86inc"; + +add_proto qw/void aom_d207e_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d207e_predictor_4x4/; + +add_proto qw/void aom_d45_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d45_predictor_4x4 neon/, "$ssse3_x86inc"; + +add_proto qw/void aom_d45e_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d45e_predictor_4x4/; + +add_proto qw/void aom_d63_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d63_predictor_4x4/, "$ssse3_x86inc"; + +add_proto qw/void aom_d63e_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d63e_predictor_4x4/; + +add_proto qw/void aom_d63f_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d63f_predictor_4x4/; + +add_proto qw/void aom_h_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_h_predictor_4x4 neon dspr2 msa/, "$sse2_x86inc"; + +add_proto qw/void aom_he_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_he_predictor_4x4/; + +add_proto qw/void aom_d117_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d117_predictor_4x4/; + +add_proto qw/void aom_d135_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d135_predictor_4x4 neon/; + +add_proto qw/void aom_d153_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d153_predictor_4x4/, "$ssse3_x86inc"; + +add_proto qw/void aom_v_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_v_predictor_4x4 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_ve_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_ve_predictor_4x4/; + +add_proto qw/void aom_tm_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_tm_predictor_4x4 neon dspr2 msa/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_predictor_4x4 dspr2 msa neon/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_top_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_top_predictor_4x4 msa neon/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_left_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_left_predictor_4x4 msa neon/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_128_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_128_predictor_4x4 msa neon/, "$sse2_x86inc"; + +add_proto qw/void aom_d207_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d207_predictor_8x8/, "$ssse3_x86inc"; + +add_proto qw/void aom_d207e_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d207e_predictor_8x8/; + +add_proto qw/void aom_d45_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d45_predictor_8x8 neon/, "$ssse3_x86inc"; + +add_proto qw/void aom_d45e_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d45e_predictor_8x8/; + +add_proto qw/void aom_d63_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d63_predictor_8x8/, "$ssse3_x86inc"; + +add_proto qw/void aom_d63e_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d63e_predictor_8x8/; + +add_proto qw/void aom_h_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_h_predictor_8x8 neon dspr2 msa/, "$sse2_x86inc"; + +add_proto qw/void aom_d117_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d117_predictor_8x8/; + +add_proto qw/void aom_d135_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d135_predictor_8x8/; + +add_proto qw/void aom_d153_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d153_predictor_8x8/, "$ssse3_x86inc"; + +add_proto qw/void aom_v_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_v_predictor_8x8 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_tm_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_tm_predictor_8x8 neon dspr2 msa/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_predictor_8x8 dspr2 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_top_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_top_predictor_8x8 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_left_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_left_predictor_8x8 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_128_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_128_predictor_8x8 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_d207_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d207_predictor_16x16/, "$ssse3_x86inc"; + +add_proto qw/void aom_d207e_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d207e_predictor_16x16/; + +add_proto qw/void aom_d45_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d45_predictor_16x16 neon/, "$ssse3_x86inc"; + +add_proto qw/void aom_d45e_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d45e_predictor_16x16/; + +add_proto qw/void aom_d63_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d63_predictor_16x16/, "$ssse3_x86inc"; + +add_proto qw/void aom_d63e_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d63e_predictor_16x16/; + +add_proto qw/void aom_h_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_h_predictor_16x16 neon dspr2 msa/, "$sse2_x86inc"; + +add_proto qw/void aom_d117_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d117_predictor_16x16/; + +add_proto qw/void aom_d135_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d135_predictor_16x16/; + +add_proto qw/void aom_d153_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d153_predictor_16x16/, "$ssse3_x86inc"; + +add_proto qw/void aom_v_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_v_predictor_16x16 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_tm_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_tm_predictor_16x16 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_predictor_16x16 dspr2 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_top_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_top_predictor_16x16 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_left_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_left_predictor_16x16 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_128_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_128_predictor_16x16 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_d207_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d207_predictor_32x32/, "$ssse3_x86inc"; + +add_proto qw/void aom_d207e_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d207e_predictor_32x32/; + +add_proto qw/void aom_d45_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d45_predictor_32x32/, "$ssse3_x86inc"; + +add_proto qw/void aom_d45e_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d45e_predictor_32x32/; + +add_proto qw/void aom_d63_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d63_predictor_32x32/, "$ssse3_x86inc"; + +add_proto qw/void aom_d63e_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d63e_predictor_32x32/; + +add_proto qw/void aom_h_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_h_predictor_32x32 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_d117_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d117_predictor_32x32/; + +add_proto qw/void aom_d135_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d135_predictor_32x32/; + +add_proto qw/void aom_d153_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_d153_predictor_32x32/, "$ssse3_x86inc"; + +add_proto qw/void aom_v_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_v_predictor_32x32 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_tm_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_tm_predictor_32x32 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_predictor_32x32 msa neon/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_top_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_top_predictor_32x32 msa neon/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_left_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_left_predictor_32x32 msa neon/, "$sse2_x86inc"; + +add_proto qw/void aom_dc_128_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; +specialize qw/aom_dc_128_predictor_32x32 msa neon/, "$sse2_x86inc"; + +# High bitdepth functions +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { + add_proto qw/void aom_highbd_d207_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d207_predictor_4x4/; + + add_proto qw/void aom_highbd_d207e_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d207e_predictor_4x4/; + + add_proto qw/void aom_highbd_d45_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d45_predictor_4x4/; + + add_proto qw/void aom_highbd_d45e_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d45e_predictor_4x4/; + + add_proto qw/void aom_highbd_d63_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d63_predictor_4x4/; + + add_proto qw/void aom_highbd_d63e_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d63e_predictor_4x4/; + + add_proto qw/void aom_highbd_h_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_h_predictor_4x4/; + + add_proto qw/void aom_highbd_d117_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d117_predictor_4x4/; + + add_proto qw/void aom_highbd_d135_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d135_predictor_4x4/; + + add_proto qw/void aom_highbd_d153_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d153_predictor_4x4/; + + add_proto qw/void aom_highbd_v_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_v_predictor_4x4/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_tm_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_tm_predictor_4x4/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_dc_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_predictor_4x4/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_dc_top_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_top_predictor_4x4/; + + add_proto qw/void aom_highbd_dc_left_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_left_predictor_4x4/; + + add_proto qw/void aom_highbd_dc_128_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_128_predictor_4x4/; + + add_proto qw/void aom_highbd_d207_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d207_predictor_8x8/; + + add_proto qw/void aom_highbd_d207e_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d207e_predictor_8x8/; + + add_proto qw/void aom_highbd_d45_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d45_predictor_8x8/; + + add_proto qw/void aom_highbd_d45e_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d45e_predictor_8x8/; + + add_proto qw/void aom_highbd_d63_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d63_predictor_8x8/; + + add_proto qw/void aom_highbd_d63e_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d63e_predictor_8x8/; + + add_proto qw/void aom_highbd_h_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_h_predictor_8x8/; + + add_proto qw/void aom_highbd_d117_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d117_predictor_8x8/; + + add_proto qw/void aom_highbd_d135_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d135_predictor_8x8/; + + add_proto qw/void aom_highbd_d153_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d153_predictor_8x8/; + + add_proto qw/void aom_highbd_v_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_v_predictor_8x8/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_tm_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_tm_predictor_8x8/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_dc_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_predictor_8x8/, "$sse2_x86inc";; + + add_proto qw/void aom_highbd_dc_top_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_top_predictor_8x8/; + + add_proto qw/void aom_highbd_dc_left_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_left_predictor_8x8/; + + add_proto qw/void aom_highbd_dc_128_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_128_predictor_8x8/; + + add_proto qw/void aom_highbd_d207_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d207_predictor_16x16/; + + add_proto qw/void aom_highbd_d207e_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d207e_predictor_16x16/; + + add_proto qw/void aom_highbd_d45_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d45_predictor_16x16/; + + add_proto qw/void aom_highbd_d45e_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d45e_predictor_16x16/; + + add_proto qw/void aom_highbd_d63_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d63_predictor_16x16/; + + add_proto qw/void aom_highbd_d63e_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d63e_predictor_16x16/; + + add_proto qw/void aom_highbd_h_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_h_predictor_16x16/; + + add_proto qw/void aom_highbd_d117_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d117_predictor_16x16/; + + add_proto qw/void aom_highbd_d135_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d135_predictor_16x16/; + + add_proto qw/void aom_highbd_d153_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d153_predictor_16x16/; + + add_proto qw/void aom_highbd_v_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_v_predictor_16x16/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_tm_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_tm_predictor_16x16/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_dc_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_predictor_16x16/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_dc_top_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_top_predictor_16x16/; + + add_proto qw/void aom_highbd_dc_left_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_left_predictor_16x16/; + + add_proto qw/void aom_highbd_dc_128_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_128_predictor_16x16/; + + add_proto qw/void aom_highbd_d207_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d207_predictor_32x32/; + + add_proto qw/void aom_highbd_d207e_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d207e_predictor_32x32/; + + add_proto qw/void aom_highbd_d45_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d45_predictor_32x32/; + + add_proto qw/void aom_highbd_d45e_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d45e_predictor_32x32/; + + add_proto qw/void aom_highbd_d63_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d63_predictor_32x32/; + + add_proto qw/void aom_highbd_d63e_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d63e_predictor_32x32/; + + add_proto qw/void aom_highbd_h_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_h_predictor_32x32/; + + add_proto qw/void aom_highbd_d117_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d117_predictor_32x32/; + + add_proto qw/void aom_highbd_d135_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d135_predictor_32x32/; + + add_proto qw/void aom_highbd_d153_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_d153_predictor_32x32/; + + add_proto qw/void aom_highbd_v_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_v_predictor_32x32/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_tm_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_tm_predictor_32x32/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_dc_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_predictor_32x32/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_dc_top_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_top_predictor_32x32/; + + add_proto qw/void aom_highbd_dc_left_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_left_predictor_32x32/; + + add_proto qw/void aom_highbd_dc_128_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; + specialize qw/aom_highbd_dc_128_predictor_32x32/; +} # CONFIG_VPX_HIGHBITDEPTH + +# +# Sub Pixel Filters +# +add_proto qw/void aom_convolve_copy/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_convolve_copy neon dspr2 msa/, "$sse2_x86inc"; + +add_proto qw/void aom_convolve_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_convolve_avg neon dspr2 msa/, "$sse2_x86inc"; + +add_proto qw/void aom_convolve8/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_convolve8 sse2 ssse3 neon dspr2 msa/, "$avx2_ssse3"; + +add_proto qw/void aom_convolve8_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_convolve8_horiz sse2 ssse3 neon dspr2 msa/, "$avx2_ssse3"; + +add_proto qw/void aom_convolve8_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_convolve8_vert sse2 ssse3 neon dspr2 msa/, "$avx2_ssse3"; + +add_proto qw/void aom_convolve8_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_convolve8_avg sse2 ssse3 neon dspr2 msa/; + +add_proto qw/void aom_convolve8_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_convolve8_avg_horiz sse2 ssse3 neon dspr2 msa/; + +add_proto qw/void aom_convolve8_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_convolve8_avg_vert sse2 ssse3 neon dspr2 msa/; + +add_proto qw/void aom_scaled_2d/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_scaled_2d ssse3/; + +add_proto qw/void aom_scaled_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_scaled_horiz/; + +add_proto qw/void aom_scaled_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_scaled_vert/; + +add_proto qw/void aom_scaled_avg_2d/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_scaled_avg_2d/; + +add_proto qw/void aom_scaled_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_scaled_avg_horiz/; + +add_proto qw/void aom_scaled_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; +specialize qw/aom_scaled_avg_vert/; + +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { + # + # Sub Pixel Filters + # + add_proto qw/void aom_highbd_convolve_copy/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; + specialize qw/aom_highbd_convolve_copy/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_convolve_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; + specialize qw/aom_highbd_convolve_avg/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_convolve8/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; + specialize qw/aom_highbd_convolve8/, "$sse2_x86_64"; + + add_proto qw/void aom_highbd_convolve8_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; + specialize qw/aom_highbd_convolve8_horiz/, "$sse2_x86_64"; + + add_proto qw/void aom_highbd_convolve8_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; + specialize qw/aom_highbd_convolve8_vert/, "$sse2_x86_64"; + + add_proto qw/void aom_highbd_convolve8_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; + specialize qw/aom_highbd_convolve8_avg/, "$sse2_x86_64"; + + add_proto qw/void aom_highbd_convolve8_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; + specialize qw/aom_highbd_convolve8_avg_horiz/, "$sse2_x86_64"; + + add_proto qw/void aom_highbd_convolve8_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; + specialize qw/aom_highbd_convolve8_avg_vert/, "$sse2_x86_64"; +} # CONFIG_VPX_HIGHBITDEPTH + +# +# Loopfilter +# +add_proto qw/void aom_lpf_vertical_16/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh"; +specialize qw/aom_lpf_vertical_16 sse2 neon_asm dspr2 msa/; +$aom_lpf_vertical_16_neon_asm=aom_lpf_vertical_16_neon; + +add_proto qw/void aom_lpf_vertical_16_dual/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh"; +specialize qw/aom_lpf_vertical_16_dual sse2 neon_asm dspr2 msa/; +$aom_lpf_vertical_16_dual_neon_asm=aom_lpf_vertical_16_dual_neon; + +add_proto qw/void aom_lpf_vertical_8/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"; +specialize qw/aom_lpf_vertical_8 sse2 neon dspr2 msa/; + +add_proto qw/void aom_lpf_vertical_8_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1"; +specialize qw/aom_lpf_vertical_8_dual sse2 neon_asm dspr2 msa/; +$aom_lpf_vertical_8_dual_neon_asm=aom_lpf_vertical_8_dual_neon; + +add_proto qw/void aom_lpf_vertical_4/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"; +specialize qw/aom_lpf_vertical_4 mmx neon dspr2 msa/; + +add_proto qw/void aom_lpf_vertical_4_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1"; +specialize qw/aom_lpf_vertical_4_dual sse2 neon dspr2 msa/; + +add_proto qw/void aom_lpf_horizontal_16/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"; +specialize qw/aom_lpf_horizontal_16 sse2 avx2 neon_asm dspr2 msa/; +$aom_lpf_horizontal_16_neon_asm=aom_lpf_horizontal_16_neon; + +add_proto qw/void aom_lpf_horizontal_8/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"; +specialize qw/aom_lpf_horizontal_8 sse2 neon dspr2 msa/; + +add_proto qw/void aom_lpf_horizontal_8_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1"; +specialize qw/aom_lpf_horizontal_8_dual sse2 neon_asm dspr2 msa/; +$aom_lpf_horizontal_8_dual_neon_asm=aom_lpf_horizontal_8_dual_neon; + +add_proto qw/void aom_lpf_horizontal_4/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"; +specialize qw/aom_lpf_horizontal_4 mmx neon dspr2 msa/; + +add_proto qw/void aom_lpf_horizontal_4_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1"; +specialize qw/aom_lpf_horizontal_4_dual sse2 neon dspr2 msa/; + +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { + add_proto qw/void aom_highbd_lpf_vertical_16/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd"; + specialize qw/aom_highbd_lpf_vertical_16 sse2/; + + add_proto qw/void aom_highbd_lpf_vertical_16_dual/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd"; + specialize qw/aom_highbd_lpf_vertical_16_dual sse2/; + + add_proto qw/void aom_highbd_lpf_vertical_8/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd"; + specialize qw/aom_highbd_lpf_vertical_8 sse2/; + + add_proto qw/void aom_highbd_lpf_vertical_8_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd"; + specialize qw/aom_highbd_lpf_vertical_8_dual sse2/; + + add_proto qw/void aom_highbd_lpf_vertical_4/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd"; + specialize qw/aom_highbd_lpf_vertical_4 sse2/; + + add_proto qw/void aom_highbd_lpf_vertical_4_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd"; + specialize qw/aom_highbd_lpf_vertical_4_dual sse2/; + + add_proto qw/void aom_highbd_lpf_horizontal_16/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd"; + specialize qw/aom_highbd_lpf_horizontal_16 sse2/; + + add_proto qw/void aom_highbd_lpf_horizontal_8/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd"; + specialize qw/aom_highbd_lpf_horizontal_8 sse2/; + + add_proto qw/void aom_highbd_lpf_horizontal_8_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd"; + specialize qw/aom_highbd_lpf_horizontal_8_dual sse2/; + + add_proto qw/void aom_highbd_lpf_horizontal_4/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd"; + specialize qw/aom_highbd_lpf_horizontal_4 sse2/; + + add_proto qw/void aom_highbd_lpf_horizontal_4_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd"; + specialize qw/aom_highbd_lpf_horizontal_4_dual sse2/; +} # CONFIG_VPX_HIGHBITDEPTH + +# +# Encoder functions. +# + +# +# Forward transform +# +if (aom_config("CONFIG_VP10_ENCODER") eq "yes") { +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { + add_proto qw/void aom_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct4x4 sse2/; + + add_proto qw/void aom_fdct4x4_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct4x4_1 sse2/; + + add_proto qw/void aom_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct8x8 sse2/; + + add_proto qw/void aom_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct8x8_1 sse2/; + + add_proto qw/void aom_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct16x16 sse2/; + + add_proto qw/void aom_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct16x16_1 sse2/; + + add_proto qw/void aom_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct32x32 sse2/; + + add_proto qw/void aom_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct32x32_rd sse2/; + + add_proto qw/void aom_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct32x32_1 sse2/; + + add_proto qw/void aom_highbd_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_highbd_fdct4x4 sse2/; + + add_proto qw/void aom_highbd_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_highbd_fdct8x8 sse2/; + + add_proto qw/void aom_highbd_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_highbd_fdct8x8_1/; + + add_proto qw/void aom_highbd_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_highbd_fdct16x16 sse2/; + + add_proto qw/void aom_highbd_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_highbd_fdct16x16_1/; + + add_proto qw/void aom_highbd_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_highbd_fdct32x32 sse2/; + + add_proto qw/void aom_highbd_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_highbd_fdct32x32_rd sse2/; + + add_proto qw/void aom_highbd_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_highbd_fdct32x32_1/; +} else { + add_proto qw/void aom_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct4x4 sse2 msa/; + + add_proto qw/void aom_fdct4x4_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct4x4_1 sse2/; + + add_proto qw/void aom_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct8x8 sse2 neon msa/, "$ssse3_x86_64_x86inc"; + + add_proto qw/void aom_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct8x8_1 sse2 neon msa/; + + add_proto qw/void aom_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct16x16 sse2 msa/; + + add_proto qw/void aom_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct16x16_1 sse2 msa/; + + add_proto qw/void aom_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct32x32 sse2 avx2 msa/; + + add_proto qw/void aom_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct32x32_rd sse2 avx2 msa/; + + add_proto qw/void aom_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride"; + specialize qw/aom_fdct32x32_1 sse2 msa/; +} # CONFIG_VPX_HIGHBITDEPTH +} # CONFIG_VP10_ENCODER + +# +# Inverse transform +if (aom_config("CONFIG_VP10") eq "yes") { +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { + # Note as optimized versions of these functions are added we need to add a check to ensure + # that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only. + add_proto qw/void aom_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_iwht4x4_1_add/; + + add_proto qw/void aom_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_iwht4x4_16_add/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct4x4_1_add/; + + add_proto qw/void aom_highbd_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct8x8_1_add/; + + add_proto qw/void aom_highbd_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct16x16_1_add/; + + add_proto qw/void aom_highbd_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct32x32_1024_add/; + + add_proto qw/void aom_highbd_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct32x32_34_add/; + + add_proto qw/void aom_highbd_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct32x32_1_add/; + + add_proto qw/void aom_highbd_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_iwht4x4_1_add/; + + add_proto qw/void aom_highbd_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_iwht4x4_16_add/; + + # Force C versions if CONFIG_EMULATE_HARDWARE is 1 + if (aom_config("CONFIG_EMULATE_HARDWARE") eq "yes") { + add_proto qw/void aom_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct4x4_16_add/; + + add_proto qw/void aom_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct4x4_1_add/; + + add_proto qw/void aom_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_64_add/; + + add_proto qw/void aom_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_12_add/; + + add_proto qw/void aom_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_1_add/; + + add_proto qw/void aom_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_256_add/; + + add_proto qw/void aom_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_10_add/; + + add_proto qw/void aom_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_1_add/; + + add_proto qw/void aom_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_1024_add/; + + add_proto qw/void aom_idct32x32_135_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_135_add/; + + add_proto qw/void aom_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_34_add/; + + add_proto qw/void aom_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_1_add/; + + add_proto qw/void aom_highbd_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct4x4_16_add/; + + add_proto qw/void aom_highbd_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct8x8_64_add/; + + add_proto qw/void aom_highbd_idct8x8_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct8x8_10_add/; + + add_proto qw/void aom_highbd_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct16x16_256_add/; + + add_proto qw/void aom_highbd_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct16x16_10_add/; + } else { + add_proto qw/void aom_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct4x4_16_add sse2/; + + add_proto qw/void aom_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct4x4_1_add sse2/; + + add_proto qw/void aom_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_64_add sse2/, "$ssse3_x86_64_x86inc"; + + add_proto qw/void aom_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_12_add sse2/, "$ssse3_x86_64_x86inc"; + + add_proto qw/void aom_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_1_add sse2/; + + add_proto qw/void aom_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_256_add sse2/; + + add_proto qw/void aom_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_10_add sse2/; + + add_proto qw/void aom_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_1_add sse2/; + + add_proto qw/void aom_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_1024_add sse2/, "$ssse3_x86_64_x86inc"; + + add_proto qw/void aom_idct32x32_135_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_135_add sse2/, "$ssse3_x86_64_x86inc"; + # Need to add 135 eob idct32x32 implementations. + $aom_idct32x32_135_add_sse2=aom_idct32x32_1024_add_sse2; + + add_proto qw/void aom_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_34_add sse2/, "$ssse3_x86_64_x86inc"; + + add_proto qw/void aom_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_1_add sse2/; + + add_proto qw/void aom_highbd_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct4x4_16_add sse2/; + + add_proto qw/void aom_highbd_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct8x8_64_add sse2/; + + add_proto qw/void aom_highbd_idct8x8_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct8x8_10_add sse2/; + + add_proto qw/void aom_highbd_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct16x16_256_add sse2/; + + add_proto qw/void aom_highbd_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; + specialize qw/aom_highbd_idct16x16_10_add sse2/; + } # CONFIG_EMULATE_HARDWARE +} else { + # Force C versions if CONFIG_EMULATE_HARDWARE is 1 + if (aom_config("CONFIG_EMULATE_HARDWARE") eq "yes") { + add_proto qw/void aom_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct4x4_1_add/; + + add_proto qw/void aom_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct4x4_16_add/; + + add_proto qw/void aom_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_1_add/; + + add_proto qw/void aom_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_64_add/; + + add_proto qw/void aom_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_12_add/; + + add_proto qw/void aom_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_1_add/; + + add_proto qw/void aom_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_256_add/; + + add_proto qw/void aom_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_10_add/; + + add_proto qw/void aom_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_1024_add/; + + add_proto qw/void aom_idct32x32_135_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_135_add/; + + add_proto qw/void aom_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_34_add/; + + add_proto qw/void aom_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_1_add/; + + add_proto qw/void aom_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_iwht4x4_1_add/; + + add_proto qw/void aom_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_iwht4x4_16_add/; + } else { + add_proto qw/void aom_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct4x4_1_add sse2 neon dspr2 msa/; + + add_proto qw/void aom_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct4x4_16_add sse2 neon dspr2 msa/; + + add_proto qw/void aom_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_1_add sse2 neon dspr2 msa/; + + add_proto qw/void aom_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_64_add sse2 neon dspr2 msa/, "$ssse3_x86_64_x86inc"; + + add_proto qw/void aom_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct8x8_12_add sse2 neon dspr2 msa/, "$ssse3_x86_64_x86inc"; + + add_proto qw/void aom_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_1_add sse2 neon dspr2 msa/; + + add_proto qw/void aom_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_256_add sse2 neon dspr2 msa/; + + add_proto qw/void aom_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct16x16_10_add sse2 neon dspr2 msa/; + + add_proto qw/void aom_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_1024_add sse2 neon dspr2 msa/, "$ssse3_x86_64_x86inc"; + + add_proto qw/void aom_idct32x32_135_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_135_add sse2 neon dspr2 msa/, "$ssse3_x86_64_x86inc"; + # Need to add 135 eob idct32x32 implementations. + $aom_idct32x32_135_add_sse2=aom_idct32x32_1024_add_sse2; + $aom_idct32x32_135_add_neon=aom_idct32x32_1024_add_neon; + $aom_idct32x32_135_add_dspr2=aom_idct32x32_1024_add_dspr2; + $aom_idct32x32_135_add_msa=aom_idct32x32_1024_add_msa; + + add_proto qw/void aom_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_34_add sse2 neon_asm dspr2 msa/, "$ssse3_x86_64_x86inc"; + # Need to add 34 eob idct32x32 neon implementation. + $aom_idct32x32_34_add_neon_asm=aom_idct32x32_1024_add_neon; + + add_proto qw/void aom_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_idct32x32_1_add sse2 neon dspr2 msa/; + + add_proto qw/void aom_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_iwht4x4_1_add msa/; + + add_proto qw/void aom_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; + specialize qw/aom_iwht4x4_16_add msa/, "$sse2_x86inc"; + } # CONFIG_EMULATE_HARDWARE +} # CONFIG_VPX_HIGHBITDEPTH +} # CONFIG_VP10 + +# +# Quantization +# +if (aom_config("CONFIG_AOM_QM") eq "yes") { + if (aom_config("CONFIG_VP10_ENCODER") eq "yes") { + add_proto qw/void aom_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr"; + + add_proto qw/void aom_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr"; + + if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { + add_proto qw/void aom_highbd_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr"; + + add_proto qw/void aom_highbd_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr"; + } # CONFIG_VPX_HIGHBITDEPTH + } # CONFIG_VP10_ENCODER +} else { + if (aom_config("CONFIG_VP10_ENCODER") eq "yes") { + add_proto qw/void aom_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan"; + specialize qw/aom_quantize_b sse2/, "$ssse3_x86_64_x86inc", "$avx_x86_64_x86inc"; + + add_proto qw/void aom_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan"; + specialize qw/aom_quantize_b_32x32/, "$ssse3_x86_64_x86inc", "$avx_x86_64_x86inc"; + + if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { + add_proto qw/void aom_highbd_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan"; + specialize qw/aom_highbd_quantize_b sse2/; + + add_proto qw/void aom_highbd_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan"; + specialize qw/aom_highbd_quantize_b_32x32 sse2/; + } # CONFIG_VPX_HIGHBITDEPTH + } # CONFIG_VP10_ENCODER +} # CONFIG_AOM_QM + +if (aom_config("CONFIG_ENCODERS") eq "yes") { +# +# Block subtraction +# +add_proto qw/void aom_subtract_block/, "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride"; +specialize qw/aom_subtract_block neon msa/, "$sse2_x86inc"; + +# +# Single block SAD +# +add_proto qw/unsigned int aom_sad64x64/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad64x64 avx2 neon msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad64x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad64x32 avx2 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad32x64/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad32x64 avx2 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad32x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad32x32 avx2 neon msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad32x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad32x16 avx2 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad16x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad16x32 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad16x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad16x16 mmx media neon msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad16x8 mmx neon msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad8x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad8x16 mmx neon msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad8x8 mmx neon msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad8x4/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad8x4 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad4x8 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad4x4/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; +specialize qw/aom_sad4x4 mmx neon msa/, "$sse2_x86inc"; + +# +# Avg +# +if (aom_config("CONFIG_VP10_ENCODER") eq "yes") { + add_proto qw/unsigned int aom_avg_8x8/, "const uint8_t *, int p"; + specialize qw/aom_avg_8x8 sse2 neon msa/; + + add_proto qw/unsigned int aom_avg_4x4/, "const uint8_t *, int p"; + specialize qw/aom_avg_4x4 sse2 neon msa/; + + add_proto qw/void aom_minmax_8x8/, "const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max"; + specialize qw/aom_minmax_8x8 sse2/; + + add_proto qw/void aom_hadamard_8x8/, "int16_t const *src_diff, int src_stride, int16_t *coeff"; + specialize qw/aom_hadamard_8x8 sse2/, "$ssse3_x86_64_x86inc"; + + add_proto qw/void aom_hadamard_16x16/, "int16_t const *src_diff, int src_stride, int16_t *coeff"; + specialize qw/aom_hadamard_16x16 sse2/; + + add_proto qw/int aom_satd/, "const int16_t *coeff, int length"; + specialize qw/aom_satd sse2 neon/; + + add_proto qw/void aom_int_pro_row/, "int16_t *hbuf, uint8_t const *ref, const int ref_stride, const int height"; + specialize qw/aom_int_pro_row sse2 neon/; + + add_proto qw/int16_t aom_int_pro_col/, "uint8_t const *ref, const int width"; + specialize qw/aom_int_pro_col sse2 neon/; + + add_proto qw/int aom_vector_var/, "int16_t const *ref, int16_t const *src, const int bwl"; + specialize qw/aom_vector_var neon sse2/; +} # CONFIG_VP10_ENCODER + +add_proto qw/unsigned int aom_sad64x64_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad64x64_avg avx2 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad64x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad64x32_avg avx2 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad32x64_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad32x64_avg avx2 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad32x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad32x32_avg avx2 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad32x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad32x16_avg avx2 msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad16x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad16x32_avg msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad16x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad16x16_avg msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad16x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad16x8_avg msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad8x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad8x16_avg msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad8x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad8x8_avg msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad8x4_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad8x4_avg msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad4x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad4x8_avg msa/, "$sse2_x86inc"; + +add_proto qw/unsigned int aom_sad4x4_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; +specialize qw/aom_sad4x4_avg msa/, "$sse2_x86inc"; + +# +# Multi-block SAD, comparing a reference to N blocks 1 pixel apart horizontally +# +# Blocks of 3 +add_proto qw/void aom_sad64x64x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad64x64x3 msa/; + +add_proto qw/void aom_sad32x32x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad32x32x3 msa/; + +add_proto qw/void aom_sad16x16x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad16x16x3 sse3 ssse3 msa/; + +add_proto qw/void aom_sad16x8x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad16x8x3 sse3 ssse3 msa/; + +add_proto qw/void aom_sad8x16x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad8x16x3 sse3 msa/; + +add_proto qw/void aom_sad8x8x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad8x8x3 sse3 msa/; + +add_proto qw/void aom_sad4x4x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad4x4x3 sse3 msa/; + +# Blocks of 8 +add_proto qw/void aom_sad64x64x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad64x64x8 msa/; + +add_proto qw/void aom_sad32x32x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad32x32x8 msa/; + +add_proto qw/void aom_sad16x16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad16x16x8 sse4_1 msa/; + +add_proto qw/void aom_sad16x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad16x8x8 sse4_1 msa/; + +add_proto qw/void aom_sad8x16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad8x16x8 sse4_1 msa/; + +add_proto qw/void aom_sad8x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad8x8x8 sse4_1 msa/; + +add_proto qw/void aom_sad8x4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad8x4x8 msa/; + +add_proto qw/void aom_sad4x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad4x8x8 msa/; + +add_proto qw/void aom_sad4x4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad4x4x8 sse4_1 msa/; + +# +# Multi-block SAD, comparing a reference to N independent blocks +# +add_proto qw/void aom_sad64x64x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad64x64x4d avx2 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad64x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad64x32x4d msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad32x64x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad32x64x4d msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad32x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad32x32x4d avx2 neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad32x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad32x16x4d msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad16x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad16x32x4d msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad16x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad16x16x4d neon msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad16x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad16x8x4d msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad8x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad8x16x4d msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad8x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad8x8x4d msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad8x4x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad8x4x4d msa/, "$sse2_x86inc"; + +add_proto qw/void aom_sad4x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad4x8x4d msa/, "$sse_x86inc"; + +add_proto qw/void aom_sad4x4x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; +specialize qw/aom_sad4x4x4d msa/, "$sse_x86inc"; + +# +# Structured Similarity (SSIM) +# +if (aom_config("CONFIG_INTERNAL_STATS") eq "yes") { + add_proto qw/void aom_ssim_parms_8x8/, "const uint8_t *s, int sp, const uint8_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr"; + specialize qw/aom_ssim_parms_8x8/, "$sse2_x86_64"; + + add_proto qw/void aom_ssim_parms_16x16/, "const uint8_t *s, int sp, const uint8_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr"; + specialize qw/aom_ssim_parms_16x16/, "$sse2_x86_64"; +} + +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { + # + # Block subtraction + # + add_proto qw/void aom_highbd_subtract_block/, "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd"; + specialize qw/aom_highbd_subtract_block/; + + # + # Single block SAD + # + add_proto qw/unsigned int aom_highbd_sad64x64/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad64x64/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad64x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad64x32/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad32x64/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad32x64/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad32x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad32x32/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad32x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad32x16/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad16x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad16x32/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad16x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad16x16/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad16x8/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad8x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad8x16/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad8x8/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad8x4/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad8x4/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad4x8/; + + add_proto qw/unsigned int aom_highbd_sad4x4/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; + specialize qw/aom_highbd_sad4x4/; + + # + # Avg + # + add_proto qw/unsigned int aom_highbd_avg_8x8/, "const uint8_t *, int p"; + specialize qw/aom_highbd_avg_8x8/; + add_proto qw/unsigned int aom_highbd_avg_4x4/, "const uint8_t *, int p"; + specialize qw/aom_highbd_avg_4x4/; + add_proto qw/void aom_highbd_minmax_8x8/, "const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max"; + specialize qw/aom_highbd_minmax_8x8/; + + add_proto qw/unsigned int aom_highbd_sad64x64_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad64x64_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad64x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad64x32_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad32x64_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad32x64_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad32x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad32x32_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad32x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad32x16_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad16x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad16x32_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad16x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad16x16_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad16x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad16x8_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad8x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad8x16_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad8x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad8x8_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad8x4_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad8x4_avg/, "$sse2_x86inc"; + + add_proto qw/unsigned int aom_highbd_sad4x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad4x8_avg/; + + add_proto qw/unsigned int aom_highbd_sad4x4_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; + specialize qw/aom_highbd_sad4x4_avg/; + + # + # Multi-block SAD, comparing a reference to N blocks 1 pixel apart horizontally + # + # Blocks of 3 + add_proto qw/void aom_highbd_sad64x64x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad64x64x3/; + + add_proto qw/void aom_highbd_sad32x32x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad32x32x3/; + + add_proto qw/void aom_highbd_sad16x16x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad16x16x3/; + + add_proto qw/void aom_highbd_sad16x8x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad16x8x3/; + + add_proto qw/void aom_highbd_sad8x16x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad8x16x3/; + + add_proto qw/void aom_highbd_sad8x8x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad8x8x3/; + + add_proto qw/void aom_highbd_sad4x4x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad4x4x3/; + + # Blocks of 8 + add_proto qw/void aom_highbd_sad64x64x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad64x64x8/; + + add_proto qw/void aom_highbd_sad32x32x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad32x32x8/; + + add_proto qw/void aom_highbd_sad16x16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad16x16x8/; + + add_proto qw/void aom_highbd_sad16x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad16x8x8/; + + add_proto qw/void aom_highbd_sad8x16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad8x16x8/; + + add_proto qw/void aom_highbd_sad8x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad8x8x8/; + + add_proto qw/void aom_highbd_sad8x4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad8x4x8/; + + add_proto qw/void aom_highbd_sad4x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad4x8x8/; + + add_proto qw/void aom_highbd_sad4x4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad4x4x8/; + + # + # Multi-block SAD, comparing a reference to N independent blocks + # + add_proto qw/void aom_highbd_sad64x64x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad64x64x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad64x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad64x32x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad32x64x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad32x64x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad32x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad32x32x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad32x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad32x16x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad16x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad16x32x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad16x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad16x16x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad16x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad16x8x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad8x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad8x16x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad8x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad8x8x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad8x4x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad8x4x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad4x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad4x8x4d/, "$sse2_x86inc"; + + add_proto qw/void aom_highbd_sad4x4x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; + specialize qw/aom_highbd_sad4x4x4d/, "$sse2_x86inc"; + + # + # Structured Similarity (SSIM) + # + if (aom_config("CONFIG_INTERNAL_STATS") eq "yes") { + add_proto qw/void aom_highbd_ssim_parms_8x8/, "const uint16_t *s, int sp, const uint16_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr"; + specialize qw/aom_highbd_ssim_parms_8x8/; + } +} # CONFIG_VPX_HIGHBITDEPTH +} # CONFIG_ENCODERS + +if (aom_config("CONFIG_ENCODERS") eq "yes") { + +# +# Variance +# +add_proto qw/unsigned int aom_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance64x64 sse2 avx2 neon msa/; + +add_proto qw/unsigned int aom_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance64x32 sse2 avx2 neon msa/; + +add_proto qw/unsigned int aom_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance32x64 sse2 neon msa/; + +add_proto qw/unsigned int aom_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance32x32 sse2 avx2 neon msa/; + +add_proto qw/unsigned int aom_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance32x16 sse2 avx2 msa/; + +add_proto qw/unsigned int aom_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance16x32 sse2 msa/; + +add_proto qw/unsigned int aom_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance16x16 mmx sse2 avx2 media neon msa/; + +add_proto qw/unsigned int aom_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance16x8 mmx sse2 neon msa/; + +add_proto qw/unsigned int aom_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance8x16 mmx sse2 neon msa/; + +add_proto qw/unsigned int aom_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance8x8 mmx sse2 media neon msa/; + +add_proto qw/unsigned int aom_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance8x4 sse2 msa/; + +add_proto qw/unsigned int aom_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance4x8 sse2 msa/; + +add_proto qw/unsigned int aom_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_variance4x4 mmx sse2 msa/; + +# +# Specialty Variance +# +add_proto qw/void aom_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; + specialize qw/aom_get16x16var sse2 avx2 neon msa/; + +add_proto qw/void aom_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; + specialize qw/aom_get8x8var mmx sse2 neon msa/; + +add_proto qw/unsigned int aom_mse16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + specialize qw/aom_mse16x16 mmx sse2 avx2 media neon msa/; + +add_proto qw/unsigned int aom_mse16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + specialize qw/aom_mse16x8 sse2 msa/; + +add_proto qw/unsigned int aom_mse8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + specialize qw/aom_mse8x16 sse2 msa/; + +add_proto qw/unsigned int aom_mse8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + specialize qw/aom_mse8x8 sse2 msa/; + +add_proto qw/unsigned int aom_get_mb_ss/, "const int16_t *"; + specialize qw/aom_get_mb_ss mmx sse2 msa/; + +add_proto qw/unsigned int aom_get4x4sse_cs/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride"; + specialize qw/aom_get4x4sse_cs neon msa/; + +add_proto qw/void aom_comp_avg_pred/, "uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride"; + +# +# Subpixel Variance +# +add_proto qw/uint32_t aom_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance64x64 avx2 neon msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance64x32 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance32x64 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance32x32 avx2 neon msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance32x16 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance16x32 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance16x16 mmx media neon msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance16x8 mmx msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance8x16 mmx msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance8x8 mmx media neon msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance8x4 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance4x8 msa/, "$sse_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_sub_pixel_variance4x4 mmx msa/, "$sse_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance64x64 avx2 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance64x32 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance32x64 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance32x32 avx2 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance32x16 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance16x32 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance16x16 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance16x8 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance8x16 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance8x8 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance8x4 msa/, "$sse2_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance4x8 msa/, "$sse_x86inc", "$ssse3_x86inc"; + +add_proto qw/uint32_t aom_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_sub_pixel_avg_variance4x4 msa/, "$sse_x86inc", "$ssse3_x86inc"; + +# +# Specialty Subpixel +# +add_proto qw/uint32_t aom_variance_halfpixvar16x16_h/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_variance_halfpixvar16x16_h mmx sse2 media/; + +add_proto qw/uint32_t aom_variance_halfpixvar16x16_v/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_variance_halfpixvar16x16_v mmx sse2 media/; + +add_proto qw/uint32_t aom_variance_halfpixvar16x16_hv/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_variance_halfpixvar16x16_hv mmx sse2 media/; + +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { + add_proto qw/unsigned int aom_highbd_12_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_variance64x64 sse2/; + + add_proto qw/unsigned int aom_highbd_12_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_variance64x32 sse2/; + + add_proto qw/unsigned int aom_highbd_12_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_variance32x64 sse2/; + + add_proto qw/unsigned int aom_highbd_12_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_variance32x32 sse2/; + + add_proto qw/unsigned int aom_highbd_12_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_variance32x16 sse2/; + + add_proto qw/unsigned int aom_highbd_12_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_variance16x32 sse2/; + + add_proto qw/unsigned int aom_highbd_12_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_variance16x16 sse2/; + + add_proto qw/unsigned int aom_highbd_12_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_variance16x8 sse2/; + + add_proto qw/unsigned int aom_highbd_12_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_variance8x16 sse2/; + + add_proto qw/unsigned int aom_highbd_12_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_variance8x8 sse2/; + + add_proto qw/unsigned int aom_highbd_12_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_12_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_12_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + + add_proto qw/unsigned int aom_highbd_10_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_variance64x64 sse2/; + + add_proto qw/unsigned int aom_highbd_10_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_variance64x32 sse2/; + + add_proto qw/unsigned int aom_highbd_10_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_variance32x64 sse2/; + + add_proto qw/unsigned int aom_highbd_10_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_variance32x32 sse2/; + + add_proto qw/unsigned int aom_highbd_10_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_variance32x16 sse2/; + + add_proto qw/unsigned int aom_highbd_10_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_variance16x32 sse2/; + + add_proto qw/unsigned int aom_highbd_10_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_variance16x16 sse2/; + + add_proto qw/unsigned int aom_highbd_10_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_variance16x8 sse2/; + + add_proto qw/unsigned int aom_highbd_10_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_variance8x16 sse2/; + + add_proto qw/unsigned int aom_highbd_10_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_variance8x8 sse2/; + + add_proto qw/unsigned int aom_highbd_10_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_10_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_10_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + + add_proto qw/unsigned int aom_highbd_8_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_variance64x64 sse2/; + + add_proto qw/unsigned int aom_highbd_8_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_variance64x32 sse2/; + + add_proto qw/unsigned int aom_highbd_8_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_variance32x64 sse2/; + + add_proto qw/unsigned int aom_highbd_8_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_variance32x32 sse2/; + + add_proto qw/unsigned int aom_highbd_8_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_variance32x16 sse2/; + + add_proto qw/unsigned int aom_highbd_8_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_variance16x32 sse2/; + + add_proto qw/unsigned int aom_highbd_8_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_variance16x16 sse2/; + + add_proto qw/unsigned int aom_highbd_8_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_variance16x8 sse2/; + + add_proto qw/unsigned int aom_highbd_8_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_variance8x16 sse2/; + + add_proto qw/unsigned int aom_highbd_8_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_variance8x8 sse2/; + + add_proto qw/unsigned int aom_highbd_8_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_8_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_8_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + + add_proto qw/void aom_highbd_8_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; + add_proto qw/void aom_highbd_8_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; + + add_proto qw/void aom_highbd_10_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; + add_proto qw/void aom_highbd_10_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; + + add_proto qw/void aom_highbd_12_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; + add_proto qw/void aom_highbd_12_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; + + add_proto qw/unsigned int aom_highbd_8_mse16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_mse16x16 sse2/; + + add_proto qw/unsigned int aom_highbd_8_mse16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_8_mse8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_8_mse8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + specialize qw/aom_highbd_8_mse8x8 sse2/; + + add_proto qw/unsigned int aom_highbd_10_mse16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_mse16x16 sse2/; + + add_proto qw/unsigned int aom_highbd_10_mse16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_10_mse8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_10_mse8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + specialize qw/aom_highbd_10_mse8x8 sse2/; + + add_proto qw/unsigned int aom_highbd_12_mse16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_mse16x16 sse2/; + + add_proto qw/unsigned int aom_highbd_12_mse16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_12_mse8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + add_proto qw/unsigned int aom_highbd_12_mse8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; + specialize qw/aom_highbd_12_mse8x8 sse2/; + + add_proto qw/void aom_highbd_comp_avg_pred/, "uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride"; + + # + # Subpixel Variance + # + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance64x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance64x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance32x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance32x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance32x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance16x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance16x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance16x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance8x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance8x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_12_sub_pixel_variance8x4/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + add_proto qw/uint32_t aom_highbd_12_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance64x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance64x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance32x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance32x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance32x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance16x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance16x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance16x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance8x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance8x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_10_sub_pixel_variance8x4/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + add_proto qw/uint32_t aom_highbd_10_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance64x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance64x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance32x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance32x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance32x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance16x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance16x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance16x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance8x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance8x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + specialize qw/aom_highbd_8_sub_pixel_variance8x4/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + add_proto qw/uint32_t aom_highbd_8_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance64x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance64x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance32x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance32x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance32x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance16x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance16x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance16x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance8x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance8x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_12_sub_pixel_avg_variance8x4/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + add_proto qw/uint32_t aom_highbd_12_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance64x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance64x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance32x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance32x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance32x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance16x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance16x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance16x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance8x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance8x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_10_sub_pixel_avg_variance8x4/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + add_proto qw/uint32_t aom_highbd_10_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance64x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance64x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance32x64/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance32x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance32x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance16x32/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance16x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance16x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance8x16/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance8x8/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + specialize qw/aom_highbd_8_sub_pixel_avg_variance8x4/, "$sse2_x86inc"; + + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + +} # CONFIG_VPX_HIGHBITDEPTH +} # CONFIG_ENCODERS + +1; diff --git a/aom_dsp/vpx_filter.h b/aom_dsp/aom_filter.h similarity index 96% rename from aom_dsp/vpx_filter.h rename to aom_dsp/aom_filter.h index cf27b96a15f30b5bb2f144eaabc5d52649ccd889..9bca72083607955e7f257afd20b8324c1a3606c8 100644 --- a/aom_dsp/vpx_filter.h +++ b/aom_dsp/aom_filter.h @@ -12,7 +12,7 @@ #ifndef VPX_DSP_VPX_FILTER_H_ #define VPX_DSP_VPX_FILTER_H_ -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { diff --git a/aom_dsp/arm/vpx_convolve8_avg_neon.c b/aom_dsp/arm/aom_convolve8_avg_neon.c similarity index 98% rename from aom_dsp/arm/vpx_convolve8_avg_neon.c rename to aom_dsp/arm/aom_convolve8_avg_neon.c index d53276ddc45c92eaaa9c734c8cb74b8d230d81fc..7dc936d6e6e89d99183e80ed0876b191b0666395 100644 --- a/aom_dsp/arm/vpx_convolve8_avg_neon.c +++ b/aom_dsp/arm/aom_convolve8_avg_neon.c @@ -12,9 +12,9 @@ #include <arm_neon.h> #include <assert.h> -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" static INLINE int32x4_t MULTIPLY_BY_Q0(int16x4_t dsrc0, int16x4_t dsrc1, @@ -39,7 +39,7 @@ static INLINE int32x4_t MULTIPLY_BY_Q0(int16x4_t dsrc0, int16x4_t dsrc1, return qdst; } -void vpx_convolve8_avg_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, // unused @@ -219,7 +219,7 @@ void vpx_convolve8_avg_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, return; } -void vpx_convolve8_avg_vert_neon(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, // unused int x_step_q4, // unused diff --git a/aom_dsp/arm/vpx_convolve8_avg_neon_asm.asm b/aom_dsp/arm/aom_convolve8_avg_neon_asm.asm similarity index 94% rename from aom_dsp/arm/vpx_convolve8_avg_neon_asm.asm rename to aom_dsp/arm/aom_convolve8_avg_neon_asm.asm index e279d570fc2acb1922edd61fa3132b6d4d7a83aa..fcf3d4ef84e353909b99c5d3f26f80f4095dddd3 100644 --- a/aom_dsp/arm/vpx_convolve8_avg_neon_asm.asm +++ b/aom_dsp/arm/aom_convolve8_avg_neon_asm.asm @@ -17,8 +17,8 @@ ; VP9_FILTER_WEIGHT == 128 ; VP9_FILTER_SHIFT == 7 - EXPORT |vpx_convolve8_avg_horiz_neon| - EXPORT |vpx_convolve8_avg_vert_neon| + EXPORT |aom_convolve8_avg_horiz_neon| + EXPORT |aom_convolve8_avg_vert_neon| ARM REQUIRE8 PRESERVE8 @@ -49,7 +49,7 @@ ; sp[]int w ; sp[]int h -|vpx_convolve8_avg_horiz_neon| PROC +|aom_convolve8_avg_horiz_neon| PROC push {r4-r10, lr} sub r0, r0, #3 ; adjust for taps @@ -72,7 +72,7 @@ mov r10, r6 ; w loop counter -vpx_convolve8_avg_loop_horiz_v +aom_convolve8_avg_loop_horiz_v vld1.8 {d24}, [r0], r1 vld1.8 {d25}, [r0], r1 vld1.8 {d26}, [r0], r1 @@ -95,7 +95,7 @@ vpx_convolve8_avg_loop_horiz_v add r0, r0, #3 -vpx_convolve8_avg_loop_horiz +aom_convolve8_avg_loop_horiz add r5, r0, #64 vld1.32 {d28[]}, [r0], r1 @@ -164,20 +164,20 @@ vpx_convolve8_avg_loop_horiz vmov q9, q13 subs r6, r6, #4 ; w -= 4 - bgt vpx_convolve8_avg_loop_horiz + bgt aom_convolve8_avg_loop_horiz ; outer loop mov r6, r10 ; restore w counter add r0, r0, r9 ; src += src_stride * 4 - w add r2, r2, r12 ; dst += dst_stride * 4 - w subs r7, r7, #4 ; h -= 4 - bgt vpx_convolve8_avg_loop_horiz_v + bgt aom_convolve8_avg_loop_horiz_v pop {r4-r10, pc} ENDP -|vpx_convolve8_avg_vert_neon| PROC +|aom_convolve8_avg_vert_neon| PROC push {r4-r8, lr} ; adjust for taps @@ -193,7 +193,7 @@ vpx_convolve8_avg_loop_horiz lsl r1, r1, #1 lsl r3, r3, #1 -vpx_convolve8_avg_loop_vert_h +aom_convolve8_avg_loop_vert_h mov r4, r0 add r7, r0, r1, asr #1 mov r5, r2 @@ -213,7 +213,7 @@ vpx_convolve8_avg_loop_vert_h vmovl.u8 q10, d20 vmovl.u8 q11, d22 -vpx_convolve8_avg_loop_vert +aom_convolve8_avg_loop_vert ; always process a 4x4 block at a time vld1.u32 {d24[0]}, [r7], r1 vld1.u32 {d26[0]}, [r4], r1 @@ -278,13 +278,13 @@ vpx_convolve8_avg_loop_vert vmov d22, d25 subs r12, r12, #4 ; h -= 4 - bgt vpx_convolve8_avg_loop_vert + bgt aom_convolve8_avg_loop_vert ; outer loop add r0, r0, #4 add r2, r2, #4 subs r6, r6, #4 ; w -= 4 - bgt vpx_convolve8_avg_loop_vert_h + bgt aom_convolve8_avg_loop_vert_h pop {r4-r8, pc} diff --git a/aom_dsp/arm/vpx_convolve8_neon.c b/aom_dsp/arm/aom_convolve8_neon.c similarity index 98% rename from aom_dsp/arm/vpx_convolve8_neon.c rename to aom_dsp/arm/aom_convolve8_neon.c index c712e06f7995c47efd54fd71c0c514e4dbba5d58..ed0df6dd2ae990b7499eb2ca048623d96d529b63 100644 --- a/aom_dsp/arm/vpx_convolve8_neon.c +++ b/aom_dsp/arm/aom_convolve8_neon.c @@ -12,9 +12,9 @@ #include <arm_neon.h> #include <assert.h> -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" static INLINE int32x4_t MULTIPLY_BY_Q0(int16x4_t dsrc0, int16x4_t dsrc1, @@ -39,7 +39,7 @@ static INLINE int32x4_t MULTIPLY_BY_Q0(int16x4_t dsrc0, int16x4_t dsrc1, return qdst; } -void vpx_convolve8_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, // unused @@ -205,7 +205,7 @@ void vpx_convolve8_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, return; } -void vpx_convolve8_vert_neon(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, // unused int x_step_q4, // unused diff --git a/aom_dsp/arm/vpx_convolve8_neon_asm.asm b/aom_dsp/arm/aom_convolve8_neon_asm.asm similarity index 94% rename from aom_dsp/arm/vpx_convolve8_neon_asm.asm rename to aom_dsp/arm/aom_convolve8_neon_asm.asm index 2d0f2ae0657299676e942f1f155eaaaa4be5ca35..315e5b5c81666e386e68a41bfd597c704494ba8b 100644 --- a/aom_dsp/arm/vpx_convolve8_neon_asm.asm +++ b/aom_dsp/arm/aom_convolve8_neon_asm.asm @@ -17,8 +17,8 @@ ; VP9_FILTER_WEIGHT == 128 ; VP9_FILTER_SHIFT == 7 - EXPORT |vpx_convolve8_horiz_neon| - EXPORT |vpx_convolve8_vert_neon| + EXPORT |aom_convolve8_horiz_neon| + EXPORT |aom_convolve8_vert_neon| ARM REQUIRE8 PRESERVE8 @@ -49,7 +49,7 @@ ; sp[]int w ; sp[]int h -|vpx_convolve8_horiz_neon| PROC +|aom_convolve8_horiz_neon| PROC push {r4-r10, lr} sub r0, r0, #3 ; adjust for taps @@ -72,7 +72,7 @@ mov r10, r6 ; w loop counter -vpx_convolve8_loop_horiz_v +aom_convolve8_loop_horiz_v vld1.8 {d24}, [r0], r1 vld1.8 {d25}, [r0], r1 vld1.8 {d26}, [r0], r1 @@ -95,7 +95,7 @@ vpx_convolve8_loop_horiz_v add r0, r0, #3 -vpx_convolve8_loop_horiz +aom_convolve8_loop_horiz add r5, r0, #64 vld1.32 {d28[]}, [r0], r1 @@ -153,20 +153,20 @@ vpx_convolve8_loop_horiz vmov q9, q13 subs r6, r6, #4 ; w -= 4 - bgt vpx_convolve8_loop_horiz + bgt aom_convolve8_loop_horiz ; outer loop mov r6, r10 ; restore w counter add r0, r0, r9 ; src += src_stride * 4 - w add r2, r2, r12 ; dst += dst_stride * 4 - w subs r7, r7, #4 ; h -= 4 - bgt vpx_convolve8_loop_horiz_v + bgt aom_convolve8_loop_horiz_v pop {r4-r10, pc} ENDP -|vpx_convolve8_vert_neon| PROC +|aom_convolve8_vert_neon| PROC push {r4-r8, lr} ; adjust for taps @@ -182,7 +182,7 @@ vpx_convolve8_loop_horiz lsl r1, r1, #1 lsl r3, r3, #1 -vpx_convolve8_loop_vert_h +aom_convolve8_loop_vert_h mov r4, r0 add r7, r0, r1, asr #1 mov r5, r2 @@ -202,7 +202,7 @@ vpx_convolve8_loop_vert_h vmovl.u8 q10, d20 vmovl.u8 q11, d22 -vpx_convolve8_loop_vert +aom_convolve8_loop_vert ; always process a 4x4 block at a time vld1.u32 {d24[0]}, [r7], r1 vld1.u32 {d26[0]}, [r4], r1 @@ -256,13 +256,13 @@ vpx_convolve8_loop_vert vmov d22, d25 subs r12, r12, #4 ; h -= 4 - bgt vpx_convolve8_loop_vert + bgt aom_convolve8_loop_vert ; outer loop add r0, r0, #4 add r2, r2, #4 subs r6, r6, #4 ; w -= 4 - bgt vpx_convolve8_loop_vert_h + bgt aom_convolve8_loop_vert_h pop {r4-r8, pc} diff --git a/aom_dsp/arm/vpx_convolve_avg_neon.c b/aom_dsp/arm/aom_convolve_avg_neon.c similarity index 97% rename from aom_dsp/arm/vpx_convolve_avg_neon.c rename to aom_dsp/arm/aom_convolve_avg_neon.c index 41df917daad5c7242d8b2db4c312f6e0c20ed854..f05d3ceae2e8f4a05da1def2ec4eab5be4c0125b 100644 --- a/aom_dsp/arm/vpx_convolve_avg_neon.c +++ b/aom_dsp/arm/aom_convolve_avg_neon.c @@ -11,10 +11,10 @@ #include <arm_neon.h> -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" -void vpx_convolve_avg_neon(const uint8_t *src, // r0 +void aom_convolve_avg_neon(const uint8_t *src, // r0 ptrdiff_t src_stride, // r1 uint8_t *dst, // r2 ptrdiff_t dst_stride, // r3 diff --git a/aom_dsp/arm/vpx_convolve_avg_neon_asm.asm b/aom_dsp/arm/aom_convolve_avg_neon_asm.asm similarity index 98% rename from aom_dsp/arm/vpx_convolve_avg_neon_asm.asm rename to aom_dsp/arm/aom_convolve_avg_neon_asm.asm index 97e6189fda1632fcec4eeb3803575d6159c00f11..2177756e46f2521c509a14384d6be67d32eea758 100644 --- a/aom_dsp/arm/vpx_convolve_avg_neon_asm.asm +++ b/aom_dsp/arm/aom_convolve_avg_neon_asm.asm @@ -8,14 +8,14 @@ ; be found in the AUTHORS file in the root of the source tree. ; - EXPORT |vpx_convolve_avg_neon| + EXPORT |aom_convolve_avg_neon| ARM REQUIRE8 PRESERVE8 AREA ||.text||, CODE, READONLY, ALIGN=2 -|vpx_convolve_avg_neon| PROC +|aom_convolve_avg_neon| PROC push {r4-r6, lr} ldrd r4, r5, [sp, #32] mov r6, r2 diff --git a/aom_dsp/arm/vpx_convolve_copy_neon.c b/aom_dsp/arm/aom_convolve_copy_neon.c similarity index 95% rename from aom_dsp/arm/vpx_convolve_copy_neon.c rename to aom_dsp/arm/aom_convolve_copy_neon.c index fcfb2654a8c9666a29fd095dfb411668bd37d8b3..9e57c7176f33b6c4076fb0dc8a4511c69cbc077b 100644 --- a/aom_dsp/arm/vpx_convolve_copy_neon.c +++ b/aom_dsp/arm/aom_convolve_copy_neon.c @@ -11,10 +11,10 @@ #include <arm_neon.h> -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" -void vpx_convolve_copy_neon(const uint8_t *src, // r0 +void aom_convolve_copy_neon(const uint8_t *src, // r0 ptrdiff_t src_stride, // r1 uint8_t *dst, // r2 ptrdiff_t dst_stride, // r3 diff --git a/aom_dsp/arm/vpx_convolve_copy_neon_asm.asm b/aom_dsp/arm/aom_convolve_copy_neon_asm.asm similarity index 97% rename from aom_dsp/arm/vpx_convolve_copy_neon_asm.asm rename to aom_dsp/arm/aom_convolve_copy_neon_asm.asm index 89164ad48ba0b622e35c438ac6da64ab9963f946..2d60bee3cf5e4c4a9d1508d3e6e52305fb7741fa 100644 --- a/aom_dsp/arm/vpx_convolve_copy_neon_asm.asm +++ b/aom_dsp/arm/aom_convolve_copy_neon_asm.asm @@ -8,14 +8,14 @@ ; be found in the AUTHORS file in the root of the source tree. ; - EXPORT |vpx_convolve_copy_neon| + EXPORT |aom_convolve_copy_neon| ARM REQUIRE8 PRESERVE8 AREA ||.text||, CODE, READONLY, ALIGN=2 -|vpx_convolve_copy_neon| PROC +|aom_convolve_copy_neon| PROC push {r4-r5, lr} ldrd r4, r5, [sp, #28] diff --git a/aom_dsp/arm/vpx_convolve_neon.c b/aom_dsp/arm/aom_convolve_neon.c similarity index 84% rename from aom_dsp/arm/vpx_convolve_neon.c rename to aom_dsp/arm/aom_convolve_neon.c index 92443686e8ae19b87e2653c961ac8f31d0177a3c..6c2997e040465a6373c9d770a7d4559b1ebd7814 100644 --- a/aom_dsp/arm/vpx_convolve_neon.c +++ b/aom_dsp/arm/aom_convolve_neon.c @@ -11,11 +11,11 @@ #include <assert.h> -#include "./vpx_dsp_rtcd.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "./aom_dsp_rtcd.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" -void vpx_convolve8_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_convolve8_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { @@ -35,16 +35,16 @@ void vpx_convolve8_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, * the temp buffer which has lots of extra room and is subsequently discarded * this is safe if somewhat less than ideal. */ - vpx_convolve8_horiz_neon(src - src_stride * 3, src_stride, temp, 64, filter_x, + aom_convolve8_horiz_neon(src - src_stride * 3, src_stride, temp, 64, filter_x, x_step_q4, filter_y, y_step_q4, w, intermediate_height); /* Step into the temp buffer 3 lines to get the actual frame data */ - vpx_convolve8_vert_neon(temp + 64 * 3, 64, dst, dst_stride, filter_x, + aom_convolve8_vert_neon(temp + 64 * 3, 64, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } -void vpx_convolve8_avg_neon(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -58,9 +58,9 @@ void vpx_convolve8_avg_neon(const uint8_t *src, ptrdiff_t src_stride, /* This implementation has the same issues as above. In addition, we only want * to average the values after both passes. */ - vpx_convolve8_horiz_neon(src - src_stride * 3, src_stride, temp, 64, filter_x, + aom_convolve8_horiz_neon(src - src_stride * 3, src_stride, temp, 64, filter_x, x_step_q4, filter_y, y_step_q4, w, intermediate_height); - vpx_convolve8_avg_vert_neon(temp + 64 * 3, 64, dst, dst_stride, filter_x, + aom_convolve8_avg_vert_neon(temp + 64 * 3, 64, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } diff --git a/aom_dsp/arm/avg_neon.c b/aom_dsp/arm/avg_neon.c index 7e349c58a377714714a2b81d5e00e5f88ffc78f0..2f281051eba6ea5f50314f3895516a5e8776bbb6 100644 --- a/aom_dsp/arm/avg_neon.c +++ b/aom_dsp/arm/avg_neon.c @@ -12,10 +12,10 @@ #include <arm_neon.h> #include <assert.h> -#include "./vpx_dsp_rtcd.h" -#include "./vpx_config.h" +#include "./aom_dsp_rtcd.h" +#include "./aom_config.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" static INLINE unsigned int horizontal_add_u16x8(const uint16x8_t v_16x8) { const uint32x4_t a = vpaddlq_u16(v_16x8); @@ -25,7 +25,7 @@ static INLINE unsigned int horizontal_add_u16x8(const uint16x8_t v_16x8) { return vget_lane_u32(c, 0); } -unsigned int vpx_avg_4x4_neon(const uint8_t *s, int p) { +unsigned int aom_avg_4x4_neon(const uint8_t *s, int p) { uint16x8_t v_sum; uint32x2_t v_s0 = vdup_n_u32(0); uint32x2_t v_s1 = vdup_n_u32(0); @@ -37,7 +37,7 @@ unsigned int vpx_avg_4x4_neon(const uint8_t *s, int p) { return (horizontal_add_u16x8(v_sum) + 8) >> 4; } -unsigned int vpx_avg_8x8_neon(const uint8_t *s, int p) { +unsigned int aom_avg_8x8_neon(const uint8_t *s, int p) { uint8x8_t v_s0 = vld1_u8(s); const uint8x8_t v_s1 = vld1_u8(s + p); uint16x8_t v_sum = vaddl_u8(v_s0, v_s1); @@ -65,7 +65,7 @@ unsigned int vpx_avg_8x8_neon(const uint8_t *s, int p) { // coeff: 16 bits, dynamic range [-32640, 32640]. // length: value range {16, 64, 256, 1024}. -int vpx_satd_neon(const int16_t *coeff, int length) { +int aom_satd_neon(const int16_t *coeff, int length) { const int16x4_t zero = vdup_n_s16(0); int32x4_t accum = vdupq_n_s32(0); @@ -90,7 +90,7 @@ int vpx_satd_neon(const int16_t *coeff, int length) { } } -void vpx_int_pro_row_neon(int16_t hbuf[16], uint8_t const *ref, +void aom_int_pro_row_neon(int16_t hbuf[16], uint8_t const *ref, const int ref_stride, const int height) { int i; uint16x8_t vec_sum_lo = vdupq_n_u16(0); @@ -143,7 +143,7 @@ void vpx_int_pro_row_neon(int16_t hbuf[16], uint8_t const *ref, vst1q_s16(hbuf, vreinterpretq_s16_u16(vec_sum_hi)); } -int16_t vpx_int_pro_col_neon(uint8_t const *ref, const int width) { +int16_t aom_int_pro_col_neon(uint8_t const *ref, const int width) { int i; uint16x8_t vec_sum = vdupq_n_u16(0); @@ -159,7 +159,7 @@ int16_t vpx_int_pro_col_neon(uint8_t const *ref, const int width) { // ref, src = [0, 510] - max diff = 16-bits // bwl = {2, 3, 4}, width = {16, 32, 64} -int vpx_vector_var_neon(int16_t const *ref, int16_t const *src, const int bwl) { +int aom_vector_var_neon(int16_t const *ref, int16_t const *src, const int bwl) { int width = 4 << bwl; int32x4_t sse = vdupq_n_s32(0); int16x8_t total = vdupq_n_s16(0); diff --git a/aom_dsp/arm/bilinear_filter_media.asm b/aom_dsp/arm/bilinear_filter_media.asm index f3f9754c116f3cc46fbd739fe5be6ae4e6e99efc..fbbef2541c3b9be53b05834bd7f5400ceb76c231 100644 --- a/aom_dsp/arm/bilinear_filter_media.asm +++ b/aom_dsp/arm/bilinear_filter_media.asm @@ -9,8 +9,8 @@ ; - EXPORT |vpx_filter_block2d_bil_first_pass_media| - EXPORT |vpx_filter_block2d_bil_second_pass_media| + EXPORT |aom_filter_block2d_bil_first_pass_media| + EXPORT |aom_filter_block2d_bil_second_pass_media| AREA |.text|, CODE, READONLY ; name this block of code @@ -20,13 +20,13 @@ ; r2 unsigned int src_pitch, ; r3 unsigned int height, ; stack unsigned int width, -; stack const short *vpx_filter +; stack const short *aom_filter ;------------------------------------- ; The output is transposed stroed in output array to make it easy for second pass filtering. -|vpx_filter_block2d_bil_first_pass_media| PROC +|aom_filter_block2d_bil_first_pass_media| PROC stmdb sp!, {r4 - r11, lr} - ldr r11, [sp, #40] ; vpx_filter address + ldr r11, [sp, #40] ; aom_filter address ldr r4, [sp, #36] ; width mov r12, r3 ; outer-loop counter @@ -134,7 +134,7 @@ ldmia sp!, {r4 - r11, pc} - ENDP ; |vpx_filter_block2d_bil_first_pass_media| + ENDP ; |aom_filter_block2d_bil_first_pass_media| ;--------------------------------- @@ -143,12 +143,12 @@ ; r2 int dst_pitch, ; r3 unsigned int height, ; stack unsigned int width, -; stack const short *vpx_filter +; stack const short *aom_filter ;--------------------------------- -|vpx_filter_block2d_bil_second_pass_media| PROC +|aom_filter_block2d_bil_second_pass_media| PROC stmdb sp!, {r4 - r11, lr} - ldr r11, [sp, #40] ; vpx_filter address + ldr r11, [sp, #40] ; aom_filter address ldr r4, [sp, #36] ; width ldr r5, [r11] ; load up filter coefficients @@ -232,6 +232,6 @@ bne bil_height_loop_null_2nd ldmia sp!, {r4 - r11, pc} - ENDP ; |vpx_filter_block2d_second_pass_media| + ENDP ; |aom_filter_block2d_second_pass_media| END diff --git a/aom_dsp/arm/fwd_txfm_neon.c b/aom_dsp/arm/fwd_txfm_neon.c index 7dbaf9f267aac534008a96a9b8970cb56119d8ec..17ce29e51f05b6b57ca11f420a336c7c203c3f2c 100644 --- a/aom_dsp/arm/fwd_txfm_neon.c +++ b/aom_dsp/arm/fwd_txfm_neon.c @@ -11,10 +11,10 @@ #include <arm_neon.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/txfm_common.h" -void vpx_fdct8x8_neon(const int16_t *input, int16_t *final_output, int stride) { +void aom_fdct8x8_neon(const int16_t *input, int16_t *final_output, int stride) { int i; // stage 1 int16x8_t input_0 = vshlq_n_s16(vld1q_s16(&input[0 * stride]), 2); @@ -171,7 +171,7 @@ void vpx_fdct8x8_neon(const int16_t *input, int16_t *final_output, int stride) { } } // for { - // from vpx_dct_sse2.c + // from aom_dct_sse2.c // Post-condition (division by two) // division of two 16 bits signed numbers using shifts // n / 2 = (n - (n >> 15)) >> 1 @@ -203,7 +203,7 @@ void vpx_fdct8x8_neon(const int16_t *input, int16_t *final_output, int stride) { } } -void vpx_fdct8x8_1_neon(const int16_t *input, int16_t *output, int stride) { +void aom_fdct8x8_1_neon(const int16_t *input, int16_t *output, int stride) { int r; int16x8_t sum = vld1q_s16(&input[0]); for (r = 1; r < 8; ++r) { diff --git a/aom_dsp/arm/idct16x16_1_add_neon.asm b/aom_dsp/arm/idct16x16_1_add_neon.asm index dc459e20d9cfac383ed21824fef6345fad734ffb..e07614f8394ed8e5c35dac1a30ec9f29217bb412 100644 --- a/aom_dsp/arm/idct16x16_1_add_neon.asm +++ b/aom_dsp/arm/idct16x16_1_add_neon.asm @@ -8,21 +8,21 @@ ; - EXPORT |vpx_idct16x16_1_add_neon| + EXPORT |aom_idct16x16_1_add_neon| ARM REQUIRE8 PRESERVE8 AREA ||.text||, CODE, READONLY, ALIGN=2 -;void vpx_idct16x16_1_add_neon(int16_t *input, uint8_t *dest, +;void aom_idct16x16_1_add_neon(int16_t *input, uint8_t *dest, ; int dest_stride) ; ; r0 int16_t input ; r1 uint8_t *dest ; r2 int dest_stride) -|vpx_idct16x16_1_add_neon| PROC +|aom_idct16x16_1_add_neon| PROC ldrsh r0, [r0] ; generate cospi_16_64 = 11585 @@ -193,6 +193,6 @@ vst1.64 {d31}, [r12], r2 bx lr - ENDP ; |vpx_idct16x16_1_add_neon| + ENDP ; |aom_idct16x16_1_add_neon| END diff --git a/aom_dsp/arm/idct16x16_1_add_neon.c b/aom_dsp/arm/idct16x16_1_add_neon.c index 207c3884558a7e4ad682487a0ded9ade57748232..29b7f44a1614d8ae01c3d755f90f13ecd88c4e6a 100644 --- a/aom_dsp/arm/idct16x16_1_add_neon.c +++ b/aom_dsp/arm/idct16x16_1_add_neon.c @@ -14,7 +14,7 @@ #include "aom_dsp/inv_txfm.h" #include "aom_ports/mem.h" -void vpx_idct16x16_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { +void aom_idct16x16_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { uint8x8_t d2u8, d3u8, d30u8, d31u8; uint64x1_t d2u64, d3u64, d4u64, d5u64; uint16x8_t q0u16, q9u16, q10u16, q11u16, q12u16; diff --git a/aom_dsp/arm/idct16x16_add_neon.asm b/aom_dsp/arm/idct16x16_add_neon.asm index 22a0c95941aa95215764df11979a8f286a375052..e22ab3e6d12b9f75bf67951405d3f33947a855b5 100644 --- a/aom_dsp/arm/idct16x16_add_neon.asm +++ b/aom_dsp/arm/idct16x16_add_neon.asm @@ -8,10 +8,10 @@ ; be found in the AUTHORS file in the root of the source tree. ; - EXPORT |vpx_idct16x16_256_add_neon_pass1| - EXPORT |vpx_idct16x16_256_add_neon_pass2| - EXPORT |vpx_idct16x16_10_add_neon_pass1| - EXPORT |vpx_idct16x16_10_add_neon_pass2| + EXPORT |aom_idct16x16_256_add_neon_pass1| + EXPORT |aom_idct16x16_256_add_neon_pass2| + EXPORT |aom_idct16x16_10_add_neon_pass1| + EXPORT |aom_idct16x16_10_add_neon_pass2| ARM REQUIRE8 PRESERVE8 @@ -36,7 +36,7 @@ MEND AREA Block, CODE, READONLY ; name this block of code -;void |vpx_idct16x16_256_add_neon_pass1|(int16_t *input, +;void |aom_idct16x16_256_add_neon_pass1|(int16_t *input, ; int16_t *output, int output_stride) ; ; r0 int16_t input @@ -46,7 +46,7 @@ ; idct16 stage1 - stage6 on all the elements loaded in q8-q15. The output ; will be stored back into q8-q15 registers. This function will touch q0-q7 ; registers and use them as buffer during calculation. -|vpx_idct16x16_256_add_neon_pass1| PROC +|aom_idct16x16_256_add_neon_pass1| PROC ; TODO(hkuang): Find a better way to load the elements. ; load elements of 0, 2, 4, 6, 8, 10, 12, 14 into q8 - q15 @@ -273,9 +273,9 @@ vst1.64 {d31}, [r1], r2 bx lr - ENDP ; |vpx_idct16x16_256_add_neon_pass1| + ENDP ; |aom_idct16x16_256_add_neon_pass1| -;void vpx_idct16x16_256_add_neon_pass2(int16_t *src, +;void aom_idct16x16_256_add_neon_pass2(int16_t *src, ; int16_t *output, ; int16_t *pass1Output, ; int16_t skip_adding, @@ -292,7 +292,7 @@ ; idct16 stage1 - stage7 on all the elements loaded in q8-q15. The output ; will be stored back into q8-q15 registers. This function will touch q0-q7 ; registers and use them as buffer during calculation. -|vpx_idct16x16_256_add_neon_pass2| PROC +|aom_idct16x16_256_add_neon_pass2| PROC push {r3-r9} ; TODO(hkuang): Find a better way to load the elements. @@ -784,9 +784,9 @@ skip_adding_dest end_idct16x16_pass2 pop {r3-r9} bx lr - ENDP ; |vpx_idct16x16_256_add_neon_pass2| + ENDP ; |aom_idct16x16_256_add_neon_pass2| -;void |vpx_idct16x16_10_add_neon_pass1|(int16_t *input, +;void |aom_idct16x16_10_add_neon_pass1|(int16_t *input, ; int16_t *output, int output_stride) ; ; r0 int16_t input @@ -796,7 +796,7 @@ end_idct16x16_pass2 ; idct16 stage1 - stage6 on all the elements loaded in q8-q15. The output ; will be stored back into q8-q15 registers. This function will touch q0-q7 ; registers and use them as buffer during calculation. -|vpx_idct16x16_10_add_neon_pass1| PROC +|aom_idct16x16_10_add_neon_pass1| PROC ; TODO(hkuang): Find a better way to load the elements. ; load elements of 0, 2, 4, 6, 8, 10, 12, 14 into q8 - q15 @@ -905,9 +905,9 @@ end_idct16x16_pass2 vst1.64 {d31}, [r1], r2 bx lr - ENDP ; |vpx_idct16x16_10_add_neon_pass1| + ENDP ; |aom_idct16x16_10_add_neon_pass1| -;void vpx_idct16x16_10_add_neon_pass2(int16_t *src, +;void aom_idct16x16_10_add_neon_pass2(int16_t *src, ; int16_t *output, ; int16_t *pass1Output, ; int16_t skip_adding, @@ -924,7 +924,7 @@ end_idct16x16_pass2 ; idct16 stage1 - stage7 on all the elements loaded in q8-q15. The output ; will be stored back into q8-q15 registers. This function will touch q0-q7 ; registers and use them as buffer during calculation. -|vpx_idct16x16_10_add_neon_pass2| PROC +|aom_idct16x16_10_add_neon_pass2| PROC push {r3-r9} ; TODO(hkuang): Find a better way to load the elements. @@ -1175,5 +1175,5 @@ end_idct16x16_pass2 end_idct10_16x16_pass2 pop {r3-r9} bx lr - ENDP ; |vpx_idct16x16_10_add_neon_pass2| + ENDP ; |aom_idct16x16_10_add_neon_pass2| END diff --git a/aom_dsp/arm/idct16x16_add_neon.c b/aom_dsp/arm/idct16x16_add_neon.c index c7e0d49c9c0e3d2f29cbafeae67a58f10e922212..3d545f878b63e38af09c643e43b0439400ce1df9 100644 --- a/aom_dsp/arm/idct16x16_add_neon.c +++ b/aom_dsp/arm/idct16x16_add_neon.c @@ -11,7 +11,7 @@ #include <arm_neon.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/txfm_common.h" static INLINE void TRANSPOSE8X8(int16x8_t *q8s16, int16x8_t *q9s16, @@ -78,7 +78,7 @@ static INLINE void TRANSPOSE8X8(int16x8_t *q8s16, int16x8_t *q9s16, return; } -void vpx_idct16x16_256_add_neon_pass1(int16_t *in, int16_t *out, +void aom_idct16x16_256_add_neon_pass1(int16_t *in, int16_t *out, int output_stride) { int16x4_t d0s16, d1s16, d2s16, d3s16; int16x4_t d8s16, d9s16, d10s16, d11s16, d12s16, d13s16, d14s16, d15s16; @@ -314,7 +314,7 @@ void vpx_idct16x16_256_add_neon_pass1(int16_t *in, int16_t *out, return; } -void vpx_idct16x16_256_add_neon_pass2(int16_t *src, int16_t *out, +void aom_idct16x16_256_add_neon_pass2(int16_t *src, int16_t *out, int16_t *pass1Output, int16_t skip_adding, uint8_t *dest, int dest_stride) { uint8_t *d; @@ -863,7 +863,7 @@ void vpx_idct16x16_256_add_neon_pass2(int16_t *src, int16_t *out, return; } -void vpx_idct16x16_10_add_neon_pass1(int16_t *in, int16_t *out, +void aom_idct16x16_10_add_neon_pass1(int16_t *in, int16_t *out, int output_stride) { int16x4_t d4s16; int16x4_t d8s16, d9s16, d10s16, d11s16, d12s16, d13s16, d14s16, d15s16; @@ -999,7 +999,7 @@ void vpx_idct16x16_10_add_neon_pass1(int16_t *in, int16_t *out, return; } -void vpx_idct16x16_10_add_neon_pass2(int16_t *src, int16_t *out, +void aom_idct16x16_10_add_neon_pass2(int16_t *src, int16_t *out, int16_t *pass1Output, int16_t skip_adding, uint8_t *dest, int dest_stride) { int16x4_t d0s16, d1s16, d2s16, d3s16, d4s16, d5s16, d6s16, d7s16; diff --git a/aom_dsp/arm/idct16x16_neon.c b/aom_dsp/arm/idct16x16_neon.c index bf682cc5497a8f4c7cd2a4a09695af2f847b0289..db0d4905b53d1410390b6d864f76ab35ee013984 100644 --- a/aom_dsp/arm/idct16x16_neon.c +++ b/aom_dsp/arm/idct16x16_neon.c @@ -9,26 +9,26 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" -void vpx_idct16x16_256_add_neon_pass1(const int16_t *input, int16_t *output, +void aom_idct16x16_256_add_neon_pass1(const int16_t *input, int16_t *output, int output_stride); -void vpx_idct16x16_256_add_neon_pass2(const int16_t *src, int16_t *output, +void aom_idct16x16_256_add_neon_pass2(const int16_t *src, int16_t *output, int16_t *pass1Output, int16_t skip_adding, uint8_t *dest, int dest_stride); -void vpx_idct16x16_10_add_neon_pass1(const int16_t *input, int16_t *output, +void aom_idct16x16_10_add_neon_pass1(const int16_t *input, int16_t *output, int output_stride); -void vpx_idct16x16_10_add_neon_pass2(const int16_t *src, int16_t *output, +void aom_idct16x16_10_add_neon_pass2(const int16_t *src, int16_t *output, int16_t *pass1Output, int16_t skip_adding, uint8_t *dest, int dest_stride); #if HAVE_NEON_ASM /* For ARM NEON, d8-d15 are callee-saved registers, and need to be saved. */ -extern void vpx_push_neon(int64_t *store); -extern void vpx_pop_neon(int64_t *store); +extern void aom_push_neon(int64_t *store); +extern void aom_pop_neon(int64_t *store); #endif // HAVE_NEON_ASM -void vpx_idct16x16_256_add_neon(const int16_t *input, uint8_t *dest, +void aom_idct16x16_256_add_neon(const int16_t *input, uint8_t *dest, int dest_stride) { #if HAVE_NEON_ASM int64_t store_reg[8]; @@ -38,63 +38,63 @@ void vpx_idct16x16_256_add_neon(const int16_t *input, uint8_t *dest, #if HAVE_NEON_ASM // save d8-d15 register values. - vpx_push_neon(store_reg); + aom_push_neon(store_reg); #endif /* Parallel idct on the upper 8 rows */ // First pass processes even elements 0, 2, 4, 6, 8, 10, 12, 14 and save the // stage 6 result in pass1_output. - vpx_idct16x16_256_add_neon_pass1(input, pass1_output, 8); + aom_idct16x16_256_add_neon_pass1(input, pass1_output, 8); // Second pass processes odd elements 1, 3, 5, 7, 9, 11, 13, 15 and combines // with result in pass1(pass1_output) to calculate final result in stage 7 // which will be saved into row_idct_output. - vpx_idct16x16_256_add_neon_pass2(input + 1, row_idct_output, pass1_output, 0, + aom_idct16x16_256_add_neon_pass2(input + 1, row_idct_output, pass1_output, 0, dest, dest_stride); /* Parallel idct on the lower 8 rows */ // First pass processes even elements 0, 2, 4, 6, 8, 10, 12, 14 and save the // stage 6 result in pass1_output. - vpx_idct16x16_256_add_neon_pass1(input + 8 * 16, pass1_output, 8); + aom_idct16x16_256_add_neon_pass1(input + 8 * 16, pass1_output, 8); // Second pass processes odd elements 1, 3, 5, 7, 9, 11, 13, 15 and combines // with result in pass1(pass1_output) to calculate final result in stage 7 // which will be saved into row_idct_output. - vpx_idct16x16_256_add_neon_pass2(input + 8 * 16 + 1, row_idct_output + 8, + aom_idct16x16_256_add_neon_pass2(input + 8 * 16 + 1, row_idct_output + 8, pass1_output, 0, dest, dest_stride); /* Parallel idct on the left 8 columns */ // First pass processes even elements 0, 2, 4, 6, 8, 10, 12, 14 and save the // stage 6 result in pass1_output. - vpx_idct16x16_256_add_neon_pass1(row_idct_output, pass1_output, 8); + aom_idct16x16_256_add_neon_pass1(row_idct_output, pass1_output, 8); // Second pass processes odd elements 1, 3, 5, 7, 9, 11, 13, 15 and combines // with result in pass1(pass1_output) to calculate final result in stage 7. // Then add the result to the destination data. - vpx_idct16x16_256_add_neon_pass2(row_idct_output + 1, row_idct_output, + aom_idct16x16_256_add_neon_pass2(row_idct_output + 1, row_idct_output, pass1_output, 1, dest, dest_stride); /* Parallel idct on the right 8 columns */ // First pass processes even elements 0, 2, 4, 6, 8, 10, 12, 14 and save the // stage 6 result in pass1_output. - vpx_idct16x16_256_add_neon_pass1(row_idct_output + 8 * 16, pass1_output, 8); + aom_idct16x16_256_add_neon_pass1(row_idct_output + 8 * 16, pass1_output, 8); // Second pass processes odd elements 1, 3, 5, 7, 9, 11, 13, 15 and combines // with result in pass1(pass1_output) to calculate final result in stage 7. // Then add the result to the destination data. - vpx_idct16x16_256_add_neon_pass2(row_idct_output + 8 * 16 + 1, + aom_idct16x16_256_add_neon_pass2(row_idct_output + 8 * 16 + 1, row_idct_output + 8, pass1_output, 1, dest + 8, dest_stride); #if HAVE_NEON_ASM // restore d8-d15 register values. - vpx_pop_neon(store_reg); + aom_pop_neon(store_reg); #endif return; } -void vpx_idct16x16_10_add_neon(const int16_t *input, uint8_t *dest, +void aom_idct16x16_10_add_neon(const int16_t *input, uint8_t *dest, int dest_stride) { #if HAVE_NEON_ASM int64_t store_reg[8]; @@ -104,18 +104,18 @@ void vpx_idct16x16_10_add_neon(const int16_t *input, uint8_t *dest, #if HAVE_NEON_ASM // save d8-d15 register values. - vpx_push_neon(store_reg); + aom_push_neon(store_reg); #endif /* Parallel idct on the upper 8 rows */ // First pass processes even elements 0, 2, 4, 6, 8, 10, 12, 14 and save the // stage 6 result in pass1_output. - vpx_idct16x16_10_add_neon_pass1(input, pass1_output, 8); + aom_idct16x16_10_add_neon_pass1(input, pass1_output, 8); // Second pass processes odd elements 1, 3, 5, 7, 9, 11, 13, 15 and combines // with result in pass1(pass1_output) to calculate final result in stage 7 // which will be saved into row_idct_output. - vpx_idct16x16_10_add_neon_pass2(input + 1, row_idct_output, pass1_output, 0, + aom_idct16x16_10_add_neon_pass2(input + 1, row_idct_output, pass1_output, 0, dest, dest_stride); /* Skip Parallel idct on the lower 8 rows as they are all 0s */ @@ -123,29 +123,29 @@ void vpx_idct16x16_10_add_neon(const int16_t *input, uint8_t *dest, /* Parallel idct on the left 8 columns */ // First pass processes even elements 0, 2, 4, 6, 8, 10, 12, 14 and save the // stage 6 result in pass1_output. - vpx_idct16x16_256_add_neon_pass1(row_idct_output, pass1_output, 8); + aom_idct16x16_256_add_neon_pass1(row_idct_output, pass1_output, 8); // Second pass processes odd elements 1, 3, 5, 7, 9, 11, 13, 15 and combines // with result in pass1(pass1_output) to calculate final result in stage 7. // Then add the result to the destination data. - vpx_idct16x16_256_add_neon_pass2(row_idct_output + 1, row_idct_output, + aom_idct16x16_256_add_neon_pass2(row_idct_output + 1, row_idct_output, pass1_output, 1, dest, dest_stride); /* Parallel idct on the right 8 columns */ // First pass processes even elements 0, 2, 4, 6, 8, 10, 12, 14 and save the // stage 6 result in pass1_output. - vpx_idct16x16_256_add_neon_pass1(row_idct_output + 8 * 16, pass1_output, 8); + aom_idct16x16_256_add_neon_pass1(row_idct_output + 8 * 16, pass1_output, 8); // Second pass processes odd elements 1, 3, 5, 7, 9, 11, 13, 15 and combines // with result in pass1(pass1_output) to calculate final result in stage 7. // Then add the result to the destination data. - vpx_idct16x16_256_add_neon_pass2(row_idct_output + 8 * 16 + 1, + aom_idct16x16_256_add_neon_pass2(row_idct_output + 8 * 16 + 1, row_idct_output + 8, pass1_output, 1, dest + 8, dest_stride); #if HAVE_NEON_ASM // restore d8-d15 register values. - vpx_pop_neon(store_reg); + aom_pop_neon(store_reg); #endif return; diff --git a/aom_dsp/arm/idct32x32_1_add_neon.asm b/aom_dsp/arm/idct32x32_1_add_neon.asm index 96d276b4d1404a3753e63c12046be6b7bfdd1d98..9b31287b580f5ec7d7e1b045be362af1575b9d89 100644 --- a/aom_dsp/arm/idct32x32_1_add_neon.asm +++ b/aom_dsp/arm/idct32x32_1_add_neon.asm @@ -7,7 +7,7 @@ ; file in the root of the source tree. ; - EXPORT |vpx_idct32x32_1_add_neon| + EXPORT |aom_idct32x32_1_add_neon| ARM REQUIRE8 PRESERVE8 @@ -64,14 +64,14 @@ vst1.8 {q15},[$dst], $stride MEND -;void vpx_idct32x32_1_add_neon(int16_t *input, uint8_t *dest, +;void aom_idct32x32_1_add_neon(int16_t *input, uint8_t *dest, ; int dest_stride) ; ; r0 int16_t input ; r1 uint8_t *dest ; r2 int dest_stride -|vpx_idct32x32_1_add_neon| PROC +|aom_idct32x32_1_add_neon| PROC push {lr} pld [r1] add r3, r1, #16 ; r3 dest + 16 for second loop @@ -140,5 +140,5 @@ diff_positive_32_32_loop bne diff_positive_32_32_loop pop {pc} - ENDP ; |vpx_idct32x32_1_add_neon| + ENDP ; |aom_idct32x32_1_add_neon| END diff --git a/aom_dsp/arm/idct32x32_1_add_neon.c b/aom_dsp/arm/idct32x32_1_add_neon.c index d9d5a0dde923f655b31e04081f86cf36aeffb375..768cf799acf09ff9ae05d095fc7a854fb803ce6c 100644 --- a/aom_dsp/arm/idct32x32_1_add_neon.c +++ b/aom_dsp/arm/idct32x32_1_add_neon.c @@ -11,7 +11,7 @@ #include <arm_neon.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/inv_txfm.h" #include "aom_ports/mem.h" @@ -94,7 +94,7 @@ static INLINE void ST_16x8(uint8_t *d, int d_stride, uint8x16_t *q8u8, return; } -void vpx_idct32x32_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { +void aom_idct32x32_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { uint8x16_t q0u8, q8u8, q9u8, q10u8, q11u8, q12u8, q13u8, q14u8, q15u8; int i, j, dest_stride8; uint8_t *d; diff --git a/aom_dsp/arm/idct32x32_add_neon.asm b/aom_dsp/arm/idct32x32_add_neon.asm index 7483ee77e18486f62fb2eb91f712612072361cf6..10de48298034d9d3118730418b1f25f4151441ae 100644 --- a/aom_dsp/arm/idct32x32_add_neon.asm +++ b/aom_dsp/arm/idct32x32_add_neon.asm @@ -43,7 +43,7 @@ cospi_30_64 EQU 1606 cospi_31_64 EQU 804 - EXPORT |vpx_idct32x32_1024_add_neon| + EXPORT |aom_idct32x32_1024_add_neon| ARM REQUIRE8 PRESERVE8 @@ -288,7 +288,7 @@ cospi_31_64 EQU 804 MEND ; -------------------------------------------------------------------------- -;void vpx_idct32x32_1024_add_neon(int16_t *input, uint8_t *dest, int dest_stride); +;void aom_idct32x32_1024_add_neon(int16_t *input, uint8_t *dest, int dest_stride); ; ; r0 int16_t *input, ; r1 uint8_t *dest, @@ -303,7 +303,7 @@ cospi_31_64 EQU 804 ; r9 dest + 15 * dest_stride, descending (14, 13, 12, ...) ; r10 dest + 16 * dest_stride, ascending (17, 18, 19, ...) -|vpx_idct32x32_1024_add_neon| PROC +|aom_idct32x32_1024_add_neon| PROC ; This function does one pass of idct32x32 transform. ; ; This is done by transposing the input and then doing a 1d transform on @@ -1295,5 +1295,5 @@ idct32_bands_end_2nd_pass vpop {d8-d15} pop {r4-r11} bx lr - ENDP ; |vpx_idct32x32_1024_add_neon| + ENDP ; |aom_idct32x32_1024_add_neon| END diff --git a/aom_dsp/arm/idct32x32_add_neon.c b/aom_dsp/arm/idct32x32_add_neon.c index 01d8169b5e56d3691ff064cc60f75656b35cecb3..a7562c7d5dfa945eac3e5ebdd6ac5d8ba311e2e9 100644 --- a/aom_dsp/arm/idct32x32_add_neon.c +++ b/aom_dsp/arm/idct32x32_add_neon.c @@ -11,7 +11,7 @@ #include <arm_neon.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/txfm_common.h" #define LOAD_FROM_TRANSPOSED(prev, first, second) \ @@ -428,7 +428,7 @@ static INLINE void idct32_bands_end_2nd_pass( return; } -void vpx_idct32x32_1024_add_neon(int16_t *input, uint8_t *dest, int stride) { +void aom_idct32x32_1024_add_neon(int16_t *input, uint8_t *dest, int stride) { int i, idct32_pass_loop; int16_t trans_buf[32 * 8]; int16_t pass1[32 * 32]; diff --git a/aom_dsp/arm/idct4x4_1_add_neon.asm b/aom_dsp/arm/idct4x4_1_add_neon.asm index adab715dde50079d96d9b165dfa4a66d088d92bf..145752774504f69738b51c09734b2f8ce6774452 100644 --- a/aom_dsp/arm/idct4x4_1_add_neon.asm +++ b/aom_dsp/arm/idct4x4_1_add_neon.asm @@ -8,21 +8,21 @@ ; - EXPORT |vpx_idct4x4_1_add_neon| + EXPORT |aom_idct4x4_1_add_neon| ARM REQUIRE8 PRESERVE8 AREA ||.text||, CODE, READONLY, ALIGN=2 -;void vpx_idct4x4_1_add_neon(int16_t *input, uint8_t *dest, +;void aom_idct4x4_1_add_neon(int16_t *input, uint8_t *dest, ; int dest_stride) ; ; r0 int16_t input ; r1 uint8_t *dest ; r2 int dest_stride) -|vpx_idct4x4_1_add_neon| PROC +|aom_idct4x4_1_add_neon| PROC ldrsh r0, [r0] ; generate cospi_16_64 = 11585 @@ -63,6 +63,6 @@ vst1.32 {d7[1]}, [r12] bx lr - ENDP ; |vpx_idct4x4_1_add_neon| + ENDP ; |aom_idct4x4_1_add_neon| END diff --git a/aom_dsp/arm/idct4x4_1_add_neon.c b/aom_dsp/arm/idct4x4_1_add_neon.c index 64c4fe10a3abf838af1ead0fa30082d0e503a36c..d801eb60b066c4f29975a3ed6b54d84ebfebc8d4 100644 --- a/aom_dsp/arm/idct4x4_1_add_neon.c +++ b/aom_dsp/arm/idct4x4_1_add_neon.c @@ -14,7 +14,7 @@ #include "aom_dsp/inv_txfm.h" #include "aom_ports/mem.h" -void vpx_idct4x4_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { +void aom_idct4x4_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { uint8x8_t d6u8; uint32x2_t d2u32 = vdup_n_u32(0); uint16x8_t q8u16; diff --git a/aom_dsp/arm/idct4x4_add_neon.asm b/aom_dsp/arm/idct4x4_add_neon.asm index 877fbd634359538fd901e750cb480d4f5e0442ba..d240f335d4db75699f907102a4d663b6e595d742 100644 --- a/aom_dsp/arm/idct4x4_add_neon.asm +++ b/aom_dsp/arm/idct4x4_add_neon.asm @@ -8,7 +8,7 @@ ; be found in the AUTHORS file in the root of the source tree. ; - EXPORT |vpx_idct4x4_16_add_neon| + EXPORT |aom_idct4x4_16_add_neon| ARM REQUIRE8 PRESERVE8 @@ -16,13 +16,13 @@ AREA ||.text||, CODE, READONLY, ALIGN=2 AREA Block, CODE, READONLY ; name this block of code -;void vpx_idct4x4_16_add_neon(int16_t *input, uint8_t *dest, int dest_stride) +;void aom_idct4x4_16_add_neon(int16_t *input, uint8_t *dest, int dest_stride) ; ; r0 int16_t input ; r1 uint8_t *dest ; r2 int dest_stride) -|vpx_idct4x4_16_add_neon| PROC +|aom_idct4x4_16_add_neon| PROC ; The 2D transform is done with two passes which are actually pretty ; similar. We first transform the rows. This is done by transposing @@ -185,6 +185,6 @@ vst1.32 {d26[1]}, [r1], r2 vst1.32 {d26[0]}, [r1] ; no post-increment bx lr - ENDP ; |vpx_idct4x4_16_add_neon| + ENDP ; |aom_idct4x4_16_add_neon| END diff --git a/aom_dsp/arm/idct4x4_add_neon.c b/aom_dsp/arm/idct4x4_add_neon.c index 165cd0f7deff7398880c4a747c81ae0dfcb4376b..397c61709ff576091b140f0f11f142e2e8baf6de 100644 --- a/aom_dsp/arm/idct4x4_add_neon.c +++ b/aom_dsp/arm/idct4x4_add_neon.c @@ -11,7 +11,7 @@ #include <arm_neon.h> -void vpx_idct4x4_16_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { +void aom_idct4x4_16_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { uint8x8_t d26u8, d27u8; uint32x2_t d26u32, d27u32; uint16x8_t q8u16, q9u16; diff --git a/aom_dsp/arm/idct8x8_1_add_neon.asm b/aom_dsp/arm/idct8x8_1_add_neon.asm index dbbff364f372198bb1cb9443b552340d7bde97f6..d2b410de2deb01946cd9b8e69cc83fc9ee3391dd 100644 --- a/aom_dsp/arm/idct8x8_1_add_neon.asm +++ b/aom_dsp/arm/idct8x8_1_add_neon.asm @@ -8,21 +8,21 @@ ; - EXPORT |vpx_idct8x8_1_add_neon| + EXPORT |aom_idct8x8_1_add_neon| ARM REQUIRE8 PRESERVE8 AREA ||.text||, CODE, READONLY, ALIGN=2 -;void vpx_idct8x8_1_add_neon(int16_t *input, uint8_t *dest, +;void aom_idct8x8_1_add_neon(int16_t *input, uint8_t *dest, ; int dest_stride) ; ; r0 int16_t input ; r1 uint8_t *dest ; r2 int dest_stride) -|vpx_idct8x8_1_add_neon| PROC +|aom_idct8x8_1_add_neon| PROC ldrsh r0, [r0] ; generate cospi_16_64 = 11585 @@ -83,6 +83,6 @@ vst1.64 {d31}, [r12], r2 bx lr - ENDP ; |vpx_idct8x8_1_add_neon| + ENDP ; |aom_idct8x8_1_add_neon| END diff --git a/aom_dsp/arm/idct8x8_1_add_neon.c b/aom_dsp/arm/idct8x8_1_add_neon.c index bb6fa740199cb2668d4e043cfa1e4daa3f7f169d..fcc2a2fcd29b547b979d3629b30b7ee27c493f96 100644 --- a/aom_dsp/arm/idct8x8_1_add_neon.c +++ b/aom_dsp/arm/idct8x8_1_add_neon.c @@ -14,7 +14,7 @@ #include "aom_dsp/inv_txfm.h" #include "aom_ports/mem.h" -void vpx_idct8x8_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { +void aom_idct8x8_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { uint8x8_t d2u8, d3u8, d30u8, d31u8; uint64x1_t d2u64, d3u64, d4u64, d5u64; uint16x8_t q0u16, q9u16, q10u16, q11u16, q12u16; diff --git a/aom_dsp/arm/idct8x8_add_neon.asm b/aom_dsp/arm/idct8x8_add_neon.asm index 6ab59b41b7459f89aa479eab8a45bb4746a87b06..a03c83d95879f359570631ea24b99786cd35f6bc 100644 --- a/aom_dsp/arm/idct8x8_add_neon.asm +++ b/aom_dsp/arm/idct8x8_add_neon.asm @@ -8,8 +8,8 @@ ; be found in the AUTHORS file in the root of the source tree. ; - EXPORT |vpx_idct8x8_64_add_neon| - EXPORT |vpx_idct8x8_12_add_neon| + EXPORT |aom_idct8x8_64_add_neon| + EXPORT |aom_idct8x8_12_add_neon| ARM REQUIRE8 PRESERVE8 @@ -198,13 +198,13 @@ MEND AREA Block, CODE, READONLY ; name this block of code -;void vpx_idct8x8_64_add_neon(int16_t *input, uint8_t *dest, int dest_stride) +;void aom_idct8x8_64_add_neon(int16_t *input, uint8_t *dest, int dest_stride) ; ; r0 int16_t input ; r1 uint8_t *dest ; r2 int dest_stride) -|vpx_idct8x8_64_add_neon| PROC +|aom_idct8x8_64_add_neon| PROC push {r4-r9} vpush {d8-d15} vld1.s16 {q8,q9}, [r0]! @@ -308,15 +308,15 @@ vpop {d8-d15} pop {r4-r9} bx lr - ENDP ; |vpx_idct8x8_64_add_neon| + ENDP ; |aom_idct8x8_64_add_neon| -;void vpx_idct8x8_12_add_neon(int16_t *input, uint8_t *dest, int dest_stride) +;void aom_idct8x8_12_add_neon(int16_t *input, uint8_t *dest, int dest_stride) ; ; r0 int16_t input ; r1 uint8_t *dest ; r2 int dest_stride) -|vpx_idct8x8_12_add_neon| PROC +|aom_idct8x8_12_add_neon| PROC push {r4-r9} vpush {d8-d15} vld1.s16 {q8,q9}, [r0]! @@ -514,6 +514,6 @@ vpop {d8-d15} pop {r4-r9} bx lr - ENDP ; |vpx_idct8x8_12_add_neon| + ENDP ; |aom_idct8x8_12_add_neon| END diff --git a/aom_dsp/arm/idct8x8_add_neon.c b/aom_dsp/arm/idct8x8_add_neon.c index 44f1547c7ff6e64298a45f93686e5734645cf365..8e752105b6e59f8036822bb5a5835a133edd916c 100644 --- a/aom_dsp/arm/idct8x8_add_neon.c +++ b/aom_dsp/arm/idct8x8_add_neon.c @@ -11,7 +11,7 @@ #include <arm_neon.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/txfm_common.h" static INLINE void TRANSPOSE8X8(int16x8_t *q8s16, int16x8_t *q9s16, @@ -229,7 +229,7 @@ static INLINE void IDCT8x8_1D(int16x8_t *q8s16, int16x8_t *q9s16, return; } -void vpx_idct8x8_64_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { +void aom_idct8x8_64_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { uint8_t *d1, *d2; uint8x8_t d0u8, d1u8, d2u8, d3u8; uint64x1_t d0u64, d1u64, d2u64, d3u64; @@ -331,7 +331,7 @@ void vpx_idct8x8_64_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { return; } -void vpx_idct8x8_12_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { +void aom_idct8x8_12_add_neon(int16_t *input, uint8_t *dest, int dest_stride) { uint8_t *d1, *d2; uint8x8_t d0u8, d1u8, d2u8, d3u8; int16x4_t d10s16, d11s16, d12s16, d13s16, d16s16; diff --git a/aom_dsp/arm/intrapred_neon.c b/aom_dsp/arm/intrapred_neon.c index 476920452bbdff0c91d4223c073a220a959089cf..0cdba9a8bccd4c9c16cd11ef9d29ad453d9618e8 100644 --- a/aom_dsp/arm/intrapred_neon.c +++ b/aom_dsp/arm/intrapred_neon.c @@ -11,9 +11,9 @@ #include <arm_neon.h> -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" //------------------------------------------------------------------------------ // DC 4x4 @@ -59,24 +59,24 @@ static INLINE void dc_4x4(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, } } -void vpx_dc_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { dc_4x4(dst, stride, above, left, 1, 1); } -void vpx_dc_left_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_left_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)above; dc_4x4(dst, stride, NULL, left, 0, 1); } -void vpx_dc_top_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_top_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)left; dc_4x4(dst, stride, above, NULL, 1, 0); } -void vpx_dc_128_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_128_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)above; (void)left; @@ -129,24 +129,24 @@ static INLINE void dc_8x8(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, } } -void vpx_dc_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { dc_8x8(dst, stride, above, left, 1, 1); } -void vpx_dc_left_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_left_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)above; dc_8x8(dst, stride, NULL, left, 0, 1); } -void vpx_dc_top_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_top_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)left; dc_8x8(dst, stride, above, NULL, 1, 0); } -void vpx_dc_128_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_128_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)above; (void)left; @@ -202,26 +202,26 @@ static INLINE void dc_16x16(uint8_t *dst, ptrdiff_t stride, } } -void vpx_dc_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { dc_16x16(dst, stride, above, left, 1, 1); } -void vpx_dc_left_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_left_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)above; dc_16x16(dst, stride, NULL, left, 0, 1); } -void vpx_dc_top_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_top_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)left; dc_16x16(dst, stride, above, NULL, 1, 0); } -void vpx_dc_128_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_128_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)above; @@ -285,26 +285,26 @@ static INLINE void dc_32x32(uint8_t *dst, ptrdiff_t stride, } } -void vpx_dc_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { dc_32x32(dst, stride, above, left, 1, 1); } -void vpx_dc_left_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_left_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)above; dc_32x32(dst, stride, NULL, left, 0, 1); } -void vpx_dc_top_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_top_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)left; dc_32x32(dst, stride, above, NULL, 1, 0); } -void vpx_dc_128_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, +void aom_dc_128_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { (void)above; @@ -314,7 +314,7 @@ void vpx_dc_128_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, // ----------------------------------------------------------------------------- -void vpx_d45_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, +void aom_d45_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const uint64x1_t A0 = vreinterpret_u64_u8(vld1_u8(above)); // top row const uint64x1_t A1 = vshr_n_u64(A0, 8); @@ -337,7 +337,7 @@ void vpx_d45_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, dst[3 * stride + 3] = above[7]; } -void vpx_d45_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, +void aom_d45_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { static const uint8_t shuffle1[8] = { 1, 2, 3, 4, 5, 6, 7, 7 }; static const uint8_t shuffle2[8] = { 2, 3, 4, 5, 6, 7, 7, 7 }; @@ -357,7 +357,7 @@ void vpx_d45_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, vst1_u8(dst + i * stride, row); } -void vpx_d45_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, +void aom_d45_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const uint8x16_t A0 = vld1q_u8(above); // top row const uint8x16_t above_right = vld1q_dup_u8(above + 15); @@ -376,7 +376,7 @@ void vpx_d45_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, // ----------------------------------------------------------------------------- -void vpx_d135_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, +void aom_d135_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const uint8x8_t XABCD_u8 = vld1_u8(above - 1); const uint64x1_t XABCD = vreinterpret_u64_u8(XABCD_u8); @@ -406,7 +406,7 @@ void vpx_d135_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, #if !HAVE_NEON_ASM -void vpx_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, +void aom_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int i; uint32x2_t d0u32 = vdup_n_u32(0); @@ -417,7 +417,7 @@ void vpx_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, vst1_lane_u32((uint32_t *)dst, d0u32, 0); } -void vpx_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, +void aom_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int i; uint8x8_t d0u8 = vdup_n_u8(0); @@ -427,7 +427,7 @@ void vpx_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, for (i = 0; i < 8; i++, dst += stride) vst1_u8(dst, d0u8); } -void vpx_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, +void aom_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int i; uint8x16_t q0u8 = vdupq_n_u8(0); @@ -437,7 +437,7 @@ void vpx_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, for (i = 0; i < 16; i++, dst += stride) vst1q_u8(dst, q0u8); } -void vpx_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, +void aom_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int i; uint8x16_t q0u8 = vdupq_n_u8(0); @@ -452,7 +452,7 @@ void vpx_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, } } -void vpx_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, +void aom_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { uint8x8_t d0u8 = vdup_n_u8(0); uint32x2_t d1u32 = vdup_n_u32(0); @@ -473,7 +473,7 @@ void vpx_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, vst1_lane_u32((uint32_t *)dst, vreinterpret_u32_u8(d0u8), 0); } -void vpx_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, +void aom_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { uint8x8_t d0u8 = vdup_n_u8(0); uint64x1_t d1u64 = vdup_n_u64(0); @@ -506,7 +506,7 @@ void vpx_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, vst1_u8(dst, d0u8); } -void vpx_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, +void aom_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int j; uint8x8_t d2u8 = vdup_n_u8(0); @@ -544,7 +544,7 @@ void vpx_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, } } -void vpx_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, +void aom_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int j, k; uint8x8_t d2u8 = vdup_n_u8(0); @@ -592,7 +592,7 @@ void vpx_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, } } -void vpx_tm_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, +void aom_tm_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int i; uint16x8_t q1u16, q3u16; @@ -612,7 +612,7 @@ void vpx_tm_predictor_4x4_neon(uint8_t *dst, ptrdiff_t stride, } } -void vpx_tm_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, +void aom_tm_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int j; uint16x8_t q0u16, q3u16, q10u16; @@ -654,7 +654,7 @@ void vpx_tm_predictor_8x8_neon(uint8_t *dst, ptrdiff_t stride, } } -void vpx_tm_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, +void aom_tm_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int j, k; uint16x8_t q0u16, q2u16, q3u16, q8u16, q10u16; @@ -717,7 +717,7 @@ void vpx_tm_predictor_16x16_neon(uint8_t *dst, ptrdiff_t stride, } } -void vpx_tm_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, +void aom_tm_predictor_32x32_neon(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int j, k; uint16x8_t q0u16, q3u16, q8u16, q9u16, q10u16, q11u16; diff --git a/aom_dsp/arm/intrapred_neon_asm.asm b/aom_dsp/arm/intrapred_neon_asm.asm index 115790d4801adfd5703a67ebd1878834a81b9513..6014a09f241dc73b6a1cf69ee3489253cf177502 100644 --- a/aom_dsp/arm/intrapred_neon_asm.asm +++ b/aom_dsp/arm/intrapred_neon_asm.asm @@ -8,25 +8,25 @@ ; be found in the AUTHORS file in the root of the source tree. ; - EXPORT |vpx_v_predictor_4x4_neon| - EXPORT |vpx_v_predictor_8x8_neon| - EXPORT |vpx_v_predictor_16x16_neon| - EXPORT |vpx_v_predictor_32x32_neon| - EXPORT |vpx_h_predictor_4x4_neon| - EXPORT |vpx_h_predictor_8x8_neon| - EXPORT |vpx_h_predictor_16x16_neon| - EXPORT |vpx_h_predictor_32x32_neon| - EXPORT |vpx_tm_predictor_4x4_neon| - EXPORT |vpx_tm_predictor_8x8_neon| - EXPORT |vpx_tm_predictor_16x16_neon| - EXPORT |vpx_tm_predictor_32x32_neon| + EXPORT |aom_v_predictor_4x4_neon| + EXPORT |aom_v_predictor_8x8_neon| + EXPORT |aom_v_predictor_16x16_neon| + EXPORT |aom_v_predictor_32x32_neon| + EXPORT |aom_h_predictor_4x4_neon| + EXPORT |aom_h_predictor_8x8_neon| + EXPORT |aom_h_predictor_16x16_neon| + EXPORT |aom_h_predictor_32x32_neon| + EXPORT |aom_tm_predictor_4x4_neon| + EXPORT |aom_tm_predictor_8x8_neon| + EXPORT |aom_tm_predictor_16x16_neon| + EXPORT |aom_tm_predictor_32x32_neon| ARM REQUIRE8 PRESERVE8 AREA ||.text||, CODE, READONLY, ALIGN=2 -;void vpx_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, +;void aom_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -34,16 +34,16 @@ ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_v_predictor_4x4_neon| PROC +|aom_v_predictor_4x4_neon| PROC vld1.32 {d0[0]}, [r2] vst1.32 {d0[0]}, [r0], r1 vst1.32 {d0[0]}, [r0], r1 vst1.32 {d0[0]}, [r0], r1 vst1.32 {d0[0]}, [r0], r1 bx lr - ENDP ; |vpx_v_predictor_4x4_neon| + ENDP ; |aom_v_predictor_4x4_neon| -;void vpx_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, +;void aom_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -51,7 +51,7 @@ ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_v_predictor_8x8_neon| PROC +|aom_v_predictor_8x8_neon| PROC vld1.8 {d0}, [r2] vst1.8 {d0}, [r0], r1 vst1.8 {d0}, [r0], r1 @@ -62,9 +62,9 @@ vst1.8 {d0}, [r0], r1 vst1.8 {d0}, [r0], r1 bx lr - ENDP ; |vpx_v_predictor_8x8_neon| + ENDP ; |aom_v_predictor_8x8_neon| -;void vpx_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, +;void aom_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -72,7 +72,7 @@ ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_v_predictor_16x16_neon| PROC +|aom_v_predictor_16x16_neon| PROC vld1.8 {q0}, [r2] vst1.8 {q0}, [r0], r1 vst1.8 {q0}, [r0], r1 @@ -91,9 +91,9 @@ vst1.8 {q0}, [r0], r1 vst1.8 {q0}, [r0], r1 bx lr - ENDP ; |vpx_v_predictor_16x16_neon| + ENDP ; |aom_v_predictor_16x16_neon| -;void vpx_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, +;void aom_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -101,7 +101,7 @@ ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_v_predictor_32x32_neon| PROC +|aom_v_predictor_32x32_neon| PROC vld1.8 {q0, q1}, [r2] mov r2, #2 loop_v @@ -124,9 +124,9 @@ loop_v subs r2, r2, #1 bgt loop_v bx lr - ENDP ; |vpx_v_predictor_32x32_neon| + ENDP ; |aom_v_predictor_32x32_neon| -;void vpx_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, +;void aom_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -134,7 +134,7 @@ loop_v ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_h_predictor_4x4_neon| PROC +|aom_h_predictor_4x4_neon| PROC vld1.32 {d1[0]}, [r3] vdup.8 d0, d1[0] vst1.32 {d0[0]}, [r0], r1 @@ -145,9 +145,9 @@ loop_v vdup.8 d0, d1[3] vst1.32 {d0[0]}, [r0], r1 bx lr - ENDP ; |vpx_h_predictor_4x4_neon| + ENDP ; |aom_h_predictor_4x4_neon| -;void vpx_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, +;void aom_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -155,7 +155,7 @@ loop_v ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_h_predictor_8x8_neon| PROC +|aom_h_predictor_8x8_neon| PROC vld1.64 {d1}, [r3] vdup.8 d0, d1[0] vst1.64 {d0}, [r0], r1 @@ -174,9 +174,9 @@ loop_v vdup.8 d0, d1[7] vst1.64 {d0}, [r0], r1 bx lr - ENDP ; |vpx_h_predictor_8x8_neon| + ENDP ; |aom_h_predictor_8x8_neon| -;void vpx_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, +;void aom_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -184,7 +184,7 @@ loop_v ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_h_predictor_16x16_neon| PROC +|aom_h_predictor_16x16_neon| PROC vld1.8 {q1}, [r3] vdup.8 q0, d2[0] vst1.8 {q0}, [r0], r1 @@ -219,9 +219,9 @@ loop_v vdup.8 q0, d3[7] vst1.8 {q0}, [r0], r1 bx lr - ENDP ; |vpx_h_predictor_16x16_neon| + ENDP ; |aom_h_predictor_16x16_neon| -;void vpx_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, +;void aom_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -229,7 +229,7 @@ loop_v ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_h_predictor_32x32_neon| PROC +|aom_h_predictor_32x32_neon| PROC sub r1, r1, #16 mov r2, #2 loop_h @@ -285,9 +285,9 @@ loop_h subs r2, r2, #1 bgt loop_h bx lr - ENDP ; |vpx_h_predictor_32x32_neon| + ENDP ; |aom_h_predictor_32x32_neon| -;void vpx_tm_predictor_4x4_neon (uint8_t *dst, ptrdiff_t y_stride, +;void aom_tm_predictor_4x4_neon (uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -295,7 +295,7 @@ loop_h ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_tm_predictor_4x4_neon| PROC +|aom_tm_predictor_4x4_neon| PROC ; Load ytop_left = above[-1]; sub r12, r2, #1 vld1.u8 {d0[]}, [r12] @@ -331,9 +331,9 @@ loop_h vst1.32 {d0[0]}, [r0], r1 vst1.32 {d1[0]}, [r0], r1 bx lr - ENDP ; |vpx_tm_predictor_4x4_neon| + ENDP ; |aom_tm_predictor_4x4_neon| -;void vpx_tm_predictor_8x8_neon (uint8_t *dst, ptrdiff_t y_stride, +;void aom_tm_predictor_8x8_neon (uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -341,7 +341,7 @@ loop_h ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_tm_predictor_8x8_neon| PROC +|aom_tm_predictor_8x8_neon| PROC ; Load ytop_left = above[-1]; sub r12, r2, #1 vld1.8 {d0[]}, [r12] @@ -403,9 +403,9 @@ loop_h vst1.64 {d3}, [r0], r1 bx lr - ENDP ; |vpx_tm_predictor_8x8_neon| + ENDP ; |aom_tm_predictor_8x8_neon| -;void vpx_tm_predictor_16x16_neon (uint8_t *dst, ptrdiff_t y_stride, +;void aom_tm_predictor_16x16_neon (uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -413,7 +413,7 @@ loop_h ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_tm_predictor_16x16_neon| PROC +|aom_tm_predictor_16x16_neon| PROC ; Load ytop_left = above[-1]; sub r12, r2, #1 vld1.8 {d0[]}, [r12] @@ -496,9 +496,9 @@ loop_16x16_neon bgt loop_16x16_neon bx lr - ENDP ; |vpx_tm_predictor_16x16_neon| + ENDP ; |aom_tm_predictor_16x16_neon| -;void vpx_tm_predictor_32x32_neon (uint8_t *dst, ptrdiff_t y_stride, +;void aom_tm_predictor_32x32_neon (uint8_t *dst, ptrdiff_t y_stride, ; const uint8_t *above, ; const uint8_t *left) ; r0 uint8_t *dst @@ -506,7 +506,7 @@ loop_16x16_neon ; r2 const uint8_t *above ; r3 const uint8_t *left -|vpx_tm_predictor_32x32_neon| PROC +|aom_tm_predictor_32x32_neon| PROC ; Load ytop_left = above[-1]; sub r12, r2, #1 vld1.8 {d0[]}, [r12] @@ -625,6 +625,6 @@ loop_32x32_neon bgt loop_32x32_neon bx lr - ENDP ; |vpx_tm_predictor_32x32_neon| + ENDP ; |aom_tm_predictor_32x32_neon| END diff --git a/aom_dsp/arm/loopfilter_16_neon.asm b/aom_dsp/arm/loopfilter_16_neon.asm index 5a8fdd6aff7b20d301f7b0fcded6401d7f64596a..1f2fc41fcb413196e76c19adc51c48aef1b559d3 100644 --- a/aom_dsp/arm/loopfilter_16_neon.asm +++ b/aom_dsp/arm/loopfilter_16_neon.asm @@ -8,12 +8,12 @@ ; be found in the AUTHORS file in the root of the source tree. ; - EXPORT |vpx_lpf_horizontal_4_dual_neon| + EXPORT |aom_lpf_horizontal_4_dual_neon| ARM AREA ||.text||, CODE, READONLY, ALIGN=2 -;void vpx_lpf_horizontal_4_dual_neon(uint8_t *s, int p, +;void aom_lpf_horizontal_4_dual_neon(uint8_t *s, int p, ; const uint8_t *blimit0, ; const uint8_t *limit0, ; const uint8_t *thresh0, @@ -29,7 +29,7 @@ ; sp+8 const uint8_t *limit1, ; sp+12 const uint8_t *thresh1, -|vpx_lpf_horizontal_4_dual_neon| PROC +|aom_lpf_horizontal_4_dual_neon| PROC push {lr} ldr r12, [sp, #4] ; load thresh0 @@ -66,7 +66,7 @@ sub r2, r2, r1, lsl #1 sub r3, r3, r1, lsl #1 - bl vpx_loop_filter_neon_16 + bl aom_loop_filter_neon_16 vst1.u8 {q5}, [r2@64], r1 ; store op1 vst1.u8 {q6}, [r3@64], r1 ; store op0 @@ -76,9 +76,9 @@ vpop {d8-d15} ; restore neon registers pop {pc} - ENDP ; |vpx_lpf_horizontal_4_dual_neon| + ENDP ; |aom_lpf_horizontal_4_dual_neon| -; void vpx_loop_filter_neon_16(); +; void aom_loop_filter_neon_16(); ; This is a helper function for the loopfilters. The invidual functions do the ; necessary load, transpose (if necessary) and store. This function uses ; registers d8-d15, so the calling function must save those registers. @@ -101,7 +101,7 @@ ; q6 op0 ; q7 oq0 ; q8 oq1 -|vpx_loop_filter_neon_16| PROC +|aom_loop_filter_neon_16| PROC ; filter_mask vabd.u8 q11, q3, q4 ; m1 = abs(p3 - p2) @@ -194,6 +194,6 @@ veor q8, q12, q10 ; *oq1 = u^0x80 bx lr - ENDP ; |vpx_loop_filter_neon_16| + ENDP ; |aom_loop_filter_neon_16| END diff --git a/aom_dsp/arm/loopfilter_16_neon.c b/aom_dsp/arm/loopfilter_16_neon.c index 36f34fea2ed030aa08efb4442f5e364b82f4a944..686d0fa04ed52e55a0d4057374edcd8617c4c1ea 100644 --- a/aom_dsp/arm/loopfilter_16_neon.c +++ b/aom_dsp/arm/loopfilter_16_neon.c @@ -11,9 +11,9 @@ #include <arm_neon.h> -#include "./vpx_dsp_rtcd.h" -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_dsp_rtcd.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" static INLINE void loop_filter_neon_16(uint8x16_t qblimit, // blimit uint8x16_t qlimit, // limit @@ -123,7 +123,7 @@ static INLINE void loop_filter_neon_16(uint8x16_t qblimit, // blimit return; } -void vpx_lpf_horizontal_4_dual_neon( +void aom_lpf_horizontal_4_dual_neon( uint8_t *s, int p /* pitch */, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { diff --git a/aom_dsp/arm/loopfilter_4_neon.asm b/aom_dsp/arm/loopfilter_4_neon.asm index e45e34cd4c947f2ca331b2a3108116b09572ce44..1de9b3520cea7ffd1513b0907a2fe226f3f7e370 100644 --- a/aom_dsp/arm/loopfilter_4_neon.asm +++ b/aom_dsp/arm/loopfilter_4_neon.asm @@ -8,18 +8,18 @@ ; be found in the AUTHORS file in the root of the source tree. ; - EXPORT |vpx_lpf_horizontal_4_neon| - EXPORT |vpx_lpf_vertical_4_neon| + EXPORT |aom_lpf_horizontal_4_neon| + EXPORT |aom_lpf_vertical_4_neon| ARM AREA ||.text||, CODE, READONLY, ALIGN=2 -; Currently vpx only works on iterations 8 at a time. The vp8 loop filter +; Currently aom only works on iterations 8 at a time. The vp8 loop filter ; works on 16 iterations at a time. ; TODO(fgalligan): See about removing the count code as this function is only ; called with a count of 1. ; -; void vpx_lpf_horizontal_4_neon(uint8_t *s, +; void aom_lpf_horizontal_4_neon(uint8_t *s, ; int p /* pitch */, ; const uint8_t *blimit, ; const uint8_t *limit, @@ -32,7 +32,7 @@ ; r3 const uint8_t *limit, ; sp const uint8_t *thresh, ; sp+4 int count -|vpx_lpf_horizontal_4_neon| PROC +|aom_lpf_horizontal_4_neon| PROC push {lr} vld1.8 {d0[]}, [r2] ; duplicate *blimit @@ -41,7 +41,7 @@ add r1, r1, r1 ; double pitch cmp r12, #0 - beq end_vpx_lf_h_edge + beq end_aom_lf_h_edge vld1.8 {d1[]}, [r3] ; duplicate *limit vld1.8 {d2[]}, [r2] ; duplicate *thresh @@ -62,7 +62,7 @@ count_lf_h_loop sub r2, r2, r1, lsl #1 sub r3, r3, r1, lsl #1 - bl vpx_loop_filter_neon + bl aom_loop_filter_neon vst1.u8 {d4}, [r2@64], r1 ; store op1 vst1.u8 {d5}, [r3@64], r1 ; store op0 @@ -73,16 +73,16 @@ count_lf_h_loop subs r12, r12, #1 bne count_lf_h_loop -end_vpx_lf_h_edge +end_aom_lf_h_edge pop {pc} - ENDP ; |vpx_lpf_horizontal_4_neon| + ENDP ; |aom_lpf_horizontal_4_neon| -; Currently vpx only works on iterations 8 at a time. The vp8 loop filter +; Currently aom only works on iterations 8 at a time. The vp8 loop filter ; works on 16 iterations at a time. ; TODO(fgalligan): See about removing the count code as this function is only ; called with a count of 1. ; -; void vpx_lpf_vertical_4_neon(uint8_t *s, +; void aom_lpf_vertical_4_neon(uint8_t *s, ; int p /* pitch */, ; const uint8_t *blimit, ; const uint8_t *limit, @@ -95,7 +95,7 @@ end_vpx_lf_h_edge ; r3 const uint8_t *limit, ; sp const uint8_t *thresh, ; sp+4 int count -|vpx_lpf_vertical_4_neon| PROC +|aom_lpf_vertical_4_neon| PROC push {lr} vld1.8 {d0[]}, [r2] ; duplicate *blimit @@ -105,7 +105,7 @@ end_vpx_lf_h_edge ldr r3, [sp, #4] ; load thresh sub r2, r0, #4 ; move s pointer down by 4 columns cmp r12, #0 - beq end_vpx_lf_v_edge + beq end_aom_lf_v_edge vld1.8 {d2[]}, [r3] ; duplicate *thresh @@ -135,7 +135,7 @@ count_lf_v_loop vtrn.8 d7, d16 vtrn.8 d17, d18 - bl vpx_loop_filter_neon + bl aom_loop_filter_neon sub r0, r0, #2 @@ -154,11 +154,11 @@ count_lf_v_loop subne r2, r0, #4 ; move s pointer down by 4 columns bne count_lf_v_loop -end_vpx_lf_v_edge +end_aom_lf_v_edge pop {pc} - ENDP ; |vpx_lpf_vertical_4_neon| + ENDP ; |aom_lpf_vertical_4_neon| -; void vpx_loop_filter_neon(); +; void aom_loop_filter_neon(); ; This is a helper function for the loopfilters. The invidual functions do the ; necessary load, transpose (if necessary) and store. The function does not use ; registers d8-d15. @@ -182,7 +182,7 @@ end_vpx_lf_v_edge ; d5 op0 ; d6 oq0 ; d7 oq1 -|vpx_loop_filter_neon| PROC +|aom_loop_filter_neon| PROC ; filter_mask vabd.u8 d19, d3, d4 ; m1 = abs(p3 - p2) vabd.u8 d20, d4, d5 ; m2 = abs(p2 - p1) @@ -272,6 +272,6 @@ end_vpx_lf_v_edge veor d7, d20, d18 ; *oq1 = u^0x80 bx lr - ENDP ; |vpx_loop_filter_neon| + ENDP ; |aom_loop_filter_neon| END diff --git a/aom_dsp/arm/loopfilter_4_neon.c b/aom_dsp/arm/loopfilter_4_neon.c index 9be39ac084de06279e9ac35849011c1bdbfa5600..cc75228303d23478cdfd58e29a4b8d44a67897c7 100644 --- a/aom_dsp/arm/loopfilter_4_neon.c +++ b/aom_dsp/arm/loopfilter_4_neon.c @@ -11,7 +11,7 @@ #include <arm_neon.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" static INLINE void loop_filter_neon(uint8x8_t dblimit, // flimit uint8x8_t dlimit, // limit @@ -108,7 +108,7 @@ static INLINE void loop_filter_neon(uint8x8_t dblimit, // flimit return; } -void vpx_lpf_horizontal_4_neon(uint8_t *src, int pitch, const uint8_t *blimit, +void aom_lpf_horizontal_4_neon(uint8_t *src, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { int i; @@ -116,7 +116,7 @@ void vpx_lpf_horizontal_4_neon(uint8_t *src, int pitch, const uint8_t *blimit, uint8x8_t dblimit, dlimit, dthresh; uint8x8_t d3u8, d4u8, d5u8, d6u8, d7u8, d16u8, d17u8, d18u8; - if (count == 0) // end_vpx_lf_h_edge + if (count == 0) // end_aom_lf_h_edge return; dblimit = vld1_u8(blimit); @@ -158,7 +158,7 @@ void vpx_lpf_horizontal_4_neon(uint8_t *src, int pitch, const uint8_t *blimit, return; } -void vpx_lpf_vertical_4_neon(uint8_t *src, int pitch, const uint8_t *blimit, +void aom_lpf_vertical_4_neon(uint8_t *src, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { int i, pitch8; @@ -170,7 +170,7 @@ void vpx_lpf_vertical_4_neon(uint8_t *src, int pitch, const uint8_t *blimit, uint8x8x2_t d2tmp8, d2tmp9, d2tmp10, d2tmp11; uint8x8x4_t d4Result; - if (count == 0) // end_vpx_lf_h_edge + if (count == 0) // end_aom_lf_h_edge return; dblimit = vld1_u8(blimit); diff --git a/aom_dsp/arm/loopfilter_8_neon.asm b/aom_dsp/arm/loopfilter_8_neon.asm index e81734c046029e2c75d21e6b93bb53f3ec30ea91..512e5d4626f15c21f2fe1cf3036cbb509031b6f0 100644 --- a/aom_dsp/arm/loopfilter_8_neon.asm +++ b/aom_dsp/arm/loopfilter_8_neon.asm @@ -8,18 +8,18 @@ ; be found in the AUTHORS file in the root of the source tree. ; - EXPORT |vpx_lpf_horizontal_8_neon| - EXPORT |vpx_lpf_vertical_8_neon| + EXPORT |aom_lpf_horizontal_8_neon| + EXPORT |aom_lpf_vertical_8_neon| ARM AREA ||.text||, CODE, READONLY, ALIGN=2 -; Currently vpx only works on iterations 8 at a time. The vp8 loop filter +; Currently aom only works on iterations 8 at a time. The vp8 loop filter ; works on 16 iterations at a time. ; TODO(fgalligan): See about removing the count code as this function is only ; called with a count of 1. ; -; void vpx_lpf_horizontal_8_neon(uint8_t *s, int p, +; void aom_lpf_horizontal_8_neon(uint8_t *s, int p, ; const uint8_t *blimit, ; const uint8_t *limit, ; const uint8_t *thresh, @@ -30,7 +30,7 @@ ; r3 const uint8_t *limit, ; sp const uint8_t *thresh, ; sp+4 int count -|vpx_lpf_horizontal_8_neon| PROC +|aom_lpf_horizontal_8_neon| PROC push {r4-r5, lr} vld1.8 {d0[]}, [r2] ; duplicate *blimit @@ -39,7 +39,7 @@ add r1, r1, r1 ; double pitch cmp r12, #0 - beq end_vpx_mblf_h_edge + beq end_aom_mblf_h_edge vld1.8 {d1[]}, [r3] ; duplicate *limit vld1.8 {d2[]}, [r2] ; duplicate *thresh @@ -60,7 +60,7 @@ count_mblf_h_loop sub r3, r3, r1, lsl #1 sub r2, r2, r1, lsl #2 - bl vpx_mbloop_filter_neon + bl aom_mbloop_filter_neon vst1.u8 {d0}, [r2@64], r1 ; store op2 vst1.u8 {d1}, [r3@64], r1 ; store op1 @@ -73,12 +73,12 @@ count_mblf_h_loop subs r12, r12, #1 bne count_mblf_h_loop -end_vpx_mblf_h_edge +end_aom_mblf_h_edge pop {r4-r5, pc} - ENDP ; |vpx_lpf_horizontal_8_neon| + ENDP ; |aom_lpf_horizontal_8_neon| -; void vpx_lpf_vertical_8_neon(uint8_t *s, +; void aom_lpf_vertical_8_neon(uint8_t *s, ; int pitch, ; const uint8_t *blimit, ; const uint8_t *limit, @@ -91,7 +91,7 @@ end_vpx_mblf_h_edge ; r3 const uint8_t *limit, ; sp const uint8_t *thresh, ; sp+4 int count -|vpx_lpf_vertical_8_neon| PROC +|aom_lpf_vertical_8_neon| PROC push {r4-r5, lr} vld1.8 {d0[]}, [r2] ; duplicate *blimit @@ -101,7 +101,7 @@ end_vpx_mblf_h_edge ldr r3, [sp, #12] ; load thresh sub r2, r0, #4 ; move s pointer down by 4 columns cmp r12, #0 - beq end_vpx_mblf_v_edge + beq end_aom_mblf_v_edge vld1.8 {d2[]}, [r3] ; duplicate *thresh @@ -134,7 +134,7 @@ count_mblf_v_loop sub r2, r0, #3 add r3, r0, #1 - bl vpx_mbloop_filter_neon + bl aom_mbloop_filter_neon ;store op2, op1, op0, oq0 vst4.8 {d0[0], d1[0], d2[0], d3[0]}, [r2], r1 @@ -161,11 +161,11 @@ count_mblf_v_loop subne r2, r0, #4 ; move s pointer down by 4 columns bne count_mblf_v_loop -end_vpx_mblf_v_edge +end_aom_mblf_v_edge pop {r4-r5, pc} - ENDP ; |vpx_lpf_vertical_8_neon| + ENDP ; |aom_lpf_vertical_8_neon| -; void vpx_mbloop_filter_neon(); +; void aom_mbloop_filter_neon(); ; This is a helper function for the loopfilters. The invidual functions do the ; necessary load, transpose (if necessary) and store. The function does not use ; registers d8-d15. @@ -191,7 +191,7 @@ end_vpx_mblf_v_edge ; d3 oq0 ; d4 oq1 ; d5 oq2 -|vpx_mbloop_filter_neon| PROC +|aom_mbloop_filter_neon| PROC ; filter_mask vabd.u8 d19, d3, d4 ; m1 = abs(p3 - p2) vabd.u8 d20, d4, d5 ; m2 = abs(p2 - p1) @@ -446,6 +446,6 @@ filter_branch_only bx lr - ENDP ; |vpx_mbloop_filter_neon| + ENDP ; |aom_mbloop_filter_neon| END diff --git a/aom_dsp/arm/loopfilter_8_neon.c b/aom_dsp/arm/loopfilter_8_neon.c index 9065c6d3e50bde86364067292aaa695a87458d15..1551adb679ce9570418c807d77274359bfa1072b 100644 --- a/aom_dsp/arm/loopfilter_8_neon.c +++ b/aom_dsp/arm/loopfilter_8_neon.c @@ -11,7 +11,7 @@ #include <arm_neon.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" static INLINE void mbloop_filter_neon(uint8x8_t dblimit, // mblimit uint8x8_t dlimit, // limit @@ -260,7 +260,7 @@ static INLINE void mbloop_filter_neon(uint8x8_t dblimit, // mblimit return; } -void vpx_lpf_horizontal_8_neon(uint8_t *src, int pitch, const uint8_t *blimit, +void aom_lpf_horizontal_8_neon(uint8_t *src, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { int i; @@ -269,7 +269,7 @@ void vpx_lpf_horizontal_8_neon(uint8_t *src, int pitch, const uint8_t *blimit, uint8x8_t d0u8, d1u8, d2u8, d3u8, d4u8, d5u8, d6u8, d7u8; uint8x8_t d16u8, d17u8, d18u8; - if (count == 0) // end_vpx_mblf_h_edge + if (count == 0) // end_aom_mblf_h_edge return; dblimit = vld1_u8(blimit); @@ -316,7 +316,7 @@ void vpx_lpf_horizontal_8_neon(uint8_t *src, int pitch, const uint8_t *blimit, return; } -void vpx_lpf_vertical_8_neon(uint8_t *src, int pitch, const uint8_t *blimit, +void aom_lpf_vertical_8_neon(uint8_t *src, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { int i; diff --git a/aom_dsp/arm/loopfilter_mb_neon.asm b/aom_dsp/arm/loopfilter_mb_neon.asm index 20d9cfb1133ba81b7499bc5df5425f5218b600fd..3c7c039acf792176f306277365ccf855ea76ec23 100644 --- a/aom_dsp/arm/loopfilter_mb_neon.asm +++ b/aom_dsp/arm/loopfilter_mb_neon.asm @@ -8,13 +8,13 @@ ; be found in the AUTHORS file in the root of the source tree. ; - EXPORT |vpx_lpf_horizontal_16_neon| - EXPORT |vpx_lpf_vertical_16_neon| + EXPORT |aom_lpf_horizontal_16_neon| + EXPORT |aom_lpf_vertical_16_neon| ARM AREA ||.text||, CODE, READONLY, ALIGN=2 -; void vpx_lpf_horizontal_16_neon(uint8_t *s, int p, +; void aom_lpf_horizontal_16_neon(uint8_t *s, int p, ; const uint8_t *blimit, ; const uint8_t *limit, ; const uint8_t *thresh @@ -24,7 +24,7 @@ ; r2 const uint8_t *blimit, ; r3 const uint8_t *limit, ; sp const uint8_t *thresh, -|vpx_lpf_horizontal_16_neon| PROC +|aom_lpf_horizontal_16_neon| PROC push {r4-r8, lr} vpush {d8-d15} ldr r4, [sp, #88] ; load thresh @@ -54,7 +54,7 @@ h_count vld1.u8 {d14}, [r8@64], r1 ; q6 vld1.u8 {d15}, [r8@64], r1 ; q7 - bl vpx_wide_mbfilter_neon + bl aom_wide_mbfilter_neon tst r7, #1 beq h_mbfilter @@ -115,9 +115,9 @@ h_next vpop {d8-d15} pop {r4-r8, pc} - ENDP ; |vpx_lpf_horizontal_16_neon| + ENDP ; |aom_lpf_horizontal_16_neon| -; void vpx_lpf_vertical_16_neon(uint8_t *s, int p, +; void aom_lpf_vertical_16_neon(uint8_t *s, int p, ; const uint8_t *blimit, ; const uint8_t *limit, ; const uint8_t *thresh) @@ -126,7 +126,7 @@ h_next ; r2 const uint8_t *blimit, ; r3 const uint8_t *limit, ; sp const uint8_t *thresh, -|vpx_lpf_vertical_16_neon| PROC +|aom_lpf_vertical_16_neon| PROC push {r4-r8, lr} vpush {d8-d15} ldr r4, [sp, #88] ; load thresh @@ -176,7 +176,7 @@ h_next vtrn.8 d12, d13 vtrn.8 d14, d15 - bl vpx_wide_mbfilter_neon + bl aom_wide_mbfilter_neon tst r7, #1 beq v_mbfilter @@ -279,9 +279,9 @@ v_end vpop {d8-d15} pop {r4-r8, pc} - ENDP ; |vpx_lpf_vertical_16_neon| + ENDP ; |aom_lpf_vertical_16_neon| -; void vpx_wide_mbfilter_neon(); +; void aom_wide_mbfilter_neon(); ; This is a helper function for the loopfilters. The invidual functions do the ; necessary load, transpose (if necessary) and store. ; @@ -305,7 +305,7 @@ v_end ; d13 q5 ; d14 q6 ; d15 q7 -|vpx_wide_mbfilter_neon| PROC +|aom_wide_mbfilter_neon| PROC mov r7, #0 ; filter_mask @@ -601,6 +601,6 @@ v_end vbif d3, d14, d17 ; oq6 |= q6 & ~(f2 & f & m) bx lr - ENDP ; |vpx_wide_mbfilter_neon| + ENDP ; |aom_wide_mbfilter_neon| END diff --git a/aom_dsp/arm/loopfilter_neon.c b/aom_dsp/arm/loopfilter_neon.c index 2f4c055c29432afc3c116b808b8093ef67882b64..15b093487e951b4152510b04c05d0b7b2fbbb4af 100644 --- a/aom_dsp/arm/loopfilter_neon.c +++ b/aom_dsp/arm/loopfilter_neon.c @@ -11,39 +11,39 @@ #include <arm_neon.h> -#include "./vpx_dsp_rtcd.h" -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_dsp_rtcd.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" -void vpx_lpf_vertical_4_dual_neon(uint8_t *s, int p, const uint8_t *blimit0, +void aom_lpf_vertical_4_dual_neon(uint8_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_vertical_4_neon(s, p, blimit0, limit0, thresh0, 1); - vpx_lpf_vertical_4_neon(s + 8 * p, p, blimit1, limit1, thresh1, 1); + aom_lpf_vertical_4_neon(s, p, blimit0, limit0, thresh0, 1); + aom_lpf_vertical_4_neon(s + 8 * p, p, blimit1, limit1, thresh1, 1); } #if HAVE_NEON_ASM -void vpx_lpf_horizontal_8_dual_neon( +void aom_lpf_horizontal_8_dual_neon( uint8_t *s, int p /* pitch */, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_horizontal_8_neon(s, p, blimit0, limit0, thresh0, 1); - vpx_lpf_horizontal_8_neon(s + 8, p, blimit1, limit1, thresh1, 1); + aom_lpf_horizontal_8_neon(s, p, blimit0, limit0, thresh0, 1); + aom_lpf_horizontal_8_neon(s + 8, p, blimit1, limit1, thresh1, 1); } -void vpx_lpf_vertical_8_dual_neon(uint8_t *s, int p, const uint8_t *blimit0, +void aom_lpf_vertical_8_dual_neon(uint8_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_vertical_8_neon(s, p, blimit0, limit0, thresh0, 1); - vpx_lpf_vertical_8_neon(s + 8 * p, p, blimit1, limit1, thresh1, 1); + aom_lpf_vertical_8_neon(s, p, blimit0, limit0, thresh0, 1); + aom_lpf_vertical_8_neon(s + 8 * p, p, blimit1, limit1, thresh1, 1); } -void vpx_lpf_vertical_16_dual_neon(uint8_t *s, int p, const uint8_t *blimit, +void aom_lpf_vertical_16_dual_neon(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh) { - vpx_lpf_vertical_16_neon(s, p, blimit, limit, thresh); - vpx_lpf_vertical_16_neon(s + 8 * p, p, blimit, limit, thresh); + aom_lpf_vertical_16_neon(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_neon(s + 8 * p, p, blimit, limit, thresh); } #endif // HAVE_NEON_ASM diff --git a/aom_dsp/arm/sad4d_neon.c b/aom_dsp/arm/sad4d_neon.c index e5df5fef69730a965262ec0976856cff698719b2..a1eeaf4b77e3f9ee0264f86a30aa54e1c60c8543 100644 --- a/aom_dsp/arm/sad4d_neon.c +++ b/aom_dsp/arm/sad4d_neon.c @@ -11,9 +11,9 @@ #include <arm_neon.h> -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" static INLINE unsigned int horizontal_long_add_16x8(const uint16x8_t vec_lo, const uint16x8_t vec_hi) { @@ -79,7 +79,7 @@ static void sad_neon_32(const uint8x16_t vec_src_00, vget_high_u8(vec_ref_16)); } -void vpx_sad64x64x4d_neon(const uint8_t *src, int src_stride, +void aom_sad64x64x4d_neon(const uint8_t *src, int src_stride, const uint8_t *const ref[4], int ref_stride, uint32_t *res) { int i; @@ -125,7 +125,7 @@ void vpx_sad64x64x4d_neon(const uint8_t *src, int src_stride, res[3] = horizontal_long_add_16x8(vec_sum_ref3_lo, vec_sum_ref3_hi); } -void vpx_sad32x32x4d_neon(const uint8_t *src, int src_stride, +void aom_sad32x32x4d_neon(const uint8_t *src, int src_stride, const uint8_t *const ref[4], int ref_stride, uint32_t *res) { int i; @@ -169,7 +169,7 @@ void vpx_sad32x32x4d_neon(const uint8_t *src, int src_stride, res[3] = horizontal_long_add_16x8(vec_sum_ref3_lo, vec_sum_ref3_hi); } -void vpx_sad16x16x4d_neon(const uint8_t *src, int src_stride, +void aom_sad16x16x4d_neon(const uint8_t *src, int src_stride, const uint8_t *const ref[4], int ref_stride, uint32_t *res) { int i; diff --git a/aom_dsp/arm/sad_media.asm b/aom_dsp/arm/sad_media.asm index aed1d3a22ed54f2bc84abaf375f00f9cff9c8365..9d815a215f7577ea96032212bb5fc83531ed8428 100644 --- a/aom_dsp/arm/sad_media.asm +++ b/aom_dsp/arm/sad_media.asm @@ -9,7 +9,7 @@ ; - EXPORT |vpx_sad16x16_media| + EXPORT |aom_sad16x16_media| ARM REQUIRE8 @@ -21,7 +21,7 @@ ; r1 int src_stride ; r2 const unsigned char *ref_ptr ; r3 int ref_stride -|vpx_sad16x16_media| PROC +|aom_sad16x16_media| PROC stmfd sp!, {r4-r12, lr} pld [r0, r1, lsl #0] diff --git a/aom_dsp/arm/sad_neon.c b/aom_dsp/arm/sad_neon.c index c37fe307046c6ce7dc0ae014fea5b3379b19c05b..2f452f55b5172116bb5a9f5f7323a98486f43508 100644 --- a/aom_dsp/arm/sad_neon.c +++ b/aom_dsp/arm/sad_neon.c @@ -11,11 +11,11 @@ #include <arm_neon.h> -#include "./vpx_config.h" +#include "./aom_config.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" -unsigned int vpx_sad8x16_neon(unsigned char *src_ptr, int src_stride, +unsigned int aom_sad8x16_neon(unsigned char *src_ptr, int src_stride, unsigned char *ref_ptr, int ref_stride) { uint8x8_t d0, d8; uint16x8_t q12; @@ -46,7 +46,7 @@ unsigned int vpx_sad8x16_neon(unsigned char *src_ptr, int src_stride, return vget_lane_u32(d5, 0); } -unsigned int vpx_sad4x4_neon(unsigned char *src_ptr, int src_stride, +unsigned int aom_sad4x4_neon(unsigned char *src_ptr, int src_stride, unsigned char *ref_ptr, int ref_stride) { uint8x8_t d0, d8; uint16x8_t q12; @@ -74,7 +74,7 @@ unsigned int vpx_sad4x4_neon(unsigned char *src_ptr, int src_stride, return vget_lane_u32(vreinterpret_u32_u64(d3), 0); } -unsigned int vpx_sad16x8_neon(unsigned char *src_ptr, int src_stride, +unsigned int aom_sad16x8_neon(unsigned char *src_ptr, int src_stride, unsigned char *ref_ptr, int ref_stride) { uint8x16_t q0, q4; uint16x8_t q12, q13; @@ -128,7 +128,7 @@ static INLINE unsigned int horizontal_add_16x8(const uint16x8_t vec_16x8) { return vget_lane_u32(c, 0); } -unsigned int vpx_sad64x64_neon(const uint8_t *src, int src_stride, +unsigned int aom_sad64x64_neon(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride) { int i; uint16x8_t vec_accum_lo = vdupq_n_u16(0); @@ -164,7 +164,7 @@ unsigned int vpx_sad64x64_neon(const uint8_t *src, int src_stride, return horizontal_long_add_16x8(vec_accum_lo, vec_accum_hi); } -unsigned int vpx_sad32x32_neon(const uint8_t *src, int src_stride, +unsigned int aom_sad32x32_neon(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride) { int i; uint16x8_t vec_accum_lo = vdupq_n_u16(0); @@ -189,7 +189,7 @@ unsigned int vpx_sad32x32_neon(const uint8_t *src, int src_stride, return horizontal_add_16x8(vaddq_u16(vec_accum_lo, vec_accum_hi)); } -unsigned int vpx_sad16x16_neon(const uint8_t *src, int src_stride, +unsigned int aom_sad16x16_neon(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride) { int i; uint16x8_t vec_accum_lo = vdupq_n_u16(0); @@ -208,7 +208,7 @@ unsigned int vpx_sad16x16_neon(const uint8_t *src, int src_stride, return horizontal_add_16x8(vaddq_u16(vec_accum_lo, vec_accum_hi)); } -unsigned int vpx_sad8x8_neon(const uint8_t *src, int src_stride, +unsigned int aom_sad8x8_neon(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride) { int i; uint16x8_t vec_accum = vdupq_n_u16(0); diff --git a/aom_dsp/arm/save_reg_neon.asm b/aom_dsp/arm/save_reg_neon.asm index c9ca10801df49cdbd00f70dc21b51da99cc3d194..b802792dafa46f94c744a77e4f3281dae0da2949 100644 --- a/aom_dsp/arm/save_reg_neon.asm +++ b/aom_dsp/arm/save_reg_neon.asm @@ -9,8 +9,8 @@ ; - EXPORT |vpx_push_neon| - EXPORT |vpx_pop_neon| + EXPORT |aom_push_neon| + EXPORT |aom_pop_neon| ARM REQUIRE8 @@ -18,14 +18,14 @@ AREA ||.text||, CODE, READONLY, ALIGN=2 -|vpx_push_neon| PROC +|aom_push_neon| PROC vst1.i64 {d8, d9, d10, d11}, [r0]! vst1.i64 {d12, d13, d14, d15}, [r0]! bx lr ENDP -|vpx_pop_neon| PROC +|aom_pop_neon| PROC vld1.i64 {d8, d9, d10, d11}, [r0]! vld1.i64 {d12, d13, d14, d15}, [r0]! bx lr diff --git a/aom_dsp/arm/subpel_variance_media.c b/aom_dsp/arm/subpel_variance_media.c index 57119b6a28271b5cb67c8e6425db1e16e9d29e8e..46ec028d3703cf9cc8194acdb16ddc9719f7ea14 100644 --- a/aom_dsp/arm/subpel_variance_media.c +++ b/aom_dsp/arm/subpel_variance_media.c @@ -9,9 +9,9 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" #if HAVE_MEDIA @@ -20,15 +20,15 @@ static const int16_t bilinear_filters_media[8][2] = { { 128, 0 }, { 112, 16 }, { 64, 64 }, { 48, 80 }, { 32, 96 }, { 16, 112 } }; -extern void vpx_filter_block2d_bil_first_pass_media( +extern void aom_filter_block2d_bil_first_pass_media( const uint8_t *src_ptr, uint16_t *dst_ptr, uint32_t src_pitch, uint32_t height, uint32_t width, const int16_t *filter); -extern void vpx_filter_block2d_bil_second_pass_media( +extern void aom_filter_block2d_bil_second_pass_media( const uint16_t *src_ptr, uint8_t *dst_ptr, int32_t src_pitch, uint32_t height, uint32_t width, const int16_t *filter); -unsigned int vpx_sub_pixel_variance8x8_media( +unsigned int aom_sub_pixel_variance8x8_media( const uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, const uint8_t *dst_ptr, int dst_pixels_per_line, unsigned int *sse) { uint16_t first_pass[10 * 8]; @@ -38,16 +38,16 @@ unsigned int vpx_sub_pixel_variance8x8_media( HFilter = bilinear_filters_media[xoffset]; VFilter = bilinear_filters_media[yoffset]; - vpx_filter_block2d_bil_first_pass_media(src_ptr, first_pass, + aom_filter_block2d_bil_first_pass_media(src_ptr, first_pass, src_pixels_per_line, 9, 8, HFilter); - vpx_filter_block2d_bil_second_pass_media(first_pass, second_pass, 8, 8, 8, + aom_filter_block2d_bil_second_pass_media(first_pass, second_pass, 8, 8, 8, VFilter); - return vpx_variance8x8_media(second_pass, 8, dst_ptr, dst_pixels_per_line, + return aom_variance8x8_media(second_pass, 8, dst_ptr, dst_pixels_per_line, sse); } -unsigned int vpx_sub_pixel_variance16x16_media( +unsigned int aom_sub_pixel_variance16x16_media( const uint8_t *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, const uint8_t *dst_ptr, int dst_pixels_per_line, unsigned int *sse) { uint16_t first_pass[36 * 16]; @@ -56,24 +56,24 @@ unsigned int vpx_sub_pixel_variance16x16_media( unsigned int var; if (xoffset == 4 && yoffset == 0) { - var = vpx_variance_halfpixvar16x16_h_media( + var = aom_variance_halfpixvar16x16_h_media( src_ptr, src_pixels_per_line, dst_ptr, dst_pixels_per_line, sse); } else if (xoffset == 0 && yoffset == 4) { - var = vpx_variance_halfpixvar16x16_v_media( + var = aom_variance_halfpixvar16x16_v_media( src_ptr, src_pixels_per_line, dst_ptr, dst_pixels_per_line, sse); } else if (xoffset == 4 && yoffset == 4) { - var = vpx_variance_halfpixvar16x16_hv_media( + var = aom_variance_halfpixvar16x16_hv_media( src_ptr, src_pixels_per_line, dst_ptr, dst_pixels_per_line, sse); } else { HFilter = bilinear_filters_media[xoffset]; VFilter = bilinear_filters_media[yoffset]; - vpx_filter_block2d_bil_first_pass_media( + aom_filter_block2d_bil_first_pass_media( src_ptr, first_pass, src_pixels_per_line, 17, 16, HFilter); - vpx_filter_block2d_bil_second_pass_media(first_pass, second_pass, 16, 16, + aom_filter_block2d_bil_second_pass_media(first_pass, second_pass, 16, 16, 16, VFilter); - var = vpx_variance16x16_media(second_pass, 16, dst_ptr, dst_pixels_per_line, + var = aom_variance16x16_media(second_pass, 16, dst_ptr, dst_pixels_per_line, sse); } return var; diff --git a/aom_dsp/arm/subpel_variance_neon.c b/aom_dsp/arm/subpel_variance_neon.c index 8c5f0f492214636e62f8c515a9212b9c5944bbaf..064b72d6fcc70e7ad174fa37a91f17dae07e56f6 100644 --- a/aom_dsp/arm/subpel_variance_neon.c +++ b/aom_dsp/arm/subpel_variance_neon.c @@ -10,11 +10,11 @@ */ #include <arm_neon.h> -#include "./vpx_dsp_rtcd.h" -#include "./vpx_config.h" +#include "./aom_dsp_rtcd.h" +#include "./aom_config.h" #include "aom_ports/mem.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_dsp/variance.h" @@ -74,7 +74,7 @@ static void var_filter_block2d_bil_w16(const uint8_t *src_ptr, } } -unsigned int vpx_sub_pixel_variance8x8_neon(const uint8_t *src, int src_stride, +unsigned int aom_sub_pixel_variance8x8_neon(const uint8_t *src, int src_stride, int xoffset, int yoffset, const uint8_t *dst, int dst_stride, unsigned int *sse) { @@ -85,10 +85,10 @@ unsigned int vpx_sub_pixel_variance8x8_neon(const uint8_t *src, int src_stride, bilinear_filters[xoffset]); var_filter_block2d_bil_w8(fdata3, temp2, 8, 8, 8, 8, bilinear_filters[yoffset]); - return vpx_variance8x8_neon(temp2, 8, dst, dst_stride, sse); + return aom_variance8x8_neon(temp2, 8, dst, dst_stride, sse); } -unsigned int vpx_sub_pixel_variance16x16_neon(const uint8_t *src, +unsigned int aom_sub_pixel_variance16x16_neon(const uint8_t *src, int src_stride, int xoffset, int yoffset, const uint8_t *dst, int dst_stride, @@ -100,10 +100,10 @@ unsigned int vpx_sub_pixel_variance16x16_neon(const uint8_t *src, bilinear_filters[xoffset]); var_filter_block2d_bil_w16(fdata3, temp2, 16, 16, 16, 16, bilinear_filters[yoffset]); - return vpx_variance16x16_neon(temp2, 16, dst, dst_stride, sse); + return aom_variance16x16_neon(temp2, 16, dst, dst_stride, sse); } -unsigned int vpx_sub_pixel_variance32x32_neon(const uint8_t *src, +unsigned int aom_sub_pixel_variance32x32_neon(const uint8_t *src, int src_stride, int xoffset, int yoffset, const uint8_t *dst, int dst_stride, @@ -115,10 +115,10 @@ unsigned int vpx_sub_pixel_variance32x32_neon(const uint8_t *src, bilinear_filters[xoffset]); var_filter_block2d_bil_w16(fdata3, temp2, 32, 32, 32, 32, bilinear_filters[yoffset]); - return vpx_variance32x32_neon(temp2, 32, dst, dst_stride, sse); + return aom_variance32x32_neon(temp2, 32, dst, dst_stride, sse); } -unsigned int vpx_sub_pixel_variance64x64_neon(const uint8_t *src, +unsigned int aom_sub_pixel_variance64x64_neon(const uint8_t *src, int src_stride, int xoffset, int yoffset, const uint8_t *dst, int dst_stride, @@ -130,5 +130,5 @@ unsigned int vpx_sub_pixel_variance64x64_neon(const uint8_t *src, bilinear_filters[xoffset]); var_filter_block2d_bil_w16(fdata3, temp2, 64, 64, 64, 64, bilinear_filters[yoffset]); - return vpx_variance64x64_neon(temp2, 64, dst, dst_stride, sse); + return aom_variance64x64_neon(temp2, 64, dst, dst_stride, sse); } diff --git a/aom_dsp/arm/subtract_neon.c b/aom_dsp/arm/subtract_neon.c index 99d71365f5e255bac7c38711dbdd4dbb6df0df28..cb8a2daf8ad19526a6ff6942367147eed4fe74a4 100644 --- a/aom_dsp/arm/subtract_neon.c +++ b/aom_dsp/arm/subtract_neon.c @@ -11,10 +11,10 @@ #include <arm_neon.h> -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" -void vpx_subtract_block_neon(int rows, int cols, int16_t *diff, +void aom_subtract_block_neon(int rows, int cols, int16_t *diff, ptrdiff_t diff_stride, const uint8_t *src, ptrdiff_t src_stride, const uint8_t *pred, ptrdiff_t pred_stride) { diff --git a/aom_dsp/arm/variance_halfpixvar16x16_h_media.asm b/aom_dsp/arm/variance_halfpixvar16x16_h_media.asm index dab845a204cc9a15113a1ea5ace7e975a80c288c..52214f79aac82c7d2dceb68e655303cdab14a480 100644 --- a/aom_dsp/arm/variance_halfpixvar16x16_h_media.asm +++ b/aom_dsp/arm/variance_halfpixvar16x16_h_media.asm @@ -9,7 +9,7 @@ ; - EXPORT |vpx_variance_halfpixvar16x16_h_media| + EXPORT |aom_variance_halfpixvar16x16_h_media| ARM REQUIRE8 @@ -22,7 +22,7 @@ ; r2 unsigned char *ref_ptr ; r3 int recon_stride ; stack unsigned int *sse -|vpx_variance_halfpixvar16x16_h_media| PROC +|aom_variance_halfpixvar16x16_h_media| PROC stmfd sp!, {r4-r12, lr} diff --git a/aom_dsp/arm/variance_halfpixvar16x16_hv_media.asm b/aom_dsp/arm/variance_halfpixvar16x16_hv_media.asm index 01953b70949c1c191672390c0f97374f360373ca..a3f60fc3cec99f88161e9a27447e4a036b48df0b 100644 --- a/aom_dsp/arm/variance_halfpixvar16x16_hv_media.asm +++ b/aom_dsp/arm/variance_halfpixvar16x16_hv_media.asm @@ -9,7 +9,7 @@ ; - EXPORT |vpx_variance_halfpixvar16x16_hv_media| + EXPORT |aom_variance_halfpixvar16x16_hv_media| ARM REQUIRE8 @@ -22,7 +22,7 @@ ; r2 unsigned char *ref_ptr ; r3 int recon_stride ; stack unsigned int *sse -|vpx_variance_halfpixvar16x16_hv_media| PROC +|aom_variance_halfpixvar16x16_hv_media| PROC stmfd sp!, {r4-r12, lr} diff --git a/aom_dsp/arm/variance_halfpixvar16x16_v_media.asm b/aom_dsp/arm/variance_halfpixvar16x16_v_media.asm index 0d17acb38f5e3a6b5c6d0ff257c71a3dbb5eb9f8..b8071bef8dd0bfe9444ebd004ce5eaadeb0a9696 100644 --- a/aom_dsp/arm/variance_halfpixvar16x16_v_media.asm +++ b/aom_dsp/arm/variance_halfpixvar16x16_v_media.asm @@ -9,7 +9,7 @@ ; - EXPORT |vpx_variance_halfpixvar16x16_v_media| + EXPORT |aom_variance_halfpixvar16x16_v_media| ARM REQUIRE8 @@ -22,7 +22,7 @@ ; r2 unsigned char *ref_ptr ; r3 int recon_stride ; stack unsigned int *sse -|vpx_variance_halfpixvar16x16_v_media| PROC +|aom_variance_halfpixvar16x16_v_media| PROC stmfd sp!, {r4-r12, lr} diff --git a/aom_dsp/arm/variance_media.asm b/aom_dsp/arm/variance_media.asm index f7f9e14b0a79935d96beeb3016b9237b4c5a2b9f..8a21fdc253ca178e331af08567d5930c21a5ddec 100644 --- a/aom_dsp/arm/variance_media.asm +++ b/aom_dsp/arm/variance_media.asm @@ -9,9 +9,9 @@ ; - EXPORT |vpx_variance16x16_media| - EXPORT |vpx_variance8x8_media| - EXPORT |vpx_mse16x16_media| + EXPORT |aom_variance16x16_media| + EXPORT |aom_variance8x8_media| + EXPORT |aom_mse16x16_media| ARM REQUIRE8 @@ -24,7 +24,7 @@ ; r2 unsigned char *ref_ptr ; r3 int recon_stride ; stack unsigned int *sse -|vpx_variance16x16_media| PROC +|aom_variance16x16_media| PROC stmfd sp!, {r4-r12, lr} @@ -157,7 +157,7 @@ loop16x16 ; r2 unsigned char *ref_ptr ; r3 int recon_stride ; stack unsigned int *sse -|vpx_variance8x8_media| PROC +|aom_variance8x8_media| PROC push {r4-r10, lr} @@ -241,10 +241,10 @@ loop8x8 ; r3 int recon_stride ; stack unsigned int *sse ; -;note: Based on vpx_variance16x16_media. In this function, sum is never used. +;note: Based on aom_variance16x16_media. In this function, sum is never used. ; So, we can remove this part of calculation. -|vpx_mse16x16_media| PROC +|aom_mse16x16_media| PROC push {r4-r9, lr} diff --git a/aom_dsp/arm/variance_neon.c b/aom_dsp/arm/variance_neon.c index d69f7cb1b257b46b4600186e7324787b2a529dfc..e6ebbc9fc0dc41557d3be79669661312dcecd2de 100644 --- a/aom_dsp/arm/variance_neon.c +++ b/aom_dsp/arm/variance_neon.c @@ -11,10 +11,10 @@ #include <arm_neon.h> -#include "./vpx_dsp_rtcd.h" -#include "./vpx_config.h" +#include "./aom_dsp_rtcd.h" +#include "./aom_config.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" static INLINE int horizontal_add_s16x8(const int16x8_t v_16x8) { @@ -61,17 +61,17 @@ static void variance_neon_w8(const uint8_t *a, int a_stride, const uint8_t *b, *sse = (unsigned int)horizontal_add_s32x4(vaddq_s32(v_sse_lo, v_sse_hi)); } -void vpx_get8x8var_neon(const uint8_t *a, int a_stride, const uint8_t *b, +void aom_get8x8var_neon(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sse, int *sum) { variance_neon_w8(a, a_stride, b, b_stride, 8, 8, sse, sum); } -void vpx_get16x16var_neon(const uint8_t *a, int a_stride, const uint8_t *b, +void aom_get16x16var_neon(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sse, int *sum) { variance_neon_w8(a, a_stride, b, b_stride, 16, 16, sse, sum); } -unsigned int vpx_variance8x8_neon(const uint8_t *a, int a_stride, +unsigned int aom_variance8x8_neon(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sse) { int sum; @@ -79,7 +79,7 @@ unsigned int vpx_variance8x8_neon(const uint8_t *a, int a_stride, return *sse - (((int64_t)sum * sum) >> 6); // >> 6 = / 8 * 8 } -unsigned int vpx_variance16x16_neon(const uint8_t *a, int a_stride, +unsigned int aom_variance16x16_neon(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sse) { int sum; @@ -87,7 +87,7 @@ unsigned int vpx_variance16x16_neon(const uint8_t *a, int a_stride, return *sse - (((int64_t)sum * sum) >> 8); // >> 8 = / 16 * 16 } -unsigned int vpx_variance32x32_neon(const uint8_t *a, int a_stride, +unsigned int aom_variance32x32_neon(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sse) { int sum; @@ -95,7 +95,7 @@ unsigned int vpx_variance32x32_neon(const uint8_t *a, int a_stride, return *sse - (((int64_t)sum * sum) >> 10); // >> 10 = / 32 * 32 } -unsigned int vpx_variance32x64_neon(const uint8_t *a, int a_stride, +unsigned int aom_variance32x64_neon(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sse) { int sum1, sum2; @@ -108,7 +108,7 @@ unsigned int vpx_variance32x64_neon(const uint8_t *a, int a_stride, return *sse - (((int64_t)sum1 * sum1) >> 11); // >> 11 = / 32 * 64 } -unsigned int vpx_variance64x32_neon(const uint8_t *a, int a_stride, +unsigned int aom_variance64x32_neon(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sse) { int sum1, sum2; @@ -121,7 +121,7 @@ unsigned int vpx_variance64x32_neon(const uint8_t *a, int a_stride, return *sse - (((int64_t)sum1 * sum1) >> 11); // >> 11 = / 32 * 64 } -unsigned int vpx_variance64x64_neon(const uint8_t *a, int a_stride, +unsigned int aom_variance64x64_neon(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sse) { int sum1, sum2; @@ -145,7 +145,7 @@ unsigned int vpx_variance64x64_neon(const uint8_t *a, int a_stride, return *sse - (((int64_t)sum1 * sum1) >> 12); // >> 12 = / 64 * 64 } -unsigned int vpx_variance16x8_neon(const unsigned char *src_ptr, +unsigned int aom_variance16x8_neon(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int recon_stride, unsigned int *sse) { @@ -221,7 +221,7 @@ unsigned int vpx_variance16x8_neon(const unsigned char *src_ptr, return vget_lane_u32(d0u32, 0); } -unsigned int vpx_variance8x16_neon(const unsigned char *src_ptr, +unsigned int aom_variance8x16_neon(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int recon_stride, unsigned int *sse) { @@ -283,7 +283,7 @@ unsigned int vpx_variance8x16_neon(const unsigned char *src_ptr, return vget_lane_u32(d0u32, 0); } -unsigned int vpx_mse16x16_neon(const unsigned char *src_ptr, int source_stride, +unsigned int aom_mse16x16_neon(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int recon_stride, unsigned int *sse) { int i; @@ -346,7 +346,7 @@ unsigned int vpx_mse16x16_neon(const unsigned char *src_ptr, int source_stride, return vget_lane_u32(vreinterpret_u32_s64(d0s64), 0); } -unsigned int vpx_get4x4sse_cs_neon(const unsigned char *src_ptr, +unsigned int aom_get4x4sse_cs_neon(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int recon_stride) { diff --git a/aom_dsp/avg.c b/aom_dsp/avg.c index eda733a105101841f3e2fd1ea185fe820664b749..bbdb090d1496859647b2f7d1b64ed21aef918f88 100644 --- a/aom_dsp/avg.c +++ b/aom_dsp/avg.c @@ -10,10 +10,10 @@ */ #include <stdlib.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" -unsigned int vpx_avg_8x8_c(const uint8_t *s, int p) { +unsigned int aom_avg_8x8_c(const uint8_t *s, int p) { int i, j; int sum = 0; for (i = 0; i < 8; ++i, s += p) @@ -23,7 +23,7 @@ unsigned int vpx_avg_8x8_c(const uint8_t *s, int p) { return (sum + 32) >> 6; } -unsigned int vpx_avg_4x4_c(const uint8_t *s, int p) { +unsigned int aom_avg_4x4_c(const uint8_t *s, int p) { int i, j; int sum = 0; for (i = 0; i < 4; ++i, s += p) @@ -65,7 +65,7 @@ static void hadamard_col8(const int16_t *src_diff, int src_stride, coeff[5] = c3 - c7; } -void vpx_hadamard_8x8_c(int16_t const *src_diff, int src_stride, +void aom_hadamard_8x8_c(int16_t const *src_diff, int src_stride, int16_t *coeff) { int idx; int16_t buffer[64]; @@ -88,14 +88,14 @@ void vpx_hadamard_8x8_c(int16_t const *src_diff, int src_stride, } // In place 16x16 2D Hadamard transform -void vpx_hadamard_16x16_c(int16_t const *src_diff, int src_stride, +void aom_hadamard_16x16_c(int16_t const *src_diff, int src_stride, int16_t *coeff) { int idx; for (idx = 0; idx < 4; ++idx) { // src_diff: 9 bit, dynamic range [-255, 255] int16_t const *src_ptr = src_diff + (idx >> 1) * 8 * src_stride + (idx & 0x01) * 8; - vpx_hadamard_8x8_c(src_ptr, src_stride, coeff + idx * 64); + aom_hadamard_8x8_c(src_ptr, src_stride, coeff + idx * 64); } // coeff: 15 bit, dynamic range [-16320, 16320] @@ -121,7 +121,7 @@ void vpx_hadamard_16x16_c(int16_t const *src_diff, int src_stride, // coeff: 16 bits, dynamic range [-32640, 32640]. // length: value range {16, 64, 256, 1024}. -int vpx_satd_c(const int16_t *coeff, int length) { +int aom_satd_c(const int16_t *coeff, int length) { int i; int satd = 0; for (i = 0; i < length; ++i) satd += abs(coeff[i]); @@ -132,7 +132,7 @@ int vpx_satd_c(const int16_t *coeff, int length) { // Integer projection onto row vectors. // height: value range {16, 32, 64}. -void vpx_int_pro_row_c(int16_t hbuf[16], uint8_t const *ref, +void aom_int_pro_row_c(int16_t hbuf[16], uint8_t const *ref, const int ref_stride, const int height) { int idx; const int norm_factor = height >> 1; @@ -148,7 +148,7 @@ void vpx_int_pro_row_c(int16_t hbuf[16], uint8_t const *ref, } // width: value range {16, 32, 64}. -int16_t vpx_int_pro_col_c(uint8_t const *ref, const int width) { +int16_t aom_int_pro_col_c(uint8_t const *ref, const int width) { int idx; int16_t sum = 0; // sum: 14 bit, dynamic range [0, 16320] @@ -159,7 +159,7 @@ int16_t vpx_int_pro_col_c(uint8_t const *ref, const int width) { // ref: [0 - 510] // src: [0 - 510] // bwl: {2, 3, 4} -int vpx_vector_var_c(int16_t const *ref, int16_t const *src, const int bwl) { +int aom_vector_var_c(int16_t const *ref, int16_t const *src, const int bwl) { int i; int width = 4 << bwl; int sse = 0, mean = 0, var; @@ -175,7 +175,7 @@ int vpx_vector_var_c(int16_t const *ref, int16_t const *src, const int bwl) { return var; } -void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, +void aom_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max) { int i, j; *min = 255; @@ -190,7 +190,7 @@ void vpx_minmax_8x8_c(const uint8_t *s, int p, const uint8_t *d, int dp, } #if CONFIG_VPX_HIGHBITDEPTH -unsigned int vpx_highbd_avg_8x8_c(const uint8_t *s8, int p) { +unsigned int aom_highbd_avg_8x8_c(const uint8_t *s8, int p) { int i, j; int sum = 0; const uint16_t *s = CONVERT_TO_SHORTPTR(s8); @@ -201,7 +201,7 @@ unsigned int vpx_highbd_avg_8x8_c(const uint8_t *s8, int p) { return (sum + 32) >> 6; } -unsigned int vpx_highbd_avg_4x4_c(const uint8_t *s8, int p) { +unsigned int aom_highbd_avg_4x4_c(const uint8_t *s8, int p) { int i, j; int sum = 0; const uint16_t *s = CONVERT_TO_SHORTPTR(s8); @@ -212,7 +212,7 @@ unsigned int vpx_highbd_avg_4x4_c(const uint8_t *s8, int p) { return (sum + 8) >> 4; } -void vpx_highbd_minmax_8x8_c(const uint8_t *s8, int p, const uint8_t *d8, +void aom_highbd_minmax_8x8_c(const uint8_t *s8, int p, const uint8_t *d8, int dp, int *min, int *max) { int i, j; const uint16_t *s = CONVERT_TO_SHORTPTR(s8); diff --git a/aom_dsp/bitreader.c b/aom_dsp/bitreader.c index 822776ebcc1862739fea360c6c29d26a00b99b45..142054221f3478e9ae83155d219a6b79fdc7e034 100644 --- a/aom_dsp/bitreader.c +++ b/aom_dsp/bitreader.c @@ -10,17 +10,17 @@ */ #include <stdlib.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/bitreader.h" #include "aom_dsp/prob.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "aom_util/endian_inl.h" -int vpx_reader_init(vpx_reader *r, const uint8_t *buffer, size_t size, - vpx_decrypt_cb decrypt_cb, void *decrypt_state) { +int aom_reader_init(aom_reader *r, const uint8_t *buffer, size_t size, + aom_decrypt_cb decrypt_cb, void *decrypt_state) { if (size && !buffer) { return 1; } else { @@ -31,12 +31,12 @@ int vpx_reader_init(vpx_reader *r, const uint8_t *buffer, size_t size, r->range = 255; r->decrypt_cb = decrypt_cb; r->decrypt_state = decrypt_state; - vpx_reader_fill(r); - return vpx_read_bit(r) != 0; // marker bit + aom_reader_fill(r); + return aom_read_bit(r) != 0; // marker bit } } -void vpx_reader_fill(vpx_reader *r) { +void aom_reader_fill(aom_reader *r) { const uint8_t *const buffer_end = r->buffer_end; const uint8_t *buffer = r->buffer; const uint8_t *buffer_start = buffer; @@ -91,7 +91,7 @@ void vpx_reader_fill(vpx_reader *r) { r->count = count; } -const uint8_t *vpx_reader_find_end(vpx_reader *r) { +const uint8_t *aom_reader_find_end(aom_reader *r) { // Find the end of the coded buffer while (r->count > CHAR_BIT && r->count < BD_VALUE_SIZE) { r->count -= CHAR_BIT; diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h index 07ff7f9196e5bbb127c537cc1b5a7ef0a29ff069..897a09959ade5bbd96ca1bbc68be169ef1c98272 100644 --- a/aom_dsp/bitreader.h +++ b/aom_dsp/bitreader.h @@ -15,10 +15,10 @@ #include <stddef.h> #include <limits.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_ports/mem.h" #include "aom/vp8dx.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_dsp/prob.h" #ifdef __cplusplus @@ -41,19 +41,19 @@ typedef struct { int count; const uint8_t *buffer_end; const uint8_t *buffer; - vpx_decrypt_cb decrypt_cb; + aom_decrypt_cb decrypt_cb; void *decrypt_state; uint8_t clear_buffer[sizeof(BD_VALUE) + 1]; -} vpx_reader; +} aom_reader; -int vpx_reader_init(vpx_reader *r, const uint8_t *buffer, size_t size, - vpx_decrypt_cb decrypt_cb, void *decrypt_state); +int aom_reader_init(aom_reader *r, const uint8_t *buffer, size_t size, + aom_decrypt_cb decrypt_cb, void *decrypt_state); -void vpx_reader_fill(vpx_reader *r); +void aom_reader_fill(aom_reader *r); -const uint8_t *vpx_reader_find_end(vpx_reader *r); +const uint8_t *aom_reader_find_end(aom_reader *r); -static INLINE int vpx_reader_has_error(vpx_reader *r) { +static INLINE int aom_reader_has_error(aom_reader *r) { // Check if we have reached the end of the buffer. // // Variable 'count' stores the number of bits in the 'value' buffer, minus @@ -71,7 +71,7 @@ static INLINE int vpx_reader_has_error(vpx_reader *r) { return r->count > BD_VALUE_SIZE && r->count < LOTS_OF_BITS; } -static INLINE int vpx_read(vpx_reader *r, int prob) { +static INLINE int aom_read(aom_reader *r, int prob) { unsigned int bit = 0; BD_VALUE value; BD_VALUE bigsplit; @@ -79,7 +79,7 @@ static INLINE int vpx_read(vpx_reader *r, int prob) { unsigned int range; unsigned int split = (r->range * prob + (256 - prob)) >> CHAR_BIT; - if (r->count < 0) vpx_reader_fill(r); + if (r->count < 0) aom_reader_fill(r); value = r->value; count = r->count; @@ -95,7 +95,7 @@ static INLINE int vpx_read(vpx_reader *r, int prob) { } { - register int shift = vpx_norm[range]; + register int shift = aom_norm[range]; range <<= shift; value <<= shift; count -= shift; @@ -107,23 +107,23 @@ static INLINE int vpx_read(vpx_reader *r, int prob) { return bit; } -static INLINE int vpx_read_bit(vpx_reader *r) { - return vpx_read(r, 128); // vpx_prob_half +static INLINE int aom_read_bit(aom_reader *r) { + return aom_read(r, 128); // aom_prob_half } -static INLINE int vpx_read_literal(vpx_reader *r, int bits) { +static INLINE int aom_read_literal(aom_reader *r, int bits) { int literal = 0, bit; - for (bit = bits - 1; bit >= 0; bit--) literal |= vpx_read_bit(r) << bit; + for (bit = bits - 1; bit >= 0; bit--) literal |= aom_read_bit(r) << bit; return literal; } -static INLINE int vpx_read_tree(vpx_reader *r, const vpx_tree_index *tree, - const vpx_prob *probs) { - vpx_tree_index i = 0; +static INLINE int aom_read_tree(aom_reader *r, const aom_tree_index *tree, + const aom_prob *probs) { + aom_tree_index i = 0; - while ((i = tree[i + vpx_read(r, probs[i >> 1])]) > 0) continue; + while ((i = tree[i + aom_read(r, probs[i >> 1])]) > 0) continue; return -i; } diff --git a/aom_dsp/bitreader_buffer.c b/aom_dsp/bitreader_buffer.c index 59a5a57c1614c548d0259e7ed405fe629de2cbdc..aafa3bde79006e3c64e784f322c30342db42550f 100644 --- a/aom_dsp/bitreader_buffer.c +++ b/aom_dsp/bitreader_buffer.c @@ -8,14 +8,14 @@ * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" +#include "./aom_config.h" #include "./bitreader_buffer.h" -size_t vpx_rb_bytes_read(struct vpx_read_bit_buffer *rb) { +size_t aom_rb_bytes_read(struct aom_read_bit_buffer *rb) { return (rb->bit_offset + 7) >> 3; } -int vpx_rb_read_bit(struct vpx_read_bit_buffer *rb) { +int aom_rb_read_bit(struct aom_read_bit_buffer *rb) { const size_t off = rb->bit_offset; const size_t p = off >> 3; const int q = 7 - (int)(off & 0x7); @@ -29,23 +29,23 @@ int vpx_rb_read_bit(struct vpx_read_bit_buffer *rb) { } } -int vpx_rb_read_literal(struct vpx_read_bit_buffer *rb, int bits) { +int aom_rb_read_literal(struct aom_read_bit_buffer *rb, int bits) { int value = 0, bit; - for (bit = bits - 1; bit >= 0; bit--) value |= vpx_rb_read_bit(rb) << bit; + for (bit = bits - 1; bit >= 0; bit--) value |= aom_rb_read_bit(rb) << bit; return value; } -int vpx_rb_read_signed_literal(struct vpx_read_bit_buffer *rb, int bits) { - const int value = vpx_rb_read_literal(rb, bits); - return vpx_rb_read_bit(rb) ? -value : value; +int aom_rb_read_signed_literal(struct aom_read_bit_buffer *rb, int bits) { + const int value = aom_rb_read_literal(rb, bits); + return aom_rb_read_bit(rb) ? -value : value; } -int vpx_rb_read_inv_signed_literal(struct vpx_read_bit_buffer *rb, int bits) { +int aom_rb_read_inv_signed_literal(struct aom_read_bit_buffer *rb, int bits) { #if CONFIG_MISC_FIXES const int nbits = sizeof(unsigned) * 8 - bits - 1; - const unsigned value = (unsigned)vpx_rb_read_literal(rb, bits + 1) << nbits; + const unsigned value = (unsigned)aom_rb_read_literal(rb, bits + 1) << nbits; return ((int)value) >> nbits; #else - return vpx_rb_read_signed_literal(rb, bits); + return aom_rb_read_signed_literal(rb, bits); #endif } diff --git a/aom_dsp/bitreader_buffer.h b/aom_dsp/bitreader_buffer.h index e2558fc9dc29955b059b066b836c891f75a015d6..5636f63f63b58e668684c4ef315766f79144b2df 100644 --- a/aom_dsp/bitreader_buffer.h +++ b/aom_dsp/bitreader_buffer.h @@ -14,32 +14,32 @@ #include <limits.h> -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { #endif -typedef void (*vpx_rb_error_handler)(void *data); +typedef void (*aom_rb_error_handler)(void *data); -struct vpx_read_bit_buffer { +struct aom_read_bit_buffer { const uint8_t *bit_buffer; const uint8_t *bit_buffer_end; size_t bit_offset; void *error_handler_data; - vpx_rb_error_handler error_handler; + aom_rb_error_handler error_handler; }; -size_t vpx_rb_bytes_read(struct vpx_read_bit_buffer *rb); +size_t aom_rb_bytes_read(struct aom_read_bit_buffer *rb); -int vpx_rb_read_bit(struct vpx_read_bit_buffer *rb); +int aom_rb_read_bit(struct aom_read_bit_buffer *rb); -int vpx_rb_read_literal(struct vpx_read_bit_buffer *rb, int bits); +int aom_rb_read_literal(struct aom_read_bit_buffer *rb, int bits); -int vpx_rb_read_signed_literal(struct vpx_read_bit_buffer *rb, int bits); +int aom_rb_read_signed_literal(struct aom_read_bit_buffer *rb, int bits); -int vpx_rb_read_inv_signed_literal(struct vpx_read_bit_buffer *rb, int bits); +int aom_rb_read_inv_signed_literal(struct aom_read_bit_buffer *rb, int bits); #ifdef __cplusplus } // extern "C" diff --git a/aom_dsp/bitwriter.c b/aom_dsp/bitwriter.c index 62a1df8ec889cca8a41044abd1c27e260eb1df76..973b5e8226f171cf078c3b0d26705d083045a3f3 100644 --- a/aom_dsp/bitwriter.c +++ b/aom_dsp/bitwriter.c @@ -13,19 +13,19 @@ #include "./bitwriter.h" -void vpx_start_encode(vpx_writer *br, uint8_t *source) { +void aom_start_encode(aom_writer *br, uint8_t *source) { br->lowvalue = 0; br->range = 255; br->count = -24; br->buffer = source; br->pos = 0; - vpx_write_bit(br, 0); + aom_write_bit(br, 0); } -void vpx_stop_encode(vpx_writer *br) { +void aom_stop_encode(aom_writer *br) { int i; - for (i = 0; i < 32; i++) vpx_write_bit(br, 0); + for (i = 0; i < 32; i++) aom_write_bit(br, 0); // Ensure there's no ambigous collision with any index marker bytes if ((br->buffer[br->pos - 1] & 0xe0) == 0xc0) br->buffer[br->pos++] = 0; diff --git a/aom_dsp/bitwriter.h b/aom_dsp/bitwriter.h index 2ea1800fc44f9e7e93dc81f0f73dcc9a5b8f5162..f731a6595268815f02a4b4ed4ae175bd2e4b7085 100644 --- a/aom_dsp/bitwriter.h +++ b/aom_dsp/bitwriter.h @@ -20,18 +20,18 @@ extern "C" { #endif -typedef struct vpx_writer { +typedef struct aom_writer { unsigned int lowvalue; unsigned int range; int count; unsigned int pos; uint8_t *buffer; -} vpx_writer; +} aom_writer; -void vpx_start_encode(vpx_writer *bc, uint8_t *buffer); -void vpx_stop_encode(vpx_writer *bc); +void aom_start_encode(aom_writer *bc, uint8_t *buffer); +void aom_stop_encode(aom_writer *bc); -static INLINE void vpx_write(vpx_writer *br, int bit, int probability) { +static INLINE void aom_write(aom_writer *br, int bit, int probability) { unsigned int split; int count = br->count; unsigned int range = br->range; @@ -47,7 +47,7 @@ static INLINE void vpx_write(vpx_writer *br, int bit, int probability) { range = br->range - split; } - shift = vpx_norm[range]; + shift = aom_norm[range]; range <<= shift; count += shift; @@ -79,17 +79,17 @@ static INLINE void vpx_write(vpx_writer *br, int bit, int probability) { br->range = range; } -static INLINE void vpx_write_bit(vpx_writer *w, int bit) { - vpx_write(w, bit, 128); // vpx_prob_half +static INLINE void aom_write_bit(aom_writer *w, int bit) { + aom_write(w, bit, 128); // aom_prob_half } -static INLINE void vpx_write_literal(vpx_writer *w, int data, int bits) { +static INLINE void aom_write_literal(aom_writer *w, int data, int bits) { int bit; - for (bit = bits - 1; bit >= 0; bit--) vpx_write_bit(w, 1 & (data >> bit)); + for (bit = bits - 1; bit >= 0; bit--) aom_write_bit(w, 1 & (data >> bit)); } -#define vpx_write_prob(w, v) vpx_write_literal((w), (v), 8) +#define aom_write_prob(w, v) aom_write_literal((w), (v), 8) #ifdef __cplusplus } // extern "C" diff --git a/aom_dsp/bitwriter_buffer.c b/aom_dsp/bitwriter_buffer.c index 6e30e14ce62a63d5e5eb154d1a3b8f673f579a52..5f6b324c1ceaa67aeaa2716b8b01745a5aa450fe 100644 --- a/aom_dsp/bitwriter_buffer.c +++ b/aom_dsp/bitwriter_buffer.c @@ -12,14 +12,14 @@ #include <limits.h> #include <stdlib.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "./bitwriter_buffer.h" -size_t vpx_wb_bytes_written(const struct vpx_write_bit_buffer *wb) { +size_t aom_wb_bytes_written(const struct aom_write_bit_buffer *wb) { return wb->bit_offset / CHAR_BIT + (wb->bit_offset % CHAR_BIT > 0); } -void vpx_wb_write_bit(struct vpx_write_bit_buffer *wb, int bit) { +void aom_wb_write_bit(struct aom_write_bit_buffer *wb, int bit) { const int off = (int)wb->bit_offset; const int p = off / CHAR_BIT; const int q = CHAR_BIT - 1 - off % CHAR_BIT; @@ -32,17 +32,17 @@ void vpx_wb_write_bit(struct vpx_write_bit_buffer *wb, int bit) { wb->bit_offset = off + 1; } -void vpx_wb_write_literal(struct vpx_write_bit_buffer *wb, int data, int bits) { +void aom_wb_write_literal(struct aom_write_bit_buffer *wb, int data, int bits) { int bit; - for (bit = bits - 1; bit >= 0; bit--) vpx_wb_write_bit(wb, (data >> bit) & 1); + for (bit = bits - 1; bit >= 0; bit--) aom_wb_write_bit(wb, (data >> bit) & 1); } -void vpx_wb_write_inv_signed_literal(struct vpx_write_bit_buffer *wb, int data, +void aom_wb_write_inv_signed_literal(struct aom_write_bit_buffer *wb, int data, int bits) { #if CONFIG_MISC_FIXES - vpx_wb_write_literal(wb, data, bits + 1); + aom_wb_write_literal(wb, data, bits + 1); #else - vpx_wb_write_literal(wb, abs(data), bits); - vpx_wb_write_bit(wb, data < 0); + aom_wb_write_literal(wb, abs(data), bits); + aom_wb_write_bit(wb, data < 0); #endif } diff --git a/aom_dsp/bitwriter_buffer.h b/aom_dsp/bitwriter_buffer.h index 2e2b9b0d807a53117734857dc913978692919c63..9b33fe8443e4e0a59adfcaa4f57db809a9ab0e7f 100644 --- a/aom_dsp/bitwriter_buffer.h +++ b/aom_dsp/bitwriter_buffer.h @@ -12,24 +12,24 @@ #ifndef VPX_DSP_BITWRITER_BUFFER_H_ #define VPX_DSP_BITWRITER_BUFFER_H_ -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { #endif -struct vpx_write_bit_buffer { +struct aom_write_bit_buffer { uint8_t *bit_buffer; size_t bit_offset; }; -size_t vpx_wb_bytes_written(const struct vpx_write_bit_buffer *wb); +size_t aom_wb_bytes_written(const struct aom_write_bit_buffer *wb); -void vpx_wb_write_bit(struct vpx_write_bit_buffer *wb, int bit); +void aom_wb_write_bit(struct aom_write_bit_buffer *wb, int bit); -void vpx_wb_write_literal(struct vpx_write_bit_buffer *wb, int data, int bits); +void aom_wb_write_literal(struct aom_write_bit_buffer *wb, int data, int bits); -void vpx_wb_write_inv_signed_literal(struct vpx_write_bit_buffer *wb, int data, +void aom_wb_write_inv_signed_literal(struct aom_write_bit_buffer *wb, int data, int bits); #ifdef __cplusplus diff --git a/aom_dsp/fastssim.c b/aom_dsp/fastssim.c index a0ae6a20a9c7aa9d57325e1e6b50441f1b3796e6..b64b50b481ad5381cbcd8a02ffbd8ce632e5906a 100644 --- a/aom_dsp/fastssim.c +++ b/aom_dsp/fastssim.c @@ -14,8 +14,8 @@ #include <math.h> #include <stdlib.h> #include <string.h> -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/ssim.h" #include "aom_ports/system_state.h" /* TODO(jbb): High bit depth version of this code needed */ @@ -428,11 +428,11 @@ static double convert_ssim_db(double _ssim, double _weight) { return 10 * (log10(_weight) - log10(_weight - _ssim)); } -double vpx_calc_fastssim(const YV12_BUFFER_CONFIG *source, +double aom_calc_fastssim(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *ssim_y, double *ssim_u, double *ssim_v) { double ssimv; - vpx_clear_system_state(); + aom_clear_system_state(); *ssim_y = calc_ssim(source->y_buffer, source->y_stride, dest->y_buffer, diff --git a/aom_dsp/fwd_txfm.c b/aom_dsp/fwd_txfm.c index 4cf8a9f1310fa3705e47cb9f66ec2d314c3ab8d0..68409f9a78a78a0532caafd11a8c89d07bf09666 100644 --- a/aom_dsp/fwd_txfm.c +++ b/aom_dsp/fwd_txfm.c @@ -11,7 +11,7 @@ #include "aom_dsp/fwd_txfm.h" -void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride) { +void aom_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride) { // The 2D transform is done with two passes which are actually pretty // similar. In the first one, we transform the columns and transpose // the results. In the second one, we transform the rows. To achieve that, @@ -77,7 +77,7 @@ void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride) { } } -void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride) { +void aom_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride) { int r, c; tran_low_t sum = 0; for (r = 0; r < 4; ++r) @@ -87,7 +87,7 @@ void vpx_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride) { output[1] = 0; } -void vpx_fdct8x8_c(const int16_t *input, tran_low_t *final_output, int stride) { +void aom_fdct8x8_c(const int16_t *input, tran_low_t *final_output, int stride) { int i, j; tran_low_t intermediate[64]; int pass; @@ -172,7 +172,7 @@ void vpx_fdct8x8_c(const int16_t *input, tran_low_t *final_output, int stride) { } } -void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride) { +void aom_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride) { int r, c; tran_low_t sum = 0; for (r = 0; r < 8; ++r) @@ -182,7 +182,7 @@ void vpx_fdct8x8_1_c(const int16_t *input, tran_low_t *output, int stride) { output[1] = 0; } -void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride) { +void aom_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride) { // The 2D transform is done with two passes which are actually pretty // similar. In the first one, we transform the columns and transpose // the results. In the second one, we transform the rows. To achieve that, @@ -362,7 +362,7 @@ void vpx_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride) { } } -void vpx_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride) { +void aom_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride) { int r, c; tran_low_t sum = 0; for (r = 0; r < 16; ++r) @@ -385,7 +385,7 @@ static INLINE tran_high_t half_round_shift(tran_high_t input) { return rv; } -void vpx_fdct32(const tran_high_t *input, tran_high_t *output, int round) { +void aom_fdct32(const tran_high_t *input, tran_high_t *output, int round) { tran_high_t step[32]; // Stage 1 step[0] = input[0] + input[(32 - 1)]; @@ -708,7 +708,7 @@ void vpx_fdct32(const tran_high_t *input, tran_high_t *output, int round) { output[31] = dct_32_round(step[31] * cospi_31_64 + step[16] * -cospi_1_64); } -void vpx_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride) { +void aom_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride) { int i, j; tran_high_t output[32 * 32]; @@ -716,7 +716,7 @@ void vpx_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride) { for (i = 0; i < 32; ++i) { tran_high_t temp_in[32], temp_out[32]; for (j = 0; j < 32; ++j) temp_in[j] = input[j * stride + i] * 4; - vpx_fdct32(temp_in, temp_out, 0); + aom_fdct32(temp_in, temp_out, 0); for (j = 0; j < 32; ++j) output[j * 32 + i] = (temp_out[j] + 1 + (temp_out[j] > 0)) >> 2; } @@ -725,7 +725,7 @@ void vpx_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride) { for (i = 0; i < 32; ++i) { tran_high_t temp_in[32], temp_out[32]; for (j = 0; j < 32; ++j) temp_in[j] = output[j + i * 32]; - vpx_fdct32(temp_in, temp_out, 0); + aom_fdct32(temp_in, temp_out, 0); for (j = 0; j < 32; ++j) out[j + i * 32] = (tran_low_t)((temp_out[j] + 1 + (temp_out[j] < 0)) >> 2); @@ -735,7 +735,7 @@ void vpx_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride) { // Note that although we use dct_32_round in dct32 computation flow, // this 2d fdct32x32 for rate-distortion optimization loop is operating // within 16 bits precision. -void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *out, int stride) { +void aom_fdct32x32_rd_c(const int16_t *input, tran_low_t *out, int stride) { int i, j; tran_high_t output[32 * 32]; @@ -743,11 +743,11 @@ void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *out, int stride) { for (i = 0; i < 32; ++i) { tran_high_t temp_in[32], temp_out[32]; for (j = 0; j < 32; ++j) temp_in[j] = input[j * stride + i] * 4; - vpx_fdct32(temp_in, temp_out, 0); + aom_fdct32(temp_in, temp_out, 0); for (j = 0; j < 32; ++j) // TODO(cd): see quality impact of only doing // output[j * 32 + i] = (temp_out[j] + 1) >> 2; - // PS: also change code in vpx_dsp/x86/vpx_dct_sse2.c + // PS: also change code in aom_dsp/x86/aom_dct_sse2.c output[j * 32 + i] = (temp_out[j] + 1 + (temp_out[j] > 0)) >> 2; } @@ -755,12 +755,12 @@ void vpx_fdct32x32_rd_c(const int16_t *input, tran_low_t *out, int stride) { for (i = 0; i < 32; ++i) { tran_high_t temp_in[32], temp_out[32]; for (j = 0; j < 32; ++j) temp_in[j] = output[j + i * 32]; - vpx_fdct32(temp_in, temp_out, 1); + aom_fdct32(temp_in, temp_out, 1); for (j = 0; j < 32; ++j) out[j + i * 32] = (tran_low_t)temp_out[j]; } } -void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride) { +void aom_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride) { int r, c; tran_low_t sum = 0; for (r = 0; r < 32; ++r) @@ -771,42 +771,42 @@ void vpx_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride) { } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, +void aom_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride) { - vpx_fdct4x4_c(input, output, stride); + aom_fdct4x4_c(input, output, stride); } -void vpx_highbd_fdct8x8_c(const int16_t *input, tran_low_t *final_output, +void aom_highbd_fdct8x8_c(const int16_t *input, tran_low_t *final_output, int stride) { - vpx_fdct8x8_c(input, final_output, stride); + aom_fdct8x8_c(input, final_output, stride); } -void vpx_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *final_output, +void aom_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *final_output, int stride) { - vpx_fdct8x8_1_c(input, final_output, stride); + aom_fdct8x8_1_c(input, final_output, stride); } -void vpx_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, +void aom_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride) { - vpx_fdct16x16_c(input, output, stride); + aom_fdct16x16_c(input, output, stride); } -void vpx_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, +void aom_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, int stride) { - vpx_fdct16x16_1_c(input, output, stride); + aom_fdct16x16_1_c(input, output, stride); } -void vpx_highbd_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride) { - vpx_fdct32x32_c(input, out, stride); +void aom_highbd_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride) { + aom_fdct32x32_c(input, out, stride); } -void vpx_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *out, +void aom_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *out, int stride) { - vpx_fdct32x32_rd_c(input, out, stride); + aom_fdct32x32_rd_c(input, out, stride); } -void vpx_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *out, +void aom_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *out, int stride) { - vpx_fdct32x32_1_c(input, out, stride); + aom_fdct32x32_1_c(input, out, stride); } #endif // CONFIG_VPX_HIGHBITDEPTH diff --git a/aom_dsp/fwd_txfm.h b/aom_dsp/fwd_txfm.h index 2ac17afd6c2df37e12067802b09a323b6666b8c7..97df577b8068a31d97cb46f51e299f2b580aae3e 100644 --- a/aom_dsp/fwd_txfm.h +++ b/aom_dsp/fwd_txfm.h @@ -22,5 +22,5 @@ static INLINE tran_high_t fdct_round_shift(tran_high_t input) { return rv; } -void vpx_fdct32(const tran_high_t *input, tran_high_t *output, int round); +void aom_fdct32(const tran_high_t *input, tran_high_t *output, int round); #endif // VPX_DSP_FWD_TXFM_H_ diff --git a/aom_dsp/intrapred.c b/aom_dsp/intrapred.c index 80999d817bc221e2e21031baca2e87fa01f95c85..e75faa61c1fa39c1ca285c7deaeced500ba726b3 100644 --- a/aom_dsp/intrapred.c +++ b/aom_dsp/intrapred.c @@ -9,11 +9,11 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #define DST(x, y) dst[(x) + (y)*stride] #define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2) @@ -285,7 +285,7 @@ static INLINE void dc_predictor(uint8_t *dst, ptrdiff_t stride, int bs, } } -void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, +void aom_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const int H = above[-1]; const int I = left[0]; @@ -299,7 +299,7 @@ void vpx_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, memset(dst + stride * 3, AVG3(K, L, L), 4); } -void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, +void aom_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const int H = above[-1]; const int I = above[0]; @@ -317,7 +317,7 @@ void vpx_ve_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, memcpy(dst + stride * 3, dst, 4); } -void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, +void aom_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const int I = left[0]; const int J = left[1]; @@ -333,7 +333,7 @@ void vpx_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, DST(3, 2) = DST(2, 2) = DST(0, 3) = DST(1, 3) = DST(2, 3) = DST(3, 3) = L; } -void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, +void aom_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const int A = above[0]; const int B = above[1]; @@ -356,7 +356,7 @@ void vpx_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, DST(3, 3) = AVG3(E, F, G); // differs from vp8 } -void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, +void aom_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const int A = above[0]; const int B = above[1]; @@ -380,7 +380,7 @@ void vpx_d63f_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, DST(3, 3) = AVG3(F, G, H); } -void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, +void aom_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const int A = above[0]; const int B = above[1]; @@ -401,7 +401,7 @@ void vpx_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, DST(3, 3) = H; // differs from vp8 } -void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, +void aom_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const int A = above[0]; const int B = above[1]; @@ -422,7 +422,7 @@ void vpx_d45e_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, DST(3, 3) = AVG3(G, H, H); } -void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, +void aom_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const int I = left[0]; const int J = left[1]; @@ -445,7 +445,7 @@ void vpx_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, DST(3, 1) = AVG3(B, C, D); } -void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, +void aom_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const int I = left[0]; const int J = left[1]; @@ -466,7 +466,7 @@ void vpx_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, DST(3, 0) = AVG3(D, C, B); } -void vpx_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, +void aom_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { const int I = left[0]; const int J = left[1]; @@ -682,7 +682,7 @@ static INLINE void highbd_h_predictor(uint16_t *dst, ptrdiff_t stride, int bs, (void)above; (void)bd; for (r = 0; r < bs; r++) { - vpx_memset16(dst, left[r], bs); + aom_memset16(dst, left[r], bs); dst += stride; } } @@ -709,7 +709,7 @@ static INLINE void highbd_dc_128_predictor(uint16_t *dst, ptrdiff_t stride, (void)left; for (r = 0; r < bs; r++) { - vpx_memset16(dst, 128 << (bd - 8), bs); + aom_memset16(dst, 128 << (bd - 8), bs); dst += stride; } } @@ -725,7 +725,7 @@ static INLINE void highbd_dc_left_predictor(uint16_t *dst, ptrdiff_t stride, expected_dc = (sum + (bs >> 1)) / bs; for (r = 0; r < bs; r++) { - vpx_memset16(dst, expected_dc, bs); + aom_memset16(dst, expected_dc, bs); dst += stride; } } @@ -741,7 +741,7 @@ static INLINE void highbd_dc_top_predictor(uint16_t *dst, ptrdiff_t stride, expected_dc = (sum + (bs >> 1)) / bs; for (r = 0; r < bs; r++) { - vpx_memset16(dst, expected_dc, bs); + aom_memset16(dst, expected_dc, bs); dst += stride; } } @@ -761,7 +761,7 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bs, expected_dc = (sum + (count >> 1)) / count; for (r = 0; r < bs; r++) { - vpx_memset16(dst, expected_dc, bs); + aom_memset16(dst, expected_dc, bs); dst += stride; } } @@ -771,7 +771,7 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bs, // can be unified and accessed as a pointer array. Note that the boundary // above and left are not necessarily used all the time. #define intra_pred_sized(type, size) \ - void vpx_##type##_predictor_##size##x##size##_c( \ + void aom_##type##_predictor_##size##x##size##_c( \ uint8_t *dst, ptrdiff_t stride, const uint8_t *above, \ const uint8_t *left) { \ type##_predictor(dst, stride, size, above, left); \ @@ -779,7 +779,7 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bs, #if CONFIG_VPX_HIGHBITDEPTH #define intra_pred_highbd_sized(type, size) \ - void vpx_highbd_##type##_predictor_##size##x##size##_c( \ + void aom_highbd_##type##_predictor_##size##x##size##_c( \ uint16_t *dst, ptrdiff_t stride, const uint16_t *above, \ const uint16_t *left, int bd) { \ highbd_##type##_predictor(dst, stride, size, above, left, bd); \ diff --git a/aom_dsp/inv_txfm.c b/aom_dsp/inv_txfm.c index 1b01de1e843f085aefc327598e41ffd23b6ce88c..0e40949b13fa015132dfb26e0726450cb86da2eb 100644 --- a/aom_dsp/inv_txfm.c +++ b/aom_dsp/inv_txfm.c @@ -14,7 +14,7 @@ #include "aom_dsp/inv_txfm.h" -void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) { +void aom_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) { /* 4-point reversible, orthonormal inverse Walsh-Hadamard in 3.5 adds, 0.5 shifts per pixel. */ int i; @@ -66,7 +66,7 @@ void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) { } } -void vpx_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest, int dest_stride) { +void aom_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest, int dest_stride) { int i; tran_high_t a1, e1; tran_low_t tmp[4]; @@ -112,7 +112,7 @@ void idct4_c(const tran_low_t *input, tran_low_t *output) { output[3] = WRAPLOW(step[0] - step[3], 8); } -void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) { +void aom_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) { tran_low_t out[4 * 4]; tran_low_t *outptr = out; int i, j; @@ -136,7 +136,7 @@ void vpx_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) { } } -void vpx_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, +void aom_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, int dest_stride) { int i; tran_high_t a1; @@ -207,7 +207,7 @@ void idct8_c(const tran_low_t *input, tran_low_t *output) { output[7] = WRAPLOW(step1[0] - step1[7], 8); } -void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride) { +void aom_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride) { tran_low_t out[8 * 8]; tran_low_t *outptr = out; int i, j; @@ -231,7 +231,7 @@ void vpx_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride) { } } -void vpx_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) { +void aom_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) { int i, j; tran_high_t a1; tran_low_t out = WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), 8); @@ -357,7 +357,7 @@ void iadst8_c(const tran_low_t *input, tran_low_t *output) { output[7] = WRAPLOW(-x1, 8); } -void vpx_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride) { +void aom_idct8x8_12_add_c(const tran_low_t *input, uint8_t *dest, int stride) { tran_low_t out[8 * 8] = { 0 }; tran_low_t *outptr = out; int i, j; @@ -547,7 +547,7 @@ void idct16_c(const tran_low_t *input, tran_low_t *output) { output[15] = WRAPLOW(step2[0] - step2[15], 8); } -void vpx_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, +void aom_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride) { tran_low_t out[16 * 16]; tran_low_t *outptr = out; @@ -743,7 +743,7 @@ void iadst16_c(const tran_low_t *input, tran_low_t *output) { output[15] = WRAPLOW(-x1, 8); } -void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, +void aom_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, int stride) { tran_low_t out[16 * 16] = { 0 }; tran_low_t *outptr = out; @@ -769,7 +769,7 @@ void vpx_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, } } -void vpx_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) { +void aom_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) { int i, j; tran_high_t a1; tran_low_t out = WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), 8); @@ -1148,7 +1148,7 @@ void idct32_c(const tran_low_t *input, tran_low_t *output) { output[31] = WRAPLOW(step1[0] - step1[31], 8); } -void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, +void aom_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, int stride) { tran_low_t out[32 * 32]; tran_low_t *outptr = out; @@ -1185,7 +1185,7 @@ void vpx_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, } } -void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, +void aom_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, int stride) { tran_low_t out[32 * 32] = { 0 }; tran_low_t *outptr = out; @@ -1211,7 +1211,7 @@ void vpx_idct32x32_135_add_c(const tran_low_t *input, uint8_t *dest, } } -void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, +void aom_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, int stride) { tran_low_t out[32 * 32] = { 0 }; tran_low_t *outptr = out; @@ -1237,7 +1237,7 @@ void vpx_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, } } -void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) { +void aom_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) { int i, j; tran_high_t a1; @@ -1252,7 +1252,7 @@ void vpx_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) { } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { /* 4-point reversible, orthonormal inverse Walsh-Hadamard in 3.5 adds, 0.5 shifts per pixel. */ @@ -1306,7 +1306,7 @@ void vpx_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest8, +void aom_highbd_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest8, int dest_stride, int bd) { int i; tran_high_t a1, e1; @@ -1339,7 +1339,7 @@ void vpx_highbd_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest8, } } -void vpx_highbd_idct4_c(const tran_low_t *input, tran_low_t *output, int bd) { +void aom_highbd_idct4_c(const tran_low_t *input, tran_low_t *output, int bd) { tran_low_t step[4]; tran_high_t temp1, temp2; (void)bd; @@ -1360,7 +1360,7 @@ void vpx_highbd_idct4_c(const tran_low_t *input, tran_low_t *output, int bd) { output[3] = WRAPLOW(step[0] - step[3], bd); } -void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[4 * 4]; tran_low_t *outptr = out; @@ -1370,7 +1370,7 @@ void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, // Rows for (i = 0; i < 4; ++i) { - vpx_highbd_idct4_c(input, outptr, bd); + aom_highbd_idct4_c(input, outptr, bd); input += 4; outptr += 4; } @@ -1378,7 +1378,7 @@ void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, // Columns for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) temp_in[j] = out[j * 4 + i]; - vpx_highbd_idct4_c(temp_in, temp_out, bd); + aom_highbd_idct4_c(temp_in, temp_out, bd); for (j = 0; j < 4; ++j) { dest[j * stride + i] = highbd_clip_pixel_add( dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 4), bd); @@ -1386,7 +1386,7 @@ void vpx_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest8, int dest_stride, int bd) { int i; tran_high_t a1; @@ -1406,7 +1406,7 @@ void vpx_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd) { +void aom_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd) { tran_low_t step1[8], step2[8]; tran_high_t temp1, temp2; // stage 1 @@ -1424,7 +1424,7 @@ void vpx_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd) { step1[6] = WRAPLOW(highbd_dct_const_round_shift(temp2, bd), bd); // stage 2 & stage 3 - even half - vpx_highbd_idct4_c(step1, step1, bd); + aom_highbd_idct4_c(step1, step1, bd); // stage 2 - odd half step2[4] = WRAPLOW(step1[4] + step1[5], bd); @@ -1451,7 +1451,7 @@ void vpx_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd) { output[7] = WRAPLOW(step1[0] - step1[7], bd); } -void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[8 * 8]; tran_low_t *outptr = out; @@ -1461,7 +1461,7 @@ void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, // First transform rows. for (i = 0; i < 8; ++i) { - vpx_highbd_idct8_c(input, outptr, bd); + aom_highbd_idct8_c(input, outptr, bd); input += 8; outptr += 8; } @@ -1469,7 +1469,7 @@ void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, // Then transform columns. for (i = 0; i < 8; ++i) { for (j = 0; j < 8; ++j) temp_in[j] = out[j * 8 + i]; - vpx_highbd_idct8_c(temp_in, temp_out, bd); + aom_highbd_idct8_c(temp_in, temp_out, bd); for (j = 0; j < 8; ++j) { dest[j * stride + i] = highbd_clip_pixel_add( dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 5), bd); @@ -1477,7 +1477,7 @@ void vpx_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { int i, j; tran_high_t a1; @@ -1492,7 +1492,7 @@ void vpx_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_iadst4_c(const tran_low_t *input, tran_low_t *output, int bd) { +void aom_highbd_iadst4_c(const tran_low_t *input, tran_low_t *output, int bd) { tran_high_t s0, s1, s2, s3, s4, s5, s6, s7; tran_low_t x0 = input[0]; @@ -1530,7 +1530,7 @@ void vpx_highbd_iadst4_c(const tran_low_t *input, tran_low_t *output, int bd) { output[3] = WRAPLOW(highbd_dct_const_round_shift(s0 + s1 - s3, bd), bd); } -void vpx_highbd_iadst8_c(const tran_low_t *input, tran_low_t *output, int bd) { +void aom_highbd_iadst8_c(const tran_low_t *input, tran_low_t *output, int bd) { tran_high_t s0, s1, s2, s3, s4, s5, s6, s7; tran_low_t x0 = input[7]; @@ -1607,7 +1607,7 @@ void vpx_highbd_iadst8_c(const tran_low_t *input, tran_low_t *output, int bd) { output[7] = WRAPLOW(-x1, bd); } -void vpx_highbd_idct8x8_10_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct8x8_10_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[8 * 8] = { 0 }; tran_low_t *outptr = out; @@ -1618,14 +1618,14 @@ void vpx_highbd_idct8x8_10_add_c(const tran_low_t *input, uint8_t *dest8, // First transform rows. // Only first 4 row has non-zero coefs. for (i = 0; i < 4; ++i) { - vpx_highbd_idct8_c(input, outptr, bd); + aom_highbd_idct8_c(input, outptr, bd); input += 8; outptr += 8; } // Then transform columns. for (i = 0; i < 8; ++i) { for (j = 0; j < 8; ++j) temp_in[j] = out[j * 8 + i]; - vpx_highbd_idct8_c(temp_in, temp_out, bd); + aom_highbd_idct8_c(temp_in, temp_out, bd); for (j = 0; j < 8; ++j) { dest[j * stride + i] = highbd_clip_pixel_add( dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 5), bd); @@ -1633,7 +1633,7 @@ void vpx_highbd_idct8x8_10_add_c(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd) { +void aom_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd) { tran_low_t step1[16], step2[16]; tran_high_t temp1, temp2; (void)bd; @@ -1799,7 +1799,7 @@ void vpx_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd) { output[15] = WRAPLOW(step2[0] - step2[15], bd); } -void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[16 * 16]; tran_low_t *outptr = out; @@ -1809,7 +1809,7 @@ void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, // First transform rows. for (i = 0; i < 16; ++i) { - vpx_highbd_idct16_c(input, outptr, bd); + aom_highbd_idct16_c(input, outptr, bd); input += 16; outptr += 16; } @@ -1817,7 +1817,7 @@ void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, // Then transform columns. for (i = 0; i < 16; ++i) { for (j = 0; j < 16; ++j) temp_in[j] = out[j * 16 + i]; - vpx_highbd_idct16_c(temp_in, temp_out, bd); + aom_highbd_idct16_c(temp_in, temp_out, bd); for (j = 0; j < 16; ++j) { dest[j * stride + i] = highbd_clip_pixel_add( dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 6), bd); @@ -1825,7 +1825,7 @@ void vpx_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd) { +void aom_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd) { tran_high_t s0, s1, s2, s3, s4, s5, s6, s7, s8; tran_high_t s9, s10, s11, s12, s13, s14, s15; @@ -1995,7 +1995,7 @@ void vpx_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd) { output[15] = WRAPLOW(-x1, bd); } -void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[16 * 16] = { 0 }; tran_low_t *outptr = out; @@ -2006,7 +2006,7 @@ void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest8, // First transform rows. Since all non-zero dct coefficients are in // upper-left 4x4 area, we only need to calculate first 4 rows here. for (i = 0; i < 4; ++i) { - vpx_highbd_idct16_c(input, outptr, bd); + aom_highbd_idct16_c(input, outptr, bd); input += 16; outptr += 16; } @@ -2014,7 +2014,7 @@ void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest8, // Then transform columns. for (i = 0; i < 16; ++i) { for (j = 0; j < 16; ++j) temp_in[j] = out[j * 16 + i]; - vpx_highbd_idct16_c(temp_in, temp_out, bd); + aom_highbd_idct16_c(temp_in, temp_out, bd); for (j = 0; j < 16; ++j) { dest[j * stride + i] = highbd_clip_pixel_add( dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 6), bd); @@ -2022,7 +2022,7 @@ void vpx_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { int i, j; tran_high_t a1; @@ -2407,7 +2407,7 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output, output[31] = WRAPLOW(step1[0] - step1[31], bd); } -void vpx_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[32 * 32]; tran_low_t *outptr = out; @@ -2445,7 +2445,7 @@ void vpx_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[32 * 32] = { 0 }; tran_low_t *outptr = out; @@ -2471,7 +2471,7 @@ void vpx_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { int i, j; int a1; diff --git a/aom_dsp/inv_txfm.h b/aom_dsp/inv_txfm.h index 7723f01fd4580949acb64fc44d4f2f27f2301afe..c071670ed7b5f18ed252fc97c278aa56c2a160bc 100644 --- a/aom_dsp/inv_txfm.h +++ b/aom_dsp/inv_txfm.h @@ -14,7 +14,7 @@ #include <assert.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/txfm_common.h" #include "aom_ports/mem.h" @@ -97,13 +97,13 @@ void iadst8_c(const tran_low_t *input, tran_low_t *output); void iadst16_c(const tran_low_t *input, tran_low_t *output); #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_idct4_c(const tran_low_t *input, tran_low_t *output, int bd); -void vpx_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd); -void vpx_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd); +void aom_highbd_idct4_c(const tran_low_t *input, tran_low_t *output, int bd); +void aom_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd); +void aom_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd); -void vpx_highbd_iadst4_c(const tran_low_t *input, tran_low_t *output, int bd); -void vpx_highbd_iadst8_c(const tran_low_t *input, tran_low_t *output, int bd); -void vpx_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd); +void aom_highbd_iadst4_c(const tran_low_t *input, tran_low_t *output, int bd); +void aom_highbd_iadst8_c(const tran_low_t *input, tran_low_t *output, int bd); +void aom_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd); static INLINE uint16_t highbd_clip_pixel_add(uint16_t dest, tran_high_t trans, int bd) { diff --git a/aom_dsp/loopfilter.c b/aom_dsp/loopfilter.c index 39d522aa245c04beb382580e858cc4c54ccdc636..da9ea918e489f15b8ea3fb14843673a04d636637 100644 --- a/aom_dsp/loopfilter.c +++ b/aom_dsp/loopfilter.c @@ -11,8 +11,8 @@ #include <stdlib.h> -#include "./vpx_config.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "./aom_config.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" static INLINE int8_t signed_char_clamp(int t) { @@ -109,7 +109,7 @@ static INLINE void filter4(int8_t mask, uint8_t thresh, uint8_t *op1, *op1 = signed_char_clamp(ps1 + filter) ^ 0x80; } -void vpx_lpf_horizontal_4_c(uint8_t *s, int p /* pitch */, +void aom_lpf_horizontal_4_c(uint8_t *s, int p /* pitch */, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { int i; @@ -126,15 +126,15 @@ void vpx_lpf_horizontal_4_c(uint8_t *s, int p /* pitch */, } } -void vpx_lpf_horizontal_4_dual_c(uint8_t *s, int p, const uint8_t *blimit0, +void aom_lpf_horizontal_4_dual_c(uint8_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_horizontal_4_c(s, p, blimit0, limit0, thresh0, 1); - vpx_lpf_horizontal_4_c(s + 8, p, blimit1, limit1, thresh1, 1); + aom_lpf_horizontal_4_c(s, p, blimit0, limit0, thresh0, 1); + aom_lpf_horizontal_4_c(s + 8, p, blimit1, limit1, thresh1, 1); } -void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, +void aom_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { int i; @@ -151,12 +151,12 @@ void vpx_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, } } -void vpx_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, +void aom_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_vertical_4_c(s, pitch, blimit0, limit0, thresh0, 1); - vpx_lpf_vertical_4_c(s + 8 * pitch, pitch, blimit1, limit1, thresh1, 1); + aom_lpf_vertical_4_c(s, pitch, blimit0, limit0, thresh0, 1); + aom_lpf_vertical_4_c(s + 8 * pitch, pitch, blimit1, limit1, thresh1, 1); } static INLINE void filter8(int8_t mask, uint8_t thresh, uint8_t flat, @@ -179,7 +179,7 @@ static INLINE void filter8(int8_t mask, uint8_t thresh, uint8_t flat, } } -void vpx_lpf_horizontal_8_c(uint8_t *s, int p, const uint8_t *blimit, +void aom_lpf_horizontal_8_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { int i; @@ -199,15 +199,15 @@ void vpx_lpf_horizontal_8_c(uint8_t *s, int p, const uint8_t *blimit, } } -void vpx_lpf_horizontal_8_dual_c(uint8_t *s, int p, const uint8_t *blimit0, +void aom_lpf_horizontal_8_dual_c(uint8_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_horizontal_8_c(s, p, blimit0, limit0, thresh0, 1); - vpx_lpf_horizontal_8_c(s + 8, p, blimit1, limit1, thresh1, 1); + aom_lpf_horizontal_8_c(s, p, blimit0, limit0, thresh0, 1); + aom_lpf_horizontal_8_c(s + 8, p, blimit1, limit1, thresh1, 1); } -void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, +void aom_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { int i; @@ -224,12 +224,12 @@ void vpx_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, } } -void vpx_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, +void aom_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_vertical_8_c(s, pitch, blimit0, limit0, thresh0, 1); - vpx_lpf_vertical_8_c(s + 8 * pitch, pitch, blimit1, limit1, thresh1, 1); + aom_lpf_vertical_8_c(s, pitch, blimit0, limit0, thresh0, 1); + aom_lpf_vertical_8_c(s + 8 * pitch, pitch, blimit1, limit1, thresh1, 1); } static INLINE void filter16(int8_t mask, uint8_t thresh, uint8_t flat, @@ -286,7 +286,7 @@ static INLINE void filter16(int8_t mask, uint8_t thresh, uint8_t flat, } } -void vpx_lpf_horizontal_16_c(uint8_t *s, int p, const uint8_t *blimit, +void aom_lpf_horizontal_16_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { int i; @@ -332,12 +332,12 @@ static void mb_lpf_vertical_edge_w(uint8_t *s, int p, const uint8_t *blimit, } } -void vpx_lpf_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit, +void aom_lpf_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh) { mb_lpf_vertical_edge_w(s, p, blimit, limit, thresh, 8); } -void vpx_lpf_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, +void aom_lpf_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh) { mb_lpf_vertical_edge_w(s, p, blimit, limit, thresh, 16); } @@ -433,7 +433,7 @@ static INLINE void highbd_filter4(int8_t mask, uint8_t thresh, uint16_t *op1, *op1 = signed_char_clamp_high(ps1 + filter, bd) + (0x80 << shift); } -void vpx_highbd_lpf_horizontal_4_c(uint16_t *s, int p /* pitch */, +void aom_highbd_lpf_horizontal_4_c(uint16_t *s, int p /* pitch */, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { int i; @@ -456,15 +456,15 @@ void vpx_highbd_lpf_horizontal_4_c(uint16_t *s, int p /* pitch */, } } -void vpx_highbd_lpf_horizontal_4_dual_c( +void aom_highbd_lpf_horizontal_4_dual_c( uint16_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd) { - vpx_highbd_lpf_horizontal_4_c(s, p, blimit0, limit0, thresh0, 1, bd); - vpx_highbd_lpf_horizontal_4_c(s + 8, p, blimit1, limit1, thresh1, 1, bd); + aom_highbd_lpf_horizontal_4_c(s, p, blimit0, limit0, thresh0, 1, bd); + aom_highbd_lpf_horizontal_4_c(s + 8, p, blimit1, limit1, thresh1, 1, bd); } -void vpx_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, +void aom_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { int i; @@ -481,12 +481,12 @@ void vpx_highbd_lpf_vertical_4_c(uint16_t *s, int pitch, const uint8_t *blimit, } } -void vpx_highbd_lpf_vertical_4_dual_c( +void aom_highbd_lpf_vertical_4_dual_c( uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd) { - vpx_highbd_lpf_vertical_4_c(s, pitch, blimit0, limit0, thresh0, 1, bd); - vpx_highbd_lpf_vertical_4_c(s + 8 * pitch, pitch, blimit1, limit1, thresh1, 1, + aom_highbd_lpf_vertical_4_c(s, pitch, blimit0, limit0, thresh0, 1, bd); + aom_highbd_lpf_vertical_4_c(s + 8 * pitch, pitch, blimit1, limit1, thresh1, 1, bd); } @@ -510,7 +510,7 @@ static INLINE void highbd_filter8(int8_t mask, uint8_t thresh, uint8_t flat, } } -void vpx_highbd_lpf_horizontal_8_c(uint16_t *s, int p, const uint8_t *blimit, +void aom_highbd_lpf_horizontal_8_c(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { int i; @@ -531,15 +531,15 @@ void vpx_highbd_lpf_horizontal_8_c(uint16_t *s, int p, const uint8_t *blimit, } } -void vpx_highbd_lpf_horizontal_8_dual_c( +void aom_highbd_lpf_horizontal_8_dual_c( uint16_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd) { - vpx_highbd_lpf_horizontal_8_c(s, p, blimit0, limit0, thresh0, 1, bd); - vpx_highbd_lpf_horizontal_8_c(s + 8, p, blimit1, limit1, thresh1, 1, bd); + aom_highbd_lpf_horizontal_8_c(s, p, blimit0, limit0, thresh0, 1, bd); + aom_highbd_lpf_horizontal_8_c(s + 8, p, blimit1, limit1, thresh1, 1, bd); } -void vpx_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, +void aom_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { int i; @@ -557,12 +557,12 @@ void vpx_highbd_lpf_vertical_8_c(uint16_t *s, int pitch, const uint8_t *blimit, } } -void vpx_highbd_lpf_vertical_8_dual_c( +void aom_highbd_lpf_vertical_8_dual_c( uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd) { - vpx_highbd_lpf_vertical_8_c(s, pitch, blimit0, limit0, thresh0, 1, bd); - vpx_highbd_lpf_vertical_8_c(s + 8 * pitch, pitch, blimit1, limit1, thresh1, 1, + aom_highbd_lpf_vertical_8_c(s, pitch, blimit0, limit0, thresh0, 1, bd); + aom_highbd_lpf_vertical_8_c(s + 8 * pitch, pitch, blimit1, limit1, thresh1, 1, bd); } @@ -632,7 +632,7 @@ static INLINE void highbd_filter16(int8_t mask, uint8_t thresh, uint8_t flat, } } -void vpx_highbd_lpf_horizontal_16_c(uint16_t *s, int p, const uint8_t *blimit, +void aom_highbd_lpf_horizontal_16_c(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { int i; @@ -694,13 +694,13 @@ static void highbd_mb_lpf_vertical_edge_w(uint16_t *s, int p, } } -void vpx_highbd_lpf_vertical_16_c(uint16_t *s, int p, const uint8_t *blimit, +void aom_highbd_lpf_vertical_16_c(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd) { highbd_mb_lpf_vertical_edge_w(s, p, blimit, limit, thresh, 8, bd); } -void vpx_highbd_lpf_vertical_16_dual_c(uint16_t *s, int p, +void aom_highbd_lpf_vertical_16_dual_c(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd) { diff --git a/aom_dsp/mips/vpx_convolve8_avg_horiz_msa.c b/aom_dsp/mips/aom_convolve8_avg_horiz_msa.c similarity index 99% rename from aom_dsp/mips/vpx_convolve8_avg_horiz_msa.c rename to aom_dsp/mips/aom_convolve8_avg_horiz_msa.c index 06c1af35889bf96149bfa65bd07daf92653401fa..847394a3d214708da9556fdbb8027b2fd9ad952b 100644 --- a/aom_dsp/mips/vpx_convolve8_avg_horiz_msa.c +++ b/aom_dsp/mips/aom_convolve8_avg_horiz_msa.c @@ -10,8 +10,8 @@ */ #include <assert.h> -#include "./vpx_dsp_rtcd.h" -#include "aom_dsp/mips/vpx_convolve_msa.h" +#include "./aom_dsp_rtcd.h" +#include "aom_dsp/mips/aom_convolve_msa.h" static void common_hz_8t_and_aver_dst_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, @@ -632,7 +632,7 @@ static void common_hz_2t_and_aver_dst_64w_msa(const uint8_t *src, } } -void vpx_convolve8_avg_horiz_msa(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_horiz_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -669,7 +669,7 @@ void vpx_convolve8_avg_horiz_msa(const uint8_t *src, ptrdiff_t src_stride, (int32_t)dst_stride, &filt_hor[3], h); break; default: - vpx_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } @@ -696,7 +696,7 @@ void vpx_convolve8_avg_horiz_msa(const uint8_t *src, ptrdiff_t src_stride, (int32_t)dst_stride, filt_hor, h); break; default: - vpx_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/vpx_convolve8_avg_msa.c b/aom_dsp/mips/aom_convolve8_avg_msa.c similarity index 98% rename from aom_dsp/mips/vpx_convolve8_avg_msa.c rename to aom_dsp/mips/aom_convolve8_avg_msa.c index 7b828cf4c02e25e884991563c877d17ccf5b5950..bed600d5b9dd473f0f4a69ccb3f28895c06dd861 100644 --- a/aom_dsp/mips/vpx_convolve8_avg_msa.c +++ b/aom_dsp/mips/aom_convolve8_avg_msa.c @@ -10,8 +10,8 @@ */ #include <assert.h> -#include "./vpx_dsp_rtcd.h" -#include "aom_dsp/mips/vpx_convolve_msa.h" +#include "./aom_dsp_rtcd.h" +#include "aom_dsp/mips/aom_convolve_msa.h" static void common_hv_8ht_8vt_and_aver_dst_4w_msa( const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -515,7 +515,7 @@ static void common_hv_2ht_2vt_and_aver_dst_64w_msa( } } -void vpx_convolve8_avg_msa(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -561,13 +561,13 @@ void vpx_convolve8_avg_msa(const uint8_t *src, ptrdiff_t src_stride, &filt_hor[3], &filt_ver[3], h); break; default: - vpx_convolve8_avg_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } } else if (((const int32_t *)filter_x)[0] == 0 || ((const int32_t *)filter_y)[0] == 0) { - vpx_convolve8_avg_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, + aom_convolve8_avg_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } else { switch (w) { @@ -597,7 +597,7 @@ void vpx_convolve8_avg_msa(const uint8_t *src, ptrdiff_t src_stride, filt_ver, h); break; default: - vpx_convolve8_avg_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/vpx_convolve8_avg_vert_msa.c b/aom_dsp/mips/aom_convolve8_avg_vert_msa.c similarity index 99% rename from aom_dsp/mips/vpx_convolve8_avg_vert_msa.c rename to aom_dsp/mips/aom_convolve8_avg_vert_msa.c index cc68603cf1a679c52f5d9b26590553eac2a16531..dae771104f18cfd9b76c9939cfb0f7dde7cf19f5 100644 --- a/aom_dsp/mips/vpx_convolve8_avg_vert_msa.c +++ b/aom_dsp/mips/aom_convolve8_avg_vert_msa.c @@ -10,8 +10,8 @@ */ #include <assert.h> -#include "./vpx_dsp_rtcd.h" -#include "aom_dsp/mips/vpx_convolve_msa.h" +#include "./aom_dsp_rtcd.h" +#include "aom_dsp/mips/aom_convolve_msa.h" static void common_vt_8t_and_aver_dst_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, @@ -604,7 +604,7 @@ static void common_vt_2t_and_aver_dst_64w_msa(const uint8_t *src, } } -void vpx_convolve8_avg_vert_msa(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_vert_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -641,7 +641,7 @@ void vpx_convolve8_avg_vert_msa(const uint8_t *src, ptrdiff_t src_stride, (int32_t)dst_stride, &filt_ver[3], h); break; default: - vpx_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } @@ -669,7 +669,7 @@ void vpx_convolve8_avg_vert_msa(const uint8_t *src, ptrdiff_t src_stride, (int32_t)dst_stride, filt_ver, h); break; default: - vpx_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/vpx_convolve8_horiz_msa.c b/aom_dsp/mips/aom_convolve8_horiz_msa.c similarity index 98% rename from aom_dsp/mips/vpx_convolve8_horiz_msa.c rename to aom_dsp/mips/aom_convolve8_horiz_msa.c index 84a73a6f187d0058c2bcac27a218371cdc095575..fc3a823c5702e0f4eb6de831b942a04ed0f35fde 100644 --- a/aom_dsp/mips/vpx_convolve8_horiz_msa.c +++ b/aom_dsp/mips/aom_convolve8_horiz_msa.c @@ -10,8 +10,8 @@ */ #include <assert.h> -#include "./vpx_dsp_rtcd.h" -#include "aom_dsp/mips/vpx_convolve_msa.h" +#include "./aom_dsp_rtcd.h" +#include "aom_dsp/mips/aom_convolve_msa.h" static void common_hz_8t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -620,7 +620,7 @@ static void common_hz_2t_64w_msa(const uint8_t *src, int32_t src_stride, } } -void vpx_convolve8_horiz_msa(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_horiz_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -657,7 +657,7 @@ void vpx_convolve8_horiz_msa(const uint8_t *src, ptrdiff_t src_stride, &filt_hor[3], h); break; default: - vpx_convolve8_horiz_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_horiz_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } @@ -684,7 +684,7 @@ void vpx_convolve8_horiz_msa(const uint8_t *src, ptrdiff_t src_stride, filt_hor, h); break; default: - vpx_convolve8_horiz_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_horiz_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/vpx_convolve8_msa.c b/aom_dsp/mips/aom_convolve8_msa.c similarity index 98% rename from aom_dsp/mips/vpx_convolve8_msa.c rename to aom_dsp/mips/aom_convolve8_msa.c index 673cfa9cb7b49df38a754e01d8f0d0125f6a906b..a4d594931a93989b32c63ee4b7d8c757c12149b2 100644 --- a/aom_dsp/mips/vpx_convolve8_msa.c +++ b/aom_dsp/mips/aom_convolve8_msa.c @@ -10,8 +10,8 @@ */ #include <assert.h> -#include "./vpx_dsp_rtcd.h" -#include "aom_dsp/mips/vpx_convolve_msa.h" +#include "./aom_dsp_rtcd.h" +#include "aom_dsp/mips/aom_convolve_msa.h" const uint8_t mc_filt_mask_arr[16 * 3] = { /* 8 width cases */ @@ -541,7 +541,7 @@ static void common_hv_2ht_2vt_64w_msa(const uint8_t *src, int32_t src_stride, } } -void vpx_convolve8_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_convolve8_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int32_t x_step_q4, const int16_t *filter_y, int32_t y_step_q4, int32_t w, int32_t h) { @@ -586,13 +586,13 @@ void vpx_convolve8_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, &filt_ver[3], (int32_t)h); break; default: - vpx_convolve8_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, + aom_convolve8_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } } else if (((const int32_t *)filter_x)[0] == 0 || ((const int32_t *)filter_y)[0] == 0) { - vpx_convolve8_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, + aom_convolve8_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } else { switch (w) { @@ -622,7 +622,7 @@ void vpx_convolve8_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, (int32_t)h); break; default: - vpx_convolve8_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, + aom_convolve8_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/vpx_convolve8_vert_msa.c b/aom_dsp/mips/aom_convolve8_vert_msa.c similarity index 99% rename from aom_dsp/mips/vpx_convolve8_vert_msa.c rename to aom_dsp/mips/aom_convolve8_vert_msa.c index 4cf825764e86fb60193cb3116faa4a9dad9cc55b..f7bdfc2bd7b08e1cdec3397f92739a944ea47717 100644 --- a/aom_dsp/mips/vpx_convolve8_vert_msa.c +++ b/aom_dsp/mips/aom_convolve8_vert_msa.c @@ -10,8 +10,8 @@ */ #include <assert.h> -#include "./vpx_dsp_rtcd.h" -#include "aom_dsp/mips/vpx_convolve_msa.h" +#include "./aom_dsp_rtcd.h" +#include "aom_dsp/mips/aom_convolve_msa.h" static void common_vt_8t_4w_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, @@ -627,7 +627,7 @@ static void common_vt_2t_64w_msa(const uint8_t *src, int32_t src_stride, } } -void vpx_convolve8_vert_msa(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_vert_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -664,7 +664,7 @@ void vpx_convolve8_vert_msa(const uint8_t *src, ptrdiff_t src_stride, &filt_ver[3], h); break; default: - vpx_convolve8_vert_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } @@ -691,7 +691,7 @@ void vpx_convolve8_vert_msa(const uint8_t *src, ptrdiff_t src_stride, filt_ver, h); break; default: - vpx_convolve8_vert_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/vpx_convolve_avg_msa.c b/aom_dsp/mips/aom_convolve_avg_msa.c similarity index 99% rename from aom_dsp/mips/vpx_convolve_avg_msa.c rename to aom_dsp/mips/aom_convolve_avg_msa.c index 5ee791c4092455b806eb8afe09bdb145a51f72f8..75f8c7ea85aef3e82127e84fe794d3bc53d6989e 100644 --- a/aom_dsp/mips/vpx_convolve_avg_msa.c +++ b/aom_dsp/mips/aom_convolve_avg_msa.c @@ -187,7 +187,7 @@ static void avg_width64_msa(const uint8_t *src, int32_t src_stride, } } -void vpx_convolve_avg_msa(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve_avg_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int32_t filter_x_stride, const int16_t *filter_y, int32_t filter_y_stride, diff --git a/aom_dsp/mips/vpx_convolve_copy_msa.c b/aom_dsp/mips/aom_convolve_copy_msa.c similarity index 99% rename from aom_dsp/mips/vpx_convolve_copy_msa.c rename to aom_dsp/mips/aom_convolve_copy_msa.c index ad4e4cde5eaa068ac05e50d8a3721390fd37ac3b..f7f116f4da6ce3bf1ecea626a5313cbe933aecb8 100644 --- a/aom_dsp/mips/vpx_convolve_copy_msa.c +++ b/aom_dsp/mips/aom_convolve_copy_msa.c @@ -197,7 +197,7 @@ static void copy_width64_msa(const uint8_t *src, int32_t src_stride, copy_16multx8mult_msa(src, src_stride, dst, dst_stride, height, 64); } -void vpx_convolve_copy_msa(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve_copy_msa(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int32_t filter_x_stride, const int16_t *filter_y, int32_t filter_y_stride, diff --git a/aom_dsp/mips/vpx_convolve_msa.h b/aom_dsp/mips/aom_convolve_msa.h similarity index 99% rename from aom_dsp/mips/vpx_convolve_msa.h rename to aom_dsp/mips/aom_convolve_msa.h index 90c169eaa60a01d90896b2197bf477f8fd513836..27227029e8cfc98a58405a935616a559d421e56c 100644 --- a/aom_dsp/mips/vpx_convolve_msa.h +++ b/aom_dsp/mips/aom_convolve_msa.h @@ -13,7 +13,7 @@ #define VPX_DSP_MIPS_VPX_CONVOLVE_MSA_H_ #include "aom_dsp/mips/macros_msa.h" -#include "aom_dsp/vpx_filter.h" +#include "aom_dsp/aom_filter.h" extern const uint8_t mc_filt_mask_arr[16 * 3]; diff --git a/aom_dsp/mips/avg_msa.c b/aom_dsp/mips/avg_msa.c index f556134504b685ed0eeda4b5fd6be3758b6b183b..0e172815532b7aae1e599c325e184ece751dc552 100644 --- a/aom_dsp/mips/avg_msa.c +++ b/aom_dsp/mips/avg_msa.c @@ -9,10 +9,10 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/macros_msa.h" -uint32_t vpx_avg_8x8_msa(const uint8_t *src, int32_t src_stride) { +uint32_t aom_avg_8x8_msa(const uint8_t *src, int32_t src_stride) { uint32_t sum_out; v16u8 src0, src1, src2, src3, src4, src5, src6, src7; v8u16 sum0, sum1, sum2, sum3, sum4, sum5, sum6, sum7; @@ -34,7 +34,7 @@ uint32_t vpx_avg_8x8_msa(const uint8_t *src, int32_t src_stride) { return sum_out; } -uint32_t vpx_avg_4x4_msa(const uint8_t *src, int32_t src_stride) { +uint32_t aom_avg_4x4_msa(const uint8_t *src, int32_t src_stride) { uint32_t sum_out; uint32_t src0, src1, src2, src3; v16u8 vec = { 0 }; diff --git a/aom_dsp/mips/common_dspr2.c b/aom_dsp/mips/common_dspr2.c index d749a99429ed64eee703616441aeb243979b90ef..00ab75dc31dba3ceeb665216d9e9edf026b6f5a8 100644 --- a/aom_dsp/mips/common_dspr2.c +++ b/aom_dsp/mips/common_dspr2.c @@ -12,20 +12,20 @@ #include "aom_dsp/mips/common_dspr2.h" #if HAVE_DSPR2 -uint8_t vpx_ff_cropTbl_a[256 + 2 * CROP_WIDTH]; -uint8_t *vpx_ff_cropTbl; +uint8_t aom_ff_cropTbl_a[256 + 2 * CROP_WIDTH]; +uint8_t *aom_ff_cropTbl; -void vpx_dsputil_static_init(void) { +void aom_dsputil_static_init(void) { int i; - for (i = 0; i < 256; i++) vpx_ff_cropTbl_a[i + CROP_WIDTH] = i; + for (i = 0; i < 256; i++) aom_ff_cropTbl_a[i + CROP_WIDTH] = i; for (i = 0; i < CROP_WIDTH; i++) { - vpx_ff_cropTbl_a[i] = 0; - vpx_ff_cropTbl_a[i + CROP_WIDTH + 256] = 255; + aom_ff_cropTbl_a[i] = 0; + aom_ff_cropTbl_a[i + CROP_WIDTH + 256] = 255; } - vpx_ff_cropTbl = &vpx_ff_cropTbl_a[CROP_WIDTH]; + aom_ff_cropTbl = &aom_ff_cropTbl_a[CROP_WIDTH]; } #endif diff --git a/aom_dsp/mips/common_dspr2.h b/aom_dsp/mips/common_dspr2.h index 2d1bdf1421fc32723948d56b64d41f107555bef8..efb9afddae13f2f73e64e6436a18985be2f38715 100644 --- a/aom_dsp/mips/common_dspr2.h +++ b/aom_dsp/mips/common_dspr2.h @@ -13,8 +13,8 @@ #define VPX_COMMON_MIPS_DSPR2_H_ #include <assert.h> -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { @@ -22,7 +22,7 @@ extern "C" { #if HAVE_DSPR2 #define CROP_WIDTH 512 -extern uint8_t *vpx_ff_cropTbl; // From "aom_dsp/mips/intrapred4_dspr2.c" +extern uint8_t *aom_ff_cropTbl; // From "aom_dsp/mips/intrapred4_dspr2.c" static INLINE void prefetch_load(const unsigned char *src) { __asm__ __volatile__("pref 0, 0(%[src]) \n\t" : : [src] "r"(src)); diff --git a/aom_dsp/mips/convolve2_avg_dspr2.c b/aom_dsp/mips/convolve2_avg_dspr2.c index ce55d62793c571c191a9dcde967cac38cd3c0669..d557115b92fcf60297a4a474ac49fe0a365e9e4b 100644 --- a/aom_dsp/mips/convolve2_avg_dspr2.c +++ b/aom_dsp/mips/convolve2_avg_dspr2.c @@ -12,10 +12,10 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/convolve_common_dspr2.h" -#include "aom_dsp/vpx_convolve.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_convolve.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" #if HAVE_DSPR2 @@ -26,7 +26,7 @@ static void convolve_bi_avg_vert_4_dspr2(const uint8_t *src, int32_t src_stride, int32_t x, y; const uint8_t *src_ptr; uint8_t *dst_ptr; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; uint32_t load1, load2; uint32_t p1, p2; @@ -125,7 +125,7 @@ static void convolve_bi_avg_vert_64_dspr2(const uint8_t *src, int32_t x, y; const uint8_t *src_ptr; uint8_t *dst_ptr; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; uint32_t load1, load2; uint32_t p1, p2; @@ -218,7 +218,7 @@ static void convolve_bi_avg_vert_64_dspr2(const uint8_t *src, } } -void vpx_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -248,7 +248,7 @@ void vpx_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, h); break; default: - vpx_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/convolve2_avg_horiz_dspr2.c b/aom_dsp/mips/convolve2_avg_horiz_dspr2.c index b54244843d9b3e5fa5811a257a8b76fe1f7d13cd..efbdcf60fb34e17b100586186d5deefd07fc2267 100644 --- a/aom_dsp/mips/convolve2_avg_horiz_dspr2.c +++ b/aom_dsp/mips/convolve2_avg_horiz_dspr2.c @@ -12,10 +12,10 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/convolve_common_dspr2.h" -#include "aom_dsp/vpx_convolve.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_convolve.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" #if HAVE_DSPR2 @@ -24,7 +24,7 @@ static void convolve_bi_avg_horiz_4_dspr2(const uint8_t *src, int32_t dst_stride, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; int32_t Temp1, Temp2, Temp3, Temp4; uint32_t vector4a = 64; uint32_t tp1, tp2; @@ -115,7 +115,7 @@ static void convolve_bi_avg_horiz_8_dspr2(const uint8_t *src, int32_t dst_stride, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; int32_t Temp1, Temp2, Temp3; uint32_t tp1, tp2, tp3, tp4; @@ -262,7 +262,7 @@ static void convolve_bi_avg_horiz_16_dspr2(const uint8_t *src_ptr, int32_t y, c; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t Temp1, Temp2, Temp3; uint32_t qload1, qload2, qload3; @@ -509,7 +509,7 @@ static void convolve_bi_avg_horiz_64_dspr2(const uint8_t *src_ptr, int32_t y, c; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t Temp1, Temp2, Temp3; uint32_t qload1, qload2, qload3; @@ -750,7 +750,7 @@ static void convolve_bi_avg_horiz_64_dspr2(const uint8_t *src_ptr, } } -void vpx_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, @@ -794,7 +794,7 @@ void vpx_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, h); break; default: - vpx_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_horiz_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/convolve2_dspr2.c b/aom_dsp/mips/convolve2_dspr2.c index 385eef2b52bf931051c5efc0d12e213d6f45cc9c..066308315d311a49b0451551689eb8b1a188e933 100644 --- a/aom_dsp/mips/convolve2_dspr2.c +++ b/aom_dsp/mips/convolve2_dspr2.c @@ -12,10 +12,10 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/convolve_common_dspr2.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_dsp/vpx_filter.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_dsp/aom_filter.h" #include "aom_ports/mem.h" #if HAVE_DSPR2 @@ -23,7 +23,7 @@ static void convolve_bi_horiz_4_transposed_dspr2( const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint8_t *dst_ptr; int32_t Temp1, Temp2; uint32_t vector4a = 64; @@ -107,7 +107,7 @@ static void convolve_bi_horiz_8_transposed_dspr2( const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint8_t *dst_ptr; uint32_t vector4a = 64; int32_t Temp1, Temp2, Temp3; @@ -243,7 +243,7 @@ static void convolve_bi_horiz_16_transposed_dspr2( int32_t c, y; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t Temp1, Temp2, Temp3; uint32_t qload1, qload2; @@ -608,7 +608,7 @@ static void convolve_bi_horiz_64_transposed_dspr2( int32_t c, y; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t Temp1, Temp2, Temp3; uint32_t qload1, qload2; @@ -988,7 +988,7 @@ void convolve_bi_horiz_transposed(const uint8_t *src, ptrdiff_t src_stride, } } -void vpx_convolve2_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_convolve2_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter, int w, int h) { uint32_t pos = 38; diff --git a/aom_dsp/mips/convolve2_horiz_dspr2.c b/aom_dsp/mips/convolve2_horiz_dspr2.c index 06899908cd851405a2785517ea2ef336b1c814f3..dc51ab1cb797416c8932b4f08d4125714b7e52bf 100644 --- a/aom_dsp/mips/convolve2_horiz_dspr2.c +++ b/aom_dsp/mips/convolve2_horiz_dspr2.c @@ -12,10 +12,10 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/convolve_common_dspr2.h" -#include "aom_dsp/vpx_convolve.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_convolve.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" #if HAVE_DSPR2 @@ -23,7 +23,7 @@ static void convolve_bi_horiz_4_dspr2(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; int32_t Temp1, Temp2, Temp3, Temp4; uint32_t vector4a = 64; uint32_t tp1, tp2; @@ -100,7 +100,7 @@ static void convolve_bi_horiz_8_dspr2(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; int32_t Temp1, Temp2, Temp3; uint32_t tp1, tp2, tp3; @@ -224,7 +224,7 @@ static void convolve_bi_horiz_16_dspr2(const uint8_t *src_ptr, int32_t y, c; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t Temp1, Temp2, Temp3; uint32_t qload1, qload2, qload3; @@ -428,7 +428,7 @@ static void convolve_bi_horiz_64_dspr2(const uint8_t *src_ptr, int32_t y, c; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t Temp1, Temp2, Temp3; uint32_t qload1, qload2, qload3; @@ -627,7 +627,7 @@ static void convolve_bi_horiz_64_dspr2(const uint8_t *src_ptr, } } -void vpx_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -673,7 +673,7 @@ void vpx_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, (int32_t)dst_stride, filter_x, (int32_t)h); break; default: - vpx_convolve8_horiz_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_horiz_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/convolve2_vert_dspr2.c b/aom_dsp/mips/convolve2_vert_dspr2.c index dc4d57ec6b1217f5d88bc822e89f95e1e808e805..3367be01a2d8167cfba327c03c6be612e9372130 100644 --- a/aom_dsp/mips/convolve2_vert_dspr2.c +++ b/aom_dsp/mips/convolve2_vert_dspr2.c @@ -12,10 +12,10 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/convolve_common_dspr2.h" -#include "aom_dsp/vpx_convolve.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_convolve.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" #if HAVE_DSPR2 @@ -26,7 +26,7 @@ static void convolve_bi_vert_4_dspr2(const uint8_t *src, int32_t src_stride, int32_t x, y; const uint8_t *src_ptr; uint8_t *dst_ptr; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; uint32_t load1, load2; uint32_t p1, p2; @@ -116,7 +116,7 @@ static void convolve_bi_vert_64_dspr2(const uint8_t *src, int32_t src_stride, int32_t x, y; const uint8_t *src_ptr; uint8_t *dst_ptr; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; uint32_t load1, load2; uint32_t p1, p2; @@ -200,7 +200,7 @@ static void convolve_bi_vert_64_dspr2(const uint8_t *src, int32_t src_stride, } } -void vpx_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -229,7 +229,7 @@ void vpx_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, convolve_bi_vert_64_dspr2(src, src_stride, dst, dst_stride, filter_y, h); break; default: - vpx_convolve8_vert_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/convolve8_avg_dspr2.c b/aom_dsp/mips/convolve8_avg_dspr2.c index dc07844aa147a3e6868a39f894f6c1c8a752efc7..298065adb035700889bcbb39f2c0d4497a622a40 100644 --- a/aom_dsp/mips/convolve8_avg_dspr2.c +++ b/aom_dsp/mips/convolve8_avg_dspr2.c @@ -12,10 +12,10 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/convolve_common_dspr2.h" -#include "aom_dsp/vpx_convolve.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_convolve.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" #if HAVE_DSPR2 @@ -26,7 +26,7 @@ static void convolve_avg_vert_4_dspr2(const uint8_t *src, int32_t src_stride, int32_t x, y; const uint8_t *src_ptr; uint8_t *dst_ptr; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; uint32_t load1, load2, load3, load4; uint32_t p1, p2; @@ -182,7 +182,7 @@ static void convolve_avg_vert_64_dspr2(const uint8_t *src, int32_t src_stride, int32_t x, y; const uint8_t *src_ptr; uint8_t *dst_ptr; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; uint32_t load1, load2, load3, load4; uint32_t p1, p2; @@ -333,7 +333,7 @@ static void convolve_avg_vert_64_dspr2(const uint8_t *src, int32_t src_stride, } } -void vpx_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -342,7 +342,7 @@ void vpx_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, assert(((const int32_t *)filter_y)[1] != 0x800000); if (((const int32_t *)filter_y)[0] == 0) { - vpx_convolve2_avg_vert_dspr2(src, src_stride, dst, dst_stride, filter_x, + aom_convolve2_avg_vert_dspr2(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } else { uint32_t pos = 38; @@ -368,14 +368,14 @@ void vpx_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, h); break; default: - vpx_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_avg_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } } } -void vpx_convolve8_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -391,14 +391,14 @@ void vpx_convolve8_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride, if (intermediate_height < h) intermediate_height = h; - vpx_convolve8_horiz(src - (src_stride * 3), src_stride, temp, 64, filter_x, + aom_convolve8_horiz(src - (src_stride * 3), src_stride, temp, 64, filter_x, x_step_q4, filter_y, y_step_q4, w, intermediate_height); - vpx_convolve8_avg_vert(temp + 64 * 3, 64, dst, dst_stride, filter_x, + aom_convolve8_avg_vert(temp + 64 * 3, 64, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } -void vpx_convolve_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int filter_x_stride, const int16_t *filter_y, int filter_y_stride, int w, diff --git a/aom_dsp/mips/convolve8_avg_horiz_dspr2.c b/aom_dsp/mips/convolve8_avg_horiz_dspr2.c index da0db37ac21bfd973ae3323356f7727a9bdecec9..f6534b4205e20f6192681f81350bb5c94ad62565 100644 --- a/aom_dsp/mips/convolve8_avg_horiz_dspr2.c +++ b/aom_dsp/mips/convolve8_avg_horiz_dspr2.c @@ -12,10 +12,10 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/convolve_common_dspr2.h" -#include "aom_dsp/vpx_convolve.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_convolve.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" #if HAVE_DSPR2 @@ -23,7 +23,7 @@ static void convolve_avg_horiz_4_dspr2(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; int32_t vector1b, vector2b, vector3b, vector4b; int32_t Temp1, Temp2, Temp3, Temp4; uint32_t vector4a = 64; @@ -140,7 +140,7 @@ static void convolve_avg_horiz_8_dspr2(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; int32_t vector1b, vector2b, vector3b, vector4b; int32_t Temp1, Temp2, Temp3; @@ -326,7 +326,7 @@ static void convolve_avg_horiz_16_dspr2(const uint8_t *src_ptr, int32_t y, c; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t filter12, filter34, filter56, filter78; int32_t Temp1, Temp2, Temp3; @@ -634,7 +634,7 @@ static void convolve_avg_horiz_64_dspr2(const uint8_t *src_ptr, int32_t y, c; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t filter12, filter34, filter56, filter78; int32_t Temp1, Temp2, Temp3; @@ -937,7 +937,7 @@ static void convolve_avg_horiz_64_dspr2(const uint8_t *src_ptr, } } -void vpx_convolve8_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, @@ -946,7 +946,7 @@ void vpx_convolve8_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, assert(((const int32_t *)filter_x)[1] != 0x800000); if (((const int32_t *)filter_x)[0] == 0) { - vpx_convolve2_avg_horiz_dspr2(src, src_stride, dst, dst_stride, filter_x, + aom_convolve2_avg_horiz_dspr2(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } else { uint32_t pos = 38; @@ -988,7 +988,7 @@ void vpx_convolve8_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, h); break; default: - vpx_convolve8_avg_horiz_c(src + 3, src_stride, dst, dst_stride, + aom_convolve8_avg_horiz_c(src + 3, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; diff --git a/aom_dsp/mips/convolve8_dspr2.c b/aom_dsp/mips/convolve8_dspr2.c index fc4f759c96ca17161d3ef042eb35ccd7a0b0f76a..c871702f4b723f419b697ac5247a85a055db72ac 100644 --- a/aom_dsp/mips/convolve8_dspr2.c +++ b/aom_dsp/mips/convolve8_dspr2.c @@ -12,10 +12,10 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/convolve_common_dspr2.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_dsp/vpx_filter.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_dsp/aom_filter.h" #include "aom_ports/mem.h" #if HAVE_DSPR2 @@ -25,7 +25,7 @@ static void convolve_horiz_4_transposed_dspr2(const uint8_t *src, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint8_t *dst_ptr; int32_t vector1b, vector2b, vector3b, vector4b; int32_t Temp1, Temp2, Temp3, Temp4; @@ -139,7 +139,7 @@ static void convolve_horiz_8_transposed_dspr2(const uint8_t *src, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint8_t *dst_ptr; uint32_t vector4a = 64; int32_t vector1b, vector2b, vector3b, vector4b; @@ -312,7 +312,7 @@ static void convolve_horiz_16_transposed_dspr2( int32_t c, y; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t filter12, filter34, filter56, filter78; int32_t Temp1, Temp2, Temp3; @@ -790,7 +790,7 @@ static void convolve_horiz_64_transposed_dspr2( int32_t c, y; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t filter12, filter34, filter56, filter78; int32_t Temp1, Temp2, Temp3; @@ -1296,7 +1296,7 @@ void copy_horiz_transposed(const uint8_t *src, ptrdiff_t src_stride, } } -void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { @@ -1321,7 +1321,7 @@ void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, copy_horiz_transposed(src - src_stride * 3, src_stride, temp, intermediate_height, w, intermediate_height); } else if (((const int32_t *)filter_x)[0] == 0) { - vpx_convolve2_dspr2(src - src_stride * 3, src_stride, temp, + aom_convolve2_dspr2(src - src_stride * 3, src_stride, temp, intermediate_height, filter_x, w, intermediate_height); } else { src -= (src_stride * 3 + 3); @@ -1364,7 +1364,7 @@ void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, if (filter_y[3] == 0x80) { copy_horiz_transposed(temp + 3, intermediate_height, dst, dst_stride, h, w); } else if (((const int32_t *)filter_y)[0] == 0) { - vpx_convolve2_dspr2(temp + 3, intermediate_height, dst, dst_stride, + aom_convolve2_dspr2(temp + 3, intermediate_height, dst, dst_stride, filter_y, h, w); } else { switch (h) { @@ -1393,7 +1393,7 @@ void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, } } -void vpx_convolve_copy_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve_copy_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int filter_x_stride, const int16_t *filter_y, int filter_y_stride, diff --git a/aom_dsp/mips/convolve8_horiz_dspr2.c b/aom_dsp/mips/convolve8_horiz_dspr2.c index 61291ca938cc855ddf1cbf5e286d703fe934a08a..c60557617922bb0104aad89fae6fec76a0c58b9c 100644 --- a/aom_dsp/mips/convolve8_horiz_dspr2.c +++ b/aom_dsp/mips/convolve8_horiz_dspr2.c @@ -12,10 +12,10 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/convolve_common_dspr2.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_dsp/vpx_filter.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_dsp/aom_filter.h" #include "aom_ports/mem.h" #if HAVE_DSPR2 @@ -23,7 +23,7 @@ static void convolve_horiz_4_dspr2(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; int32_t vector1b, vector2b, vector3b, vector4b; int32_t Temp1, Temp2, Temp3, Temp4; uint32_t vector4a = 64; @@ -129,7 +129,7 @@ static void convolve_horiz_8_dspr2(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int16_t *filter_x0, int32_t h) { int32_t y; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; int32_t vector1b, vector2b, vector3b, vector4b; int32_t Temp1, Temp2, Temp3; @@ -291,7 +291,7 @@ static void convolve_horiz_16_dspr2(const uint8_t *src_ptr, int32_t src_stride, int32_t y, c; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t filter12, filter34, filter56, filter78; int32_t Temp1, Temp2, Temp3; @@ -556,7 +556,7 @@ static void convolve_horiz_64_dspr2(const uint8_t *src_ptr, int32_t src_stride, int32_t y, c; const uint8_t *src; uint8_t *dst; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector_64 = 64; int32_t filter12, filter34, filter56, filter78; int32_t Temp1, Temp2, Temp3; @@ -817,7 +817,7 @@ static void convolve_horiz_64_dspr2(const uint8_t *src_ptr, int32_t src_stride, } } -void vpx_convolve8_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -826,7 +826,7 @@ void vpx_convolve8_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, assert(((const int32_t *)filter_x)[1] != 0x800000); if (((const int32_t *)filter_x)[0] == 0) { - vpx_convolve2_horiz_dspr2(src, src_stride, dst, dst_stride, filter_x, + aom_convolve2_horiz_dspr2(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } else { uint32_t pos = 38; @@ -869,7 +869,7 @@ void vpx_convolve8_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, (int32_t)dst_stride, filter_x, (int32_t)h); break; default: - vpx_convolve8_horiz_c(src + 3, src_stride, dst, dst_stride, filter_x, + aom_convolve8_horiz_c(src + 3, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/convolve8_vert_dspr2.c b/aom_dsp/mips/convolve8_vert_dspr2.c index b4c288608343d82fe43c52f594eb6c4a7416a3e4..d8a90b6abd409207753f0d02212b6ac89b239ac9 100644 --- a/aom_dsp/mips/convolve8_vert_dspr2.c +++ b/aom_dsp/mips/convolve8_vert_dspr2.c @@ -12,10 +12,10 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/convolve_common_dspr2.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_dsp/vpx_filter.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_dsp/aom_filter.h" #include "aom_ports/mem.h" #if HAVE_DSPR2 @@ -26,7 +26,7 @@ static void convolve_vert_4_dspr2(const uint8_t *src, int32_t src_stride, int32_t x, y; const uint8_t *src_ptr; uint8_t *dst_ptr; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; uint32_t load1, load2, load3, load4; uint32_t p1, p2; @@ -174,7 +174,7 @@ static void convolve_vert_64_dspr2(const uint8_t *src, int32_t src_stride, int32_t x, y; const uint8_t *src_ptr; uint8_t *dst_ptr; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; uint32_t vector4a = 64; uint32_t load1, load2, load3, load4; uint32_t p1, p2; @@ -317,7 +317,7 @@ static void convolve_vert_64_dspr2(const uint8_t *src, int32_t src_stride, } } -void vpx_convolve8_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve8_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, @@ -326,7 +326,7 @@ void vpx_convolve8_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, assert(((const int32_t *)filter_y)[1] != 0x800000); if (((const int32_t *)filter_y)[0] == 0) { - vpx_convolve2_vert_dspr2(src, src_stride, dst, dst_stride, filter_x, + aom_convolve2_vert_dspr2(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); } else { uint32_t pos = 38; @@ -350,7 +350,7 @@ void vpx_convolve8_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, convolve_vert_64_dspr2(src, src_stride, dst, dst_stride, filter_y, h); break; default: - vpx_convolve8_vert_c(src, src_stride, dst, dst_stride, filter_x, + aom_convolve8_vert_c(src, src_stride, dst, dst_stride, filter_x, x_step_q4, filter_y, y_step_q4, w, h); break; } diff --git a/aom_dsp/mips/convolve_common_dspr2.h b/aom_dsp/mips/convolve_common_dspr2.h index d17393bc22d8d9fb0b278640f08b1465c41fb907..8f2c40bfde8e95343283b970799a2111ecc2267f 100644 --- a/aom_dsp/mips/convolve_common_dspr2.h +++ b/aom_dsp/mips/convolve_common_dspr2.h @@ -14,8 +14,8 @@ #include <assert.h> -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" #include "aom_dsp/mips/common_dspr2.h" #ifdef __cplusplus @@ -23,29 +23,29 @@ extern "C" { #endif #if HAVE_DSPR2 -void vpx_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h); -void vpx_convolve2_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_convolve2_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter, int w, int h); -void vpx_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, +void aom_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, diff --git a/aom_dsp/mips/fwd_dct32x32_msa.c b/aom_dsp/mips/fwd_dct32x32_msa.c index 29f4f3ca847d6b4f9078ed9a7ccf55e5ee3a6f6d..2fae3a7c1dfae2bb19daebe958e2386c1abe4c3b 100644 --- a/aom_dsp/mips/fwd_dct32x32_msa.c +++ b/aom_dsp/mips/fwd_dct32x32_msa.c @@ -671,7 +671,7 @@ static void fdct32x8_1d_row_4x(int16_t *tmp_buf_big, int16_t *tmp_buf, fdct8x32_1d_row_transpose_store(tmp_buf, output); } -void vpx_fdct32x32_msa(const int16_t *input, int16_t *output, +void aom_fdct32x32_msa(const int16_t *input, int16_t *output, int32_t src_stride) { int32_t i; DECLARE_ALIGNED(32, int16_t, tmp_buf_big[1024]); @@ -908,7 +908,7 @@ static void fdct32x8_1d_row_rd(int16_t *tmp_buf_big, int16_t *tmp_buf, fdct8x32_1d_row_transpose_store(tmp_buf, output); } -void vpx_fdct32x32_rd_msa(const int16_t *input, int16_t *out, +void aom_fdct32x32_rd_msa(const int16_t *input, int16_t *out, int32_t src_stride) { int32_t i; DECLARE_ALIGNED(32, int16_t, tmp_buf_big[1024]); @@ -927,7 +927,7 @@ void vpx_fdct32x32_rd_msa(const int16_t *input, int16_t *out, } } -void vpx_fdct32x32_1_msa(const int16_t *input, int16_t *out, int32_t stride) { +void aom_fdct32x32_1_msa(const int16_t *input, int16_t *out, int32_t stride) { out[1] = 0; out[0] = LD_HADD(input, stride); diff --git a/aom_dsp/mips/fwd_txfm_msa.c b/aom_dsp/mips/fwd_txfm_msa.c index c385cd75d7738a75e7e22709e33d9b5aceed7373..d9f2b1d959fd7015b3ccbb331ab971ae91145724 100644 --- a/aom_dsp/mips/fwd_txfm_msa.c +++ b/aom_dsp/mips/fwd_txfm_msa.c @@ -167,7 +167,7 @@ void fdct16x8_1d_row(int16_t *input, int16_t *output) { ST_SH8(tmp4, in4, tmp5, in5, tmp6, in6, tmp7, in7, output + 8, 16); } -void vpx_fdct4x4_msa(const int16_t *input, int16_t *output, +void aom_fdct4x4_msa(const int16_t *input, int16_t *output, int32_t src_stride) { v8i16 in0, in1, in2, in3; @@ -197,7 +197,7 @@ void vpx_fdct4x4_msa(const int16_t *input, int16_t *output, ST_SH2(in0, in2, output, 8); } -void vpx_fdct8x8_msa(const int16_t *input, int16_t *output, +void aom_fdct8x8_msa(const int16_t *input, int16_t *output, int32_t src_stride) { v8i16 in0, in1, in2, in3, in4, in5, in6, in7; @@ -216,12 +216,12 @@ void vpx_fdct8x8_msa(const int16_t *input, int16_t *output, ST_SH8(in0, in1, in2, in3, in4, in5, in6, in7, output, 8); } -void vpx_fdct8x8_1_msa(const int16_t *input, int16_t *out, int32_t stride) { +void aom_fdct8x8_1_msa(const int16_t *input, int16_t *out, int32_t stride) { out[0] = LD_HADD(input, stride); out[1] = 0; } -void vpx_fdct16x16_msa(const int16_t *input, int16_t *output, +void aom_fdct16x16_msa(const int16_t *input, int16_t *output, int32_t src_stride) { int32_t i; DECLARE_ALIGNED(32, int16_t, tmp_buf[16 * 16]); @@ -237,7 +237,7 @@ void vpx_fdct16x16_msa(const int16_t *input, int16_t *output, } } -void vpx_fdct16x16_1_msa(const int16_t *input, int16_t *out, int32_t stride) { +void aom_fdct16x16_1_msa(const int16_t *input, int16_t *out, int32_t stride) { out[1] = 0; out[0] = LD_HADD(input, stride); diff --git a/aom_dsp/mips/idct16x16_msa.c b/aom_dsp/mips/idct16x16_msa.c index fb40535dc07b2c90a9a831ea2567ee923604ba13..03008739c65dacd9f0952aa45c1c10953550ed24 100644 --- a/aom_dsp/mips/idct16x16_msa.c +++ b/aom_dsp/mips/idct16x16_msa.c @@ -11,7 +11,7 @@ #include "aom_dsp/mips/inv_txfm_msa.h" -void vpx_idct16_1d_rows_msa(const int16_t *input, int16_t *output) { +void aom_idct16_1d_rows_msa(const int16_t *input, int16_t *output) { v8i16 loc0, loc1, loc2, loc3; v8i16 reg0, reg2, reg4, reg6, reg8, reg10, reg12, reg14; v8i16 reg3, reg13, reg11, reg5, reg7, reg9, reg1, reg15; @@ -104,7 +104,7 @@ void vpx_idct16_1d_rows_msa(const int16_t *input, int16_t *output) { ST_SH8(reg3, reg13, reg11, reg5, reg7, reg9, reg1, reg15, (output + 8), 16); } -void vpx_idct16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, +void aom_idct16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride) { v8i16 loc0, loc1, loc2, loc3; v8i16 reg0, reg2, reg4, reg6, reg8, reg10, reg12, reg14; @@ -202,7 +202,7 @@ void vpx_idct16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, VPX_ADDBLK_ST8x4_UB(dst, dst_stride, reg7, reg9, reg1, reg15); } -void vpx_idct16x16_256_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct16x16_256_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { int32_t i; DECLARE_ALIGNED(32, int16_t, out_arr[16 * 16]); @@ -211,25 +211,25 @@ void vpx_idct16x16_256_add_msa(const int16_t *input, uint8_t *dst, /* transform rows */ for (i = 0; i < 2; ++i) { /* process 16 * 8 block */ - vpx_idct16_1d_rows_msa((input + (i << 7)), (out + (i << 7))); + aom_idct16_1d_rows_msa((input + (i << 7)), (out + (i << 7))); } /* transform columns */ for (i = 0; i < 2; ++i) { /* process 8 * 16 block */ - vpx_idct16_1d_columns_addblk_msa((out + (i << 3)), (dst + (i << 3)), + aom_idct16_1d_columns_addblk_msa((out + (i << 3)), (dst + (i << 3)), dst_stride); } } -void vpx_idct16x16_10_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct16x16_10_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { uint8_t i; DECLARE_ALIGNED(32, int16_t, out_arr[16 * 16]); int16_t *out = out_arr; /* process 16 * 8 block */ - vpx_idct16_1d_rows_msa(input, out); + aom_idct16_1d_rows_msa(input, out); /* short case just considers top 4 rows as valid output */ out += 4 * 16; @@ -255,12 +255,12 @@ void vpx_idct16x16_10_add_msa(const int16_t *input, uint8_t *dst, /* transform columns */ for (i = 0; i < 2; ++i) { /* process 8 * 16 block */ - vpx_idct16_1d_columns_addblk_msa((out + (i << 3)), (dst + (i << 3)), + aom_idct16_1d_columns_addblk_msa((out + (i << 3)), (dst + (i << 3)), dst_stride); } } -void vpx_idct16x16_1_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct16x16_1_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { uint8_t i; int16_t out; @@ -290,7 +290,7 @@ void vpx_idct16x16_1_add_msa(const int16_t *input, uint8_t *dst, } } -void vpx_iadst16_1d_rows_msa(const int16_t *input, int16_t *output) { +void aom_iadst16_1d_rows_msa(const int16_t *input, int16_t *output) { v8i16 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15; v8i16 l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14, l15; @@ -320,7 +320,7 @@ void vpx_iadst16_1d_rows_msa(const int16_t *input, int16_t *output) { ST_SH8(l8, l9, l10, l11, l12, l13, l14, l15, (output + 8), 16); } -void vpx_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, +void aom_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride) { v8i16 v0, v2, v4, v6, k0, k1, k2, k3; v8i16 r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15; diff --git a/aom_dsp/mips/idct32x32_msa.c b/aom_dsp/mips/idct32x32_msa.c index 239edc30dbbf1eb9f74ce439b09998a9b3703625..61a54a2c4cf3cd44289f9a20be3d25f3d858b30a 100644 --- a/aom_dsp/mips/idct32x32_msa.c +++ b/aom_dsp/mips/idct32x32_msa.c @@ -630,7 +630,7 @@ static void idct8x32_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, dst_stride); } -void vpx_idct32x32_1024_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct32x32_1024_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { int32_t i; DECLARE_ALIGNED(32, int16_t, out_arr[32 * 32]); @@ -650,7 +650,7 @@ void vpx_idct32x32_1024_add_msa(const int16_t *input, uint8_t *dst, } } -void vpx_idct32x32_34_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct32x32_34_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { int32_t i; DECLARE_ALIGNED(32, int16_t, out_arr[32 * 32]); @@ -694,7 +694,7 @@ void vpx_idct32x32_34_add_msa(const int16_t *input, uint8_t *dst, } } -void vpx_idct32x32_1_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct32x32_1_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { int32_t i; int16_t out; diff --git a/aom_dsp/mips/idct4x4_msa.c b/aom_dsp/mips/idct4x4_msa.c index 344be0bbb79718bae919ffb82b38a96c97bc5321..f4d8dfa7817029622c3a72bea2a21335cd486d69 100644 --- a/aom_dsp/mips/idct4x4_msa.c +++ b/aom_dsp/mips/idct4x4_msa.c @@ -11,7 +11,7 @@ #include "aom_dsp/mips/inv_txfm_msa.h" -void vpx_iwht4x4_16_add_msa(const int16_t *input, uint8_t *dst, +void aom_iwht4x4_16_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { v8i16 in0, in1, in2, in3; v4i32 in0_r, in1_r, in2_r, in3_r, in4_r; @@ -48,7 +48,7 @@ void vpx_iwht4x4_16_add_msa(const int16_t *input, uint8_t *dst, ADDBLK_ST4x4_UB(in0, in3, in1, in2, dst, dst_stride); } -void vpx_iwht4x4_1_add_msa(const int16_t *input, uint8_t *dst, +void aom_iwht4x4_1_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { int16_t a1, e1; v8i16 in1, in0 = { 0 }; @@ -68,7 +68,7 @@ void vpx_iwht4x4_1_add_msa(const int16_t *input, uint8_t *dst, ADDBLK_ST4x4_UB(in0, in1, in1, in1, dst, dst_stride); } -void vpx_idct4x4_16_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct4x4_16_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { v8i16 in0, in1, in2, in3; @@ -85,7 +85,7 @@ void vpx_idct4x4_16_add_msa(const int16_t *input, uint8_t *dst, ADDBLK_ST4x4_UB(in0, in1, in2, in3, dst, dst_stride); } -void vpx_idct4x4_1_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct4x4_1_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { int16_t out; v8i16 vec; diff --git a/aom_dsp/mips/idct8x8_msa.c b/aom_dsp/mips/idct8x8_msa.c index f2ff15d66a5ea6bf4df47e80be14cb90b8ad8474..a9e933208be0c13296f909f7f1a512723b1e8c40 100644 --- a/aom_dsp/mips/idct8x8_msa.c +++ b/aom_dsp/mips/idct8x8_msa.c @@ -11,7 +11,7 @@ #include "aom_dsp/mips/inv_txfm_msa.h" -void vpx_idct8x8_64_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct8x8_64_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { v8i16 in0, in1, in2, in3, in4, in5, in6, in7; @@ -39,7 +39,7 @@ void vpx_idct8x8_64_add_msa(const int16_t *input, uint8_t *dst, VPX_ADDBLK_ST8x4_UB(dst, dst_stride, in4, in5, in6, in7); } -void vpx_idct8x8_12_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct8x8_12_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { v8i16 in0, in1, in2, in3, in4, in5, in6, in7; v8i16 s0, s1, s2, s3, s4, s5, s6, s7, k0, k1, k2, k3, m0, m1, m2, m3; @@ -100,7 +100,7 @@ void vpx_idct8x8_12_add_msa(const int16_t *input, uint8_t *dst, VPX_ADDBLK_ST8x4_UB(dst, dst_stride, in4, in5, in6, in7); } -void vpx_idct8x8_1_add_msa(const int16_t *input, uint8_t *dst, +void aom_idct8x8_1_add_msa(const int16_t *input, uint8_t *dst, int32_t dst_stride) { int16_t out; int32_t val; diff --git a/aom_dsp/mips/intrapred16_dspr2.c b/aom_dsp/mips/intrapred16_dspr2.c index 2784460bdaa1523d30f4022dace0962d87249a85..dc8f20208a610d1d5ed8040219754a4d8254192d 100644 --- a/aom_dsp/mips/intrapred16_dspr2.c +++ b/aom_dsp/mips/intrapred16_dspr2.c @@ -12,7 +12,7 @@ #include "aom_dsp/mips/common_dspr2.h" #if HAVE_DSPR2 -void vpx_h_predictor_16x16_dspr2(uint8_t *dst, ptrdiff_t stride, +void aom_h_predictor_16x16_dspr2(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int32_t tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8; int32_t tmp9, tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; @@ -156,7 +156,7 @@ void vpx_h_predictor_16x16_dspr2(uint8_t *dst, ptrdiff_t stride, : [left] "r"(left), [dst] "r"(dst), [stride] "r"(stride)); } -void vpx_dc_predictor_16x16_dspr2(uint8_t *dst, ptrdiff_t stride, +void aom_dc_predictor_16x16_dspr2(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int32_t expected_dc; int32_t average; diff --git a/aom_dsp/mips/intrapred4_dspr2.c b/aom_dsp/mips/intrapred4_dspr2.c index e142277bc9d508a17b0b64c33ec807ea51e07462..ea7c02810a6ce75bba425a3ba9b09149f96798c5 100644 --- a/aom_dsp/mips/intrapred4_dspr2.c +++ b/aom_dsp/mips/intrapred4_dspr2.c @@ -12,7 +12,7 @@ #include "aom_dsp/mips/common_dspr2.h" #if HAVE_DSPR2 -void vpx_h_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, +void aom_h_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int32_t tmp1, tmp2, tmp3, tmp4; @@ -38,7 +38,7 @@ void vpx_h_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, : [left] "r"(left), [dst] "r"(dst), [stride] "r"(stride)); } -void vpx_dc_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, +void aom_dc_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int32_t expected_dc; int32_t average; @@ -79,7 +79,7 @@ void vpx_dc_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, [stride] "r"(stride)); } -void vpx_tm_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, +void aom_tm_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int32_t abovel, abover; int32_t left0, left1, left2, left3; @@ -87,7 +87,7 @@ void vpx_tm_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, int32_t resl; int32_t resr; int32_t top_left; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; __asm__ __volatile__( "ulw %[resl], (%[above]) \n\t" diff --git a/aom_dsp/mips/intrapred8_dspr2.c b/aom_dsp/mips/intrapred8_dspr2.c index 0bf4bd317e4438d62e01df9404c0ed28c77e35a7..1114fbc0065611cc188a395ab6e2d3f806993a15 100644 --- a/aom_dsp/mips/intrapred8_dspr2.c +++ b/aom_dsp/mips/intrapred8_dspr2.c @@ -12,7 +12,7 @@ #include "aom_dsp/mips/common_dspr2.h" #if HAVE_DSPR2 -void vpx_h_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, +void aom_h_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int32_t tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8; @@ -65,7 +65,7 @@ void vpx_h_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, : [left] "r"(left), [dst] "r"(dst), [stride] "r"(stride)); } -void vpx_dc_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, +void aom_dc_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int32_t expected_dc; int32_t average; @@ -147,7 +147,7 @@ void vpx_dc_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, [stride] "r"(stride)); } -void vpx_tm_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, +void aom_tm_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int32_t abovel, abover; int32_t abovel_1, abover_1; @@ -155,7 +155,7 @@ void vpx_tm_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, int32_t res0, res1, res2, res3; int32_t reshw; int32_t top_left; - uint8_t *cm = vpx_ff_cropTbl; + uint8_t *cm = aom_ff_cropTbl; __asm__ __volatile__( "ulw %[reshw], (%[above]) \n\t" diff --git a/aom_dsp/mips/intrapred_msa.c b/aom_dsp/mips/intrapred_msa.c index 5ab9205077342fc3e05e801fd47588b53ecbeefe..e8eaec7a940e2f9bfa298be3f8ab17fa07e1fa27 100644 --- a/aom_dsp/mips/intrapred_msa.c +++ b/aom_dsp/mips/intrapred_msa.c @@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/macros_msa.h" #define IPRED_SUBS_UH2_UH(in0, in1, out0, out1) \ @@ -552,125 +552,125 @@ static void intra_predict_tm_32x32_msa(const uint8_t *src_top, } } -void vpx_v_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_v_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)left; intra_predict_vert_4x4_msa(above, dst, y_stride); } -void vpx_v_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_v_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)left; intra_predict_vert_8x8_msa(above, dst, y_stride); } -void vpx_v_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_v_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)left; intra_predict_vert_16x16_msa(above, dst, y_stride); } -void vpx_v_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_v_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)left; intra_predict_vert_32x32_msa(above, dst, y_stride); } -void vpx_h_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_h_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; intra_predict_horiz_4x4_msa(left, dst, y_stride); } -void vpx_h_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_h_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; intra_predict_horiz_8x8_msa(left, dst, y_stride); } -void vpx_h_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_h_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; intra_predict_horiz_16x16_msa(left, dst, y_stride); } -void vpx_h_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_h_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; intra_predict_horiz_32x32_msa(left, dst, y_stride); } -void vpx_dc_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { intra_predict_dc_4x4_msa(above, left, dst, y_stride); } -void vpx_dc_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { intra_predict_dc_8x8_msa(above, left, dst, y_stride); } -void vpx_dc_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { intra_predict_dc_16x16_msa(above, left, dst, y_stride); } -void vpx_dc_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { intra_predict_dc_32x32_msa(above, left, dst, y_stride); } -void vpx_dc_top_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_top_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)left; intra_predict_dc_tl_4x4_msa(above, dst, y_stride); } -void vpx_dc_top_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_top_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)left; intra_predict_dc_tl_8x8_msa(above, dst, y_stride); } -void vpx_dc_top_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_top_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)left; intra_predict_dc_tl_16x16_msa(above, dst, y_stride); } -void vpx_dc_top_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_top_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)left; intra_predict_dc_tl_32x32_msa(above, dst, y_stride); } -void vpx_dc_left_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_left_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; intra_predict_dc_tl_4x4_msa(left, dst, y_stride); } -void vpx_dc_left_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_left_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; intra_predict_dc_tl_8x8_msa(left, dst, y_stride); } -void vpx_dc_left_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_left_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; @@ -678,7 +678,7 @@ void vpx_dc_left_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, intra_predict_dc_tl_16x16_msa(left, dst, y_stride); } -void vpx_dc_left_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_left_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; @@ -686,7 +686,7 @@ void vpx_dc_left_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, intra_predict_dc_tl_32x32_msa(left, dst, y_stride); } -void vpx_dc_128_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_128_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; (void)left; @@ -694,7 +694,7 @@ void vpx_dc_128_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, intra_predict_128dc_4x4_msa(dst, y_stride); } -void vpx_dc_128_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_128_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; (void)left; @@ -702,7 +702,7 @@ void vpx_dc_128_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, intra_predict_128dc_8x8_msa(dst, y_stride); } -void vpx_dc_128_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_128_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; (void)left; @@ -710,7 +710,7 @@ void vpx_dc_128_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, intra_predict_128dc_16x16_msa(dst, y_stride); } -void vpx_dc_128_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_dc_128_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)above; (void)left; @@ -718,22 +718,22 @@ void vpx_dc_128_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, intra_predict_128dc_32x32_msa(dst, y_stride); } -void vpx_tm_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_tm_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { intra_predict_tm_4x4_msa(above, left, dst, y_stride); } -void vpx_tm_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_tm_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { intra_predict_tm_8x8_msa(above, left, dst, y_stride); } -void vpx_tm_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_tm_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { intra_predict_tm_16x16_msa(above, left, dst, y_stride); } -void vpx_tm_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, +void aom_tm_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { intra_predict_tm_32x32_msa(above, left, dst, y_stride); } diff --git a/aom_dsp/mips/inv_txfm_dspr2.h b/aom_dsp/mips/inv_txfm_dspr2.h index 17664c276a08d33c2bb2b8608002473a4ee64431..e7425744f81d3840e3363141ffb0db1db9b2fea7 100644 --- a/aom_dsp/mips/inv_txfm_dspr2.h +++ b/aom_dsp/mips/inv_txfm_dspr2.h @@ -14,8 +14,8 @@ #include <assert.h> -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" #include "aom_dsp/inv_txfm.h" #include "aom_dsp/mips/common_dspr2.h" @@ -59,10 +59,10 @@ extern "C" { out; \ }) -void vpx_idct32_cols_add_blk_dspr2(int16_t *input, uint8_t *dest, +void aom_idct32_cols_add_blk_dspr2(int16_t *input, uint8_t *dest, int dest_stride); -void vpx_idct4_rows_dspr2(const int16_t *input, int16_t *output); -void vpx_idct4_columns_add_blk_dspr2(int16_t *input, uint8_t *dest, +void aom_idct4_rows_dspr2(const int16_t *input, int16_t *output); +void aom_idct4_columns_add_blk_dspr2(int16_t *input, uint8_t *dest, int dest_stride); void iadst4_dspr2(const int16_t *input, int16_t *output); void idct8_rows_dspr2(const int16_t *input, int16_t *output, uint32_t no_rows); diff --git a/aom_dsp/mips/inv_txfm_msa.h b/aom_dsp/mips/inv_txfm_msa.h index 3e1f9b6d886e8f91c176c753a7f3097a99922619..c8950ba451d9d435d17dfbd4be007f4935d28771 100644 --- a/aom_dsp/mips/inv_txfm_msa.h +++ b/aom_dsp/mips/inv_txfm_msa.h @@ -403,10 +403,10 @@ MADD_SHORT(out14, out15, k1_m, k2_m, out14, out15); \ } -void vpx_idct16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, +void aom_idct16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride); -void vpx_idct16_1d_rows_msa(const int16_t *input, int16_t *output); -void vpx_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, +void aom_idct16_1d_rows_msa(const int16_t *input, int16_t *output); +void aom_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst, int32_t dst_stride); -void vpx_iadst16_1d_rows_msa(const int16_t *input, int16_t *output); +void aom_iadst16_1d_rows_msa(const int16_t *input, int16_t *output); #endif // VPX_DSP_MIPS_INV_TXFM_MSA_H_ diff --git a/aom_dsp/mips/itrans16_dspr2.c b/aom_dsp/mips/itrans16_dspr2.c index 2774dc18149c30c1c7a3f96318db7b9c2cedb9b8..c63b1e8570642d1f68ca9e9ab0299f282db2a7f6 100644 --- a/aom_dsp/mips/itrans16_dspr2.c +++ b/aom_dsp/mips/itrans16_dspr2.c @@ -9,8 +9,8 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/inv_txfm_dspr2.h" #include "aom_dsp/txfm_common.h" @@ -402,17 +402,17 @@ void idct16_cols_add_blk_dspr2(int16_t *input, uint8_t *dest, int dest_stride) { int result1, result2, result3, result4; const int const_2_power_13 = 8192; uint8_t *dest_pix; - uint8_t *cm = vpx_ff_cropTbl; - - /* prefetch vpx_ff_cropTbl */ - prefetch_load(vpx_ff_cropTbl); - prefetch_load(vpx_ff_cropTbl + 32); - prefetch_load(vpx_ff_cropTbl + 64); - prefetch_load(vpx_ff_cropTbl + 96); - prefetch_load(vpx_ff_cropTbl + 128); - prefetch_load(vpx_ff_cropTbl + 160); - prefetch_load(vpx_ff_cropTbl + 192); - prefetch_load(vpx_ff_cropTbl + 224); + uint8_t *cm = aom_ff_cropTbl; + + /* prefetch aom_ff_cropTbl */ + prefetch_load(aom_ff_cropTbl); + prefetch_load(aom_ff_cropTbl + 32); + prefetch_load(aom_ff_cropTbl + 64); + prefetch_load(aom_ff_cropTbl + 96); + prefetch_load(aom_ff_cropTbl + 128); + prefetch_load(aom_ff_cropTbl + 160); + prefetch_load(aom_ff_cropTbl + 192); + prefetch_load(aom_ff_cropTbl + 224); for (i = 0; i < 16; ++i) { dest_pix = (dest + i); @@ -869,7 +869,7 @@ void idct16_cols_add_blk_dspr2(int16_t *input, uint8_t *dest, int dest_stride) { } } -void vpx_idct16x16_256_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct16x16_256_add_dspr2(const int16_t *input, uint8_t *dest, int dest_stride) { DECLARE_ALIGNED(32, int16_t, out[16 * 16]); uint32_t pos = 45; @@ -884,7 +884,7 @@ void vpx_idct16x16_256_add_dspr2(const int16_t *input, uint8_t *dest, idct16_cols_add_blk_dspr2(out, dest, dest_stride); } -void vpx_idct16x16_10_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct16x16_10_add_dspr2(const int16_t *input, uint8_t *dest, int dest_stride) { DECLARE_ALIGNED(32, int16_t, out[16 * 16]); int16_t *outptr = out; @@ -928,7 +928,7 @@ void vpx_idct16x16_10_add_dspr2(const int16_t *input, uint8_t *dest, idct16_cols_add_blk_dspr2(out, dest, dest_stride); } -void vpx_idct16x16_1_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct16x16_1_add_dspr2(const int16_t *input, uint8_t *dest, int dest_stride) { uint32_t pos = 45; int32_t out; diff --git a/aom_dsp/mips/itrans32_cols_dspr2.c b/aom_dsp/mips/itrans32_cols_dspr2.c index 6373b08aaa09ee1a87f173054369321f111a4797..d469d1ad0b1401088c677ba6cd5154a0871c9168 100644 --- a/aom_dsp/mips/itrans32_cols_dspr2.c +++ b/aom_dsp/mips/itrans32_cols_dspr2.c @@ -9,12 +9,12 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/mips/inv_txfm_dspr2.h" #include "aom_dsp/txfm_common.h" #if HAVE_DSPR2 -void vpx_idct32_cols_add_blk_dspr2(int16_t *input, uint8_t *dest, +void aom_idct32_cols_add_blk_dspr2(int16_t *input, uint8_t *dest, int dest_stride) { int16_t step1_0, step1_1, step1_2, step1_3, step1_4, step1_5, step1_6; int16_t step1_7, step1_8, step1_9, step1_10, step1_11, step1_12, step1_13; @@ -36,17 +36,17 @@ void vpx_idct32_cols_add_blk_dspr2(int16_t *input, uint8_t *dest, int i, temp21; uint8_t *dest_pix, *dest_pix1; const int const_2_power_13 = 8192; - uint8_t *cm = vpx_ff_cropTbl; - - /* prefetch vpx_ff_cropTbl */ - prefetch_load(vpx_ff_cropTbl); - prefetch_load(vpx_ff_cropTbl + 32); - prefetch_load(vpx_ff_cropTbl + 64); - prefetch_load(vpx_ff_cropTbl + 96); - prefetch_load(vpx_ff_cropTbl + 128); - prefetch_load(vpx_ff_cropTbl + 160); - prefetch_load(vpx_ff_cropTbl + 192); - prefetch_load(vpx_ff_cropTbl + 224); + uint8_t *cm = aom_ff_cropTbl; + + /* prefetch aom_ff_cropTbl */ + prefetch_load(aom_ff_cropTbl); + prefetch_load(aom_ff_cropTbl + 32); + prefetch_load(aom_ff_cropTbl + 64); + prefetch_load(aom_ff_cropTbl + 96); + prefetch_load(aom_ff_cropTbl + 128); + prefetch_load(aom_ff_cropTbl + 160); + prefetch_load(aom_ff_cropTbl + 192); + prefetch_load(aom_ff_cropTbl + 224); for (i = 0; i < 32; ++i) { dest_pix = dest + i; diff --git a/aom_dsp/mips/itrans32_dspr2.c b/aom_dsp/mips/itrans32_dspr2.c index 3c04dead83015a87b82e423c6765461f1b03ae9c..fa77032176df1ac1d22d01a370feae0fd7500ddf 100644 --- a/aom_dsp/mips/itrans32_dspr2.c +++ b/aom_dsp/mips/itrans32_dspr2.c @@ -12,7 +12,7 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/mips/inv_txfm_dspr2.h" #include "aom_dsp/txfm_common.h" @@ -836,7 +836,7 @@ static void idct32_rows_dspr2(const int16_t *input, int16_t *output, } } -void vpx_idct32x32_1024_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct32x32_1024_add_dspr2(const int16_t *input, uint8_t *dest, int dest_stride) { DECLARE_ALIGNED(32, int16_t, out[32 * 32]); int16_t *outptr = out; @@ -851,10 +851,10 @@ void vpx_idct32x32_1024_add_dspr2(const int16_t *input, uint8_t *dest, idct32_rows_dspr2(input, outptr, 32); // Columns - vpx_idct32_cols_add_blk_dspr2(out, dest, dest_stride); + aom_idct32_cols_add_blk_dspr2(out, dest, dest_stride); } -void vpx_idct32x32_34_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct32x32_34_add_dspr2(const int16_t *input, uint8_t *dest, int stride) { DECLARE_ALIGNED(32, int16_t, out[32 * 32]); int16_t *outptr = out; @@ -909,10 +909,10 @@ void vpx_idct32x32_34_add_dspr2(const int16_t *input, uint8_t *dest, } // Columns - vpx_idct32_cols_add_blk_dspr2(out, dest, stride); + aom_idct32_cols_add_blk_dspr2(out, dest, stride); } -void vpx_idct32x32_1_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct32x32_1_add_dspr2(const int16_t *input, uint8_t *dest, int stride) { int r, out; int32_t a1, absa1; diff --git a/aom_dsp/mips/itrans4_dspr2.c b/aom_dsp/mips/itrans4_dspr2.c index ea5996450d9f8a96843b15e09a63a878f63288ba..e6d0367cd2f024309c5513bd20edbd33073cc21b 100644 --- a/aom_dsp/mips/itrans4_dspr2.c +++ b/aom_dsp/mips/itrans4_dspr2.c @@ -9,13 +9,13 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/inv_txfm_dspr2.h" #include "aom_dsp/txfm_common.h" #if HAVE_DSPR2 -void vpx_idct4_rows_dspr2(const int16_t *input, int16_t *output) { +void aom_idct4_rows_dspr2(const int16_t *input, int16_t *output) { int16_t step_0, step_1, step_2, step_3; int Temp0, Temp1, Temp2, Temp3; const int const_2_power_13 = 8192; @@ -96,24 +96,24 @@ void vpx_idct4_rows_dspr2(const int16_t *input, int16_t *output) { } } -void vpx_idct4_columns_add_blk_dspr2(int16_t *input, uint8_t *dest, +void aom_idct4_columns_add_blk_dspr2(int16_t *input, uint8_t *dest, int dest_stride) { int16_t step_0, step_1, step_2, step_3; int Temp0, Temp1, Temp2, Temp3; const int const_2_power_13 = 8192; int i; uint8_t *dest_pix; - uint8_t *cm = vpx_ff_cropTbl; - - /* prefetch vpx_ff_cropTbl */ - prefetch_load(vpx_ff_cropTbl); - prefetch_load(vpx_ff_cropTbl + 32); - prefetch_load(vpx_ff_cropTbl + 64); - prefetch_load(vpx_ff_cropTbl + 96); - prefetch_load(vpx_ff_cropTbl + 128); - prefetch_load(vpx_ff_cropTbl + 160); - prefetch_load(vpx_ff_cropTbl + 192); - prefetch_load(vpx_ff_cropTbl + 224); + uint8_t *cm = aom_ff_cropTbl; + + /* prefetch aom_ff_cropTbl */ + prefetch_load(aom_ff_cropTbl); + prefetch_load(aom_ff_cropTbl + 32); + prefetch_load(aom_ff_cropTbl + 64); + prefetch_load(aom_ff_cropTbl + 96); + prefetch_load(aom_ff_cropTbl + 128); + prefetch_load(aom_ff_cropTbl + 160); + prefetch_load(aom_ff_cropTbl + 192); + prefetch_load(aom_ff_cropTbl + 224); for (i = 0; i < 4; ++i) { dest_pix = (dest + i); @@ -216,7 +216,7 @@ void vpx_idct4_columns_add_blk_dspr2(int16_t *input, uint8_t *dest, } } -void vpx_idct4x4_16_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct4x4_16_add_dspr2(const int16_t *input, uint8_t *dest, int dest_stride) { DECLARE_ALIGNED(32, int16_t, out[4 * 4]); int16_t *outptr = out; @@ -228,13 +228,13 @@ void vpx_idct4x4_16_add_dspr2(const int16_t *input, uint8_t *dest, : [pos] "r"(pos)); // Rows - vpx_idct4_rows_dspr2(input, outptr); + aom_idct4_rows_dspr2(input, outptr); // Columns - vpx_idct4_columns_add_blk_dspr2(&out[0], dest, dest_stride); + aom_idct4_columns_add_blk_dspr2(&out[0], dest, dest_stride); } -void vpx_idct4x4_1_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct4x4_1_add_dspr2(const int16_t *input, uint8_t *dest, int dest_stride) { int a1, absa1; int r; diff --git a/aom_dsp/mips/itrans8_dspr2.c b/aom_dsp/mips/itrans8_dspr2.c index 3781dbe3ecf387905f4c0f2e16206fb5530c11f8..0a20f76f2d97d5fc346b16e0c43715ab16426349 100644 --- a/aom_dsp/mips/itrans8_dspr2.c +++ b/aom_dsp/mips/itrans8_dspr2.c @@ -9,8 +9,8 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/inv_txfm_dspr2.h" #include "aom_dsp/txfm_common.h" @@ -200,17 +200,17 @@ void idct8_columns_add_blk_dspr2(int16_t *input, uint8_t *dest, int i; const int const_2_power_13 = 8192; uint8_t *dest_pix; - uint8_t *cm = vpx_ff_cropTbl; - - /* prefetch vpx_ff_cropTbl */ - prefetch_load(vpx_ff_cropTbl); - prefetch_load(vpx_ff_cropTbl + 32); - prefetch_load(vpx_ff_cropTbl + 64); - prefetch_load(vpx_ff_cropTbl + 96); - prefetch_load(vpx_ff_cropTbl + 128); - prefetch_load(vpx_ff_cropTbl + 160); - prefetch_load(vpx_ff_cropTbl + 192); - prefetch_load(vpx_ff_cropTbl + 224); + uint8_t *cm = aom_ff_cropTbl; + + /* prefetch aom_ff_cropTbl */ + prefetch_load(aom_ff_cropTbl); + prefetch_load(aom_ff_cropTbl + 32); + prefetch_load(aom_ff_cropTbl + 64); + prefetch_load(aom_ff_cropTbl + 96); + prefetch_load(aom_ff_cropTbl + 128); + prefetch_load(aom_ff_cropTbl + 160); + prefetch_load(aom_ff_cropTbl + 192); + prefetch_load(aom_ff_cropTbl + 224); for (i = 0; i < 8; ++i) { dest_pix = (dest + i); @@ -439,7 +439,7 @@ void idct8_columns_add_blk_dspr2(int16_t *input, uint8_t *dest, } } -void vpx_idct8x8_64_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct8x8_64_add_dspr2(const int16_t *input, uint8_t *dest, int dest_stride) { DECLARE_ALIGNED(32, int16_t, out[8 * 8]); int16_t *outptr = out; @@ -455,7 +455,7 @@ void vpx_idct8x8_64_add_dspr2(const int16_t *input, uint8_t *dest, idct8_columns_add_blk_dspr2(&out[0], dest, dest_stride); } -void vpx_idct8x8_12_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct8x8_12_add_dspr2(const int16_t *input, uint8_t *dest, int dest_stride) { DECLARE_ALIGNED(32, int16_t, out[8 * 8]); int16_t *outptr = out; @@ -494,7 +494,7 @@ void vpx_idct8x8_12_add_dspr2(const int16_t *input, uint8_t *dest, idct8_columns_add_blk_dspr2(&out[0], dest, dest_stride); } -void vpx_idct8x8_1_add_dspr2(const int16_t *input, uint8_t *dest, +void aom_idct8x8_1_add_dspr2(const int16_t *input, uint8_t *dest, int dest_stride) { uint32_t pos = 45; int32_t out; diff --git a/aom_dsp/mips/loopfilter_16_msa.c b/aom_dsp/mips/loopfilter_16_msa.c index c408af1e980d1387d6cc00522a9684794e7ce84c..b3c3fd3aec81d71b9b846c9893c891724923a177 100644 --- a/aom_dsp/mips/loopfilter_16_msa.c +++ b/aom_dsp/mips/loopfilter_16_msa.c @@ -12,7 +12,7 @@ #include "aom_ports/mem.h" #include "aom_dsp/mips/loopfilter_msa.h" -int32_t vpx_hz_lpf_t4_and_t8_16w(uint8_t *src, int32_t pitch, uint8_t *filter48, +int32_t aom_hz_lpf_t4_and_t8_16w(uint8_t *src, int32_t pitch, uint8_t *filter48, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, const uint8_t *thresh_ptr) { @@ -78,7 +78,7 @@ int32_t vpx_hz_lpf_t4_and_t8_16w(uint8_t *src, int32_t pitch, uint8_t *filter48, } } -void vpx_hz_lpf_t16_16w(uint8_t *src, int32_t pitch, uint8_t *filter48) { +void aom_hz_lpf_t16_16w(uint8_t *src, int32_t pitch, uint8_t *filter48) { v16u8 flat, flat2, filter8; v16i8 zero = { 0 }; v16u8 p7, p6, p5, p4, p3, p2, p1, p0, q0, q1, q2, q3, q4, q5, q6, q7; @@ -404,7 +404,7 @@ void vpx_hz_lpf_t16_16w(uint8_t *src, int32_t pitch, uint8_t *filter48) { } } -void vpx_lpf_horizontal_16_dual_msa(uint8_t *src, int32_t pitch, +void aom_lpf_horizontal_16_dual_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, const uint8_t *thresh_ptr, int32_t count) { @@ -413,15 +413,15 @@ void vpx_lpf_horizontal_16_dual_msa(uint8_t *src, int32_t pitch, (void)count; - early_exit = vpx_hz_lpf_t4_and_t8_16w(src, pitch, &filter48[0], b_limit_ptr, + early_exit = aom_hz_lpf_t4_and_t8_16w(src, pitch, &filter48[0], b_limit_ptr, limit_ptr, thresh_ptr); if (0 == early_exit) { - vpx_hz_lpf_t16_16w(src, pitch, filter48); + aom_hz_lpf_t16_16w(src, pitch, filter48); } } -void vpx_lpf_horizontal_16_msa(uint8_t *src, int32_t pitch, +void aom_lpf_horizontal_16_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, const uint8_t *thresh_ptr, int32_t count) { @@ -639,7 +639,7 @@ void vpx_lpf_horizontal_16_msa(uint8_t *src, int32_t pitch, } } } else { - vpx_lpf_horizontal_16_dual_msa(src, pitch, b_limit_ptr, limit_ptr, + aom_lpf_horizontal_16_dual_msa(src, pitch, b_limit_ptr, limit_ptr, thresh_ptr, count); } } @@ -739,7 +739,7 @@ static void transpose_16x16(uint8_t *input, int32_t in_pitch, uint8_t *output, ST_UB8(q0, q1, q2, q3, q4, q5, q6, q7, output, out_pitch); } -int32_t vpx_vt_lpf_t4_and_t8_8w(uint8_t *src, uint8_t *filter48, +int32_t aom_vt_lpf_t4_and_t8_8w(uint8_t *src, uint8_t *filter48, uint8_t *src_org, int32_t pitch_org, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, @@ -806,7 +806,7 @@ int32_t vpx_vt_lpf_t4_and_t8_8w(uint8_t *src, uint8_t *filter48, } } -int32_t vpx_vt_lpf_t16_8w(uint8_t *src, uint8_t *src_org, int32_t pitch, +int32_t aom_vt_lpf_t16_8w(uint8_t *src, uint8_t *src_org, int32_t pitch, uint8_t *filter48) { v16i8 zero = { 0 }; v16u8 filter8, flat, flat2; @@ -1026,7 +1026,7 @@ int32_t vpx_vt_lpf_t16_8w(uint8_t *src, uint8_t *src_org, int32_t pitch, } } -void vpx_lpf_vertical_16_msa(uint8_t *src, int32_t pitch, +void aom_lpf_vertical_16_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, const uint8_t *thresh_ptr) { @@ -1037,11 +1037,11 @@ void vpx_lpf_vertical_16_msa(uint8_t *src, int32_t pitch, transpose_16x8_to_8x16(src - 8, pitch, transposed_input, 16); early_exit = - vpx_vt_lpf_t4_and_t8_8w((transposed_input + 16 * 8), &filter48[0], src, + aom_vt_lpf_t4_and_t8_8w((transposed_input + 16 * 8), &filter48[0], src, pitch, b_limit_ptr, limit_ptr, thresh_ptr); if (0 == early_exit) { - early_exit = vpx_vt_lpf_t16_8w((transposed_input + 16 * 8), src, pitch, + early_exit = aom_vt_lpf_t16_8w((transposed_input + 16 * 8), src, pitch, &filter48[0]); if (0 == early_exit) { @@ -1050,7 +1050,7 @@ void vpx_lpf_vertical_16_msa(uint8_t *src, int32_t pitch, } } -int32_t vpx_vt_lpf_t4_and_t8_16w(uint8_t *src, uint8_t *filter48, +int32_t aom_vt_lpf_t4_and_t8_16w(uint8_t *src, uint8_t *filter48, uint8_t *src_org, int32_t pitch, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, @@ -1127,7 +1127,7 @@ int32_t vpx_vt_lpf_t4_and_t8_16w(uint8_t *src, uint8_t *filter48, } } -int32_t vpx_vt_lpf_t16_16w(uint8_t *src, uint8_t *src_org, int32_t pitch, +int32_t aom_vt_lpf_t16_16w(uint8_t *src, uint8_t *src_org, int32_t pitch, uint8_t *filter48) { v16u8 flat, flat2, filter8; v16i8 zero = { 0 }; @@ -1448,7 +1448,7 @@ int32_t vpx_vt_lpf_t16_16w(uint8_t *src, uint8_t *src_org, int32_t pitch, } } -void vpx_lpf_vertical_16_dual_msa(uint8_t *src, int32_t pitch, +void aom_lpf_vertical_16_dual_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, const uint8_t *thresh_ptr) { @@ -1459,11 +1459,11 @@ void vpx_lpf_vertical_16_dual_msa(uint8_t *src, int32_t pitch, transpose_16x16((src - 8), pitch, &transposed_input[0], 16); early_exit = - vpx_vt_lpf_t4_and_t8_16w((transposed_input + 16 * 8), &filter48[0], src, + aom_vt_lpf_t4_and_t8_16w((transposed_input + 16 * 8), &filter48[0], src, pitch, b_limit_ptr, limit_ptr, thresh_ptr); if (0 == early_exit) { - early_exit = vpx_vt_lpf_t16_16w((transposed_input + 16 * 8), src, pitch, + early_exit = aom_vt_lpf_t16_16w((transposed_input + 16 * 8), src, pitch, &filter48[0]); if (0 == early_exit) { diff --git a/aom_dsp/mips/loopfilter_4_msa.c b/aom_dsp/mips/loopfilter_4_msa.c index 785798ecfa19feccefe7d29c8f93abeb59bb549d..c1877d34b62c933e59890111f758cff65d734a00 100644 --- a/aom_dsp/mips/loopfilter_4_msa.c +++ b/aom_dsp/mips/loopfilter_4_msa.c @@ -11,7 +11,7 @@ #include "aom_dsp/mips/loopfilter_msa.h" -void vpx_lpf_horizontal_4_msa(uint8_t *src, int32_t pitch, +void aom_lpf_horizontal_4_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, const uint8_t *thresh_ptr, int32_t count) { @@ -39,7 +39,7 @@ void vpx_lpf_horizontal_4_msa(uint8_t *src, int32_t pitch, SD4(p1_d, p0_d, q0_d, q1_d, (src - 2 * pitch), pitch); } -void vpx_lpf_horizontal_4_dual_msa(uint8_t *src, int32_t pitch, +void aom_lpf_horizontal_4_dual_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit0_ptr, const uint8_t *limit0_ptr, const uint8_t *thresh0_ptr, @@ -71,7 +71,7 @@ void vpx_lpf_horizontal_4_dual_msa(uint8_t *src, int32_t pitch, ST_UB4(p1, p0, q0, q1, (src - 2 * pitch), pitch); } -void vpx_lpf_vertical_4_msa(uint8_t *src, int32_t pitch, +void aom_lpf_vertical_4_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, const uint8_t *thresh_ptr, int32_t count) { @@ -101,7 +101,7 @@ void vpx_lpf_vertical_4_msa(uint8_t *src, int32_t pitch, ST4x4_UB(vec3, vec3, 0, 1, 2, 3, src, pitch); } -void vpx_lpf_vertical_4_dual_msa(uint8_t *src, int32_t pitch, +void aom_lpf_vertical_4_dual_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit0_ptr, const uint8_t *limit0_ptr, const uint8_t *thresh0_ptr, diff --git a/aom_dsp/mips/loopfilter_8_msa.c b/aom_dsp/mips/loopfilter_8_msa.c index adf797fbbc6da8388bac7ee4ea178b3a7a1bd635..1d4c1feb1f39f11d39118fd16e0d9b81fbba4227 100644 --- a/aom_dsp/mips/loopfilter_8_msa.c +++ b/aom_dsp/mips/loopfilter_8_msa.c @@ -11,7 +11,7 @@ #include "aom_dsp/mips/loopfilter_msa.h" -void vpx_lpf_horizontal_8_msa(uint8_t *src, int32_t pitch, +void aom_lpf_horizontal_8_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, const uint8_t *thresh_ptr, int32_t count) { @@ -81,7 +81,7 @@ void vpx_lpf_horizontal_8_msa(uint8_t *src, int32_t pitch, } } -void vpx_lpf_horizontal_8_dual_msa( +void aom_lpf_horizontal_8_dual_msa( uint8_t *src, int32_t pitch, const uint8_t *b_limit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *b_limit1, const uint8_t *limit1, const uint8_t *thresh1) { @@ -152,7 +152,7 @@ void vpx_lpf_horizontal_8_dual_msa( } } -void vpx_lpf_vertical_8_msa(uint8_t *src, int32_t pitch, +void aom_lpf_vertical_8_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit_ptr, const uint8_t *limit_ptr, const uint8_t *thresh_ptr, int32_t count) { @@ -229,7 +229,7 @@ void vpx_lpf_vertical_8_msa(uint8_t *src, int32_t pitch, } } -void vpx_lpf_vertical_8_dual_msa(uint8_t *src, int32_t pitch, +void aom_lpf_vertical_8_dual_msa(uint8_t *src, int32_t pitch, const uint8_t *b_limit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *b_limit1, const uint8_t *limit1, diff --git a/aom_dsp/mips/loopfilter_filters_dspr2.c b/aom_dsp/mips/loopfilter_filters_dspr2.c index a238d097262927d680e2c834c922243af484a076..08c2ebe41e8d9ca6c7785f430a000f670cb967d6 100644 --- a/aom_dsp/mips/loopfilter_filters_dspr2.c +++ b/aom_dsp/mips/loopfilter_filters_dspr2.c @@ -11,16 +11,16 @@ #include <stdlib.h> -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" #include "aom_dsp/mips/common_dspr2.h" #include "aom_dsp/mips/loopfilter_filters_dspr2.h" #include "aom_dsp/mips/loopfilter_macros_dspr2.h" #include "aom_dsp/mips/loopfilter_masks_dspr2.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #if HAVE_DSPR2 -void vpx_lpf_horizontal_4_dspr2(unsigned char *s, int pitch, +void aom_lpf_horizontal_4_dspr2(unsigned char *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { uint8_t i; @@ -105,7 +105,7 @@ void vpx_lpf_horizontal_4_dspr2(unsigned char *s, int pitch, } } -void vpx_lpf_vertical_4_dspr2(unsigned char *s, int pitch, +void aom_lpf_vertical_4_dspr2(unsigned char *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { uint8_t i; @@ -282,46 +282,46 @@ void vpx_lpf_vertical_4_dspr2(unsigned char *s, int pitch, } } -void vpx_lpf_horizontal_4_dual_dspr2( +void aom_lpf_horizontal_4_dual_dspr2( uint8_t *s, int p /* pitch */, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_horizontal_4_dspr2(s, p, blimit0, limit0, thresh0, 1); - vpx_lpf_horizontal_4_dspr2(s + 8, p, blimit1, limit1, thresh1, 1); + aom_lpf_horizontal_4_dspr2(s, p, blimit0, limit0, thresh0, 1); + aom_lpf_horizontal_4_dspr2(s + 8, p, blimit1, limit1, thresh1, 1); } -void vpx_lpf_horizontal_8_dual_dspr2( +void aom_lpf_horizontal_8_dual_dspr2( uint8_t *s, int p /* pitch */, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_horizontal_8_dspr2(s, p, blimit0, limit0, thresh0, 1); - vpx_lpf_horizontal_8_dspr2(s + 8, p, blimit1, limit1, thresh1, 1); + aom_lpf_horizontal_8_dspr2(s, p, blimit0, limit0, thresh0, 1); + aom_lpf_horizontal_8_dspr2(s + 8, p, blimit1, limit1, thresh1, 1); } -void vpx_lpf_vertical_4_dual_dspr2(uint8_t *s, int p, const uint8_t *blimit0, +void aom_lpf_vertical_4_dual_dspr2(uint8_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_vertical_4_dspr2(s, p, blimit0, limit0, thresh0, 1); - vpx_lpf_vertical_4_dspr2(s + 8 * p, p, blimit1, limit1, thresh1, 1); + aom_lpf_vertical_4_dspr2(s, p, blimit0, limit0, thresh0, 1); + aom_lpf_vertical_4_dspr2(s + 8 * p, p, blimit1, limit1, thresh1, 1); } -void vpx_lpf_vertical_8_dual_dspr2(uint8_t *s, int p, const uint8_t *blimit0, +void aom_lpf_vertical_8_dual_dspr2(uint8_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { - vpx_lpf_vertical_8_dspr2(s, p, blimit0, limit0, thresh0, 1); - vpx_lpf_vertical_8_dspr2(s + 8 * p, p, blimit1, limit1, thresh1, 1); + aom_lpf_vertical_8_dspr2(s, p, blimit0, limit0, thresh0, 1); + aom_lpf_vertical_8_dspr2(s + 8 * p, p, blimit1, limit1, thresh1, 1); } -void vpx_lpf_vertical_16_dual_dspr2(uint8_t *s, int p, const uint8_t *blimit, +void aom_lpf_vertical_16_dual_dspr2(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh) { - vpx_lpf_vertical_16_dspr2(s, p, blimit, limit, thresh); - vpx_lpf_vertical_16_dspr2(s + 8 * p, p, blimit, limit, thresh); + aom_lpf_vertical_16_dspr2(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_dspr2(s + 8 * p, p, blimit, limit, thresh); } #endif // #if HAVE_DSPR2 diff --git a/aom_dsp/mips/loopfilter_filters_dspr2.h b/aom_dsp/mips/loopfilter_filters_dspr2.h index 7e47d7b5b750521e060512c2e174917a3a24d0b6..aa86c074891ee4eebfa120ab62b57b71f374de85 100644 --- a/aom_dsp/mips/loopfilter_filters_dspr2.h +++ b/aom_dsp/mips/loopfilter_filters_dspr2.h @@ -14,9 +14,9 @@ #include <stdlib.h> -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" -#include "aom_mem/vpx_mem.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #ifdef __cplusplus @@ -27,7 +27,7 @@ extern "C" { /* inputs & outputs are quad-byte vectors */ static INLINE void filter_dspr2(uint32_t mask, uint32_t hev, uint32_t *ps1, uint32_t *ps0, uint32_t *qs0, uint32_t *qs1) { - int32_t vpx_filter_l, vpx_filter_r; + int32_t aom_filter_l, aom_filter_r; int32_t Filter1_l, Filter1_r, Filter2_l, Filter2_r; int32_t subr_r, subr_l; uint32_t t1, t2, HWM, t3; @@ -73,33 +73,33 @@ static INLINE void filter_dspr2(uint32_t mask, uint32_t hev, uint32_t *ps1, hev_r = hev_r & HWM; __asm__ __volatile__( - /* vpx_filter = vp8_signed_char_clamp(ps1 - qs1); */ - "subq_s.ph %[vpx_filter_l], %[vps1_l], %[vqs1_l] \n\t" - "subq_s.ph %[vpx_filter_r], %[vps1_r], %[vqs1_r] \n\t" + /* aom_filter = vp8_signed_char_clamp(ps1 - qs1); */ + "subq_s.ph %[aom_filter_l], %[vps1_l], %[vqs1_l] \n\t" + "subq_s.ph %[aom_filter_r], %[vps1_r], %[vqs1_r] \n\t" /* qs0 - ps0 */ "subq_s.ph %[subr_l], %[vqs0_l], %[vps0_l] \n\t" "subq_s.ph %[subr_r], %[vqs0_r], %[vps0_r] \n\t" - /* vpx_filter &= hev; */ - "and %[vpx_filter_l], %[vpx_filter_l], %[hev_l] \n\t" - "and %[vpx_filter_r], %[vpx_filter_r], %[hev_r] \n\t" + /* aom_filter &= hev; */ + "and %[aom_filter_l], %[aom_filter_l], %[hev_l] \n\t" + "and %[aom_filter_r], %[aom_filter_r], %[hev_r] \n\t" - /* vpx_filter = vp8_signed_char_clamp(vpx_filter + 3 * (qs0 - ps0)); */ - "addq_s.ph %[vpx_filter_l], %[vpx_filter_l], %[subr_l] \n\t" - "addq_s.ph %[vpx_filter_r], %[vpx_filter_r], %[subr_r] \n\t" + /* aom_filter = vp8_signed_char_clamp(aom_filter + 3 * (qs0 - ps0)); */ + "addq_s.ph %[aom_filter_l], %[aom_filter_l], %[subr_l] \n\t" + "addq_s.ph %[aom_filter_r], %[aom_filter_r], %[subr_r] \n\t" "xor %[invhev_l], %[hev_l], %[HWM] \n\t" - "addq_s.ph %[vpx_filter_l], %[vpx_filter_l], %[subr_l] \n\t" - "addq_s.ph %[vpx_filter_r], %[vpx_filter_r], %[subr_r] \n\t" + "addq_s.ph %[aom_filter_l], %[aom_filter_l], %[subr_l] \n\t" + "addq_s.ph %[aom_filter_r], %[aom_filter_r], %[subr_r] \n\t" "xor %[invhev_r], %[hev_r], %[HWM] \n\t" - "addq_s.ph %[vpx_filter_l], %[vpx_filter_l], %[subr_l] \n\t" - "addq_s.ph %[vpx_filter_r], %[vpx_filter_r], %[subr_r] \n\t" + "addq_s.ph %[aom_filter_l], %[aom_filter_l], %[subr_l] \n\t" + "addq_s.ph %[aom_filter_r], %[aom_filter_r], %[subr_r] \n\t" - /* vpx_filter &= mask; */ - "and %[vpx_filter_l], %[vpx_filter_l], %[mask_l] \n\t" - "and %[vpx_filter_r], %[vpx_filter_r], %[mask_r] \n\t" + /* aom_filter &= mask; */ + "and %[aom_filter_l], %[aom_filter_l], %[mask_l] \n\t" + "and %[aom_filter_r], %[aom_filter_r], %[mask_r] \n\t" - : [vpx_filter_l] "=&r"(vpx_filter_l), [vpx_filter_r] "=&r"(vpx_filter_r), + : [aom_filter_l] "=&r"(aom_filter_l), [aom_filter_r] "=&r"(aom_filter_r), [subr_l] "=&r"(subr_l), [subr_r] "=&r"(subr_r), [invhev_l] "=&r"(invhev_l), [invhev_r] "=&r"(invhev_r) : [vps0_l] "r"(vps0_l), [vps0_r] "r"(vps0_r), [vps1_l] "r"(vps1_l), @@ -110,13 +110,13 @@ static INLINE void filter_dspr2(uint32_t mask, uint32_t hev, uint32_t *ps1, /* save bottom 3 bits so that we round one side +4 and the other +3 */ __asm__ __volatile__( - /* Filter2 = vp8_signed_char_clamp(vpx_filter + 3) >>= 3; */ - "addq_s.ph %[Filter1_l], %[vpx_filter_l], %[t2] \n\t" - "addq_s.ph %[Filter1_r], %[vpx_filter_r], %[t2] \n\t" + /* Filter2 = vp8_signed_char_clamp(aom_filter + 3) >>= 3; */ + "addq_s.ph %[Filter1_l], %[aom_filter_l], %[t2] \n\t" + "addq_s.ph %[Filter1_r], %[aom_filter_r], %[t2] \n\t" - /* Filter1 = vp8_signed_char_clamp(vpx_filter + 4) >>= 3; */ - "addq_s.ph %[Filter2_l], %[vpx_filter_l], %[t1] \n\t" - "addq_s.ph %[Filter2_r], %[vpx_filter_r], %[t1] \n\t" + /* Filter1 = vp8_signed_char_clamp(aom_filter + 4) >>= 3; */ + "addq_s.ph %[Filter2_l], %[aom_filter_l], %[t1] \n\t" + "addq_s.ph %[Filter2_r], %[aom_filter_r], %[t1] \n\t" "shra.ph %[Filter1_r], %[Filter1_r], 3 \n\t" "shra.ph %[Filter1_l], %[Filter1_l], 3 \n\t" @@ -139,22 +139,22 @@ static INLINE void filter_dspr2(uint32_t mask, uint32_t hev, uint32_t *ps1, [vps0_l] "+r"(vps0_l), [vps0_r] "+r"(vps0_r), [vqs0_l] "+r"(vqs0_l), [vqs0_r] "+r"(vqs0_r) : [t1] "r"(t1), [t2] "r"(t2), [HWM] "r"(HWM), - [vpx_filter_l] "r"(vpx_filter_l), [vpx_filter_r] "r"(vpx_filter_r)); + [aom_filter_l] "r"(aom_filter_l), [aom_filter_r] "r"(aom_filter_r)); __asm__ __volatile__( - /* (vpx_filter += 1) >>= 1 */ + /* (aom_filter += 1) >>= 1 */ "addqh.ph %[Filter1_l], %[Filter1_l], %[t3] \n\t" "addqh.ph %[Filter1_r], %[Filter1_r], %[t3] \n\t" - /* vpx_filter &= ~hev; */ + /* aom_filter &= ~hev; */ "and %[Filter1_l], %[Filter1_l], %[invhev_l] \n\t" "and %[Filter1_r], %[Filter1_r], %[invhev_r] \n\t" - /* vps1 = vp8_signed_char_clamp(ps1 + vpx_filter); */ + /* vps1 = vp8_signed_char_clamp(ps1 + aom_filter); */ "addq_s.ph %[vps1_l], %[vps1_l], %[Filter1_l] \n\t" "addq_s.ph %[vps1_r], %[vps1_r], %[Filter1_r] \n\t" - /* vqs1 = vp8_signed_char_clamp(qs1 - vpx_filter); */ + /* vqs1 = vp8_signed_char_clamp(qs1 - aom_filter); */ "subq_s.ph %[vqs1_l], %[vqs1_l], %[Filter1_l] \n\t" "subq_s.ph %[vqs1_r], %[vqs1_r], %[Filter1_r] \n\t" @@ -194,7 +194,7 @@ static INLINE void filter1_dspr2(uint32_t mask, uint32_t hev, uint32_t ps1, uint32_t ps0, uint32_t qs0, uint32_t qs1, uint32_t *p1_f0, uint32_t *p0_f0, uint32_t *q0_f0, uint32_t *q1_f0) { - int32_t vpx_filter_l, vpx_filter_r; + int32_t aom_filter_l, aom_filter_r; int32_t Filter1_l, Filter1_r, Filter2_l, Filter2_r; int32_t subr_r, subr_l; uint32_t t1, t2, HWM, t3; @@ -240,33 +240,33 @@ static INLINE void filter1_dspr2(uint32_t mask, uint32_t hev, uint32_t ps1, hev_r = hev_r & HWM; __asm__ __volatile__( - /* vpx_filter = vp8_signed_char_clamp(ps1 - qs1); */ - "subq_s.ph %[vpx_filter_l], %[vps1_l], %[vqs1_l] \n\t" - "subq_s.ph %[vpx_filter_r], %[vps1_r], %[vqs1_r] \n\t" + /* aom_filter = vp8_signed_char_clamp(ps1 - qs1); */ + "subq_s.ph %[aom_filter_l], %[vps1_l], %[vqs1_l] \n\t" + "subq_s.ph %[aom_filter_r], %[vps1_r], %[vqs1_r] \n\t" /* qs0 - ps0 */ "subq_s.ph %[subr_l], %[vqs0_l], %[vps0_l] \n\t" "subq_s.ph %[subr_r], %[vqs0_r], %[vps0_r] \n\t" - /* vpx_filter &= hev; */ - "and %[vpx_filter_l], %[vpx_filter_l], %[hev_l] \n\t" - "and %[vpx_filter_r], %[vpx_filter_r], %[hev_r] \n\t" + /* aom_filter &= hev; */ + "and %[aom_filter_l], %[aom_filter_l], %[hev_l] \n\t" + "and %[aom_filter_r], %[aom_filter_r], %[hev_r] \n\t" - /* vpx_filter = vp8_signed_char_clamp(vpx_filter + 3 * (qs0 - ps0)); */ - "addq_s.ph %[vpx_filter_l], %[vpx_filter_l], %[subr_l] \n\t" - "addq_s.ph %[vpx_filter_r], %[vpx_filter_r], %[subr_r] \n\t" + /* aom_filter = vp8_signed_char_clamp(aom_filter + 3 * (qs0 - ps0)); */ + "addq_s.ph %[aom_filter_l], %[aom_filter_l], %[subr_l] \n\t" + "addq_s.ph %[aom_filter_r], %[aom_filter_r], %[subr_r] \n\t" "xor %[invhev_l], %[hev_l], %[HWM] \n\t" - "addq_s.ph %[vpx_filter_l], %[vpx_filter_l], %[subr_l] \n\t" - "addq_s.ph %[vpx_filter_r], %[vpx_filter_r], %[subr_r] \n\t" + "addq_s.ph %[aom_filter_l], %[aom_filter_l], %[subr_l] \n\t" + "addq_s.ph %[aom_filter_r], %[aom_filter_r], %[subr_r] \n\t" "xor %[invhev_r], %[hev_r], %[HWM] \n\t" - "addq_s.ph %[vpx_filter_l], %[vpx_filter_l], %[subr_l] \n\t" - "addq_s.ph %[vpx_filter_r], %[vpx_filter_r], %[subr_r] \n\t" + "addq_s.ph %[aom_filter_l], %[aom_filter_l], %[subr_l] \n\t" + "addq_s.ph %[aom_filter_r], %[aom_filter_r], %[subr_r] \n\t" - /* vpx_filter &= mask; */ - "and %[vpx_filter_l], %[vpx_filter_l], %[mask_l] \n\t" - "and %[vpx_filter_r], %[vpx_filter_r], %[mask_r] \n\t" + /* aom_filter &= mask; */ + "and %[aom_filter_l], %[aom_filter_l], %[mask_l] \n\t" + "and %[aom_filter_r], %[aom_filter_r], %[mask_r] \n\t" - : [vpx_filter_l] "=&r"(vpx_filter_l), [vpx_filter_r] "=&r"(vpx_filter_r), + : [aom_filter_l] "=&r"(aom_filter_l), [aom_filter_r] "=&r"(aom_filter_r), [subr_l] "=&r"(subr_l), [subr_r] "=&r"(subr_r), [invhev_l] "=&r"(invhev_l), [invhev_r] "=&r"(invhev_r) : [vps0_l] "r"(vps0_l), [vps0_r] "r"(vps0_r), [vps1_l] "r"(vps1_l), @@ -277,13 +277,13 @@ static INLINE void filter1_dspr2(uint32_t mask, uint32_t hev, uint32_t ps1, /* save bottom 3 bits so that we round one side +4 and the other +3 */ __asm__ __volatile__( - /* Filter2 = vp8_signed_char_clamp(vpx_filter + 3) >>= 3; */ - "addq_s.ph %[Filter1_l], %[vpx_filter_l], %[t2] \n\t" - "addq_s.ph %[Filter1_r], %[vpx_filter_r], %[t2] \n\t" + /* Filter2 = vp8_signed_char_clamp(aom_filter + 3) >>= 3; */ + "addq_s.ph %[Filter1_l], %[aom_filter_l], %[t2] \n\t" + "addq_s.ph %[Filter1_r], %[aom_filter_r], %[t2] \n\t" - /* Filter1 = vp8_signed_char_clamp(vpx_filter + 4) >>= 3; */ - "addq_s.ph %[Filter2_l], %[vpx_filter_l], %[t1] \n\t" - "addq_s.ph %[Filter2_r], %[vpx_filter_r], %[t1] \n\t" + /* Filter1 = vp8_signed_char_clamp(aom_filter + 4) >>= 3; */ + "addq_s.ph %[Filter2_l], %[aom_filter_l], %[t1] \n\t" + "addq_s.ph %[Filter2_r], %[aom_filter_r], %[t1] \n\t" "shra.ph %[Filter1_r], %[Filter1_r], 3 \n\t" "shra.ph %[Filter1_l], %[Filter1_l], 3 \n\t" @@ -306,22 +306,22 @@ static INLINE void filter1_dspr2(uint32_t mask, uint32_t hev, uint32_t ps1, [vps0_l] "+r"(vps0_l), [vps0_r] "+r"(vps0_r), [vqs0_l] "+r"(vqs0_l), [vqs0_r] "+r"(vqs0_r) : [t1] "r"(t1), [t2] "r"(t2), [HWM] "r"(HWM), - [vpx_filter_l] "r"(vpx_filter_l), [vpx_filter_r] "r"(vpx_filter_r)); + [aom_filter_l] "r"(aom_filter_l), [aom_filter_r] "r"(aom_filter_r)); __asm__ __volatile__( - /* (vpx_filter += 1) >>= 1 */ + /* (aom_filter += 1) >>= 1 */ "addqh.ph %[Filter1_l], %[Filter1_l], %[t3] \n\t" "addqh.ph %[Filter1_r], %[Filter1_r], %[t3] \n\t" - /* vpx_filter &= ~hev; */ + /* aom_filter &= ~hev; */ "and %[Filter1_l], %[Filter1_l], %[invhev_l] \n\t" "and %[Filter1_r], %[Filter1_r], %[invhev_r] \n\t" - /* vps1 = vp8_signed_char_clamp(ps1 + vpx_filter); */ + /* vps1 = vp8_signed_char_clamp(ps1 + aom_filter); */ "addq_s.ph %[vps1_l], %[vps1_l], %[Filter1_l] \n\t" "addq_s.ph %[vps1_r], %[vps1_r], %[Filter1_r] \n\t" - /* vqs1 = vp8_signed_char_clamp(qs1 - vpx_filter); */ + /* vqs1 = vp8_signed_char_clamp(qs1 - aom_filter); */ "subq_s.ph %[vqs1_l], %[vqs1_l], %[Filter1_l] \n\t" "subq_s.ph %[vqs1_r], %[vqs1_r], %[Filter1_r] \n\t" diff --git a/aom_dsp/mips/loopfilter_macros_dspr2.h b/aom_dsp/mips/loopfilter_macros_dspr2.h index 3199db4bb0b1b4a80df868c5c8e4b47573594c01..c7b1c7f5297ae80d5ad117d6a4f50ecbb5901ac6 100644 --- a/aom_dsp/mips/loopfilter_macros_dspr2.h +++ b/aom_dsp/mips/loopfilter_macros_dspr2.h @@ -14,9 +14,9 @@ #include <stdlib.h> -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" -#include "aom_mem/vpx_mem.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" +#include "aom_mem/aom_mem.h" #ifdef __cplusplus extern "C" { diff --git a/aom_dsp/mips/loopfilter_masks_dspr2.h b/aom_dsp/mips/loopfilter_masks_dspr2.h index 852afc6754cae80ec6d146fe4ba3ece7adc2eb59..b283e184a8b6f529b5533691e0def008c0c1f236 100644 --- a/aom_dsp/mips/loopfilter_masks_dspr2.h +++ b/aom_dsp/mips/loopfilter_masks_dspr2.h @@ -14,9 +14,9 @@ #include <stdlib.h> -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" -#include "aom_mem/vpx_mem.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" +#include "aom_mem/aom_mem.h" #ifdef __cplusplus extern "C" { diff --git a/aom_dsp/mips/loopfilter_mb_dspr2.c b/aom_dsp/mips/loopfilter_mb_dspr2.c index 4003e4a056eabd6bbfb16274b4cade30096c12a2..a389ee77125f7f12d010a3ea860b360763f2939a 100644 --- a/aom_dsp/mips/loopfilter_mb_dspr2.c +++ b/aom_dsp/mips/loopfilter_mb_dspr2.c @@ -11,16 +11,16 @@ #include <stdlib.h> -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" #include "aom_dsp/mips/common_dspr2.h" #include "aom_dsp/mips/loopfilter_filters_dspr2.h" #include "aom_dsp/mips/loopfilter_macros_dspr2.h" #include "aom_dsp/mips/loopfilter_masks_dspr2.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #if HAVE_DSPR2 -void vpx_lpf_horizontal_8_dspr2(unsigned char *s, int pitch, +void aom_lpf_horizontal_8_dspr2(unsigned char *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { uint32_t mask; @@ -287,7 +287,7 @@ void vpx_lpf_horizontal_8_dspr2(unsigned char *s, int pitch, } } -void vpx_lpf_vertical_8_dspr2(unsigned char *s, int pitch, +void aom_lpf_vertical_8_dspr2(unsigned char *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { uint8_t i; diff --git a/aom_dsp/mips/loopfilter_mb_horiz_dspr2.c b/aom_dsp/mips/loopfilter_mb_horiz_dspr2.c index 2d2c16332ab4b62f6417b57644e51b3046334172..a2a6fe4f2b16d2c5d3c23284eb78ca3f144f0251 100644 --- a/aom_dsp/mips/loopfilter_mb_horiz_dspr2.c +++ b/aom_dsp/mips/loopfilter_mb_horiz_dspr2.c @@ -11,16 +11,16 @@ #include <stdlib.h> -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" #include "aom_dsp/mips/common_dspr2.h" #include "aom_dsp/mips/loopfilter_filters_dspr2.h" #include "aom_dsp/mips/loopfilter_macros_dspr2.h" #include "aom_dsp/mips/loopfilter_masks_dspr2.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #if HAVE_DSPR2 -void vpx_lpf_horizontal_16_dspr2(unsigned char *s, int pitch, +void aom_lpf_horizontal_16_dspr2(unsigned char *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { uint32_t mask; diff --git a/aom_dsp/mips/loopfilter_mb_vert_dspr2.c b/aom_dsp/mips/loopfilter_mb_vert_dspr2.c index 567d5edce648330cd4661a700c3bff0e677ec2aa..28528869b4b1efac7307f2a446bef8db3aaf1191 100644 --- a/aom_dsp/mips/loopfilter_mb_vert_dspr2.c +++ b/aom_dsp/mips/loopfilter_mb_vert_dspr2.c @@ -11,16 +11,16 @@ #include <stdlib.h> -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" #include "aom_dsp/mips/common_dspr2.h" #include "aom_dsp/mips/loopfilter_filters_dspr2.h" #include "aom_dsp/mips/loopfilter_macros_dspr2.h" #include "aom_dsp/mips/loopfilter_masks_dspr2.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #if HAVE_DSPR2 -void vpx_lpf_vertical_16_dspr2(uint8_t *s, int pitch, const uint8_t *blimit, +void aom_lpf_vertical_16_dspr2(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh) { uint8_t i; uint32_t mask, hev, flat, flat2; diff --git a/aom_dsp/mips/macros_msa.h b/aom_dsp/mips/macros_msa.h index 1390dd3fca7a01f7f1682355eeab3c74f727c985..cbfa6a134ed8ba0243fd02e9f48286a6efe551f4 100644 --- a/aom_dsp/mips/macros_msa.h +++ b/aom_dsp/mips/macros_msa.h @@ -14,8 +14,8 @@ #include <msa.h> -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" #define LD_B(RTYPE, psrc) *((const RTYPE *)(psrc)) #define LD_UB(...) LD_B(v16u8, __VA_ARGS__) diff --git a/aom_dsp/mips/sad_msa.c b/aom_dsp/mips/sad_msa.c index 4216cd43d64b9613e0475f9e9e2ad3697f24f861..3c21f3c59b0e216e8ebec376600a3bfec751feac 100644 --- a/aom_dsp/mips/sad_msa.c +++ b/aom_dsp/mips/sad_msa.c @@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/macros_msa.h" #define SAD_INSVE_W4(RTYPE, in0, in1, in2, in3, out) \ @@ -1261,142 +1261,142 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride, } #define VPX_SAD_4xHEIGHT_MSA(height) \ - uint32_t vpx_sad4x##height##_msa(const uint8_t *src, int32_t src_stride, \ + uint32_t aom_sad4x##height##_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride) { \ return sad_4width_msa(src, src_stride, ref, ref_stride, height); \ } #define VPX_SAD_8xHEIGHT_MSA(height) \ - uint32_t vpx_sad8x##height##_msa(const uint8_t *src, int32_t src_stride, \ + uint32_t aom_sad8x##height##_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride) { \ return sad_8width_msa(src, src_stride, ref, ref_stride, height); \ } #define VPX_SAD_16xHEIGHT_MSA(height) \ - uint32_t vpx_sad16x##height##_msa(const uint8_t *src, int32_t src_stride, \ + uint32_t aom_sad16x##height##_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride) { \ return sad_16width_msa(src, src_stride, ref, ref_stride, height); \ } #define VPX_SAD_32xHEIGHT_MSA(height) \ - uint32_t vpx_sad32x##height##_msa(const uint8_t *src, int32_t src_stride, \ + uint32_t aom_sad32x##height##_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride) { \ return sad_32width_msa(src, src_stride, ref, ref_stride, height); \ } #define VPX_SAD_64xHEIGHT_MSA(height) \ - uint32_t vpx_sad64x##height##_msa(const uint8_t *src, int32_t src_stride, \ + uint32_t aom_sad64x##height##_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride) { \ return sad_64width_msa(src, src_stride, ref, ref_stride, height); \ } #define VPX_SAD_4xHEIGHTx3_MSA(height) \ - void vpx_sad4x##height##x3_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad4x##height##x3_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ uint32_t *sads) { \ sad_4width_x3_msa(src, src_stride, ref, ref_stride, height, sads); \ } #define VPX_SAD_8xHEIGHTx3_MSA(height) \ - void vpx_sad8x##height##x3_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad8x##height##x3_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ uint32_t *sads) { \ sad_8width_x3_msa(src, src_stride, ref, ref_stride, height, sads); \ } #define VPX_SAD_16xHEIGHTx3_MSA(height) \ - void vpx_sad16x##height##x3_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad16x##height##x3_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ uint32_t *sads) { \ sad_16width_x3_msa(src, src_stride, ref, ref_stride, height, sads); \ } #define VPX_SAD_32xHEIGHTx3_MSA(height) \ - void vpx_sad32x##height##x3_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad32x##height##x3_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ uint32_t *sads) { \ sad_32width_x3_msa(src, src_stride, ref, ref_stride, height, sads); \ } #define VPX_SAD_64xHEIGHTx3_MSA(height) \ - void vpx_sad64x##height##x3_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad64x##height##x3_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ uint32_t *sads) { \ sad_64width_x3_msa(src, src_stride, ref, ref_stride, height, sads); \ } #define VPX_SAD_4xHEIGHTx8_MSA(height) \ - void vpx_sad4x##height##x8_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad4x##height##x8_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ uint32_t *sads) { \ sad_4width_x8_msa(src, src_stride, ref, ref_stride, height, sads); \ } #define VPX_SAD_8xHEIGHTx8_MSA(height) \ - void vpx_sad8x##height##x8_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad8x##height##x8_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ uint32_t *sads) { \ sad_8width_x8_msa(src, src_stride, ref, ref_stride, height, sads); \ } #define VPX_SAD_16xHEIGHTx8_MSA(height) \ - void vpx_sad16x##height##x8_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad16x##height##x8_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ uint32_t *sads) { \ sad_16width_x8_msa(src, src_stride, ref, ref_stride, height, sads); \ } #define VPX_SAD_32xHEIGHTx8_MSA(height) \ - void vpx_sad32x##height##x8_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad32x##height##x8_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ uint32_t *sads) { \ sad_32width_x8_msa(src, src_stride, ref, ref_stride, height, sads); \ } #define VPX_SAD_64xHEIGHTx8_MSA(height) \ - void vpx_sad64x##height##x8_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad64x##height##x8_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ uint32_t *sads) { \ sad_64width_x8_msa(src, src_stride, ref, ref_stride, height, sads); \ } #define VPX_SAD_4xHEIGHTx4D_MSA(height) \ - void vpx_sad4x##height##x4d_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad4x##height##x4d_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *const refs[], \ int32_t ref_stride, uint32_t *sads) { \ sad_4width_x4d_msa(src, src_stride, refs, ref_stride, height, sads); \ } #define VPX_SAD_8xHEIGHTx4D_MSA(height) \ - void vpx_sad8x##height##x4d_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad8x##height##x4d_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *const refs[], \ int32_t ref_stride, uint32_t *sads) { \ sad_8width_x4d_msa(src, src_stride, refs, ref_stride, height, sads); \ } #define VPX_SAD_16xHEIGHTx4D_MSA(height) \ - void vpx_sad16x##height##x4d_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad16x##height##x4d_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *const refs[], \ int32_t ref_stride, uint32_t *sads) { \ sad_16width_x4d_msa(src, src_stride, refs, ref_stride, height, sads); \ } #define VPX_SAD_32xHEIGHTx4D_MSA(height) \ - void vpx_sad32x##height##x4d_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad32x##height##x4d_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *const refs[], \ int32_t ref_stride, uint32_t *sads) { \ sad_32width_x4d_msa(src, src_stride, refs, ref_stride, height, sads); \ } #define VPX_SAD_64xHEIGHTx4D_MSA(height) \ - void vpx_sad64x##height##x4d_msa(const uint8_t *src, int32_t src_stride, \ + void aom_sad64x##height##x4d_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *const refs[], \ int32_t ref_stride, uint32_t *sads) { \ sad_64width_x4d_msa(src, src_stride, refs, ref_stride, height, sads); \ } #define VPX_AVGSAD_4xHEIGHT_MSA(height) \ - uint32_t vpx_sad4x##height##_avg_msa(const uint8_t *src, int32_t src_stride, \ + uint32_t aom_sad4x##height##_avg_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ const uint8_t *second_pred) { \ return avgsad_4width_msa(src, src_stride, ref, ref_stride, height, \ @@ -1404,7 +1404,7 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride, } #define VPX_AVGSAD_8xHEIGHT_MSA(height) \ - uint32_t vpx_sad8x##height##_avg_msa(const uint8_t *src, int32_t src_stride, \ + uint32_t aom_sad8x##height##_avg_msa(const uint8_t *src, int32_t src_stride, \ const uint8_t *ref, int32_t ref_stride, \ const uint8_t *second_pred) { \ return avgsad_8width_msa(src, src_stride, ref, ref_stride, height, \ @@ -1412,7 +1412,7 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride, } #define VPX_AVGSAD_16xHEIGHT_MSA(height) \ - uint32_t vpx_sad16x##height##_avg_msa( \ + uint32_t aom_sad16x##height##_avg_msa( \ const uint8_t *src, int32_t src_stride, const uint8_t *ref, \ int32_t ref_stride, const uint8_t *second_pred) { \ return avgsad_16width_msa(src, src_stride, ref, ref_stride, height, \ @@ -1420,7 +1420,7 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride, } #define VPX_AVGSAD_32xHEIGHT_MSA(height) \ - uint32_t vpx_sad32x##height##_avg_msa( \ + uint32_t aom_sad32x##height##_avg_msa( \ const uint8_t *src, int32_t src_stride, const uint8_t *ref, \ int32_t ref_stride, const uint8_t *second_pred) { \ return avgsad_32width_msa(src, src_stride, ref, ref_stride, height, \ @@ -1428,7 +1428,7 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride, } #define VPX_AVGSAD_64xHEIGHT_MSA(height) \ - uint32_t vpx_sad64x##height##_avg_msa( \ + uint32_t aom_sad64x##height##_avg_msa( \ const uint8_t *src, int32_t src_stride, const uint8_t *ref, \ int32_t ref_stride, const uint8_t *second_pred) { \ return avgsad_64width_msa(src, src_stride, ref, ref_stride, height, \ diff --git a/aom_dsp/mips/sub_pixel_variance_msa.c b/aom_dsp/mips/sub_pixel_variance_msa.c index 5a45964bb2ca4fbd1d3d7433a0fbc5ab8afb3876..221ec497d22c107fc69a80422221b40b92b5211c 100644 --- a/aom_dsp/mips/sub_pixel_variance_msa.c +++ b/aom_dsp/mips/sub_pixel_variance_msa.c @@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" #include "aom_dsp/mips/macros_msa.h" #include "aom_dsp/variance.h" @@ -1619,7 +1619,7 @@ static uint32_t sub_pixel_avg_sse_diff_64width_hv_msa( #define VARIANCE_64Wx64H(sse, diff) VARIANCE_LARGE_WxH(sse, diff, 12); #define VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(wd, ht) \ - uint32_t vpx_sub_pixel_variance##wd##x##ht##_msa( \ + uint32_t aom_sub_pixel_variance##wd##x##ht##_msa( \ const uint8_t *src, int32_t src_stride, int32_t xoffset, \ int32_t yoffset, const uint8_t *ref, int32_t ref_stride, \ uint32_t *sse) { \ @@ -1645,7 +1645,7 @@ static uint32_t sub_pixel_avg_sse_diff_64width_hv_msa( \ var = VARIANCE_##wd##Wx##ht##H(*sse, diff); \ } else { \ - var = vpx_variance##wd##x##ht##_msa(src, src_stride, ref, ref_stride, \ + var = aom_variance##wd##x##ht##_msa(src, src_stride, ref, ref_stride, \ sse); \ } \ } \ @@ -1674,7 +1674,7 @@ VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(64, 64) /* clang-format on */ #define VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(wd, ht) \ - uint32_t vpx_sub_pixel_avg_variance##wd##x##ht##_msa( \ + uint32_t aom_sub_pixel_avg_variance##wd##x##ht##_msa( \ const uint8_t *src_ptr, int32_t src_stride, int32_t xoffset, \ int32_t yoffset, const uint8_t *ref_ptr, int32_t ref_stride, \ uint32_t *sse, const uint8_t *sec_pred) { \ @@ -1722,7 +1722,7 @@ VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(32, 16) VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(32, 32) /* clang-format on */ -uint32_t vpx_sub_pixel_avg_variance32x64_msa(const uint8_t *src_ptr, +uint32_t aom_sub_pixel_avg_variance32x64_msa(const uint8_t *src_ptr, int32_t src_stride, int32_t xoffset, int32_t yoffset, const uint8_t *ref_ptr, @@ -1757,7 +1757,7 @@ uint32_t vpx_sub_pixel_avg_variance32x64_msa(const uint8_t *src_ptr, } #define VPX_SUB_PIXEL_AVG_VARIANCE64XHEIGHT_MSA(ht) \ - uint32_t vpx_sub_pixel_avg_variance64x##ht##_msa( \ + uint32_t aom_sub_pixel_avg_variance64x##ht##_msa( \ const uint8_t *src_ptr, int32_t src_stride, int32_t xoffset, \ int32_t yoffset, const uint8_t *ref_ptr, int32_t ref_stride, \ uint32_t *sse, const uint8_t *sec_pred) { \ diff --git a/aom_dsp/mips/subtract_msa.c b/aom_dsp/mips/subtract_msa.c index fff7cc19913e144ee8f11284b2846be367a15253..37b89765db2c0afeb24f8d11ed8ee131b1df88f3 100644 --- a/aom_dsp/mips/subtract_msa.c +++ b/aom_dsp/mips/subtract_msa.c @@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/macros_msa.h" static void sub_blk_4x4_msa(const uint8_t *src_ptr, int32_t src_stride, @@ -227,7 +227,7 @@ static void sub_blk_64x64_msa(const uint8_t *src, int32_t src_stride, } } -void vpx_subtract_block_msa(int32_t rows, int32_t cols, int16_t *diff_ptr, +void aom_subtract_block_msa(int32_t rows, int32_t cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride) { @@ -254,12 +254,12 @@ void vpx_subtract_block_msa(int32_t rows, int32_t cols, int16_t *diff_ptr, diff_stride); break; default: - vpx_subtract_block_c(rows, cols, diff_ptr, diff_stride, src_ptr, + aom_subtract_block_c(rows, cols, diff_ptr, diff_stride, src_ptr, src_stride, pred_ptr, pred_stride); break; } } else { - vpx_subtract_block_c(rows, cols, diff_ptr, diff_stride, src_ptr, src_stride, + aom_subtract_block_c(rows, cols, diff_ptr, diff_stride, src_ptr, src_stride, pred_ptr, pred_stride); } } diff --git a/aom_dsp/mips/variance_msa.c b/aom_dsp/mips/variance_msa.c index 518ea7f57ed86884c30497266dfef32dfb0957f9..e4c56e37aab2148300de20d10cb9dcb511c24198 100644 --- a/aom_dsp/mips/variance_msa.c +++ b/aom_dsp/mips/variance_msa.c @@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/mips/macros_msa.h" #define CALC_MSE_B(src, ref, var) \ @@ -488,7 +488,7 @@ static uint32_t sse_64width_msa(const uint8_t *src_ptr, int32_t src_stride, return HADD_SW_S32(var); } -uint32_t vpx_get4x4sse_cs_msa(const uint8_t *src_ptr, int32_t src_stride, +uint32_t aom_get4x4sse_cs_msa(const uint8_t *src_ptr, int32_t src_stride, const uint8_t *ref_ptr, int32_t ref_stride) { uint32_t err = 0; uint32_t src0, src1, src2, src3; @@ -529,7 +529,7 @@ uint32_t vpx_get4x4sse_cs_msa(const uint8_t *src_ptr, int32_t src_stride, #define VARIANCE_64Wx64H(sse, diff) VARIANCE_LARGE_WxH(sse, diff, 12); #define VPX_VARIANCE_WDXHT_MSA(wd, ht) \ - uint32_t vpx_variance##wd##x##ht##_msa( \ + uint32_t aom_variance##wd##x##ht##_msa( \ const uint8_t *src, int32_t src_stride, const uint8_t *ref, \ int32_t ref_stride, uint32_t *sse) { \ int32_t diff; \ @@ -556,7 +556,7 @@ VPX_VARIANCE_WDXHT_MSA(32, 16) VPX_VARIANCE_WDXHT_MSA(32, 32) /* clang-format on */ -uint32_t vpx_variance32x64_msa(const uint8_t *src, int32_t src_stride, +uint32_t aom_variance32x64_msa(const uint8_t *src, int32_t src_stride, const uint8_t *ref, int32_t ref_stride, uint32_t *sse) { int32_t diff; @@ -566,7 +566,7 @@ uint32_t vpx_variance32x64_msa(const uint8_t *src, int32_t src_stride, return VARIANCE_32Wx64H(*sse, diff); } -uint32_t vpx_variance64x32_msa(const uint8_t *src, int32_t src_stride, +uint32_t aom_variance64x32_msa(const uint8_t *src, int32_t src_stride, const uint8_t *ref, int32_t ref_stride, uint32_t *sse) { int32_t diff; @@ -576,7 +576,7 @@ uint32_t vpx_variance64x32_msa(const uint8_t *src, int32_t src_stride, return VARIANCE_64Wx32H(*sse, diff); } -uint32_t vpx_variance64x64_msa(const uint8_t *src, int32_t src_stride, +uint32_t aom_variance64x64_msa(const uint8_t *src, int32_t src_stride, const uint8_t *ref, int32_t ref_stride, uint32_t *sse) { int32_t diff; @@ -586,14 +586,14 @@ uint32_t vpx_variance64x64_msa(const uint8_t *src, int32_t src_stride, return VARIANCE_64Wx64H(*sse, diff); } -uint32_t vpx_mse8x8_msa(const uint8_t *src, int32_t src_stride, +uint32_t aom_mse8x8_msa(const uint8_t *src, int32_t src_stride, const uint8_t *ref, int32_t ref_stride, uint32_t *sse) { *sse = sse_8width_msa(src, src_stride, ref, ref_stride, 8); return *sse; } -uint32_t vpx_mse8x16_msa(const uint8_t *src, int32_t src_stride, +uint32_t aom_mse8x16_msa(const uint8_t *src, int32_t src_stride, const uint8_t *ref, int32_t ref_stride, uint32_t *sse) { *sse = sse_8width_msa(src, src_stride, ref, ref_stride, 16); @@ -601,7 +601,7 @@ uint32_t vpx_mse8x16_msa(const uint8_t *src, int32_t src_stride, return *sse; } -uint32_t vpx_mse16x8_msa(const uint8_t *src, int32_t src_stride, +uint32_t aom_mse16x8_msa(const uint8_t *src, int32_t src_stride, const uint8_t *ref, int32_t ref_stride, uint32_t *sse) { *sse = sse_16width_msa(src, src_stride, ref, ref_stride, 8); @@ -609,7 +609,7 @@ uint32_t vpx_mse16x8_msa(const uint8_t *src, int32_t src_stride, return *sse; } -uint32_t vpx_mse16x16_msa(const uint8_t *src, int32_t src_stride, +uint32_t aom_mse16x16_msa(const uint8_t *src, int32_t src_stride, const uint8_t *ref, int32_t ref_stride, uint32_t *sse) { *sse = sse_16width_msa(src, src_stride, ref, ref_stride, 16); @@ -617,16 +617,16 @@ uint32_t vpx_mse16x16_msa(const uint8_t *src, int32_t src_stride, return *sse; } -void vpx_get8x8var_msa(const uint8_t *src, int32_t src_stride, +void aom_get8x8var_msa(const uint8_t *src, int32_t src_stride, const uint8_t *ref, int32_t ref_stride, uint32_t *sse, int32_t *sum) { *sse = sse_diff_8width_msa(src, src_stride, ref, ref_stride, 8, sum); } -void vpx_get16x16var_msa(const uint8_t *src, int32_t src_stride, +void aom_get16x16var_msa(const uint8_t *src, int32_t src_stride, const uint8_t *ref, int32_t ref_stride, uint32_t *sse, int32_t *sum) { *sse = sse_diff_16width_msa(src, src_stride, ref, ref_stride, 16, sum); } -uint32_t vpx_get_mb_ss_msa(const int16_t *src) { return get_mb_ss_msa(src); } +uint32_t aom_get_mb_ss_msa(const int16_t *src) { return get_mb_ss_msa(src); } diff --git a/aom_dsp/prob.c b/aom_dsp/prob.c index ac68be35e56e633df0811c5b76af46b2551faeb8..2ebe7f4d8a5a7727eef224e40d5069915beedb4b 100644 --- a/aom_dsp/prob.c +++ b/aom_dsp/prob.c @@ -11,7 +11,7 @@ #include "./prob.h" -const uint8_t vpx_norm[256] = { +const uint8_t aom_norm[256] = { 0, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -25,10 +25,10 @@ const uint8_t vpx_norm[256] = { }; static unsigned int tree_merge_probs_impl(unsigned int i, - const vpx_tree_index *tree, - const vpx_prob *pre_probs, + const aom_tree_index *tree, + const aom_prob *pre_probs, const unsigned int *counts, - vpx_prob *probs) { + aom_prob *probs) { const int l = tree[i]; const unsigned int left_count = (l <= 0) ? counts[-l] @@ -42,7 +42,7 @@ static unsigned int tree_merge_probs_impl(unsigned int i, return left_count + right_count; } -void vpx_tree_merge_probs(const vpx_tree_index *tree, const vpx_prob *pre_probs, - const unsigned int *counts, vpx_prob *probs) { +void aom_tree_merge_probs(const aom_tree_index *tree, const aom_prob *pre_probs, + const unsigned int *counts, aom_prob *probs) { tree_merge_probs_impl(0, tree, pre_probs, counts, probs); } diff --git a/aom_dsp/prob.h b/aom_dsp/prob.h index 9edb953864df4fc43525f11896c02a28926047a3..dcb1f0efb8a5da486ccda0fbd2f6bfb61d65c29d 100644 --- a/aom_dsp/prob.h +++ b/aom_dsp/prob.h @@ -12,8 +12,8 @@ #ifndef VPX_DSP_PROB_H_ #define VPX_DSP_PROB_H_ -#include "./vpx_config.h" -#include "./vpx_dsp_common.h" +#include "./aom_config.h" +#include "./aom_dsp_common.h" #include "aom_ports/mem.h" @@ -21,50 +21,50 @@ extern "C" { #endif -typedef uint8_t vpx_prob; +typedef uint8_t aom_prob; #define MAX_PROB 255 -#define vpx_prob_half ((vpx_prob)128) +#define aom_prob_half ((aom_prob)128) -typedef int8_t vpx_tree_index; +typedef int8_t aom_tree_index; #define TREE_SIZE(leaf_count) (-2 + 2 * (leaf_count)) -#define vpx_complement(x) (255 - x) +#define aom_complement(x) (255 - x) #define MODE_MV_COUNT_SAT 20 /* We build coding trees compactly in arrays. - Each node of the tree is a pair of vpx_tree_indices. + Each node of the tree is a pair of aom_tree_indices. Array index often references a corresponding probability table. Index <= 0 means done encoding/decoding and value = -Index, Index > 0 means need another bit, specification at index. Nonnegative indices are always even; processing begins at node 0. */ -typedef const vpx_tree_index vpx_tree[]; +typedef const aom_tree_index aom_tree[]; -static INLINE vpx_prob clip_prob(int p) { +static INLINE aom_prob clip_prob(int p) { return (p > 255) ? 255 : (p < 1) ? 1 : p; } -static INLINE vpx_prob get_prob(int num, int den) { +static INLINE aom_prob get_prob(int num, int den) { return (den == 0) ? 128u : clip_prob(((int64_t)num * 256 + (den >> 1)) / den); } -static INLINE vpx_prob get_binary_prob(int n0, int n1) { +static INLINE aom_prob get_binary_prob(int n0, int n1) { return get_prob(n0, n0 + n1); } /* This function assumes prob1 and prob2 are already within [1,255] range. */ -static INLINE vpx_prob weighted_prob(int prob1, int prob2, int factor) { +static INLINE aom_prob weighted_prob(int prob1, int prob2, int factor) { return ROUND_POWER_OF_TWO(prob1 * (256 - factor) + prob2 * factor, 8); } -static INLINE vpx_prob merge_probs(vpx_prob pre_prob, const unsigned int ct[2], +static INLINE aom_prob merge_probs(aom_prob pre_prob, const unsigned int ct[2], unsigned int count_sat, unsigned int max_update_factor) { - const vpx_prob prob = get_binary_prob(ct[0], ct[1]); + const aom_prob prob = get_binary_prob(ct[0], ct[1]); const unsigned int count = VPXMIN(ct[0] + ct[1], count_sat); const unsigned int factor = max_update_factor * count / count_sat; return weighted_prob(pre_prob, prob, factor); @@ -76,7 +76,7 @@ static const int count_to_update_factor[MODE_MV_COUNT_SAT + 1] = { 70, 76, 83, 89, 96, 102, 108, 115, 121, 128 }; -static INLINE vpx_prob mode_mv_merge_probs(vpx_prob pre_prob, +static INLINE aom_prob mode_mv_merge_probs(aom_prob pre_prob, const unsigned int ct[2]) { const unsigned int den = ct[0] + ct[1]; if (den == 0) { @@ -84,16 +84,16 @@ static INLINE vpx_prob mode_mv_merge_probs(vpx_prob pre_prob, } else { const unsigned int count = VPXMIN(den, MODE_MV_COUNT_SAT); const unsigned int factor = count_to_update_factor[count]; - const vpx_prob prob = + const aom_prob prob = clip_prob(((int64_t)(ct[0]) * 256 + (den >> 1)) / den); return weighted_prob(pre_prob, prob, factor); } } -void vpx_tree_merge_probs(const vpx_tree_index *tree, const vpx_prob *pre_probs, - const unsigned int *counts, vpx_prob *probs); +void aom_tree_merge_probs(const aom_tree_index *tree, const aom_prob *pre_probs, + const unsigned int *counts, aom_prob *probs); -DECLARE_ALIGNED(16, extern const uint8_t, vpx_norm[256]); +DECLARE_ALIGNED(16, extern const uint8_t, aom_norm[256]); #ifdef __cplusplus } // extern "C" diff --git a/aom_dsp/psnrhvs.c b/aom_dsp/psnrhvs.c index b5d5d65bbb3bce96b827da9da5f90210898e95bb..95750b4516a7873775f6f360e91534ffcc0aff27 100644 --- a/aom_dsp/psnrhvs.c +++ b/aom_dsp/psnrhvs.c @@ -15,8 +15,8 @@ #include <stdlib.h> #include <math.h> -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/ssim.h" #include "aom_ports/system_state.h" @@ -28,7 +28,7 @@ static void od_bin_fdct8x8(tran_low_t *y, int ystride, const int16_t *x, int xstride) { (void)xstride; - vpx_fdct8x8(x, y, ystride); + aom_fdct8x8(x, y, ystride); } /* Normalized inverse quantization matrix for 8x8 DCT at the point of @@ -202,13 +202,13 @@ static double calc_psnrhvs(const unsigned char *_src, int _systride, ret /= pixels; return ret; } -double vpx_psnrhvs(const YV12_BUFFER_CONFIG *source, +double aom_psnrhvs(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *y_psnrhvs, double *u_psnrhvs, double *v_psnrhvs) { double psnrhvs; const double par = 1.0; const int step = 7; - vpx_clear_system_state(); + aom_clear_system_state(); *y_psnrhvs = calc_psnrhvs(source->y_buffer, source->y_stride, dest->y_buffer, dest->y_stride, par, source->y_crop_width, source->y_crop_height, step, csf_y); diff --git a/aom_dsp/quantize.c b/aom_dsp/quantize.c index 3ef6d05bc60b57abd07c813154fd1611c900ea3b..2a194c6bb4a4f8daf8f8c8c53559853d6509c9a3 100644 --- a/aom_dsp/quantize.c +++ b/aom_dsp/quantize.c @@ -10,10 +10,10 @@ */ #include "aom_dsp/quantize.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #if CONFIG_AOM_QM -void vpx_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, +void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr, @@ -41,7 +41,7 @@ void vpx_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, +void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, @@ -69,7 +69,7 @@ void vpx_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, } #endif -void vpx_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, +void aom_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr, const int16_t quant, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr, @@ -100,7 +100,7 @@ void vpx_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, +void aom_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr, const int16_t quant, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, @@ -131,7 +131,7 @@ void vpx_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, } #endif -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, @@ -193,7 +193,7 @@ void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, @@ -252,7 +252,7 @@ void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, } #endif -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +void aom_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, @@ -317,7 +317,7 @@ void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_b_32x32_c( +void aom_highbd_quantize_b_32x32_c( const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, @@ -377,7 +377,7 @@ void vpx_highbd_quantize_b_32x32_c( } #endif #else -void vpx_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, +void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr) { @@ -401,7 +401,7 @@ void vpx_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, +void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, @@ -425,7 +425,7 @@ void vpx_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, } #endif -void vpx_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, +void aom_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr, const int16_t quant, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr) { @@ -451,7 +451,7 @@ void vpx_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, +void aom_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr, const int16_t quant, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, @@ -477,7 +477,7 @@ void vpx_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, } #endif -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, @@ -528,7 +528,7 @@ void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, @@ -578,7 +578,7 @@ void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, } #endif -void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +void aom_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, @@ -633,7 +633,7 @@ void vpx_quantize_b_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_b_32x32_c( +void aom_highbd_quantize_b_32x32_c( const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, diff --git a/aom_dsp/quantize.h b/aom_dsp/quantize.h index 2b5d09756396a615778349d7f19c508a42604f86..cb941b5568a6e47424f193a7ac5dae9f9289bb87 100644 --- a/aom_dsp/quantize.h +++ b/aom_dsp/quantize.h @@ -12,25 +12,25 @@ #ifndef VPX_DSP_QUANTIZE_H_ #define VPX_DSP_QUANTIZE_H_ -#include "./vpx_config.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "./aom_config.h" +#include "aom_dsp/aom_dsp_common.h" #ifdef __cplusplus extern "C" { #endif #if CONFIG_AOM_QM -void vpx_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, +void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr, const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr); -void vpx_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, +void aom_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr, const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr); -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, @@ -39,18 +39,18 @@ void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const int16_t *iscan, const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr); #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, +void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr, const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr); -void vpx_highbd_quantize_dc_32x32( +void aom_highbd_quantize_dc_32x32( const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr, const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr); -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, @@ -60,15 +60,15 @@ void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr); #endif #else -void vpx_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, +void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr); -void vpx_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, +void aom_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr); -void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, @@ -76,18 +76,18 @@ void vpx_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, +void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr); -void vpx_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, +void aom_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr); -void vpx_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, +void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, diff --git a/aom_dsp/sad.c b/aom_dsp/sad.c index d26ffe902ef52a90107ca8f39e38143ea2dba561..a94876aca5b7b4f914e258f2ee26bf36201dddc6 100644 --- a/aom_dsp/sad.c +++ b/aom_dsp/sad.c @@ -11,10 +11,10 @@ #include <stdlib.h> -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" /* Sum the difference between every corresponding element of the buffers. */ @@ -32,7 +32,7 @@ static INLINE unsigned int sad(const uint8_t *a, int a_stride, const uint8_t *b, return sad; } -// TODO(johannkoenig): this moved to vpx_dsp, should be able to clean this up. +// TODO(johannkoenig): this moved to aom_dsp, should be able to clean this up. /* Remove dependency on vp9 variance function by duplicating vp9_comp_avg_pred. * The function averages every corresponding element of the buffers and stores * the value in a third buffer, comp_pred. @@ -74,11 +74,11 @@ static INLINE void highbd_avg_pred(uint16_t *comp_pred, const uint8_t *pred8, #endif // CONFIG_VPX_HIGHBITDEPTH #define sadMxN(m, n) \ - unsigned int vpx_sad##m##x##n##_c(const uint8_t *src, int src_stride, \ + unsigned int aom_sad##m##x##n##_c(const uint8_t *src, int src_stride, \ const uint8_t *ref, int ref_stride) { \ return sad(src, src_stride, ref, ref_stride, m, n); \ } \ - unsigned int vpx_sad##m##x##n##_avg_c(const uint8_t *src, int src_stride, \ + unsigned int aom_sad##m##x##n##_avg_c(const uint8_t *src, int src_stride, \ const uint8_t *ref, int ref_stride, \ const uint8_t *second_pred) { \ uint8_t comp_pred[m * n]; \ @@ -89,24 +89,24 @@ static INLINE void highbd_avg_pred(uint16_t *comp_pred, const uint8_t *pred8, // depending on call sites, pass **ref_array to avoid & in subsequent call and // de-dup with 4D below. #define sadMxNxK(m, n, k) \ - void vpx_sad##m##x##n##x##k##_c(const uint8_t *src, int src_stride, \ + void aom_sad##m##x##n##x##k##_c(const uint8_t *src, int src_stride, \ const uint8_t *ref_array, int ref_stride, \ uint32_t *sad_array) { \ int i; \ for (i = 0; i < k; ++i) \ sad_array[i] = \ - vpx_sad##m##x##n##_c(src, src_stride, &ref_array[i], ref_stride); \ + aom_sad##m##x##n##_c(src, src_stride, &ref_array[i], ref_stride); \ } // This appears to be equivalent to the above when k == 4 and refs is const #define sadMxNx4D(m, n) \ - void vpx_sad##m##x##n##x4d_c(const uint8_t *src, int src_stride, \ + void aom_sad##m##x##n##x4d_c(const uint8_t *src, int src_stride, \ const uint8_t *const ref_array[], \ int ref_stride, uint32_t *sad_array) { \ int i; \ for (i = 0; i < 4; ++i) \ sad_array[i] = \ - vpx_sad##m##x##n##_c(src, src_stride, ref_array[i], ref_stride); \ + aom_sad##m##x##n##_c(src, src_stride, ref_array[i], ref_stride); \ } /* clang-format off */ @@ -212,12 +212,12 @@ static INLINE unsigned int highbd_sadb(const uint8_t *a8, int a_stride, } #define highbd_sadMxN(m, n) \ - unsigned int vpx_highbd_sad##m##x##n##_c(const uint8_t *src, int src_stride, \ + unsigned int aom_highbd_sad##m##x##n##_c(const uint8_t *src, int src_stride, \ const uint8_t *ref, \ int ref_stride) { \ return highbd_sad(src, src_stride, ref, ref_stride, m, n); \ } \ - unsigned int vpx_highbd_sad##m##x##n##_avg_c( \ + unsigned int aom_highbd_sad##m##x##n##_avg_c( \ const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, \ const uint8_t *second_pred) { \ uint16_t comp_pred[m * n]; \ @@ -226,23 +226,23 @@ static INLINE unsigned int highbd_sadb(const uint8_t *a8, int a_stride, } #define highbd_sadMxNxK(m, n, k) \ - void vpx_highbd_sad##m##x##n##x##k##_c( \ + void aom_highbd_sad##m##x##n##x##k##_c( \ const uint8_t *src, int src_stride, const uint8_t *ref_array, \ int ref_stride, uint32_t *sad_array) { \ int i; \ for (i = 0; i < k; ++i) { \ - sad_array[i] = vpx_highbd_sad##m##x##n##_c(src, src_stride, \ + sad_array[i] = aom_highbd_sad##m##x##n##_c(src, src_stride, \ &ref_array[i], ref_stride); \ } \ } #define highbd_sadMxNx4D(m, n) \ - void vpx_highbd_sad##m##x##n##x4d_c(const uint8_t *src, int src_stride, \ + void aom_highbd_sad##m##x##n##x4d_c(const uint8_t *src, int src_stride, \ const uint8_t *const ref_array[], \ int ref_stride, uint32_t *sad_array) { \ int i; \ for (i = 0; i < 4; ++i) { \ - sad_array[i] = vpx_highbd_sad##m##x##n##_c(src, src_stride, \ + sad_array[i] = aom_highbd_sad##m##x##n##_c(src, src_stride, \ ref_array[i], ref_stride); \ } \ } diff --git a/aom_dsp/ssim.c b/aom_dsp/ssim.c index e3f5d0dcd190d95505c6c359ae31bdb09b1b07a7..c2080709c9d8b5a06d21c958db6e9ebc9c290f9a 100644 --- a/aom_dsp/ssim.c +++ b/aom_dsp/ssim.c @@ -10,12 +10,12 @@ */ #include <math.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/ssim.h" #include "aom_ports/mem.h" #include "aom_ports/system_state.h" -void vpx_ssim_parms_16x16_c(const uint8_t *s, int sp, const uint8_t *r, int rp, +void aom_ssim_parms_16x16_c(const uint8_t *s, int sp, const uint8_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr) { @@ -30,7 +30,7 @@ void vpx_ssim_parms_16x16_c(const uint8_t *s, int sp, const uint8_t *r, int rp, } } } -void vpx_ssim_parms_8x8_c(const uint8_t *s, int sp, const uint8_t *r, int rp, +void aom_ssim_parms_8x8_c(const uint8_t *s, int sp, const uint8_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr) { int i, j; @@ -46,7 +46,7 @@ void vpx_ssim_parms_8x8_c(const uint8_t *s, int sp, const uint8_t *r, int rp, } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_ssim_parms_8x8_c(const uint16_t *s, int sp, const uint16_t *r, +void aom_highbd_ssim_parms_8x8_c(const uint16_t *s, int sp, const uint16_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr) { @@ -87,7 +87,7 @@ static double similarity(uint32_t sum_s, uint32_t sum_r, uint32_t sum_sq_s, static double ssim_8x8(const uint8_t *s, int sp, const uint8_t *r, int rp) { uint32_t sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0; - vpx_ssim_parms_8x8(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r, + aom_ssim_parms_8x8(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r, &sum_sxr); return similarity(sum_s, sum_r, sum_sq_s, sum_sq_r, sum_sxr, 64); } @@ -97,7 +97,7 @@ static double highbd_ssim_8x8(const uint16_t *s, int sp, const uint16_t *r, int rp, unsigned int bd) { uint32_t sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0; const int oshift = bd - 8; - vpx_highbd_ssim_parms_8x8(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r, + aom_highbd_ssim_parms_8x8(s, sp, r, rp, &sum_s, &sum_r, &sum_sq_s, &sum_sq_r, &sum_sxr); return similarity(sum_s >> oshift, sum_r >> oshift, sum_sq_s >> (2 * oshift), sum_sq_r >> (2 * oshift), sum_sxr >> (2 * oshift), 64); @@ -107,7 +107,7 @@ static double highbd_ssim_8x8(const uint16_t *s, int sp, const uint16_t *r, // We are using a 8x8 moving window with starting location of each 8x8 window // on the 4x4 pixel grid. Such arrangement allows the windows to overlap // block boundaries to penalize blocking artifacts. -static double vpx_ssim2(const uint8_t *img1, const uint8_t *img2, +static double aom_ssim2(const uint8_t *img1, const uint8_t *img2, int stride_img1, int stride_img2, int width, int height) { int i, j; @@ -128,7 +128,7 @@ static double vpx_ssim2(const uint8_t *img1, const uint8_t *img2, } #if CONFIG_VPX_HIGHBITDEPTH -static double vpx_highbd_ssim2(const uint8_t *img1, const uint8_t *img2, +static double aom_highbd_ssim2(const uint8_t *img1, const uint8_t *img2, int stride_img1, int stride_img2, int width, int height, unsigned int bd) { int i, j; @@ -151,18 +151,18 @@ static double vpx_highbd_ssim2(const uint8_t *img1, const uint8_t *img2, } #endif // CONFIG_VPX_HIGHBITDEPTH -double vpx_calc_ssim(const YV12_BUFFER_CONFIG *source, +double aom_calc_ssim(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *weight) { double a, b, c; double ssimv; - a = vpx_ssim2(source->y_buffer, dest->y_buffer, source->y_stride, + a = aom_ssim2(source->y_buffer, dest->y_buffer, source->y_stride, dest->y_stride, source->y_crop_width, source->y_crop_height); - b = vpx_ssim2(source->u_buffer, dest->u_buffer, source->uv_stride, + b = aom_ssim2(source->u_buffer, dest->u_buffer, source->uv_stride, dest->uv_stride, source->uv_crop_width, source->uv_crop_height); - c = vpx_ssim2(source->v_buffer, dest->v_buffer, source->uv_stride, + c = aom_ssim2(source->v_buffer, dest->v_buffer, source->uv_stride, dest->uv_stride, source->uv_crop_width, source->uv_crop_height); ssimv = a * .8 + .1 * (b + c); @@ -172,19 +172,19 @@ double vpx_calc_ssim(const YV12_BUFFER_CONFIG *source, return ssimv; } -double vpx_calc_ssimg(const YV12_BUFFER_CONFIG *source, +double aom_calc_ssimg(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *ssim_y, double *ssim_u, double *ssim_v) { double ssim_all = 0; double a, b, c; - a = vpx_ssim2(source->y_buffer, dest->y_buffer, source->y_stride, + a = aom_ssim2(source->y_buffer, dest->y_buffer, source->y_stride, dest->y_stride, source->y_crop_width, source->y_crop_height); - b = vpx_ssim2(source->u_buffer, dest->u_buffer, source->uv_stride, + b = aom_ssim2(source->u_buffer, dest->u_buffer, source->uv_stride, dest->uv_stride, source->uv_crop_width, source->uv_crop_height); - c = vpx_ssim2(source->v_buffer, dest->v_buffer, source->uv_stride, + c = aom_ssim2(source->v_buffer, dest->v_buffer, source->uv_stride, dest->uv_stride, source->uv_crop_width, source->uv_crop_height); *ssim_y = a; *ssim_u = b; @@ -272,11 +272,11 @@ static double ssimv_similarity2(const Ssimv *sv, int64_t n) { } static void ssimv_parms(uint8_t *img1, int img1_pitch, uint8_t *img2, int img2_pitch, Ssimv *sv) { - vpx_ssim_parms_8x8(img1, img1_pitch, img2, img2_pitch, &sv->sum_s, &sv->sum_r, + aom_ssim_parms_8x8(img1, img1_pitch, img2, img2_pitch, &sv->sum_s, &sv->sum_r, &sv->sum_sq_s, &sv->sum_sq_r, &sv->sum_sxr); } -double vpx_get_ssim_metrics(uint8_t *img1, int img1_pitch, uint8_t *img2, +double aom_get_ssim_metrics(uint8_t *img1, int img1_pitch, uint8_t *img2, int img2_pitch, int width, int height, Ssimv *sv2, Metrics *m, int do_inconsistency) { double dssim_total = 0; @@ -287,7 +287,7 @@ double vpx_get_ssim_metrics(uint8_t *img1, int img1_pitch, uint8_t *img2, int c = 0; double norm; double old_ssim_total = 0; - vpx_clear_system_state(); + aom_clear_system_state(); // We can sample points as frequently as we like start with 1 per 4x4. for (i = 0; i < height; i += 4, img1 += img1_pitch * 4, img2 += img2_pitch * 4) { @@ -437,21 +437,21 @@ double vpx_get_ssim_metrics(uint8_t *img1, int img1_pitch, uint8_t *img2, } #if CONFIG_VPX_HIGHBITDEPTH -double vpx_highbd_calc_ssim(const YV12_BUFFER_CONFIG *source, +double aom_highbd_calc_ssim(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *weight, unsigned int bd) { double a, b, c; double ssimv; - a = vpx_highbd_ssim2(source->y_buffer, dest->y_buffer, source->y_stride, + a = aom_highbd_ssim2(source->y_buffer, dest->y_buffer, source->y_stride, dest->y_stride, source->y_crop_width, source->y_crop_height, bd); - b = vpx_highbd_ssim2(source->u_buffer, dest->u_buffer, source->uv_stride, + b = aom_highbd_ssim2(source->u_buffer, dest->u_buffer, source->uv_stride, dest->uv_stride, source->uv_crop_width, source->uv_crop_height, bd); - c = vpx_highbd_ssim2(source->v_buffer, dest->v_buffer, source->uv_stride, + c = aom_highbd_ssim2(source->v_buffer, dest->v_buffer, source->uv_stride, dest->uv_stride, source->uv_crop_width, source->uv_crop_height, bd); @@ -462,21 +462,21 @@ double vpx_highbd_calc_ssim(const YV12_BUFFER_CONFIG *source, return ssimv; } -double vpx_highbd_calc_ssimg(const YV12_BUFFER_CONFIG *source, +double aom_highbd_calc_ssimg(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *ssim_y, double *ssim_u, double *ssim_v, unsigned int bd) { double ssim_all = 0; double a, b, c; - a = vpx_highbd_ssim2(source->y_buffer, dest->y_buffer, source->y_stride, + a = aom_highbd_ssim2(source->y_buffer, dest->y_buffer, source->y_stride, dest->y_stride, source->y_crop_width, source->y_crop_height, bd); - b = vpx_highbd_ssim2(source->u_buffer, dest->u_buffer, source->uv_stride, + b = aom_highbd_ssim2(source->u_buffer, dest->u_buffer, source->uv_stride, dest->uv_stride, source->uv_crop_width, source->uv_crop_height, bd); - c = vpx_highbd_ssim2(source->v_buffer, dest->v_buffer, source->uv_stride, + c = aom_highbd_ssim2(source->v_buffer, dest->v_buffer, source->uv_stride, dest->uv_stride, source->uv_crop_width, source->uv_crop_height, bd); *ssim_y = a; diff --git a/aom_dsp/ssim.h b/aom_dsp/ssim.h index 380211f7548489231a6dc996a8fdf322515647b9..afe9d9ac6a40a8486ba70a9ccaa86752e473defc 100644 --- a/aom_dsp/ssim.h +++ b/aom_dsp/ssim.h @@ -16,7 +16,7 @@ extern "C" { #endif -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_scale/yv12config.h" // metrics used for calculating ssim, ssim2, dssim, and ssimc @@ -61,31 +61,31 @@ typedef struct { double ssimcd; } Metrics; -double vpx_get_ssim_metrics(uint8_t *img1, int img1_pitch, uint8_t *img2, +double aom_get_ssim_metrics(uint8_t *img1, int img1_pitch, uint8_t *img2, int img2_pitch, int width, int height, Ssimv *sv2, Metrics *m, int do_inconsistency); -double vpx_calc_ssim(const YV12_BUFFER_CONFIG *source, +double aom_calc_ssim(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *weight); -double vpx_calc_ssimg(const YV12_BUFFER_CONFIG *source, +double aom_calc_ssimg(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *ssim_y, double *ssim_u, double *ssim_v); -double vpx_calc_fastssim(const YV12_BUFFER_CONFIG *source, +double aom_calc_fastssim(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *ssim_y, double *ssim_u, double *ssim_v); -double vpx_psnrhvs(const YV12_BUFFER_CONFIG *source, +double aom_psnrhvs(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *ssim_y, double *ssim_u, double *ssim_v); #if CONFIG_VPX_HIGHBITDEPTH -double vpx_highbd_calc_ssim(const YV12_BUFFER_CONFIG *source, +double aom_highbd_calc_ssim(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *weight, unsigned int bd); -double vpx_highbd_calc_ssimg(const YV12_BUFFER_CONFIG *source, +double aom_highbd_calc_ssimg(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *ssim_y, double *ssim_u, double *ssim_v, unsigned int bd); #endif // CONFIG_VPX_HIGHBITDEPTH diff --git a/aom_dsp/subtract.c b/aom_dsp/subtract.c index 871549a504e55f3cb69e4e33a3f5c4161bdd7583..3890d46bed8e319826bbbf6409ea3a906c6a5575 100644 --- a/aom_dsp/subtract.c +++ b/aom_dsp/subtract.c @@ -11,13 +11,13 @@ #include <stdlib.h> -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" -void vpx_subtract_block_c(int rows, int cols, int16_t *diff, +void aom_subtract_block_c(int rows, int cols, int16_t *diff, ptrdiff_t diff_stride, const uint8_t *src, ptrdiff_t src_stride, const uint8_t *pred, ptrdiff_t pred_stride) { @@ -33,7 +33,7 @@ void vpx_subtract_block_c(int rows, int cols, int16_t *diff, } #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_subtract_block_c(int rows, int cols, int16_t *diff, +void aom_highbd_subtract_block_c(int rows, int cols, int16_t *diff, ptrdiff_t diff_stride, const uint8_t *src8, ptrdiff_t src_stride, const uint8_t *pred8, ptrdiff_t pred_stride, int bd) { diff --git a/aom_dsp/txfm_common.h b/aom_dsp/txfm_common.h index a027333ead0782d5f8e2f272ea9e26906f8f040f..6fda5b5a4d71f87236406602c39b1651bb280b4f 100644 --- a/aom_dsp/txfm_common.h +++ b/aom_dsp/txfm_common.h @@ -12,7 +12,7 @@ #ifndef VPX_DSP_TXFM_COMMON_H_ #define VPX_DSP_TXFM_COMMON_H_ -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" // Constants and Macros used by all idct/dct functions #define DCT_CONST_BITS 14 diff --git a/aom_dsp/variance.c b/aom_dsp/variance.c index 4eb963c25d6b15265708ae6e72371fcc94164c79..33675383c49ffe40798e9f85a4b2f96d212fab3c 100644 --- a/aom_dsp/variance.c +++ b/aom_dsp/variance.c @@ -9,11 +9,11 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_dsp/variance.h" @@ -22,7 +22,7 @@ static const uint8_t bilinear_filters[8][2] = { { 64, 64 }, { 48, 80 }, { 32, 96 }, { 16, 112 }, }; -uint32_t vpx_get4x4sse_cs_c(const uint8_t *a, int a_stride, const uint8_t *b, +uint32_t aom_get4x4sse_cs_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride) { int distortion = 0; int r, c; @@ -40,7 +40,7 @@ uint32_t vpx_get4x4sse_cs_c(const uint8_t *a, int a_stride, const uint8_t *b, return distortion; } -uint32_t vpx_get_mb_ss_c(const int16_t *a) { +uint32_t aom_get_mb_ss_c(const int16_t *a) { unsigned int i, sum = 0; for (i = 0; i < 256; ++i) { @@ -50,22 +50,22 @@ uint32_t vpx_get_mb_ss_c(const int16_t *a) { return sum; } -uint32_t vpx_variance_halfpixvar16x16_h_c(const uint8_t *a, int a_stride, +uint32_t aom_variance_halfpixvar16x16_h_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, uint32_t *sse) { - return vpx_sub_pixel_variance16x16_c(a, a_stride, 4, 0, b, b_stride, sse); + return aom_sub_pixel_variance16x16_c(a, a_stride, 4, 0, b, b_stride, sse); } -uint32_t vpx_variance_halfpixvar16x16_v_c(const uint8_t *a, int a_stride, +uint32_t aom_variance_halfpixvar16x16_v_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, uint32_t *sse) { - return vpx_sub_pixel_variance16x16_c(a, a_stride, 0, 4, b, b_stride, sse); + return aom_sub_pixel_variance16x16_c(a, a_stride, 0, 4, b, b_stride, sse); } -uint32_t vpx_variance_halfpixvar16x16_hv_c(const uint8_t *a, int a_stride, +uint32_t aom_variance_halfpixvar16x16_hv_c(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, uint32_t *sse) { - return vpx_sub_pixel_variance16x16_c(a, a_stride, 4, 4, b, b_stride, sse); + return aom_sub_pixel_variance16x16_c(a, a_stride, 4, 4, b, b_stride, sse); } static void variance(const uint8_t *a, int a_stride, const uint8_t *b, @@ -146,7 +146,7 @@ static void var_filter_block2d_bil_second_pass(const uint16_t *a, uint8_t *b, } #define VAR(W, H) \ - uint32_t vpx_variance##W##x##H##_c(const uint8_t *a, int a_stride, \ + uint32_t aom_variance##W##x##H##_c(const uint8_t *a, int a_stride, \ const uint8_t *b, int b_stride, \ uint32_t *sse) { \ int sum; \ @@ -155,7 +155,7 @@ static void var_filter_block2d_bil_second_pass(const uint16_t *a, uint8_t *b, } #define SUBPIX_VAR(W, H) \ - uint32_t vpx_sub_pixel_variance##W##x##H##_c( \ + uint32_t aom_sub_pixel_variance##W##x##H##_c( \ const uint8_t *a, int a_stride, int xoffset, int yoffset, \ const uint8_t *b, int b_stride, uint32_t *sse) { \ uint16_t fdata3[(H + 1) * W]; \ @@ -166,11 +166,11 @@ static void var_filter_block2d_bil_second_pass(const uint16_t *a, uint8_t *b, var_filter_block2d_bil_second_pass(fdata3, temp2, W, W, H, W, \ bilinear_filters[yoffset]); \ \ - return vpx_variance##W##x##H##_c(temp2, W, b, b_stride, sse); \ + return aom_variance##W##x##H##_c(temp2, W, b, b_stride, sse); \ } #define SUBPIX_AVG_VAR(W, H) \ - uint32_t vpx_sub_pixel_avg_variance##W##x##H##_c( \ + uint32_t aom_sub_pixel_avg_variance##W##x##H##_c( \ const uint8_t *a, int a_stride, int xoffset, int yoffset, \ const uint8_t *b, int b_stride, uint32_t *sse, \ const uint8_t *second_pred) { \ @@ -183,9 +183,9 @@ static void var_filter_block2d_bil_second_pass(const uint16_t *a, uint8_t *b, var_filter_block2d_bil_second_pass(fdata3, temp2, W, W, H, W, \ bilinear_filters[yoffset]); \ \ - vpx_comp_avg_pred(temp3, second_pred, W, H, temp2, W); \ + aom_comp_avg_pred(temp3, second_pred, W, H, temp2, W); \ \ - return vpx_variance##W##x##H##_c(temp3, W, b, b_stride, sse); \ + return aom_variance##W##x##H##_c(temp3, W, b, b_stride, sse); \ } /* Identical to the variance call except it takes an additional parameter, sum, @@ -193,7 +193,7 @@ static void var_filter_block2d_bil_second_pass(const uint16_t *a, uint8_t *b, * sse - sum^2 / w*h */ #define GET_VAR(W, H) \ - void vpx_get##W##x##H##var_c(const uint8_t *a, int a_stride, \ + void aom_get##W##x##H##var_c(const uint8_t *a, int a_stride, \ const uint8_t *b, int b_stride, uint32_t *sse, \ int *sum) { \ variance(a, a_stride, b, b_stride, W, H, sse, sum); \ @@ -204,7 +204,7 @@ static void var_filter_block2d_bil_second_pass(const uint16_t *a, uint8_t *b, * variable. */ #define MSE(W, H) \ - uint32_t vpx_mse##W##x##H##_c(const uint8_t *a, int a_stride, \ + uint32_t aom_mse##W##x##H##_c(const uint8_t *a, int a_stride, \ const uint8_t *b, int b_stride, \ uint32_t *sse) { \ int sum; \ @@ -242,7 +242,7 @@ MSE(8, 16) MSE(8, 8) /* clang-format on */ -void vpx_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, +void aom_comp_avg_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride) { int i, j; @@ -310,7 +310,7 @@ static void highbd_12_variance(const uint8_t *a8, int a_stride, } #define HIGHBD_VAR(W, H) \ - uint32_t vpx_highbd_8_variance##W##x##H##_c(const uint8_t *a, int a_stride, \ + uint32_t aom_highbd_8_variance##W##x##H##_c(const uint8_t *a, int a_stride, \ const uint8_t *b, int b_stride, \ uint32_t *sse) { \ int sum; \ @@ -318,7 +318,7 @@ static void highbd_12_variance(const uint8_t *a8, int a_stride, return *sse - (((int64_t)sum * sum) / (W * H)); \ } \ \ - uint32_t vpx_highbd_10_variance##W##x##H##_c(const uint8_t *a, int a_stride, \ + uint32_t aom_highbd_10_variance##W##x##H##_c(const uint8_t *a, int a_stride, \ const uint8_t *b, int b_stride, \ uint32_t *sse) { \ int sum; \ @@ -326,7 +326,7 @@ static void highbd_12_variance(const uint8_t *a8, int a_stride, return *sse - (((int64_t)sum * sum) / (W * H)); \ } \ \ - uint32_t vpx_highbd_12_variance##W##x##H##_c(const uint8_t *a, int a_stride, \ + uint32_t aom_highbd_12_variance##W##x##H##_c(const uint8_t *a, int a_stride, \ const uint8_t *b, int b_stride, \ uint32_t *sse) { \ int sum; \ @@ -335,26 +335,26 @@ static void highbd_12_variance(const uint8_t *a8, int a_stride, } #define HIGHBD_GET_VAR(S) \ - void vpx_highbd_8_get##S##x##S##var_c(const uint8_t *src, int src_stride, \ + void aom_highbd_8_get##S##x##S##var_c(const uint8_t *src, int src_stride, \ const uint8_t *ref, int ref_stride, \ uint32_t *sse, int *sum) { \ highbd_8_variance(src, src_stride, ref, ref_stride, S, S, sse, sum); \ } \ \ - void vpx_highbd_10_get##S##x##S##var_c(const uint8_t *src, int src_stride, \ + void aom_highbd_10_get##S##x##S##var_c(const uint8_t *src, int src_stride, \ const uint8_t *ref, int ref_stride, \ uint32_t *sse, int *sum) { \ highbd_10_variance(src, src_stride, ref, ref_stride, S, S, sse, sum); \ } \ \ - void vpx_highbd_12_get##S##x##S##var_c(const uint8_t *src, int src_stride, \ + void aom_highbd_12_get##S##x##S##var_c(const uint8_t *src, int src_stride, \ const uint8_t *ref, int ref_stride, \ uint32_t *sse, int *sum) { \ highbd_12_variance(src, src_stride, ref, ref_stride, S, S, sse, sum); \ } #define HIGHBD_MSE(W, H) \ - uint32_t vpx_highbd_8_mse##W##x##H##_c(const uint8_t *src, int src_stride, \ + uint32_t aom_highbd_8_mse##W##x##H##_c(const uint8_t *src, int src_stride, \ const uint8_t *ref, int ref_stride, \ uint32_t *sse) { \ int sum; \ @@ -362,7 +362,7 @@ static void highbd_12_variance(const uint8_t *a8, int a_stride, return *sse; \ } \ \ - uint32_t vpx_highbd_10_mse##W##x##H##_c(const uint8_t *src, int src_stride, \ + uint32_t aom_highbd_10_mse##W##x##H##_c(const uint8_t *src, int src_stride, \ const uint8_t *ref, int ref_stride, \ uint32_t *sse) { \ int sum; \ @@ -370,7 +370,7 @@ static void highbd_12_variance(const uint8_t *a8, int a_stride, return *sse; \ } \ \ - uint32_t vpx_highbd_12_mse##W##x##H##_c(const uint8_t *src, int src_stride, \ + uint32_t aom_highbd_12_mse##W##x##H##_c(const uint8_t *src, int src_stride, \ const uint8_t *ref, int ref_stride, \ uint32_t *sse) { \ int sum; \ @@ -421,7 +421,7 @@ static void highbd_var_filter_block2d_bil_second_pass( } #define HIGHBD_SUBPIX_VAR(W, H) \ - uint32_t vpx_highbd_8_sub_pixel_variance##W##x##H##_c( \ + uint32_t aom_highbd_8_sub_pixel_variance##W##x##H##_c( \ const uint8_t *src, int src_stride, int xoffset, int yoffset, \ const uint8_t *dst, int dst_stride, uint32_t *sse) { \ uint16_t fdata3[(H + 1) * W]; \ @@ -432,11 +432,11 @@ static void highbd_var_filter_block2d_bil_second_pass( highbd_var_filter_block2d_bil_second_pass(fdata3, temp2, W, W, H, W, \ bilinear_filters[yoffset]); \ \ - return vpx_highbd_8_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp2), W, \ + return aom_highbd_8_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp2), W, \ dst, dst_stride, sse); \ } \ \ - uint32_t vpx_highbd_10_sub_pixel_variance##W##x##H##_c( \ + uint32_t aom_highbd_10_sub_pixel_variance##W##x##H##_c( \ const uint8_t *src, int src_stride, int xoffset, int yoffset, \ const uint8_t *dst, int dst_stride, uint32_t *sse) { \ uint16_t fdata3[(H + 1) * W]; \ @@ -447,11 +447,11 @@ static void highbd_var_filter_block2d_bil_second_pass( highbd_var_filter_block2d_bil_second_pass(fdata3, temp2, W, W, H, W, \ bilinear_filters[yoffset]); \ \ - return vpx_highbd_10_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp2), W, \ + return aom_highbd_10_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp2), W, \ dst, dst_stride, sse); \ } \ \ - uint32_t vpx_highbd_12_sub_pixel_variance##W##x##H##_c( \ + uint32_t aom_highbd_12_sub_pixel_variance##W##x##H##_c( \ const uint8_t *src, int src_stride, int xoffset, int yoffset, \ const uint8_t *dst, int dst_stride, uint32_t *sse) { \ uint16_t fdata3[(H + 1) * W]; \ @@ -462,12 +462,12 @@ static void highbd_var_filter_block2d_bil_second_pass( highbd_var_filter_block2d_bil_second_pass(fdata3, temp2, W, W, H, W, \ bilinear_filters[yoffset]); \ \ - return vpx_highbd_12_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp2), W, \ + return aom_highbd_12_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp2), W, \ dst, dst_stride, sse); \ } #define HIGHBD_SUBPIX_AVG_VAR(W, H) \ - uint32_t vpx_highbd_8_sub_pixel_avg_variance##W##x##H##_c( \ + uint32_t aom_highbd_8_sub_pixel_avg_variance##W##x##H##_c( \ const uint8_t *src, int src_stride, int xoffset, int yoffset, \ const uint8_t *dst, int dst_stride, uint32_t *sse, \ const uint8_t *second_pred) { \ @@ -480,14 +480,14 @@ static void highbd_var_filter_block2d_bil_second_pass( highbd_var_filter_block2d_bil_second_pass(fdata3, temp2, W, W, H, W, \ bilinear_filters[yoffset]); \ \ - vpx_highbd_comp_avg_pred(temp3, second_pred, W, H, \ + aom_highbd_comp_avg_pred(temp3, second_pred, W, H, \ CONVERT_TO_BYTEPTR(temp2), W); \ \ - return vpx_highbd_8_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp3), W, \ + return aom_highbd_8_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp3), W, \ dst, dst_stride, sse); \ } \ \ - uint32_t vpx_highbd_10_sub_pixel_avg_variance##W##x##H##_c( \ + uint32_t aom_highbd_10_sub_pixel_avg_variance##W##x##H##_c( \ const uint8_t *src, int src_stride, int xoffset, int yoffset, \ const uint8_t *dst, int dst_stride, uint32_t *sse, \ const uint8_t *second_pred) { \ @@ -500,14 +500,14 @@ static void highbd_var_filter_block2d_bil_second_pass( highbd_var_filter_block2d_bil_second_pass(fdata3, temp2, W, W, H, W, \ bilinear_filters[yoffset]); \ \ - vpx_highbd_comp_avg_pred(temp3, second_pred, W, H, \ + aom_highbd_comp_avg_pred(temp3, second_pred, W, H, \ CONVERT_TO_BYTEPTR(temp2), W); \ \ - return vpx_highbd_10_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp3), W, \ + return aom_highbd_10_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp3), W, \ dst, dst_stride, sse); \ } \ \ - uint32_t vpx_highbd_12_sub_pixel_avg_variance##W##x##H##_c( \ + uint32_t aom_highbd_12_sub_pixel_avg_variance##W##x##H##_c( \ const uint8_t *src, int src_stride, int xoffset, int yoffset, \ const uint8_t *dst, int dst_stride, uint32_t *sse, \ const uint8_t *second_pred) { \ @@ -520,10 +520,10 @@ static void highbd_var_filter_block2d_bil_second_pass( highbd_var_filter_block2d_bil_second_pass(fdata3, temp2, W, W, H, W, \ bilinear_filters[yoffset]); \ \ - vpx_highbd_comp_avg_pred(temp3, second_pred, W, H, \ + aom_highbd_comp_avg_pred(temp3, second_pred, W, H, \ CONVERT_TO_BYTEPTR(temp2), W); \ \ - return vpx_highbd_12_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp3), W, \ + return aom_highbd_12_variance##W##x##H##_c(CONVERT_TO_BYTEPTR(temp3), W, \ dst, dst_stride, sse); \ } @@ -557,7 +557,7 @@ HIGHBD_MSE(8, 16) HIGHBD_MSE(8, 8) /* clang-format on */ -void vpx_highbd_comp_avg_pred(uint16_t *comp_pred, const uint8_t *pred8, +void aom_highbd_comp_avg_pred(uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride) { int i, j; diff --git a/aom_dsp/variance.h b/aom_dsp/variance.h index 8b1e1d19d9aed3d74d3da97bc1c4b747fb7dfe0d..81966fc6ba19a36eb5ecde6926e7715297f1697c 100644 --- a/aom_dsp/variance.h +++ b/aom_dsp/variance.h @@ -12,9 +12,9 @@ #ifndef VPX_DSP_VARIANCE_H_ #define VPX_DSP_VARIANCE_H_ -#include "./vpx_config.h" +#include "./aom_config.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { @@ -23,48 +23,48 @@ extern "C" { #define FILTER_BITS 7 #define FILTER_WEIGHT 128 -typedef unsigned int (*vpx_sad_fn_t)(const uint8_t *a, int a_stride, +typedef unsigned int (*aom_sad_fn_t)(const uint8_t *a, int a_stride, const uint8_t *b_ptr, int b_stride); -typedef unsigned int (*vpx_sad_avg_fn_t)(const uint8_t *a_ptr, int a_stride, +typedef unsigned int (*aom_sad_avg_fn_t)(const uint8_t *a_ptr, int a_stride, const uint8_t *b_ptr, int b_stride, const uint8_t *second_pred); typedef void (*vp8_copy32xn_fn_t)(const uint8_t *a, int a_stride, uint8_t *b, int b_stride, int n); -typedef void (*vpx_sad_multi_fn_t)(const uint8_t *a, int a_stride, +typedef void (*aom_sad_multi_fn_t)(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sad_array); -typedef void (*vpx_sad_multi_d_fn_t)(const uint8_t *a, int a_stride, +typedef void (*aom_sad_multi_d_fn_t)(const uint8_t *a, int a_stride, const uint8_t *const b_array[], int b_stride, unsigned int *sad_array); -typedef unsigned int (*vpx_variance_fn_t)(const uint8_t *a, int a_stride, +typedef unsigned int (*aom_variance_fn_t)(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sse); -typedef unsigned int (*vpx_subpixvariance_fn_t)(const uint8_t *a, int a_stride, +typedef unsigned int (*aom_subpixvariance_fn_t)(const uint8_t *a, int a_stride, int xoffset, int yoffset, const uint8_t *b, int b_stride, unsigned int *sse); -typedef unsigned int (*vpx_subp_avg_variance_fn_t)( +typedef unsigned int (*aom_subp_avg_variance_fn_t)( const uint8_t *a_ptr, int a_stride, int xoffset, int yoffset, const uint8_t *b_ptr, int b_stride, unsigned int *sse, const uint8_t *second_pred); #if CONFIG_VP10 -typedef struct vpx_variance_vtable { - vpx_sad_fn_t sdf; - vpx_sad_avg_fn_t sdaf; - vpx_variance_fn_t vf; - vpx_subpixvariance_fn_t svf; - vpx_subp_avg_variance_fn_t svaf; - vpx_sad_multi_fn_t sdx3f; - vpx_sad_multi_fn_t sdx8f; - vpx_sad_multi_d_fn_t sdx4df; -} vpx_variance_fn_ptr_t; +typedef struct aom_variance_vtable { + aom_sad_fn_t sdf; + aom_sad_avg_fn_t sdaf; + aom_variance_fn_t vf; + aom_subpixvariance_fn_t svf; + aom_subp_avg_variance_fn_t svaf; + aom_sad_multi_fn_t sdx3f; + aom_sad_multi_fn_t sdx8f; + aom_sad_multi_d_fn_t sdx4df; +} aom_variance_fn_ptr_t; #endif // CONFIG_VP10 #ifdef __cplusplus diff --git a/aom_dsp/vpx_dsp_rtcd_defs.pl b/aom_dsp/vpx_dsp_rtcd_defs.pl deleted file mode 100644 index c9c8cf705ed72943b856d2e94f8c742d232f94b8..0000000000000000000000000000000000000000 --- a/aom_dsp/vpx_dsp_rtcd_defs.pl +++ /dev/null @@ -1,1919 +0,0 @@ -sub vpx_dsp_forward_decls() { -print <<EOF -/* - * DSP - */ - -#include "aom/vpx_integer.h" -#include "aom_dsp/vpx_dsp_common.h" - -EOF -} -forward_decls qw/vpx_dsp_forward_decls/; - -# x86inc.asm had specific constraints. break it out so it's easy to disable. -# zero all the variables to avoid tricky else conditions. -$mmx_x86inc = $sse_x86inc = $sse2_x86inc = $ssse3_x86inc = $avx_x86inc = - $avx2_x86inc = ''; -$mmx_x86_64_x86inc = $sse_x86_64_x86inc = $sse2_x86_64_x86inc = - $ssse3_x86_64_x86inc = $avx_x86_64_x86inc = $avx2_x86_64_x86inc = ''; -if (vpx_config("CONFIG_USE_X86INC") eq "yes") { - $mmx_x86inc = 'mmx'; - $sse_x86inc = 'sse'; - $sse2_x86inc = 'sse2'; - $ssse3_x86inc = 'ssse3'; - $avx_x86inc = 'avx'; - $avx2_x86inc = 'avx2'; - if ($opts{arch} eq "x86_64") { - $mmx_x86_64_x86inc = 'mmx'; - $sse_x86_64_x86inc = 'sse'; - $sse2_x86_64_x86inc = 'sse2'; - $ssse3_x86_64_x86inc = 'ssse3'; - $avx_x86_64_x86inc = 'avx'; - $avx2_x86_64_x86inc = 'avx2'; - } -} - -# optimizations which depend on multiple features -$avx2_ssse3 = ''; -if ((vpx_config("HAVE_AVX2") eq "yes") && (vpx_config("HAVE_SSSE3") eq "yes")) { - $avx2_ssse3 = 'avx2'; -} - -# functions that are 64 bit only. -$mmx_x86_64 = $sse2_x86_64 = $ssse3_x86_64 = $avx_x86_64 = $avx2_x86_64 = ''; -if ($opts{arch} eq "x86_64") { - $mmx_x86_64 = 'mmx'; - $sse2_x86_64 = 'sse2'; - $ssse3_x86_64 = 'ssse3'; - $avx_x86_64 = 'avx'; - $avx2_x86_64 = 'avx2'; -} - -# -# Intra prediction -# - -add_proto qw/void vpx_d207_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d207_predictor_4x4/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d207e_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d207e_predictor_4x4/; - -add_proto qw/void vpx_d45_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d45_predictor_4x4 neon/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d45e_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d45e_predictor_4x4/; - -add_proto qw/void vpx_d63_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d63_predictor_4x4/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d63e_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d63e_predictor_4x4/; - -add_proto qw/void vpx_d63f_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d63f_predictor_4x4/; - -add_proto qw/void vpx_h_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_h_predictor_4x4 neon dspr2 msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_he_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_he_predictor_4x4/; - -add_proto qw/void vpx_d117_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d117_predictor_4x4/; - -add_proto qw/void vpx_d135_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d135_predictor_4x4 neon/; - -add_proto qw/void vpx_d153_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d153_predictor_4x4/, "$ssse3_x86inc"; - -add_proto qw/void vpx_v_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_v_predictor_4x4 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_ve_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_ve_predictor_4x4/; - -add_proto qw/void vpx_tm_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_tm_predictor_4x4 neon dspr2 msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_predictor_4x4 dspr2 msa neon/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_top_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_top_predictor_4x4 msa neon/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_left_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_left_predictor_4x4 msa neon/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_128_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_128_predictor_4x4 msa neon/, "$sse2_x86inc"; - -add_proto qw/void vpx_d207_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d207_predictor_8x8/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d207e_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d207e_predictor_8x8/; - -add_proto qw/void vpx_d45_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d45_predictor_8x8 neon/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d45e_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d45e_predictor_8x8/; - -add_proto qw/void vpx_d63_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d63_predictor_8x8/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d63e_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d63e_predictor_8x8/; - -add_proto qw/void vpx_h_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_h_predictor_8x8 neon dspr2 msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_d117_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d117_predictor_8x8/; - -add_proto qw/void vpx_d135_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d135_predictor_8x8/; - -add_proto qw/void vpx_d153_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d153_predictor_8x8/, "$ssse3_x86inc"; - -add_proto qw/void vpx_v_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_v_predictor_8x8 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_tm_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_tm_predictor_8x8 neon dspr2 msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_predictor_8x8 dspr2 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_top_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_top_predictor_8x8 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_left_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_left_predictor_8x8 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_128_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_128_predictor_8x8 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_d207_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d207_predictor_16x16/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d207e_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d207e_predictor_16x16/; - -add_proto qw/void vpx_d45_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d45_predictor_16x16 neon/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d45e_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d45e_predictor_16x16/; - -add_proto qw/void vpx_d63_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d63_predictor_16x16/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d63e_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d63e_predictor_16x16/; - -add_proto qw/void vpx_h_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_h_predictor_16x16 neon dspr2 msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_d117_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d117_predictor_16x16/; - -add_proto qw/void vpx_d135_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d135_predictor_16x16/; - -add_proto qw/void vpx_d153_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d153_predictor_16x16/, "$ssse3_x86inc"; - -add_proto qw/void vpx_v_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_v_predictor_16x16 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_tm_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_tm_predictor_16x16 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_predictor_16x16 dspr2 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_top_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_top_predictor_16x16 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_left_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_left_predictor_16x16 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_128_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_128_predictor_16x16 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_d207_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d207_predictor_32x32/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d207e_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d207e_predictor_32x32/; - -add_proto qw/void vpx_d45_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d45_predictor_32x32/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d45e_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d45e_predictor_32x32/; - -add_proto qw/void vpx_d63_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d63_predictor_32x32/, "$ssse3_x86inc"; - -add_proto qw/void vpx_d63e_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d63e_predictor_32x32/; - -add_proto qw/void vpx_h_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_h_predictor_32x32 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_d117_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d117_predictor_32x32/; - -add_proto qw/void vpx_d135_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d135_predictor_32x32/; - -add_proto qw/void vpx_d153_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_d153_predictor_32x32/, "$ssse3_x86inc"; - -add_proto qw/void vpx_v_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_v_predictor_32x32 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_tm_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_tm_predictor_32x32 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_predictor_32x32 msa neon/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_top_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_top_predictor_32x32 msa neon/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_left_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_left_predictor_32x32 msa neon/, "$sse2_x86inc"; - -add_proto qw/void vpx_dc_128_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; -specialize qw/vpx_dc_128_predictor_32x32 msa neon/, "$sse2_x86inc"; - -# High bitdepth functions -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { - add_proto qw/void vpx_highbd_d207_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d207_predictor_4x4/; - - add_proto qw/void vpx_highbd_d207e_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d207e_predictor_4x4/; - - add_proto qw/void vpx_highbd_d45_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d45_predictor_4x4/; - - add_proto qw/void vpx_highbd_d45e_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d45e_predictor_4x4/; - - add_proto qw/void vpx_highbd_d63_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d63_predictor_4x4/; - - add_proto qw/void vpx_highbd_d63e_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d63e_predictor_4x4/; - - add_proto qw/void vpx_highbd_h_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_h_predictor_4x4/; - - add_proto qw/void vpx_highbd_d117_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d117_predictor_4x4/; - - add_proto qw/void vpx_highbd_d135_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d135_predictor_4x4/; - - add_proto qw/void vpx_highbd_d153_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d153_predictor_4x4/; - - add_proto qw/void vpx_highbd_v_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_v_predictor_4x4/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_tm_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_tm_predictor_4x4/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_dc_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_predictor_4x4/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_dc_top_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_top_predictor_4x4/; - - add_proto qw/void vpx_highbd_dc_left_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_left_predictor_4x4/; - - add_proto qw/void vpx_highbd_dc_128_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_128_predictor_4x4/; - - add_proto qw/void vpx_highbd_d207_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d207_predictor_8x8/; - - add_proto qw/void vpx_highbd_d207e_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d207e_predictor_8x8/; - - add_proto qw/void vpx_highbd_d45_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d45_predictor_8x8/; - - add_proto qw/void vpx_highbd_d45e_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d45e_predictor_8x8/; - - add_proto qw/void vpx_highbd_d63_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d63_predictor_8x8/; - - add_proto qw/void vpx_highbd_d63e_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d63e_predictor_8x8/; - - add_proto qw/void vpx_highbd_h_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_h_predictor_8x8/; - - add_proto qw/void vpx_highbd_d117_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d117_predictor_8x8/; - - add_proto qw/void vpx_highbd_d135_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d135_predictor_8x8/; - - add_proto qw/void vpx_highbd_d153_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d153_predictor_8x8/; - - add_proto qw/void vpx_highbd_v_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_v_predictor_8x8/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_tm_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_tm_predictor_8x8/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_dc_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_predictor_8x8/, "$sse2_x86inc";; - - add_proto qw/void vpx_highbd_dc_top_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_top_predictor_8x8/; - - add_proto qw/void vpx_highbd_dc_left_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_left_predictor_8x8/; - - add_proto qw/void vpx_highbd_dc_128_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_128_predictor_8x8/; - - add_proto qw/void vpx_highbd_d207_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d207_predictor_16x16/; - - add_proto qw/void vpx_highbd_d207e_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d207e_predictor_16x16/; - - add_proto qw/void vpx_highbd_d45_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d45_predictor_16x16/; - - add_proto qw/void vpx_highbd_d45e_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d45e_predictor_16x16/; - - add_proto qw/void vpx_highbd_d63_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d63_predictor_16x16/; - - add_proto qw/void vpx_highbd_d63e_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d63e_predictor_16x16/; - - add_proto qw/void vpx_highbd_h_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_h_predictor_16x16/; - - add_proto qw/void vpx_highbd_d117_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d117_predictor_16x16/; - - add_proto qw/void vpx_highbd_d135_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d135_predictor_16x16/; - - add_proto qw/void vpx_highbd_d153_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d153_predictor_16x16/; - - add_proto qw/void vpx_highbd_v_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_v_predictor_16x16/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_tm_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_tm_predictor_16x16/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_dc_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_predictor_16x16/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_dc_top_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_top_predictor_16x16/; - - add_proto qw/void vpx_highbd_dc_left_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_left_predictor_16x16/; - - add_proto qw/void vpx_highbd_dc_128_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_128_predictor_16x16/; - - add_proto qw/void vpx_highbd_d207_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d207_predictor_32x32/; - - add_proto qw/void vpx_highbd_d207e_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d207e_predictor_32x32/; - - add_proto qw/void vpx_highbd_d45_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d45_predictor_32x32/; - - add_proto qw/void vpx_highbd_d45e_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d45e_predictor_32x32/; - - add_proto qw/void vpx_highbd_d63_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d63_predictor_32x32/; - - add_proto qw/void vpx_highbd_d63e_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d63e_predictor_32x32/; - - add_proto qw/void vpx_highbd_h_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_h_predictor_32x32/; - - add_proto qw/void vpx_highbd_d117_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d117_predictor_32x32/; - - add_proto qw/void vpx_highbd_d135_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d135_predictor_32x32/; - - add_proto qw/void vpx_highbd_d153_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_d153_predictor_32x32/; - - add_proto qw/void vpx_highbd_v_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_v_predictor_32x32/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_tm_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_tm_predictor_32x32/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_dc_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_predictor_32x32/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_dc_top_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_top_predictor_32x32/; - - add_proto qw/void vpx_highbd_dc_left_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_left_predictor_32x32/; - - add_proto qw/void vpx_highbd_dc_128_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - specialize qw/vpx_highbd_dc_128_predictor_32x32/; -} # CONFIG_VPX_HIGHBITDEPTH - -# -# Sub Pixel Filters -# -add_proto qw/void vpx_convolve_copy/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_convolve_copy neon dspr2 msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_convolve_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_convolve_avg neon dspr2 msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_convolve8/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_convolve8 sse2 ssse3 neon dspr2 msa/, "$avx2_ssse3"; - -add_proto qw/void vpx_convolve8_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_convolve8_horiz sse2 ssse3 neon dspr2 msa/, "$avx2_ssse3"; - -add_proto qw/void vpx_convolve8_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_convolve8_vert sse2 ssse3 neon dspr2 msa/, "$avx2_ssse3"; - -add_proto qw/void vpx_convolve8_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_convolve8_avg sse2 ssse3 neon dspr2 msa/; - -add_proto qw/void vpx_convolve8_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_convolve8_avg_horiz sse2 ssse3 neon dspr2 msa/; - -add_proto qw/void vpx_convolve8_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_convolve8_avg_vert sse2 ssse3 neon dspr2 msa/; - -add_proto qw/void vpx_scaled_2d/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_scaled_2d ssse3/; - -add_proto qw/void vpx_scaled_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_scaled_horiz/; - -add_proto qw/void vpx_scaled_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_scaled_vert/; - -add_proto qw/void vpx_scaled_avg_2d/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_scaled_avg_2d/; - -add_proto qw/void vpx_scaled_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_scaled_avg_horiz/; - -add_proto qw/void vpx_scaled_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h"; -specialize qw/vpx_scaled_avg_vert/; - -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { - # - # Sub Pixel Filters - # - add_proto qw/void vpx_highbd_convolve_copy/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/vpx_highbd_convolve_copy/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_convolve_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/vpx_highbd_convolve_avg/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_convolve8/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/vpx_highbd_convolve8/, "$sse2_x86_64"; - - add_proto qw/void vpx_highbd_convolve8_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/vpx_highbd_convolve8_horiz/, "$sse2_x86_64"; - - add_proto qw/void vpx_highbd_convolve8_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/vpx_highbd_convolve8_vert/, "$sse2_x86_64"; - - add_proto qw/void vpx_highbd_convolve8_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/vpx_highbd_convolve8_avg/, "$sse2_x86_64"; - - add_proto qw/void vpx_highbd_convolve8_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/vpx_highbd_convolve8_avg_horiz/, "$sse2_x86_64"; - - add_proto qw/void vpx_highbd_convolve8_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/vpx_highbd_convolve8_avg_vert/, "$sse2_x86_64"; -} # CONFIG_VPX_HIGHBITDEPTH - -# -# Loopfilter -# -add_proto qw/void vpx_lpf_vertical_16/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh"; -specialize qw/vpx_lpf_vertical_16 sse2 neon_asm dspr2 msa/; -$vpx_lpf_vertical_16_neon_asm=vpx_lpf_vertical_16_neon; - -add_proto qw/void vpx_lpf_vertical_16_dual/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh"; -specialize qw/vpx_lpf_vertical_16_dual sse2 neon_asm dspr2 msa/; -$vpx_lpf_vertical_16_dual_neon_asm=vpx_lpf_vertical_16_dual_neon; - -add_proto qw/void vpx_lpf_vertical_8/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"; -specialize qw/vpx_lpf_vertical_8 sse2 neon dspr2 msa/; - -add_proto qw/void vpx_lpf_vertical_8_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1"; -specialize qw/vpx_lpf_vertical_8_dual sse2 neon_asm dspr2 msa/; -$vpx_lpf_vertical_8_dual_neon_asm=vpx_lpf_vertical_8_dual_neon; - -add_proto qw/void vpx_lpf_vertical_4/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"; -specialize qw/vpx_lpf_vertical_4 mmx neon dspr2 msa/; - -add_proto qw/void vpx_lpf_vertical_4_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1"; -specialize qw/vpx_lpf_vertical_4_dual sse2 neon dspr2 msa/; - -add_proto qw/void vpx_lpf_horizontal_16/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"; -specialize qw/vpx_lpf_horizontal_16 sse2 avx2 neon_asm dspr2 msa/; -$vpx_lpf_horizontal_16_neon_asm=vpx_lpf_horizontal_16_neon; - -add_proto qw/void vpx_lpf_horizontal_8/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"; -specialize qw/vpx_lpf_horizontal_8 sse2 neon dspr2 msa/; - -add_proto qw/void vpx_lpf_horizontal_8_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1"; -specialize qw/vpx_lpf_horizontal_8_dual sse2 neon_asm dspr2 msa/; -$vpx_lpf_horizontal_8_dual_neon_asm=vpx_lpf_horizontal_8_dual_neon; - -add_proto qw/void vpx_lpf_horizontal_4/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count"; -specialize qw/vpx_lpf_horizontal_4 mmx neon dspr2 msa/; - -add_proto qw/void vpx_lpf_horizontal_4_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1"; -specialize qw/vpx_lpf_horizontal_4_dual sse2 neon dspr2 msa/; - -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { - add_proto qw/void vpx_highbd_lpf_vertical_16/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd"; - specialize qw/vpx_highbd_lpf_vertical_16 sse2/; - - add_proto qw/void vpx_highbd_lpf_vertical_16_dual/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd"; - specialize qw/vpx_highbd_lpf_vertical_16_dual sse2/; - - add_proto qw/void vpx_highbd_lpf_vertical_8/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd"; - specialize qw/vpx_highbd_lpf_vertical_8 sse2/; - - add_proto qw/void vpx_highbd_lpf_vertical_8_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd"; - specialize qw/vpx_highbd_lpf_vertical_8_dual sse2/; - - add_proto qw/void vpx_highbd_lpf_vertical_4/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd"; - specialize qw/vpx_highbd_lpf_vertical_4 sse2/; - - add_proto qw/void vpx_highbd_lpf_vertical_4_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd"; - specialize qw/vpx_highbd_lpf_vertical_4_dual sse2/; - - add_proto qw/void vpx_highbd_lpf_horizontal_16/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd"; - specialize qw/vpx_highbd_lpf_horizontal_16 sse2/; - - add_proto qw/void vpx_highbd_lpf_horizontal_8/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd"; - specialize qw/vpx_highbd_lpf_horizontal_8 sse2/; - - add_proto qw/void vpx_highbd_lpf_horizontal_8_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd"; - specialize qw/vpx_highbd_lpf_horizontal_8_dual sse2/; - - add_proto qw/void vpx_highbd_lpf_horizontal_4/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd"; - specialize qw/vpx_highbd_lpf_horizontal_4 sse2/; - - add_proto qw/void vpx_highbd_lpf_horizontal_4_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd"; - specialize qw/vpx_highbd_lpf_horizontal_4_dual sse2/; -} # CONFIG_VPX_HIGHBITDEPTH - -# -# Encoder functions. -# - -# -# Forward transform -# -if (vpx_config("CONFIG_VP10_ENCODER") eq "yes") { -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { - add_proto qw/void vpx_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct4x4 sse2/; - - add_proto qw/void vpx_fdct4x4_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct4x4_1 sse2/; - - add_proto qw/void vpx_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct8x8 sse2/; - - add_proto qw/void vpx_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct8x8_1 sse2/; - - add_proto qw/void vpx_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct16x16 sse2/; - - add_proto qw/void vpx_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct16x16_1 sse2/; - - add_proto qw/void vpx_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct32x32 sse2/; - - add_proto qw/void vpx_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct32x32_rd sse2/; - - add_proto qw/void vpx_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct32x32_1 sse2/; - - add_proto qw/void vpx_highbd_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_highbd_fdct4x4 sse2/; - - add_proto qw/void vpx_highbd_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_highbd_fdct8x8 sse2/; - - add_proto qw/void vpx_highbd_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_highbd_fdct8x8_1/; - - add_proto qw/void vpx_highbd_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_highbd_fdct16x16 sse2/; - - add_proto qw/void vpx_highbd_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_highbd_fdct16x16_1/; - - add_proto qw/void vpx_highbd_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_highbd_fdct32x32 sse2/; - - add_proto qw/void vpx_highbd_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_highbd_fdct32x32_rd sse2/; - - add_proto qw/void vpx_highbd_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_highbd_fdct32x32_1/; -} else { - add_proto qw/void vpx_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct4x4 sse2 msa/; - - add_proto qw/void vpx_fdct4x4_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct4x4_1 sse2/; - - add_proto qw/void vpx_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct8x8 sse2 neon msa/, "$ssse3_x86_64_x86inc"; - - add_proto qw/void vpx_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct8x8_1 sse2 neon msa/; - - add_proto qw/void vpx_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct16x16 sse2 msa/; - - add_proto qw/void vpx_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct16x16_1 sse2 msa/; - - add_proto qw/void vpx_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct32x32 sse2 avx2 msa/; - - add_proto qw/void vpx_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct32x32_rd sse2 avx2 msa/; - - add_proto qw/void vpx_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/vpx_fdct32x32_1 sse2 msa/; -} # CONFIG_VPX_HIGHBITDEPTH -} # CONFIG_VP10_ENCODER - -# -# Inverse transform -if (vpx_config("CONFIG_VP10") eq "yes") { -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { - # Note as optimized versions of these functions are added we need to add a check to ensure - # that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only. - add_proto qw/void vpx_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_iwht4x4_1_add/; - - add_proto qw/void vpx_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_iwht4x4_16_add/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct4x4_1_add/; - - add_proto qw/void vpx_highbd_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct8x8_1_add/; - - add_proto qw/void vpx_highbd_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct16x16_1_add/; - - add_proto qw/void vpx_highbd_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct32x32_1024_add/; - - add_proto qw/void vpx_highbd_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct32x32_34_add/; - - add_proto qw/void vpx_highbd_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct32x32_1_add/; - - add_proto qw/void vpx_highbd_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_iwht4x4_1_add/; - - add_proto qw/void vpx_highbd_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_iwht4x4_16_add/; - - # Force C versions if CONFIG_EMULATE_HARDWARE is 1 - if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") { - add_proto qw/void vpx_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct4x4_16_add/; - - add_proto qw/void vpx_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct4x4_1_add/; - - add_proto qw/void vpx_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_64_add/; - - add_proto qw/void vpx_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_12_add/; - - add_proto qw/void vpx_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_1_add/; - - add_proto qw/void vpx_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_256_add/; - - add_proto qw/void vpx_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_10_add/; - - add_proto qw/void vpx_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_1_add/; - - add_proto qw/void vpx_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_1024_add/; - - add_proto qw/void vpx_idct32x32_135_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_135_add/; - - add_proto qw/void vpx_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_34_add/; - - add_proto qw/void vpx_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_1_add/; - - add_proto qw/void vpx_highbd_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct4x4_16_add/; - - add_proto qw/void vpx_highbd_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct8x8_64_add/; - - add_proto qw/void vpx_highbd_idct8x8_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct8x8_10_add/; - - add_proto qw/void vpx_highbd_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct16x16_256_add/; - - add_proto qw/void vpx_highbd_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct16x16_10_add/; - } else { - add_proto qw/void vpx_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct4x4_16_add sse2/; - - add_proto qw/void vpx_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct4x4_1_add sse2/; - - add_proto qw/void vpx_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_64_add sse2/, "$ssse3_x86_64_x86inc"; - - add_proto qw/void vpx_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_12_add sse2/, "$ssse3_x86_64_x86inc"; - - add_proto qw/void vpx_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_1_add sse2/; - - add_proto qw/void vpx_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_256_add sse2/; - - add_proto qw/void vpx_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_10_add sse2/; - - add_proto qw/void vpx_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_1_add sse2/; - - add_proto qw/void vpx_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_1024_add sse2/, "$ssse3_x86_64_x86inc"; - - add_proto qw/void vpx_idct32x32_135_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_135_add sse2/, "$ssse3_x86_64_x86inc"; - # Need to add 135 eob idct32x32 implementations. - $vpx_idct32x32_135_add_sse2=vpx_idct32x32_1024_add_sse2; - - add_proto qw/void vpx_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_34_add sse2/, "$ssse3_x86_64_x86inc"; - - add_proto qw/void vpx_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_1_add sse2/; - - add_proto qw/void vpx_highbd_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct4x4_16_add sse2/; - - add_proto qw/void vpx_highbd_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct8x8_64_add sse2/; - - add_proto qw/void vpx_highbd_idct8x8_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct8x8_10_add sse2/; - - add_proto qw/void vpx_highbd_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct16x16_256_add sse2/; - - add_proto qw/void vpx_highbd_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; - specialize qw/vpx_highbd_idct16x16_10_add sse2/; - } # CONFIG_EMULATE_HARDWARE -} else { - # Force C versions if CONFIG_EMULATE_HARDWARE is 1 - if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") { - add_proto qw/void vpx_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct4x4_1_add/; - - add_proto qw/void vpx_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct4x4_16_add/; - - add_proto qw/void vpx_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_1_add/; - - add_proto qw/void vpx_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_64_add/; - - add_proto qw/void vpx_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_12_add/; - - add_proto qw/void vpx_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_1_add/; - - add_proto qw/void vpx_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_256_add/; - - add_proto qw/void vpx_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_10_add/; - - add_proto qw/void vpx_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_1024_add/; - - add_proto qw/void vpx_idct32x32_135_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_135_add/; - - add_proto qw/void vpx_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_34_add/; - - add_proto qw/void vpx_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_1_add/; - - add_proto qw/void vpx_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_iwht4x4_1_add/; - - add_proto qw/void vpx_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_iwht4x4_16_add/; - } else { - add_proto qw/void vpx_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct4x4_1_add sse2 neon dspr2 msa/; - - add_proto qw/void vpx_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct4x4_16_add sse2 neon dspr2 msa/; - - add_proto qw/void vpx_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_1_add sse2 neon dspr2 msa/; - - add_proto qw/void vpx_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_64_add sse2 neon dspr2 msa/, "$ssse3_x86_64_x86inc"; - - add_proto qw/void vpx_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct8x8_12_add sse2 neon dspr2 msa/, "$ssse3_x86_64_x86inc"; - - add_proto qw/void vpx_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_1_add sse2 neon dspr2 msa/; - - add_proto qw/void vpx_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_256_add sse2 neon dspr2 msa/; - - add_proto qw/void vpx_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct16x16_10_add sse2 neon dspr2 msa/; - - add_proto qw/void vpx_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_1024_add sse2 neon dspr2 msa/, "$ssse3_x86_64_x86inc"; - - add_proto qw/void vpx_idct32x32_135_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_135_add sse2 neon dspr2 msa/, "$ssse3_x86_64_x86inc"; - # Need to add 135 eob idct32x32 implementations. - $vpx_idct32x32_135_add_sse2=vpx_idct32x32_1024_add_sse2; - $vpx_idct32x32_135_add_neon=vpx_idct32x32_1024_add_neon; - $vpx_idct32x32_135_add_dspr2=vpx_idct32x32_1024_add_dspr2; - $vpx_idct32x32_135_add_msa=vpx_idct32x32_1024_add_msa; - - add_proto qw/void vpx_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_34_add sse2 neon_asm dspr2 msa/, "$ssse3_x86_64_x86inc"; - # Need to add 34 eob idct32x32 neon implementation. - $vpx_idct32x32_34_add_neon_asm=vpx_idct32x32_1024_add_neon; - - add_proto qw/void vpx_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_idct32x32_1_add sse2 neon dspr2 msa/; - - add_proto qw/void vpx_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_iwht4x4_1_add msa/; - - add_proto qw/void vpx_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/vpx_iwht4x4_16_add msa/, "$sse2_x86inc"; - } # CONFIG_EMULATE_HARDWARE -} # CONFIG_VPX_HIGHBITDEPTH -} # CONFIG_VP10 - -# -# Quantization -# -if (vpx_config("CONFIG_AOM_QM") eq "yes") { - if (vpx_config("CONFIG_VP10_ENCODER") eq "yes") { - add_proto qw/void vpx_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr"; - - add_proto qw/void vpx_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr"; - - if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { - add_proto qw/void vpx_highbd_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr"; - - add_proto qw/void vpx_highbd_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr"; - } # CONFIG_VPX_HIGHBITDEPTH - } # CONFIG_VP10_ENCODER -} else { - if (vpx_config("CONFIG_VP10_ENCODER") eq "yes") { - add_proto qw/void vpx_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan"; - specialize qw/vpx_quantize_b sse2/, "$ssse3_x86_64_x86inc", "$avx_x86_64_x86inc"; - - add_proto qw/void vpx_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan"; - specialize qw/vpx_quantize_b_32x32/, "$ssse3_x86_64_x86inc", "$avx_x86_64_x86inc"; - - if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { - add_proto qw/void vpx_highbd_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan"; - specialize qw/vpx_highbd_quantize_b sse2/; - - add_proto qw/void vpx_highbd_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan"; - specialize qw/vpx_highbd_quantize_b_32x32 sse2/; - } # CONFIG_VPX_HIGHBITDEPTH - } # CONFIG_VP10_ENCODER -} # CONFIG_AOM_QM - -if (vpx_config("CONFIG_ENCODERS") eq "yes") { -# -# Block subtraction -# -add_proto qw/void vpx_subtract_block/, "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride"; -specialize qw/vpx_subtract_block neon msa/, "$sse2_x86inc"; - -# -# Single block SAD -# -add_proto qw/unsigned int vpx_sad64x64/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad64x64 avx2 neon msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad64x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad64x32 avx2 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad32x64/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad32x64 avx2 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad32x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad32x32 avx2 neon msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad32x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad32x16 avx2 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad16x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad16x32 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad16x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad16x16 mmx media neon msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad16x8 mmx neon msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad8x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad8x16 mmx neon msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad8x8 mmx neon msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad8x4/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad8x4 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad4x8 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad4x4/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; -specialize qw/vpx_sad4x4 mmx neon msa/, "$sse2_x86inc"; - -# -# Avg -# -if (vpx_config("CONFIG_VP10_ENCODER") eq "yes") { - add_proto qw/unsigned int vpx_avg_8x8/, "const uint8_t *, int p"; - specialize qw/vpx_avg_8x8 sse2 neon msa/; - - add_proto qw/unsigned int vpx_avg_4x4/, "const uint8_t *, int p"; - specialize qw/vpx_avg_4x4 sse2 neon msa/; - - add_proto qw/void vpx_minmax_8x8/, "const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max"; - specialize qw/vpx_minmax_8x8 sse2/; - - add_proto qw/void vpx_hadamard_8x8/, "int16_t const *src_diff, int src_stride, int16_t *coeff"; - specialize qw/vpx_hadamard_8x8 sse2/, "$ssse3_x86_64_x86inc"; - - add_proto qw/void vpx_hadamard_16x16/, "int16_t const *src_diff, int src_stride, int16_t *coeff"; - specialize qw/vpx_hadamard_16x16 sse2/; - - add_proto qw/int vpx_satd/, "const int16_t *coeff, int length"; - specialize qw/vpx_satd sse2 neon/; - - add_proto qw/void vpx_int_pro_row/, "int16_t *hbuf, uint8_t const *ref, const int ref_stride, const int height"; - specialize qw/vpx_int_pro_row sse2 neon/; - - add_proto qw/int16_t vpx_int_pro_col/, "uint8_t const *ref, const int width"; - specialize qw/vpx_int_pro_col sse2 neon/; - - add_proto qw/int vpx_vector_var/, "int16_t const *ref, int16_t const *src, const int bwl"; - specialize qw/vpx_vector_var neon sse2/; -} # CONFIG_VP10_ENCODER - -add_proto qw/unsigned int vpx_sad64x64_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad64x64_avg avx2 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad64x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad64x32_avg avx2 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad32x64_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad32x64_avg avx2 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad32x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad32x32_avg avx2 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad32x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad32x16_avg avx2 msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad16x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad16x32_avg msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad16x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad16x16_avg msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad16x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad16x8_avg msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad8x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad8x16_avg msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad8x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad8x8_avg msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad8x4_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad8x4_avg msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad4x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad4x8_avg msa/, "$sse2_x86inc"; - -add_proto qw/unsigned int vpx_sad4x4_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; -specialize qw/vpx_sad4x4_avg msa/, "$sse2_x86inc"; - -# -# Multi-block SAD, comparing a reference to N blocks 1 pixel apart horizontally -# -# Blocks of 3 -add_proto qw/void vpx_sad64x64x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad64x64x3 msa/; - -add_proto qw/void vpx_sad32x32x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad32x32x3 msa/; - -add_proto qw/void vpx_sad16x16x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad16x16x3 sse3 ssse3 msa/; - -add_proto qw/void vpx_sad16x8x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad16x8x3 sse3 ssse3 msa/; - -add_proto qw/void vpx_sad8x16x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad8x16x3 sse3 msa/; - -add_proto qw/void vpx_sad8x8x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad8x8x3 sse3 msa/; - -add_proto qw/void vpx_sad4x4x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad4x4x3 sse3 msa/; - -# Blocks of 8 -add_proto qw/void vpx_sad64x64x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad64x64x8 msa/; - -add_proto qw/void vpx_sad32x32x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad32x32x8 msa/; - -add_proto qw/void vpx_sad16x16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad16x16x8 sse4_1 msa/; - -add_proto qw/void vpx_sad16x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad16x8x8 sse4_1 msa/; - -add_proto qw/void vpx_sad8x16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad8x16x8 sse4_1 msa/; - -add_proto qw/void vpx_sad8x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad8x8x8 sse4_1 msa/; - -add_proto qw/void vpx_sad8x4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad8x4x8 msa/; - -add_proto qw/void vpx_sad4x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad4x8x8 msa/; - -add_proto qw/void vpx_sad4x4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad4x4x8 sse4_1 msa/; - -# -# Multi-block SAD, comparing a reference to N independent blocks -# -add_proto qw/void vpx_sad64x64x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad64x64x4d avx2 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad64x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad64x32x4d msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad32x64x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad32x64x4d msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad32x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad32x32x4d avx2 neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad32x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad32x16x4d msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad16x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad16x32x4d msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad16x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad16x16x4d neon msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad16x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad16x8x4d msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad8x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad8x16x4d msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad8x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad8x8x4d msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad8x4x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad8x4x4d msa/, "$sse2_x86inc"; - -add_proto qw/void vpx_sad4x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad4x8x4d msa/, "$sse_x86inc"; - -add_proto qw/void vpx_sad4x4x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t * const ref_ptr[], int ref_stride, uint32_t *sad_array"; -specialize qw/vpx_sad4x4x4d msa/, "$sse_x86inc"; - -# -# Structured Similarity (SSIM) -# -if (vpx_config("CONFIG_INTERNAL_STATS") eq "yes") { - add_proto qw/void vpx_ssim_parms_8x8/, "const uint8_t *s, int sp, const uint8_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr"; - specialize qw/vpx_ssim_parms_8x8/, "$sse2_x86_64"; - - add_proto qw/void vpx_ssim_parms_16x16/, "const uint8_t *s, int sp, const uint8_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr"; - specialize qw/vpx_ssim_parms_16x16/, "$sse2_x86_64"; -} - -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { - # - # Block subtraction - # - add_proto qw/void vpx_highbd_subtract_block/, "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd"; - specialize qw/vpx_highbd_subtract_block/; - - # - # Single block SAD - # - add_proto qw/unsigned int vpx_highbd_sad64x64/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad64x64/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad64x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad64x32/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad32x64/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad32x64/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad32x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad32x32/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad32x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad32x16/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad16x32/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad16x32/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad16x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad16x16/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad16x8/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad8x16/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad8x16/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad8x8/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad8x4/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad8x4/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad4x8/; - - add_proto qw/unsigned int vpx_highbd_sad4x4/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; - specialize qw/vpx_highbd_sad4x4/; - - # - # Avg - # - add_proto qw/unsigned int vpx_highbd_avg_8x8/, "const uint8_t *, int p"; - specialize qw/vpx_highbd_avg_8x8/; - add_proto qw/unsigned int vpx_highbd_avg_4x4/, "const uint8_t *, int p"; - specialize qw/vpx_highbd_avg_4x4/; - add_proto qw/void vpx_highbd_minmax_8x8/, "const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max"; - specialize qw/vpx_highbd_minmax_8x8/; - - add_proto qw/unsigned int vpx_highbd_sad64x64_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad64x64_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad64x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad64x32_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad32x64_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad32x64_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad32x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad32x32_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad32x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad32x16_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad16x32_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad16x32_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad16x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad16x16_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad16x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad16x8_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad8x16_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad8x16_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad8x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad8x8_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad8x4_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad8x4_avg/, "$sse2_x86inc"; - - add_proto qw/unsigned int vpx_highbd_sad4x8_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad4x8_avg/; - - add_proto qw/unsigned int vpx_highbd_sad4x4_avg/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred"; - specialize qw/vpx_highbd_sad4x4_avg/; - - # - # Multi-block SAD, comparing a reference to N blocks 1 pixel apart horizontally - # - # Blocks of 3 - add_proto qw/void vpx_highbd_sad64x64x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad64x64x3/; - - add_proto qw/void vpx_highbd_sad32x32x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad32x32x3/; - - add_proto qw/void vpx_highbd_sad16x16x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad16x16x3/; - - add_proto qw/void vpx_highbd_sad16x8x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad16x8x3/; - - add_proto qw/void vpx_highbd_sad8x16x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad8x16x3/; - - add_proto qw/void vpx_highbd_sad8x8x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad8x8x3/; - - add_proto qw/void vpx_highbd_sad4x4x3/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad4x4x3/; - - # Blocks of 8 - add_proto qw/void vpx_highbd_sad64x64x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad64x64x8/; - - add_proto qw/void vpx_highbd_sad32x32x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad32x32x8/; - - add_proto qw/void vpx_highbd_sad16x16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad16x16x8/; - - add_proto qw/void vpx_highbd_sad16x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad16x8x8/; - - add_proto qw/void vpx_highbd_sad8x16x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad8x16x8/; - - add_proto qw/void vpx_highbd_sad8x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad8x8x8/; - - add_proto qw/void vpx_highbd_sad8x4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad8x4x8/; - - add_proto qw/void vpx_highbd_sad4x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad4x8x8/; - - add_proto qw/void vpx_highbd_sad4x4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad4x4x8/; - - # - # Multi-block SAD, comparing a reference to N independent blocks - # - add_proto qw/void vpx_highbd_sad64x64x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad64x64x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad64x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad64x32x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad32x64x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad32x64x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad32x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad32x32x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad32x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad32x16x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad16x32x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad16x32x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad16x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad16x16x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad16x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad16x8x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad8x16x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad8x16x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad8x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad8x8x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad8x4x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad8x4x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad4x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad4x8x4d/, "$sse2_x86inc"; - - add_proto qw/void vpx_highbd_sad4x4x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, uint32_t *sad_array"; - specialize qw/vpx_highbd_sad4x4x4d/, "$sse2_x86inc"; - - # - # Structured Similarity (SSIM) - # - if (vpx_config("CONFIG_INTERNAL_STATS") eq "yes") { - add_proto qw/void vpx_highbd_ssim_parms_8x8/, "const uint16_t *s, int sp, const uint16_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr"; - specialize qw/vpx_highbd_ssim_parms_8x8/; - } -} # CONFIG_VPX_HIGHBITDEPTH -} # CONFIG_ENCODERS - -if (vpx_config("CONFIG_ENCODERS") eq "yes") { - -# -# Variance -# -add_proto qw/unsigned int vpx_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance64x64 sse2 avx2 neon msa/; - -add_proto qw/unsigned int vpx_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance64x32 sse2 avx2 neon msa/; - -add_proto qw/unsigned int vpx_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance32x64 sse2 neon msa/; - -add_proto qw/unsigned int vpx_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance32x32 sse2 avx2 neon msa/; - -add_proto qw/unsigned int vpx_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance32x16 sse2 avx2 msa/; - -add_proto qw/unsigned int vpx_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance16x32 sse2 msa/; - -add_proto qw/unsigned int vpx_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance16x16 mmx sse2 avx2 media neon msa/; - -add_proto qw/unsigned int vpx_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance16x8 mmx sse2 neon msa/; - -add_proto qw/unsigned int vpx_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance8x16 mmx sse2 neon msa/; - -add_proto qw/unsigned int vpx_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance8x8 mmx sse2 media neon msa/; - -add_proto qw/unsigned int vpx_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance8x4 sse2 msa/; - -add_proto qw/unsigned int vpx_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance4x8 sse2 msa/; - -add_proto qw/unsigned int vpx_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_variance4x4 mmx sse2 msa/; - -# -# Specialty Variance -# -add_proto qw/void vpx_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; - specialize qw/vpx_get16x16var sse2 avx2 neon msa/; - -add_proto qw/void vpx_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; - specialize qw/vpx_get8x8var mmx sse2 neon msa/; - -add_proto qw/unsigned int vpx_mse16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - specialize qw/vpx_mse16x16 mmx sse2 avx2 media neon msa/; - -add_proto qw/unsigned int vpx_mse16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - specialize qw/vpx_mse16x8 sse2 msa/; - -add_proto qw/unsigned int vpx_mse8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - specialize qw/vpx_mse8x16 sse2 msa/; - -add_proto qw/unsigned int vpx_mse8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - specialize qw/vpx_mse8x8 sse2 msa/; - -add_proto qw/unsigned int vpx_get_mb_ss/, "const int16_t *"; - specialize qw/vpx_get_mb_ss mmx sse2 msa/; - -add_proto qw/unsigned int vpx_get4x4sse_cs/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride"; - specialize qw/vpx_get4x4sse_cs neon msa/; - -add_proto qw/void vpx_comp_avg_pred/, "uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride"; - -# -# Subpixel Variance -# -add_proto qw/uint32_t vpx_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance64x64 avx2 neon msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance64x32 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance32x64 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance32x32 avx2 neon msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance32x16 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance16x32 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance16x16 mmx media neon msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance16x8 mmx msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance8x16 mmx msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance8x8 mmx media neon msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance8x4 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance4x8 msa/, "$sse_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_sub_pixel_variance4x4 mmx msa/, "$sse_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance64x64 avx2 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance64x32 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance32x64 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance32x32 avx2 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance32x16 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance16x32 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance16x16 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance16x8 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance8x16 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance8x8 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance8x4 msa/, "$sse2_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance4x8 msa/, "$sse_x86inc", "$ssse3_x86inc"; - -add_proto qw/uint32_t vpx_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_sub_pixel_avg_variance4x4 msa/, "$sse_x86inc", "$ssse3_x86inc"; - -# -# Specialty Subpixel -# -add_proto qw/uint32_t vpx_variance_halfpixvar16x16_h/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_variance_halfpixvar16x16_h mmx sse2 media/; - -add_proto qw/uint32_t vpx_variance_halfpixvar16x16_v/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_variance_halfpixvar16x16_v mmx sse2 media/; - -add_proto qw/uint32_t vpx_variance_halfpixvar16x16_hv/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_variance_halfpixvar16x16_hv mmx sse2 media/; - -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { - add_proto qw/unsigned int vpx_highbd_12_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_variance64x64 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_variance64x32 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_variance32x64 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_variance32x32 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_variance32x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_variance16x32 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_variance16x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_variance16x8 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_variance8x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_variance8x8 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_12_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_12_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - - add_proto qw/unsigned int vpx_highbd_10_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_variance64x64 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_variance64x32 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_variance32x64 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_variance32x32 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_variance32x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_variance16x32 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_variance16x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_variance16x8 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_variance8x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_variance8x8 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_10_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_10_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - - add_proto qw/unsigned int vpx_highbd_8_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_variance64x64 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_variance64x32 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_variance32x64 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_variance32x32 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_variance32x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_variance16x32 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_variance16x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_variance16x8 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_variance8x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_variance8x8 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_8_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_8_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - - add_proto qw/void vpx_highbd_8_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; - add_proto qw/void vpx_highbd_8_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; - - add_proto qw/void vpx_highbd_10_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; - add_proto qw/void vpx_highbd_10_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; - - add_proto qw/void vpx_highbd_12_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; - add_proto qw/void vpx_highbd_12_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; - - add_proto qw/unsigned int vpx_highbd_8_mse16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_mse16x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_8_mse16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_8_mse8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_8_mse8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - specialize qw/vpx_highbd_8_mse8x8 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_mse16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_mse16x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_10_mse16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_10_mse8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_10_mse8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - specialize qw/vpx_highbd_10_mse8x8 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_mse16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_mse16x16 sse2/; - - add_proto qw/unsigned int vpx_highbd_12_mse16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_12_mse8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - add_proto qw/unsigned int vpx_highbd_12_mse8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse"; - specialize qw/vpx_highbd_12_mse8x8 sse2/; - - add_proto qw/void vpx_highbd_comp_avg_pred/, "uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride"; - - # - # Subpixel Variance - # - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance64x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance64x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance32x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance32x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance32x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance16x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance16x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance16x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance8x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance8x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_12_sub_pixel_variance8x4/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance64x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance64x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance32x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance32x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance32x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance16x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance16x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance16x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance8x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance8x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_10_sub_pixel_variance8x4/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance64x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance64x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance32x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance32x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance32x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance16x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance16x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance16x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance8x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance8x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - specialize qw/vpx_highbd_8_sub_pixel_variance8x4/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance64x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance64x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance32x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance32x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance32x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance16x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance16x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance16x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance8x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance8x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_12_sub_pixel_avg_variance8x4/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - add_proto qw/uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance64x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance64x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance32x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance32x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance32x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance16x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance16x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance16x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance8x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance8x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_10_sub_pixel_avg_variance8x4/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - add_proto qw/uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance64x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance64x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance32x64/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance32x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance32x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance16x32/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance16x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance16x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance8x16/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance8x8/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - specialize qw/vpx_highbd_8_sub_pixel_avg_variance8x4/, "$sse2_x86inc"; - - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - add_proto qw/uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - -} # CONFIG_VPX_HIGHBITDEPTH -} # CONFIG_ENCODERS - -1; diff --git a/aom_dsp/x86/vpx_asm_stubs.c b/aom_dsp/x86/aom_asm_stubs.c similarity index 61% rename from aom_dsp/x86/vpx_asm_stubs.c rename to aom_dsp/x86/aom_asm_stubs.c index 10718733131886b298499995d0302cfc8d6a0c94..be8cba52589e368346ee19f2a53cfde71381af5d 100644 --- a/aom_dsp/x86/vpx_asm_stubs.c +++ b/aom_dsp/x86/aom_asm_stubs.c @@ -9,53 +9,53 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/x86/convolve.h" #if HAVE_SSE2 -filter8_1dfunction vpx_filter_block1d16_v8_sse2; -filter8_1dfunction vpx_filter_block1d16_h8_sse2; -filter8_1dfunction vpx_filter_block1d8_v8_sse2; -filter8_1dfunction vpx_filter_block1d8_h8_sse2; -filter8_1dfunction vpx_filter_block1d4_v8_sse2; -filter8_1dfunction vpx_filter_block1d4_h8_sse2; -filter8_1dfunction vpx_filter_block1d16_v8_avg_sse2; -filter8_1dfunction vpx_filter_block1d16_h8_avg_sse2; -filter8_1dfunction vpx_filter_block1d8_v8_avg_sse2; -filter8_1dfunction vpx_filter_block1d8_h8_avg_sse2; -filter8_1dfunction vpx_filter_block1d4_v8_avg_sse2; -filter8_1dfunction vpx_filter_block1d4_h8_avg_sse2; +filter8_1dfunction aom_filter_block1d16_v8_sse2; +filter8_1dfunction aom_filter_block1d16_h8_sse2; +filter8_1dfunction aom_filter_block1d8_v8_sse2; +filter8_1dfunction aom_filter_block1d8_h8_sse2; +filter8_1dfunction aom_filter_block1d4_v8_sse2; +filter8_1dfunction aom_filter_block1d4_h8_sse2; +filter8_1dfunction aom_filter_block1d16_v8_avg_sse2; +filter8_1dfunction aom_filter_block1d16_h8_avg_sse2; +filter8_1dfunction aom_filter_block1d8_v8_avg_sse2; +filter8_1dfunction aom_filter_block1d8_h8_avg_sse2; +filter8_1dfunction aom_filter_block1d4_v8_avg_sse2; +filter8_1dfunction aom_filter_block1d4_h8_avg_sse2; -filter8_1dfunction vpx_filter_block1d16_v2_sse2; -filter8_1dfunction vpx_filter_block1d16_h2_sse2; -filter8_1dfunction vpx_filter_block1d8_v2_sse2; -filter8_1dfunction vpx_filter_block1d8_h2_sse2; -filter8_1dfunction vpx_filter_block1d4_v2_sse2; -filter8_1dfunction vpx_filter_block1d4_h2_sse2; -filter8_1dfunction vpx_filter_block1d16_v2_avg_sse2; -filter8_1dfunction vpx_filter_block1d16_h2_avg_sse2; -filter8_1dfunction vpx_filter_block1d8_v2_avg_sse2; -filter8_1dfunction vpx_filter_block1d8_h2_avg_sse2; -filter8_1dfunction vpx_filter_block1d4_v2_avg_sse2; -filter8_1dfunction vpx_filter_block1d4_h2_avg_sse2; +filter8_1dfunction aom_filter_block1d16_v2_sse2; +filter8_1dfunction aom_filter_block1d16_h2_sse2; +filter8_1dfunction aom_filter_block1d8_v2_sse2; +filter8_1dfunction aom_filter_block1d8_h2_sse2; +filter8_1dfunction aom_filter_block1d4_v2_sse2; +filter8_1dfunction aom_filter_block1d4_h2_sse2; +filter8_1dfunction aom_filter_block1d16_v2_avg_sse2; +filter8_1dfunction aom_filter_block1d16_h2_avg_sse2; +filter8_1dfunction aom_filter_block1d8_v2_avg_sse2; +filter8_1dfunction aom_filter_block1d8_h2_avg_sse2; +filter8_1dfunction aom_filter_block1d4_v2_avg_sse2; +filter8_1dfunction aom_filter_block1d4_h2_avg_sse2; -// void vpx_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, // int w, int h); -// void vpx_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, // int w, int h); -// void vpx_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_avg_horiz_sse2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, // int w, int h); -// void vpx_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_avg_vert_sse2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, @@ -65,12 +65,12 @@ FUN_CONV_1D(vert, y_step_q4, filter_y, v, src - src_stride * 3, , sse2); FUN_CONV_1D(avg_horiz, x_step_q4, filter_x, h, src, avg_, sse2); FUN_CONV_1D(avg_vert, y_step_q4, filter_y, v, src - src_stride * 3, avg_, sse2); -// void vpx_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, // int w, int h); -// void vpx_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, @@ -79,33 +79,33 @@ FUN_CONV_2D(, sse2); FUN_CONV_2D(avg_, sse2); #if CONFIG_VPX_HIGHBITDEPTH && ARCH_X86_64 -highbd_filter8_1dfunction vpx_highbd_filter_block1d16_v8_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d16_h8_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d8_v8_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d8_h8_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d4_v8_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d4_h8_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d16_v8_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d16_h8_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d8_v8_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d8_h8_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d4_v8_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d4_h8_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d16_v8_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d16_h8_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d8_v8_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d8_h8_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d4_v8_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d4_h8_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d16_v8_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d16_h8_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d8_v8_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d8_h8_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d4_v8_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d4_h8_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d16_v2_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d16_h2_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d8_v2_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d8_h2_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d4_v2_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d4_h2_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d16_v2_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d16_h2_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d8_v2_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d8_h2_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d4_v2_avg_sse2; -highbd_filter8_1dfunction vpx_highbd_filter_block1d4_h2_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d16_v2_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d16_h2_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d8_v2_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d8_h2_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d4_v2_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d4_h2_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d16_v2_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d16_h2_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d8_v2_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d8_h2_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d4_v2_avg_sse2; +highbd_filter8_1dfunction aom_highbd_filter_block1d4_h2_avg_sse2; -// void vpx_highbd_convolve8_horiz_sse2(const uint8_t *src, +// void aom_highbd_convolve8_horiz_sse2(const uint8_t *src, // ptrdiff_t src_stride, // uint8_t *dst, // ptrdiff_t dst_stride, @@ -114,7 +114,7 @@ highbd_filter8_1dfunction vpx_highbd_filter_block1d4_h2_avg_sse2; // const int16_t *filter_y, // int y_step_q4, // int w, int h, int bd); -// void vpx_highbd_convolve8_vert_sse2(const uint8_t *src, +// void aom_highbd_convolve8_vert_sse2(const uint8_t *src, // ptrdiff_t src_stride, // uint8_t *dst, // ptrdiff_t dst_stride, @@ -123,7 +123,7 @@ highbd_filter8_1dfunction vpx_highbd_filter_block1d4_h2_avg_sse2; // const int16_t *filter_y, // int y_step_q4, // int w, int h, int bd); -// void vpx_highbd_convolve8_avg_horiz_sse2(const uint8_t *src, +// void aom_highbd_convolve8_avg_horiz_sse2(const uint8_t *src, // ptrdiff_t src_stride, // uint8_t *dst, // ptrdiff_t dst_stride, @@ -132,7 +132,7 @@ highbd_filter8_1dfunction vpx_highbd_filter_block1d4_h2_avg_sse2; // const int16_t *filter_y, // int y_step_q4, // int w, int h, int bd); -// void vpx_highbd_convolve8_avg_vert_sse2(const uint8_t *src, +// void aom_highbd_convolve8_avg_vert_sse2(const uint8_t *src, // ptrdiff_t src_stride, // uint8_t *dst, // ptrdiff_t dst_stride, @@ -147,12 +147,12 @@ HIGH_FUN_CONV_1D(avg_horiz, x_step_q4, filter_x, h, src, avg_, sse2); HIGH_FUN_CONV_1D(avg_vert, y_step_q4, filter_y, v, src - src_stride * 3, avg_, sse2); -// void vpx_highbd_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, +// void aom_highbd_convolve8_sse2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, // int w, int h, int bd); -// void vpx_highbd_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, +// void aom_highbd_convolve8_avg_sse2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, diff --git a/aom_dsp/x86/vpx_convolve_copy_sse2.asm b/aom_dsp/x86/aom_convolve_copy_sse2.asm similarity index 100% rename from aom_dsp/x86/vpx_convolve_copy_sse2.asm rename to aom_dsp/x86/aom_convolve_copy_sse2.asm diff --git a/aom_dsp/x86/vpx_high_subpixel_8t_sse2.asm b/aom_dsp/x86/aom_high_subpixel_8t_sse2.asm similarity index 94% rename from aom_dsp/x86/vpx_high_subpixel_8t_sse2.asm rename to aom_dsp/x86/aom_high_subpixel_8t_sse2.asm index f02845ea8abf3470a344f96d3db5a5dd55136795..da738feffa89dbc88329dc703c7d0ab204dfa69d 100644 --- a/aom_dsp/x86/vpx_high_subpixel_8t_sse2.asm +++ b/aom_dsp/x86/aom_high_subpixel_8t_sse2.asm @@ -197,7 +197,7 @@ movdqu [rdi + %2], xmm0 %endm -;void vpx_filter_block1d4_v8_sse2 +;void aom_filter_block1d4_v8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pitch, @@ -206,8 +206,8 @@ ; unsigned int output_height, ; short *filter ;) -global sym(vpx_highbd_filter_block1d4_v8_sse2) PRIVATE -sym(vpx_highbd_filter_block1d4_v8_sse2): +global sym(aom_highbd_filter_block1d4_v8_sse2) PRIVATE +sym(aom_highbd_filter_block1d4_v8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -267,7 +267,7 @@ sym(vpx_highbd_filter_block1d4_v8_sse2): pop rbp ret -;void vpx_filter_block1d8_v8_sse2 +;void aom_filter_block1d8_v8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pitch, @@ -276,8 +276,8 @@ sym(vpx_highbd_filter_block1d4_v8_sse2): ; unsigned int output_height, ; short *filter ;) -global sym(vpx_highbd_filter_block1d8_v8_sse2) PRIVATE -sym(vpx_highbd_filter_block1d8_v8_sse2): +global sym(aom_highbd_filter_block1d8_v8_sse2) PRIVATE +sym(aom_highbd_filter_block1d8_v8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -326,7 +326,7 @@ sym(vpx_highbd_filter_block1d8_v8_sse2): pop rbp ret -;void vpx_filter_block1d16_v8_sse2 +;void aom_filter_block1d16_v8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pitch, @@ -335,8 +335,8 @@ sym(vpx_highbd_filter_block1d8_v8_sse2): ; unsigned int output_height, ; short *filter ;) -global sym(vpx_highbd_filter_block1d16_v8_sse2) PRIVATE -sym(vpx_highbd_filter_block1d16_v8_sse2): +global sym(aom_highbd_filter_block1d16_v8_sse2) PRIVATE +sym(aom_highbd_filter_block1d16_v8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -389,8 +389,8 @@ sym(vpx_highbd_filter_block1d16_v8_sse2): pop rbp ret -global sym(vpx_highbd_filter_block1d4_v8_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d4_v8_avg_sse2): +global sym(aom_highbd_filter_block1d4_v8_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d4_v8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -450,8 +450,8 @@ sym(vpx_highbd_filter_block1d4_v8_avg_sse2): pop rbp ret -global sym(vpx_highbd_filter_block1d8_v8_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d8_v8_avg_sse2): +global sym(aom_highbd_filter_block1d8_v8_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d8_v8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -499,8 +499,8 @@ sym(vpx_highbd_filter_block1d8_v8_avg_sse2): pop rbp ret -global sym(vpx_highbd_filter_block1d16_v8_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d16_v8_avg_sse2): +global sym(aom_highbd_filter_block1d16_v8_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d16_v8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -552,7 +552,7 @@ sym(vpx_highbd_filter_block1d16_v8_avg_sse2): pop rbp ret -;void vpx_filter_block1d4_h8_sse2 +;void aom_filter_block1d4_h8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pixels_per_line, @@ -561,8 +561,8 @@ sym(vpx_highbd_filter_block1d16_v8_avg_sse2): ; unsigned int output_height, ; short *filter ;) -global sym(vpx_highbd_filter_block1d4_h8_sse2) PRIVATE -sym(vpx_highbd_filter_block1d4_h8_sse2): +global sym(aom_highbd_filter_block1d4_h8_sse2) PRIVATE +sym(aom_highbd_filter_block1d4_h8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -627,7 +627,7 @@ sym(vpx_highbd_filter_block1d4_h8_sse2): pop rbp ret -;void vpx_filter_block1d8_h8_sse2 +;void aom_filter_block1d8_h8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pixels_per_line, @@ -636,8 +636,8 @@ sym(vpx_highbd_filter_block1d4_h8_sse2): ; unsigned int output_height, ; short *filter ;) -global sym(vpx_highbd_filter_block1d8_h8_sse2) PRIVATE -sym(vpx_highbd_filter_block1d8_h8_sse2): +global sym(aom_highbd_filter_block1d8_h8_sse2) PRIVATE +sym(aom_highbd_filter_block1d8_h8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -693,7 +693,7 @@ sym(vpx_highbd_filter_block1d8_h8_sse2): pop rbp ret -;void vpx_filter_block1d16_h8_sse2 +;void aom_filter_block1d16_h8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pixels_per_line, @@ -702,8 +702,8 @@ sym(vpx_highbd_filter_block1d8_h8_sse2): ; unsigned int output_height, ; short *filter ;) -global sym(vpx_highbd_filter_block1d16_h8_sse2) PRIVATE -sym(vpx_highbd_filter_block1d16_h8_sse2): +global sym(aom_highbd_filter_block1d16_h8_sse2) PRIVATE +sym(aom_highbd_filter_block1d16_h8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -770,8 +770,8 @@ sym(vpx_highbd_filter_block1d16_h8_sse2): pop rbp ret -global sym(vpx_highbd_filter_block1d4_h8_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d4_h8_avg_sse2): +global sym(aom_highbd_filter_block1d4_h8_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d4_h8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -836,8 +836,8 @@ sym(vpx_highbd_filter_block1d4_h8_avg_sse2): pop rbp ret -global sym(vpx_highbd_filter_block1d8_h8_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d8_h8_avg_sse2): +global sym(aom_highbd_filter_block1d8_h8_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d8_h8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -893,8 +893,8 @@ sym(vpx_highbd_filter_block1d8_h8_avg_sse2): pop rbp ret -global sym(vpx_highbd_filter_block1d16_h8_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d16_h8_avg_sse2): +global sym(aom_highbd_filter_block1d16_h8_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d16_h8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 diff --git a/aom_dsp/x86/vpx_high_subpixel_bilinear_sse2.asm b/aom_dsp/x86/aom_high_subpixel_bilinear_sse2.asm similarity index 89% rename from aom_dsp/x86/vpx_high_subpixel_bilinear_sse2.asm rename to aom_dsp/x86/aom_high_subpixel_bilinear_sse2.asm index eacedc5740e05162a28e2077c42a9e091abfd279..c926ab6a2125aad3cbc301d92284526d8b0d8184 100644 --- a/aom_dsp/x86/vpx_high_subpixel_bilinear_sse2.asm +++ b/aom_dsp/x86/aom_high_subpixel_bilinear_sse2.asm @@ -171,8 +171,8 @@ %endm %endif -global sym(vpx_highbd_filter_block1d4_v2_sse2) PRIVATE -sym(vpx_highbd_filter_block1d4_v2_sse2): +global sym(aom_highbd_filter_block1d4_v2_sse2) PRIVATE +sym(aom_highbd_filter_block1d4_v2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -196,8 +196,8 @@ sym(vpx_highbd_filter_block1d4_v2_sse2): ret %if ARCH_X86_64 -global sym(vpx_highbd_filter_block1d8_v2_sse2) PRIVATE -sym(vpx_highbd_filter_block1d8_v2_sse2): +global sym(aom_highbd_filter_block1d8_v2_sse2) PRIVATE +sym(aom_highbd_filter_block1d8_v2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -222,8 +222,8 @@ sym(vpx_highbd_filter_block1d8_v2_sse2): pop rbp ret -global sym(vpx_highbd_filter_block1d16_v2_sse2) PRIVATE -sym(vpx_highbd_filter_block1d16_v2_sse2): +global sym(aom_highbd_filter_block1d16_v2_sse2) PRIVATE +sym(aom_highbd_filter_block1d16_v2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -251,8 +251,8 @@ sym(vpx_highbd_filter_block1d16_v2_sse2): ret %endif -global sym(vpx_highbd_filter_block1d4_v2_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d4_v2_avg_sse2): +global sym(aom_highbd_filter_block1d4_v2_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d4_v2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -276,8 +276,8 @@ sym(vpx_highbd_filter_block1d4_v2_avg_sse2): ret %if ARCH_X86_64 -global sym(vpx_highbd_filter_block1d8_v2_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d8_v2_avg_sse2): +global sym(aom_highbd_filter_block1d8_v2_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d8_v2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -302,8 +302,8 @@ sym(vpx_highbd_filter_block1d8_v2_avg_sse2): pop rbp ret -global sym(vpx_highbd_filter_block1d16_v2_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d16_v2_avg_sse2): +global sym(aom_highbd_filter_block1d16_v2_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d16_v2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -331,8 +331,8 @@ sym(vpx_highbd_filter_block1d16_v2_avg_sse2): ret %endif -global sym(vpx_highbd_filter_block1d4_h2_sse2) PRIVATE -sym(vpx_highbd_filter_block1d4_h2_sse2): +global sym(aom_highbd_filter_block1d4_h2_sse2) PRIVATE +sym(aom_highbd_filter_block1d4_h2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -357,8 +357,8 @@ sym(vpx_highbd_filter_block1d4_h2_sse2): ret %if ARCH_X86_64 -global sym(vpx_highbd_filter_block1d8_h2_sse2) PRIVATE -sym(vpx_highbd_filter_block1d8_h2_sse2): +global sym(aom_highbd_filter_block1d8_h2_sse2) PRIVATE +sym(aom_highbd_filter_block1d8_h2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -383,8 +383,8 @@ sym(vpx_highbd_filter_block1d8_h2_sse2): pop rbp ret -global sym(vpx_highbd_filter_block1d16_h2_sse2) PRIVATE -sym(vpx_highbd_filter_block1d16_h2_sse2): +global sym(aom_highbd_filter_block1d16_h2_sse2) PRIVATE +sym(aom_highbd_filter_block1d16_h2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -412,8 +412,8 @@ sym(vpx_highbd_filter_block1d16_h2_sse2): ret %endif -global sym(vpx_highbd_filter_block1d4_h2_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d4_h2_avg_sse2): +global sym(aom_highbd_filter_block1d4_h2_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d4_h2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -438,8 +438,8 @@ sym(vpx_highbd_filter_block1d4_h2_avg_sse2): ret %if ARCH_X86_64 -global sym(vpx_highbd_filter_block1d8_h2_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d8_h2_avg_sse2): +global sym(aom_highbd_filter_block1d8_h2_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d8_h2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -464,8 +464,8 @@ sym(vpx_highbd_filter_block1d8_h2_avg_sse2): pop rbp ret -global sym(vpx_highbd_filter_block1d16_h2_avg_sse2) PRIVATE -sym(vpx_highbd_filter_block1d16_h2_avg_sse2): +global sym(aom_highbd_filter_block1d16_h2_avg_sse2) PRIVATE +sym(aom_highbd_filter_block1d16_h2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 diff --git a/aom_dsp/x86/vpx_subpixel_8t_intrin_avx2.c b/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c similarity index 92% rename from aom_dsp/x86/vpx_subpixel_8t_intrin_avx2.c rename to aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c index 6e4047d6af32e1ef4de0454b1e195b1c1e20e1f5..c6c32ea535f6e423fd9b919cd59aa5107b479c50 100644 --- a/aom_dsp/x86/vpx_subpixel_8t_intrin_avx2.c +++ b/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c @@ -15,7 +15,7 @@ #include <immintrin.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/x86/convolve.h" #include "aom_ports/mem.h" @@ -63,7 +63,7 @@ DECLARE_ALIGNED(32, static const uint8_t, filt4_global_avx2[32]) = { #define MM256_BROADCASTSI128_SI256(x) _mm256_broadcastsi128_si256(x) #endif // __clang__ -static void vpx_filter_block1d16_h8_avx2( +static void aom_filter_block1d16_h8_avx2( const uint8_t *src_ptr, ptrdiff_t src_pixels_per_line, uint8_t *output_ptr, ptrdiff_t output_pitch, uint32_t output_height, const int16_t *filter) { __m128i filtersReg; @@ -291,7 +291,7 @@ static void vpx_filter_block1d16_h8_avx2( } } -static void vpx_filter_block1d16_v8_avx2( +static void aom_filter_block1d16_v8_avx2( const uint8_t *src_ptr, ptrdiff_t src_pitch, uint8_t *output_ptr, ptrdiff_t out_pitch, uint32_t output_height, const int16_t *filter) { __m128i filtersReg; @@ -527,41 +527,41 @@ static void vpx_filter_block1d16_v8_avx2( } #if HAVE_AVX2 && HAVE_SSSE3 -filter8_1dfunction vpx_filter_block1d4_v8_ssse3; +filter8_1dfunction aom_filter_block1d4_v8_ssse3; #if ARCH_X86_64 -filter8_1dfunction vpx_filter_block1d8_v8_intrin_ssse3; -filter8_1dfunction vpx_filter_block1d8_h8_intrin_ssse3; -filter8_1dfunction vpx_filter_block1d4_h8_intrin_ssse3; -#define vpx_filter_block1d8_v8_avx2 vpx_filter_block1d8_v8_intrin_ssse3 -#define vpx_filter_block1d8_h8_avx2 vpx_filter_block1d8_h8_intrin_ssse3 -#define vpx_filter_block1d4_h8_avx2 vpx_filter_block1d4_h8_intrin_ssse3 +filter8_1dfunction aom_filter_block1d8_v8_intrin_ssse3; +filter8_1dfunction aom_filter_block1d8_h8_intrin_ssse3; +filter8_1dfunction aom_filter_block1d4_h8_intrin_ssse3; +#define aom_filter_block1d8_v8_avx2 aom_filter_block1d8_v8_intrin_ssse3 +#define aom_filter_block1d8_h8_avx2 aom_filter_block1d8_h8_intrin_ssse3 +#define aom_filter_block1d4_h8_avx2 aom_filter_block1d4_h8_intrin_ssse3 #else // ARCH_X86 -filter8_1dfunction vpx_filter_block1d8_v8_ssse3; -filter8_1dfunction vpx_filter_block1d8_h8_ssse3; -filter8_1dfunction vpx_filter_block1d4_h8_ssse3; -#define vpx_filter_block1d8_v8_avx2 vpx_filter_block1d8_v8_ssse3 -#define vpx_filter_block1d8_h8_avx2 vpx_filter_block1d8_h8_ssse3 -#define vpx_filter_block1d4_h8_avx2 vpx_filter_block1d4_h8_ssse3 +filter8_1dfunction aom_filter_block1d8_v8_ssse3; +filter8_1dfunction aom_filter_block1d8_h8_ssse3; +filter8_1dfunction aom_filter_block1d4_h8_ssse3; +#define aom_filter_block1d8_v8_avx2 aom_filter_block1d8_v8_ssse3 +#define aom_filter_block1d8_h8_avx2 aom_filter_block1d8_h8_ssse3 +#define aom_filter_block1d4_h8_avx2 aom_filter_block1d4_h8_ssse3 #endif // ARCH_X86_64 -filter8_1dfunction vpx_filter_block1d16_v2_ssse3; -filter8_1dfunction vpx_filter_block1d16_h2_ssse3; -filter8_1dfunction vpx_filter_block1d8_v2_ssse3; -filter8_1dfunction vpx_filter_block1d8_h2_ssse3; -filter8_1dfunction vpx_filter_block1d4_v2_ssse3; -filter8_1dfunction vpx_filter_block1d4_h2_ssse3; -#define vpx_filter_block1d4_v8_avx2 vpx_filter_block1d4_v8_ssse3 -#define vpx_filter_block1d16_v2_avx2 vpx_filter_block1d16_v2_ssse3 -#define vpx_filter_block1d16_h2_avx2 vpx_filter_block1d16_h2_ssse3 -#define vpx_filter_block1d8_v2_avx2 vpx_filter_block1d8_v2_ssse3 -#define vpx_filter_block1d8_h2_avx2 vpx_filter_block1d8_h2_ssse3 -#define vpx_filter_block1d4_v2_avx2 vpx_filter_block1d4_v2_ssse3 -#define vpx_filter_block1d4_h2_avx2 vpx_filter_block1d4_h2_ssse3 -// void vpx_convolve8_horiz_avx2(const uint8_t *src, ptrdiff_t src_stride, +filter8_1dfunction aom_filter_block1d16_v2_ssse3; +filter8_1dfunction aom_filter_block1d16_h2_ssse3; +filter8_1dfunction aom_filter_block1d8_v2_ssse3; +filter8_1dfunction aom_filter_block1d8_h2_ssse3; +filter8_1dfunction aom_filter_block1d4_v2_ssse3; +filter8_1dfunction aom_filter_block1d4_h2_ssse3; +#define aom_filter_block1d4_v8_avx2 aom_filter_block1d4_v8_ssse3 +#define aom_filter_block1d16_v2_avx2 aom_filter_block1d16_v2_ssse3 +#define aom_filter_block1d16_h2_avx2 aom_filter_block1d16_h2_ssse3 +#define aom_filter_block1d8_v2_avx2 aom_filter_block1d8_v2_ssse3 +#define aom_filter_block1d8_h2_avx2 aom_filter_block1d8_h2_ssse3 +#define aom_filter_block1d4_v2_avx2 aom_filter_block1d4_v2_ssse3 +#define aom_filter_block1d4_h2_avx2 aom_filter_block1d4_h2_ssse3 +// void aom_convolve8_horiz_avx2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, // int w, int h); -// void vpx_convolve8_vert_avx2(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_vert_avx2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, @@ -569,7 +569,7 @@ filter8_1dfunction vpx_filter_block1d4_h2_ssse3; FUN_CONV_1D(horiz, x_step_q4, filter_x, h, src, , avx2); FUN_CONV_1D(vert, y_step_q4, filter_y, v, src - src_stride * 3, , avx2); -// void vpx_convolve8_avx2(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_avx2(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, diff --git a/aom_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c b/aom_dsp/x86/aom_subpixel_8t_intrin_ssse3.c similarity index 94% rename from aom_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c rename to aom_dsp/x86/aom_subpixel_8t_intrin_ssse3.c index 06e563db90d619b4b91c61060cd422c2a67f624b..c02e09dbc440483a79b5c2c30055e176957eeff9 100644 --- a/aom_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c +++ b/aom_dsp/x86/aom_subpixel_8t_intrin_ssse3.c @@ -15,10 +15,10 @@ #include <tmmintrin.h> -#include "./vpx_dsp_rtcd.h" -#include "aom_dsp/vpx_filter.h" +#include "./aom_dsp_rtcd.h" +#include "aom_dsp/aom_filter.h" #include "aom_dsp/x86/convolve.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "aom_ports/emmintrin_compat.h" @@ -49,11 +49,11 @@ DECLARE_ALIGNED(16, static const uint8_t, filt4_global[16]) = { }; // These are reused by the avx2 intrinsics. -filter8_1dfunction vpx_filter_block1d8_v8_intrin_ssse3; -filter8_1dfunction vpx_filter_block1d8_h8_intrin_ssse3; -filter8_1dfunction vpx_filter_block1d4_h8_intrin_ssse3; +filter8_1dfunction aom_filter_block1d8_v8_intrin_ssse3; +filter8_1dfunction aom_filter_block1d8_h8_intrin_ssse3; +filter8_1dfunction aom_filter_block1d4_h8_intrin_ssse3; -void vpx_filter_block1d4_h8_intrin_ssse3( +void aom_filter_block1d4_h8_intrin_ssse3( const uint8_t *src_ptr, ptrdiff_t src_pixels_per_line, uint8_t *output_ptr, ptrdiff_t output_pitch, uint32_t output_height, const int16_t *filter) { __m128i firstFilters, secondFilters, shuffle1, shuffle2; @@ -121,7 +121,7 @@ void vpx_filter_block1d4_h8_intrin_ssse3( } } -void vpx_filter_block1d8_h8_intrin_ssse3( +void aom_filter_block1d8_h8_intrin_ssse3( const uint8_t *src_ptr, ptrdiff_t src_pixels_per_line, uint8_t *output_ptr, ptrdiff_t output_pitch, uint32_t output_height, const int16_t *filter) { __m128i firstFilters, secondFilters, thirdFilters, forthFilters, srcReg; @@ -198,7 +198,7 @@ void vpx_filter_block1d8_h8_intrin_ssse3( } } -void vpx_filter_block1d8_v8_intrin_ssse3( +void aom_filter_block1d8_v8_intrin_ssse3( const uint8_t *src_ptr, ptrdiff_t src_pitch, uint8_t *output_ptr, ptrdiff_t out_pitch, uint32_t output_height, const int16_t *filter) { __m128i addFilterReg64, filtersReg, minReg; @@ -283,48 +283,48 @@ void vpx_filter_block1d8_v8_intrin_ssse3( } } -filter8_1dfunction vpx_filter_block1d16_v8_ssse3; -filter8_1dfunction vpx_filter_block1d16_h8_ssse3; -filter8_1dfunction vpx_filter_block1d8_v8_ssse3; -filter8_1dfunction vpx_filter_block1d8_h8_ssse3; -filter8_1dfunction vpx_filter_block1d4_v8_ssse3; -filter8_1dfunction vpx_filter_block1d4_h8_ssse3; -filter8_1dfunction vpx_filter_block1d16_v8_avg_ssse3; -filter8_1dfunction vpx_filter_block1d16_h8_avg_ssse3; -filter8_1dfunction vpx_filter_block1d8_v8_avg_ssse3; -filter8_1dfunction vpx_filter_block1d8_h8_avg_ssse3; -filter8_1dfunction vpx_filter_block1d4_v8_avg_ssse3; -filter8_1dfunction vpx_filter_block1d4_h8_avg_ssse3; - -filter8_1dfunction vpx_filter_block1d16_v2_ssse3; -filter8_1dfunction vpx_filter_block1d16_h2_ssse3; -filter8_1dfunction vpx_filter_block1d8_v2_ssse3; -filter8_1dfunction vpx_filter_block1d8_h2_ssse3; -filter8_1dfunction vpx_filter_block1d4_v2_ssse3; -filter8_1dfunction vpx_filter_block1d4_h2_ssse3; -filter8_1dfunction vpx_filter_block1d16_v2_avg_ssse3; -filter8_1dfunction vpx_filter_block1d16_h2_avg_ssse3; -filter8_1dfunction vpx_filter_block1d8_v2_avg_ssse3; -filter8_1dfunction vpx_filter_block1d8_h2_avg_ssse3; -filter8_1dfunction vpx_filter_block1d4_v2_avg_ssse3; -filter8_1dfunction vpx_filter_block1d4_h2_avg_ssse3; - -// void vpx_convolve8_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, +filter8_1dfunction aom_filter_block1d16_v8_ssse3; +filter8_1dfunction aom_filter_block1d16_h8_ssse3; +filter8_1dfunction aom_filter_block1d8_v8_ssse3; +filter8_1dfunction aom_filter_block1d8_h8_ssse3; +filter8_1dfunction aom_filter_block1d4_v8_ssse3; +filter8_1dfunction aom_filter_block1d4_h8_ssse3; +filter8_1dfunction aom_filter_block1d16_v8_avg_ssse3; +filter8_1dfunction aom_filter_block1d16_h8_avg_ssse3; +filter8_1dfunction aom_filter_block1d8_v8_avg_ssse3; +filter8_1dfunction aom_filter_block1d8_h8_avg_ssse3; +filter8_1dfunction aom_filter_block1d4_v8_avg_ssse3; +filter8_1dfunction aom_filter_block1d4_h8_avg_ssse3; + +filter8_1dfunction aom_filter_block1d16_v2_ssse3; +filter8_1dfunction aom_filter_block1d16_h2_ssse3; +filter8_1dfunction aom_filter_block1d8_v2_ssse3; +filter8_1dfunction aom_filter_block1d8_h2_ssse3; +filter8_1dfunction aom_filter_block1d4_v2_ssse3; +filter8_1dfunction aom_filter_block1d4_h2_ssse3; +filter8_1dfunction aom_filter_block1d16_v2_avg_ssse3; +filter8_1dfunction aom_filter_block1d16_h2_avg_ssse3; +filter8_1dfunction aom_filter_block1d8_v2_avg_ssse3; +filter8_1dfunction aom_filter_block1d8_h2_avg_ssse3; +filter8_1dfunction aom_filter_block1d4_v2_avg_ssse3; +filter8_1dfunction aom_filter_block1d4_h2_avg_ssse3; + +// void aom_convolve8_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, // int w, int h); -// void vpx_convolve8_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, // int w, int h); -// void vpx_convolve8_avg_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_avg_horiz_ssse3(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, // int w, int h); -// void vpx_convolve8_avg_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_avg_vert_ssse3(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, @@ -875,7 +875,7 @@ static int get_filter_offset(const int16_t *f, const InterpKernel *base) { return (int)((const InterpKernel *)(intptr_t)f - base); } -void vpx_scaled_2d_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, +void aom_scaled_2d_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h) { @@ -889,12 +889,12 @@ void vpx_scaled_2d_ssse3(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, x_step_q4, filters_y, y0_q4, y_step_q4, w, h); } -// void vpx_convolve8_ssse3(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_ssse3(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, // int w, int h); -// void vpx_convolve8_avg_ssse3(const uint8_t *src, ptrdiff_t src_stride, +// void aom_convolve8_avg_ssse3(const uint8_t *src, ptrdiff_t src_stride, // uint8_t *dst, ptrdiff_t dst_stride, // const int16_t *filter_x, int x_step_q4, // const int16_t *filter_y, int y_step_q4, diff --git a/aom_dsp/x86/vpx_subpixel_8t_sse2.asm b/aom_dsp/x86/aom_subpixel_8t_sse2.asm similarity index 94% rename from aom_dsp/x86/vpx_subpixel_8t_sse2.asm rename to aom_dsp/x86/aom_subpixel_8t_sse2.asm index b197150c53a67e0d6295c3c41c5439ce6d2d2432..535581e46d9a3b053460f59294d1f0b13301a81e 100644 --- a/aom_dsp/x86/vpx_subpixel_8t_sse2.asm +++ b/aom_dsp/x86/aom_subpixel_8t_sse2.asm @@ -176,7 +176,7 @@ movq [rdi + %2], xmm0 %endm -;void vpx_filter_block1d4_v8_sse2 +;void aom_filter_block1d4_v8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pitch, @@ -185,8 +185,8 @@ ; unsigned int output_height, ; short *filter ;) -global sym(vpx_filter_block1d4_v8_sse2) PRIVATE -sym(vpx_filter_block1d4_v8_sse2): +global sym(aom_filter_block1d4_v8_sse2) PRIVATE +sym(aom_filter_block1d4_v8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -243,7 +243,7 @@ sym(vpx_filter_block1d4_v8_sse2): pop rbp ret -;void vpx_filter_block1d8_v8_sse2 +;void aom_filter_block1d8_v8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pitch, @@ -252,8 +252,8 @@ sym(vpx_filter_block1d4_v8_sse2): ; unsigned int output_height, ; short *filter ;) -global sym(vpx_filter_block1d8_v8_sse2) PRIVATE -sym(vpx_filter_block1d8_v8_sse2): +global sym(aom_filter_block1d8_v8_sse2) PRIVATE +sym(aom_filter_block1d8_v8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -302,7 +302,7 @@ sym(vpx_filter_block1d8_v8_sse2): pop rbp ret -;void vpx_filter_block1d16_v8_sse2 +;void aom_filter_block1d16_v8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pitch, @@ -311,8 +311,8 @@ sym(vpx_filter_block1d8_v8_sse2): ; unsigned int output_height, ; short *filter ;) -global sym(vpx_filter_block1d16_v8_sse2) PRIVATE -sym(vpx_filter_block1d16_v8_sse2): +global sym(aom_filter_block1d16_v8_sse2) PRIVATE +sym(aom_filter_block1d16_v8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -365,8 +365,8 @@ sym(vpx_filter_block1d16_v8_sse2): pop rbp ret -global sym(vpx_filter_block1d4_v8_avg_sse2) PRIVATE -sym(vpx_filter_block1d4_v8_avg_sse2): +global sym(aom_filter_block1d4_v8_avg_sse2) PRIVATE +sym(aom_filter_block1d4_v8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -423,8 +423,8 @@ sym(vpx_filter_block1d4_v8_avg_sse2): pop rbp ret -global sym(vpx_filter_block1d8_v8_avg_sse2) PRIVATE -sym(vpx_filter_block1d8_v8_avg_sse2): +global sym(aom_filter_block1d8_v8_avg_sse2) PRIVATE +sym(aom_filter_block1d8_v8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -472,8 +472,8 @@ sym(vpx_filter_block1d8_v8_avg_sse2): pop rbp ret -global sym(vpx_filter_block1d16_v8_avg_sse2) PRIVATE -sym(vpx_filter_block1d16_v8_avg_sse2): +global sym(aom_filter_block1d16_v8_avg_sse2) PRIVATE +sym(aom_filter_block1d16_v8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -525,7 +525,7 @@ sym(vpx_filter_block1d16_v8_avg_sse2): pop rbp ret -;void vpx_filter_block1d4_h8_sse2 +;void aom_filter_block1d4_h8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pixels_per_line, @@ -534,8 +534,8 @@ sym(vpx_filter_block1d16_v8_avg_sse2): ; unsigned int output_height, ; short *filter ;) -global sym(vpx_filter_block1d4_h8_sse2) PRIVATE -sym(vpx_filter_block1d4_h8_sse2): +global sym(aom_filter_block1d4_h8_sse2) PRIVATE +sym(aom_filter_block1d4_h8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -599,7 +599,7 @@ sym(vpx_filter_block1d4_h8_sse2): pop rbp ret -;void vpx_filter_block1d8_h8_sse2 +;void aom_filter_block1d8_h8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pixels_per_line, @@ -608,8 +608,8 @@ sym(vpx_filter_block1d4_h8_sse2): ; unsigned int output_height, ; short *filter ;) -global sym(vpx_filter_block1d8_h8_sse2) PRIVATE -sym(vpx_filter_block1d8_h8_sse2): +global sym(aom_filter_block1d8_h8_sse2) PRIVATE +sym(aom_filter_block1d8_h8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -674,7 +674,7 @@ sym(vpx_filter_block1d8_h8_sse2): pop rbp ret -;void vpx_filter_block1d16_h8_sse2 +;void aom_filter_block1d16_h8_sse2 ;( ; unsigned char *src_ptr, ; unsigned int src_pixels_per_line, @@ -683,8 +683,8 @@ sym(vpx_filter_block1d8_h8_sse2): ; unsigned int output_height, ; short *filter ;) -global sym(vpx_filter_block1d16_h8_sse2) PRIVATE -sym(vpx_filter_block1d16_h8_sse2): +global sym(aom_filter_block1d16_h8_sse2) PRIVATE +sym(aom_filter_block1d16_h8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -769,8 +769,8 @@ sym(vpx_filter_block1d16_h8_sse2): pop rbp ret -global sym(vpx_filter_block1d4_h8_avg_sse2) PRIVATE -sym(vpx_filter_block1d4_h8_avg_sse2): +global sym(aom_filter_block1d4_h8_avg_sse2) PRIVATE +sym(aom_filter_block1d4_h8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -834,8 +834,8 @@ sym(vpx_filter_block1d4_h8_avg_sse2): pop rbp ret -global sym(vpx_filter_block1d8_h8_avg_sse2) PRIVATE -sym(vpx_filter_block1d8_h8_avg_sse2): +global sym(aom_filter_block1d8_h8_avg_sse2) PRIVATE +sym(aom_filter_block1d8_h8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -900,8 +900,8 @@ sym(vpx_filter_block1d8_h8_avg_sse2): pop rbp ret -global sym(vpx_filter_block1d16_h8_avg_sse2) PRIVATE -sym(vpx_filter_block1d16_h8_avg_sse2): +global sym(aom_filter_block1d16_h8_avg_sse2) PRIVATE +sym(aom_filter_block1d16_h8_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 diff --git a/aom_dsp/x86/vpx_subpixel_8t_ssse3.asm b/aom_dsp/x86/aom_subpixel_8t_ssse3.asm similarity index 100% rename from aom_dsp/x86/vpx_subpixel_8t_ssse3.asm rename to aom_dsp/x86/aom_subpixel_8t_ssse3.asm diff --git a/aom_dsp/x86/vpx_subpixel_bilinear_sse2.asm b/aom_dsp/x86/aom_subpixel_bilinear_sse2.asm similarity index 89% rename from aom_dsp/x86/vpx_subpixel_bilinear_sse2.asm rename to aom_dsp/x86/aom_subpixel_bilinear_sse2.asm index 7de58ff2a9a67293bf8552153d06968082f488b1..78ac1c49f7e7b2a49c7fae089f4b03b6c0c1bdfe 100644 --- a/aom_dsp/x86/vpx_subpixel_bilinear_sse2.asm +++ b/aom_dsp/x86/aom_subpixel_bilinear_sse2.asm @@ -131,8 +131,8 @@ dec rcx %endm -global sym(vpx_filter_block1d4_v2_sse2) PRIVATE -sym(vpx_filter_block1d4_v2_sse2): +global sym(aom_filter_block1d4_v2_sse2) PRIVATE +sym(aom_filter_block1d4_v2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -155,8 +155,8 @@ sym(vpx_filter_block1d4_v2_sse2): pop rbp ret -global sym(vpx_filter_block1d8_v2_sse2) PRIVATE -sym(vpx_filter_block1d8_v2_sse2): +global sym(aom_filter_block1d8_v2_sse2) PRIVATE +sym(aom_filter_block1d8_v2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -181,8 +181,8 @@ sym(vpx_filter_block1d8_v2_sse2): pop rbp ret -global sym(vpx_filter_block1d16_v2_sse2) PRIVATE -sym(vpx_filter_block1d16_v2_sse2): +global sym(aom_filter_block1d16_v2_sse2) PRIVATE +sym(aom_filter_block1d16_v2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -209,8 +209,8 @@ sym(vpx_filter_block1d16_v2_sse2): pop rbp ret -global sym(vpx_filter_block1d4_v2_avg_sse2) PRIVATE -sym(vpx_filter_block1d4_v2_avg_sse2): +global sym(aom_filter_block1d4_v2_avg_sse2) PRIVATE +sym(aom_filter_block1d4_v2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -233,8 +233,8 @@ sym(vpx_filter_block1d4_v2_avg_sse2): pop rbp ret -global sym(vpx_filter_block1d8_v2_avg_sse2) PRIVATE -sym(vpx_filter_block1d8_v2_avg_sse2): +global sym(aom_filter_block1d8_v2_avg_sse2) PRIVATE +sym(aom_filter_block1d8_v2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -259,8 +259,8 @@ sym(vpx_filter_block1d8_v2_avg_sse2): pop rbp ret -global sym(vpx_filter_block1d16_v2_avg_sse2) PRIVATE -sym(vpx_filter_block1d16_v2_avg_sse2): +global sym(aom_filter_block1d16_v2_avg_sse2) PRIVATE +sym(aom_filter_block1d16_v2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -287,8 +287,8 @@ sym(vpx_filter_block1d16_v2_avg_sse2): pop rbp ret -global sym(vpx_filter_block1d4_h2_sse2) PRIVATE -sym(vpx_filter_block1d4_h2_sse2): +global sym(aom_filter_block1d4_h2_sse2) PRIVATE +sym(aom_filter_block1d4_h2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -312,8 +312,8 @@ sym(vpx_filter_block1d4_h2_sse2): pop rbp ret -global sym(vpx_filter_block1d8_h2_sse2) PRIVATE -sym(vpx_filter_block1d8_h2_sse2): +global sym(aom_filter_block1d8_h2_sse2) PRIVATE +sym(aom_filter_block1d8_h2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -339,8 +339,8 @@ sym(vpx_filter_block1d8_h2_sse2): pop rbp ret -global sym(vpx_filter_block1d16_h2_sse2) PRIVATE -sym(vpx_filter_block1d16_h2_sse2): +global sym(aom_filter_block1d16_h2_sse2) PRIVATE +sym(aom_filter_block1d16_h2_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -367,8 +367,8 @@ sym(vpx_filter_block1d16_h2_sse2): pop rbp ret -global sym(vpx_filter_block1d4_h2_avg_sse2) PRIVATE -sym(vpx_filter_block1d4_h2_avg_sse2): +global sym(aom_filter_block1d4_h2_avg_sse2) PRIVATE +sym(aom_filter_block1d4_h2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -392,8 +392,8 @@ sym(vpx_filter_block1d4_h2_avg_sse2): pop rbp ret -global sym(vpx_filter_block1d8_h2_avg_sse2) PRIVATE -sym(vpx_filter_block1d8_h2_avg_sse2): +global sym(aom_filter_block1d8_h2_avg_sse2) PRIVATE +sym(aom_filter_block1d8_h2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -419,8 +419,8 @@ sym(vpx_filter_block1d8_h2_avg_sse2): pop rbp ret -global sym(vpx_filter_block1d16_h2_avg_sse2) PRIVATE -sym(vpx_filter_block1d16_h2_avg_sse2): +global sym(aom_filter_block1d16_h2_avg_sse2) PRIVATE +sym(aom_filter_block1d16_h2_avg_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 diff --git a/aom_dsp/x86/vpx_subpixel_bilinear_ssse3.asm b/aom_dsp/x86/aom_subpixel_bilinear_ssse3.asm similarity index 88% rename from aom_dsp/x86/vpx_subpixel_bilinear_ssse3.asm rename to aom_dsp/x86/aom_subpixel_bilinear_ssse3.asm index 46ad5435eed894dbc1a1658330cb6276582fcabc..043e535426ab0fdd021c5585a67d60182fee065e 100644 --- a/aom_dsp/x86/vpx_subpixel_bilinear_ssse3.asm +++ b/aom_dsp/x86/aom_subpixel_bilinear_ssse3.asm @@ -109,8 +109,8 @@ dec rcx %endm -global sym(vpx_filter_block1d4_v2_ssse3) PRIVATE -sym(vpx_filter_block1d4_v2_ssse3): +global sym(aom_filter_block1d4_v2_ssse3) PRIVATE +sym(aom_filter_block1d4_v2_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -133,8 +133,8 @@ sym(vpx_filter_block1d4_v2_ssse3): pop rbp ret -global sym(vpx_filter_block1d8_v2_ssse3) PRIVATE -sym(vpx_filter_block1d8_v2_ssse3): +global sym(aom_filter_block1d8_v2_ssse3) PRIVATE +sym(aom_filter_block1d8_v2_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -159,8 +159,8 @@ sym(vpx_filter_block1d8_v2_ssse3): pop rbp ret -global sym(vpx_filter_block1d16_v2_ssse3) PRIVATE -sym(vpx_filter_block1d16_v2_ssse3): +global sym(aom_filter_block1d16_v2_ssse3) PRIVATE +sym(aom_filter_block1d16_v2_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -186,8 +186,8 @@ sym(vpx_filter_block1d16_v2_ssse3): pop rbp ret -global sym(vpx_filter_block1d4_v2_avg_ssse3) PRIVATE -sym(vpx_filter_block1d4_v2_avg_ssse3): +global sym(aom_filter_block1d4_v2_avg_ssse3) PRIVATE +sym(aom_filter_block1d4_v2_avg_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -210,8 +210,8 @@ sym(vpx_filter_block1d4_v2_avg_ssse3): pop rbp ret -global sym(vpx_filter_block1d8_v2_avg_ssse3) PRIVATE -sym(vpx_filter_block1d8_v2_avg_ssse3): +global sym(aom_filter_block1d8_v2_avg_ssse3) PRIVATE +sym(aom_filter_block1d8_v2_avg_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -236,8 +236,8 @@ sym(vpx_filter_block1d8_v2_avg_ssse3): pop rbp ret -global sym(vpx_filter_block1d16_v2_avg_ssse3) PRIVATE -sym(vpx_filter_block1d16_v2_avg_ssse3): +global sym(aom_filter_block1d16_v2_avg_ssse3) PRIVATE +sym(aom_filter_block1d16_v2_avg_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -263,8 +263,8 @@ sym(vpx_filter_block1d16_v2_avg_ssse3): pop rbp ret -global sym(vpx_filter_block1d4_h2_ssse3) PRIVATE -sym(vpx_filter_block1d4_h2_ssse3): +global sym(aom_filter_block1d4_h2_ssse3) PRIVATE +sym(aom_filter_block1d4_h2_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -288,8 +288,8 @@ sym(vpx_filter_block1d4_h2_ssse3): pop rbp ret -global sym(vpx_filter_block1d8_h2_ssse3) PRIVATE -sym(vpx_filter_block1d8_h2_ssse3): +global sym(aom_filter_block1d8_h2_ssse3) PRIVATE +sym(aom_filter_block1d8_h2_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -315,8 +315,8 @@ sym(vpx_filter_block1d8_h2_ssse3): pop rbp ret -global sym(vpx_filter_block1d16_h2_ssse3) PRIVATE -sym(vpx_filter_block1d16_h2_ssse3): +global sym(aom_filter_block1d16_h2_ssse3) PRIVATE +sym(aom_filter_block1d16_h2_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -342,8 +342,8 @@ sym(vpx_filter_block1d16_h2_ssse3): pop rbp ret -global sym(vpx_filter_block1d4_h2_avg_ssse3) PRIVATE -sym(vpx_filter_block1d4_h2_avg_ssse3): +global sym(aom_filter_block1d4_h2_avg_ssse3) PRIVATE +sym(aom_filter_block1d4_h2_avg_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -367,8 +367,8 @@ sym(vpx_filter_block1d4_h2_avg_ssse3): pop rbp ret -global sym(vpx_filter_block1d8_h2_avg_ssse3) PRIVATE -sym(vpx_filter_block1d8_h2_avg_ssse3): +global sym(aom_filter_block1d8_h2_avg_ssse3) PRIVATE +sym(aom_filter_block1d8_h2_avg_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -394,8 +394,8 @@ sym(vpx_filter_block1d8_h2_avg_ssse3): pop rbp ret -global sym(vpx_filter_block1d16_h2_avg_ssse3) PRIVATE -sym(vpx_filter_block1d16_h2_avg_ssse3): +global sym(aom_filter_block1d16_h2_avg_ssse3) PRIVATE +sym(aom_filter_block1d16_h2_avg_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 diff --git a/aom_dsp/x86/avg_intrin_sse2.c b/aom_dsp/x86/avg_intrin_sse2.c index b5631bfcaf51d954e85d423020a2f33750288acd..94a579c9b1d38d3f5e6a989765dafb72f59ae4ca 100644 --- a/aom_dsp/x86/avg_intrin_sse2.c +++ b/aom_dsp/x86/avg_intrin_sse2.c @@ -11,10 +11,10 @@ #include <emmintrin.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" -void vpx_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp, +void aom_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max) { __m128i u0, s0, d0, diff, maxabsdiff, minabsdiff, negdiff, absdiff0, absdiff; u0 = _mm_setzero_si128(); @@ -92,7 +92,7 @@ void vpx_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp, *min = _mm_extract_epi16(minabsdiff, 0); } -unsigned int vpx_avg_8x8_sse2(const uint8_t *s, int p) { +unsigned int aom_avg_8x8_sse2(const uint8_t *s, int p) { __m128i s0, s1, u0; unsigned int avg = 0; u0 = _mm_setzero_si128(); @@ -119,7 +119,7 @@ unsigned int vpx_avg_8x8_sse2(const uint8_t *s, int p) { return (avg + 32) >> 6; } -unsigned int vpx_avg_4x4_sse2(const uint8_t *s, int p) { +unsigned int aom_avg_4x4_sse2(const uint8_t *s, int p) { __m128i s0, s1, u0; unsigned int avg = 0; u0 = _mm_setzero_si128(); @@ -213,7 +213,7 @@ static void hadamard_col8_sse2(__m128i *in, int iter) { } } -void vpx_hadamard_8x8_sse2(int16_t const *src_diff, int src_stride, +void aom_hadamard_8x8_sse2(int16_t const *src_diff, int src_stride, int16_t *coeff) { __m128i src[8]; src[0] = _mm_load_si128((const __m128i *)src_diff); @@ -245,13 +245,13 @@ void vpx_hadamard_8x8_sse2(int16_t const *src_diff, int src_stride, _mm_store_si128((__m128i *)coeff, src[7]); } -void vpx_hadamard_16x16_sse2(int16_t const *src_diff, int src_stride, +void aom_hadamard_16x16_sse2(int16_t const *src_diff, int src_stride, int16_t *coeff) { int idx; for (idx = 0; idx < 4; ++idx) { int16_t const *src_ptr = src_diff + (idx >> 1) * 8 * src_stride + (idx & 0x01) * 8; - vpx_hadamard_8x8_sse2(src_ptr, src_stride, coeff + idx * 64); + aom_hadamard_8x8_sse2(src_ptr, src_stride, coeff + idx * 64); } for (idx = 0; idx < 64; idx += 8) { @@ -284,7 +284,7 @@ void vpx_hadamard_16x16_sse2(int16_t const *src_diff, int src_stride, } } -int vpx_satd_sse2(const int16_t *coeff, int length) { +int aom_satd_sse2(const int16_t *coeff, int length) { int i; const __m128i zero = _mm_setzero_si128(); __m128i accum = zero; @@ -310,7 +310,7 @@ int vpx_satd_sse2(const int16_t *coeff, int length) { return _mm_cvtsi128_si32(accum); } -void vpx_int_pro_row_sse2(int16_t *hbuf, uint8_t const *ref, +void aom_int_pro_row_sse2(int16_t *hbuf, uint8_t const *ref, const int ref_stride, const int height) { int idx; __m128i zero = _mm_setzero_si128(); @@ -359,7 +359,7 @@ void vpx_int_pro_row_sse2(int16_t *hbuf, uint8_t const *ref, _mm_storeu_si128((__m128i *)hbuf, s1); } -int16_t vpx_int_pro_col_sse2(uint8_t const *ref, const int width) { +int16_t aom_int_pro_col_sse2(uint8_t const *ref, const int width) { __m128i zero = _mm_setzero_si128(); __m128i src_line = _mm_load_si128((const __m128i *)ref); __m128i s0 = _mm_sad_epu8(src_line, zero); @@ -379,7 +379,7 @@ int16_t vpx_int_pro_col_sse2(uint8_t const *ref, const int width) { return _mm_extract_epi16(s0, 0); } -int vpx_vector_var_sse2(int16_t const *ref, int16_t const *src, const int bwl) { +int aom_vector_var_sse2(int16_t const *ref, int16_t const *src, const int bwl) { int idx; int width = 4 << bwl; int16_t mean; diff --git a/aom_dsp/x86/avg_ssse3_x86_64.asm b/aom_dsp/x86/avg_ssse3_x86_64.asm index 26412e8e432bb5b1e7fd0c87f7f7ab822ac02065..8f28874e4f1e94e324bc0b94e1640f433ecfffe7 100644 --- a/aom_dsp/x86/avg_ssse3_x86_64.asm +++ b/aom_dsp/x86/avg_ssse3_x86_64.asm @@ -8,7 +8,7 @@ ; be found in the AUTHORS file in the root of the source tree. ; -%define private_prefix vpx +%define private_prefix aom %include "third_party/x86inc/x86inc.asm" diff --git a/aom_dsp/x86/convolve.h b/aom_dsp/x86/convolve.h index b50359f90e0f5ae536c5ff7951e3148fdd0a7260..cf436543f25f58eb680cc3c644292d958c07bca3 100644 --- a/aom_dsp/x86/convolve.h +++ b/aom_dsp/x86/convolve.h @@ -13,8 +13,8 @@ #include <assert.h> -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch, @@ -22,7 +22,7 @@ typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch, uint32_t output_height, const int16_t *filter); #define FUN_CONV_1D(name, step_q4, filter, dir, src_start, avg, opt) \ - void vpx_convolve8_##name##_##opt( \ + void aom_convolve8_##name##_##opt( \ const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \ ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \ const int16_t *filter_y, int y_step_q4, int w, int h) { \ @@ -30,21 +30,21 @@ typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch, assert(step_q4 == 16); \ if (filter[0] || filter[1] || filter[2]) { \ while (w >= 16) { \ - vpx_filter_block1d16_##dir##8_##avg##opt(src_start, src_stride, dst, \ + aom_filter_block1d16_##dir##8_##avg##opt(src_start, src_stride, dst, \ dst_stride, h, filter); \ src += 16; \ dst += 16; \ w -= 16; \ } \ while (w >= 8) { \ - vpx_filter_block1d8_##dir##8_##avg##opt(src_start, src_stride, dst, \ + aom_filter_block1d8_##dir##8_##avg##opt(src_start, src_stride, dst, \ dst_stride, h, filter); \ src += 8; \ dst += 8; \ w -= 8; \ } \ while (w >= 4) { \ - vpx_filter_block1d4_##dir##8_##avg##opt(src_start, src_stride, dst, \ + aom_filter_block1d4_##dir##8_##avg##opt(src_start, src_stride, dst, \ dst_stride, h, filter); \ src += 4; \ dst += 4; \ @@ -52,21 +52,21 @@ typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch, } \ } else { \ while (w >= 16) { \ - vpx_filter_block1d16_##dir##2_##avg##opt(src, src_stride, dst, \ + aom_filter_block1d16_##dir##2_##avg##opt(src, src_stride, dst, \ dst_stride, h, filter); \ src += 16; \ dst += 16; \ w -= 16; \ } \ while (w >= 8) { \ - vpx_filter_block1d8_##dir##2_##avg##opt(src, src_stride, dst, \ + aom_filter_block1d8_##dir##2_##avg##opt(src, src_stride, dst, \ dst_stride, h, filter); \ src += 8; \ dst += 8; \ w -= 8; \ } \ while (w >= 4) { \ - vpx_filter_block1d4_##dir##2_##avg##opt(src, src_stride, dst, \ + aom_filter_block1d4_##dir##2_##avg##opt(src, src_stride, dst, \ dst_stride, h, filter); \ src += 4; \ dst += 4; \ @@ -76,7 +76,7 @@ typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch, } #define FUN_CONV_2D(avg, opt) \ - void vpx_convolve8_##avg##opt( \ + void aom_convolve8_##avg##opt( \ const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \ ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \ const int16_t *filter_y, int y_step_q4, int w, int h) { \ @@ -89,17 +89,17 @@ typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch, if (filter_x[0] || filter_x[1] || filter_x[2] || filter_y[0] || \ filter_y[1] || filter_y[2]) { \ DECLARE_ALIGNED(16, uint8_t, fdata2[64 * 71]); \ - vpx_convolve8_horiz_##opt(src - 3 * src_stride, src_stride, fdata2, 64, \ + aom_convolve8_horiz_##opt(src - 3 * src_stride, src_stride, fdata2, 64, \ filter_x, x_step_q4, filter_y, y_step_q4, w, \ h + 7); \ - vpx_convolve8_##avg##vert_##opt(fdata2 + 3 * 64, 64, dst, dst_stride, \ + aom_convolve8_##avg##vert_##opt(fdata2 + 3 * 64, 64, dst, dst_stride, \ filter_x, x_step_q4, filter_y, \ y_step_q4, w, h); \ } else { \ DECLARE_ALIGNED(16, uint8_t, fdata2[64 * 65]); \ - vpx_convolve8_horiz_##opt(src, src_stride, fdata2, 64, filter_x, \ + aom_convolve8_horiz_##opt(src, src_stride, fdata2, 64, filter_x, \ x_step_q4, filter_y, y_step_q4, w, h + 1); \ - vpx_convolve8_##avg##vert_##opt(fdata2, 64, dst, dst_stride, filter_x, \ + aom_convolve8_##avg##vert_##opt(fdata2, 64, dst, dst_stride, filter_x, \ x_step_q4, filter_y, y_step_q4, w, h); \ } \ } @@ -114,7 +114,7 @@ typedef void highbd_filter8_1dfunction(const uint16_t *src_ptr, const int16_t *filter, int bd); #define HIGH_FUN_CONV_1D(name, step_q4, filter, dir, src_start, avg, opt) \ - void vpx_highbd_convolve8_##name##_##opt( \ + void aom_highbd_convolve8_##name##_##opt( \ const uint8_t *src8, ptrdiff_t src_stride, uint8_t *dst8, \ ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \ const int16_t *filter_y, int y_step_q4, int w, int h, int bd) { \ @@ -123,21 +123,21 @@ typedef void highbd_filter8_1dfunction(const uint16_t *src_ptr, uint16_t *dst = CONVERT_TO_SHORTPTR(dst8); \ if (filter[0] || filter[1] || filter[2]) { \ while (w >= 16) { \ - vpx_highbd_filter_block1d16_##dir##8_##avg##opt( \ + aom_highbd_filter_block1d16_##dir##8_##avg##opt( \ src_start, src_stride, dst, dst_stride, h, filter, bd); \ src += 16; \ dst += 16; \ w -= 16; \ } \ while (w >= 8) { \ - vpx_highbd_filter_block1d8_##dir##8_##avg##opt( \ + aom_highbd_filter_block1d8_##dir##8_##avg##opt( \ src_start, src_stride, dst, dst_stride, h, filter, bd); \ src += 8; \ dst += 8; \ w -= 8; \ } \ while (w >= 4) { \ - vpx_highbd_filter_block1d4_##dir##8_##avg##opt( \ + aom_highbd_filter_block1d4_##dir##8_##avg##opt( \ src_start, src_stride, dst, dst_stride, h, filter, bd); \ src += 4; \ dst += 4; \ @@ -145,21 +145,21 @@ typedef void highbd_filter8_1dfunction(const uint16_t *src_ptr, } \ } else { \ while (w >= 16) { \ - vpx_highbd_filter_block1d16_##dir##2_##avg##opt( \ + aom_highbd_filter_block1d16_##dir##2_##avg##opt( \ src, src_stride, dst, dst_stride, h, filter, bd); \ src += 16; \ dst += 16; \ w -= 16; \ } \ while (w >= 8) { \ - vpx_highbd_filter_block1d8_##dir##2_##avg##opt( \ + aom_highbd_filter_block1d8_##dir##2_##avg##opt( \ src, src_stride, dst, dst_stride, h, filter, bd); \ src += 8; \ dst += 8; \ w -= 8; \ } \ while (w >= 4) { \ - vpx_highbd_filter_block1d4_##dir##2_##avg##opt( \ + aom_highbd_filter_block1d4_##dir##2_##avg##opt( \ src, src_stride, dst, dst_stride, h, filter, bd); \ src += 4; \ dst += 4; \ @@ -168,14 +168,14 @@ typedef void highbd_filter8_1dfunction(const uint16_t *src_ptr, } \ } \ if (w) { \ - vpx_highbd_convolve8_##name##_c(src8, src_stride, dst8, dst_stride, \ + aom_highbd_convolve8_##name##_c(src8, src_stride, dst8, dst_stride, \ filter_x, x_step_q4, filter_y, \ y_step_q4, w, h, bd); \ } \ } #define HIGH_FUN_CONV_2D(avg, opt) \ - void vpx_highbd_convolve8_##avg##opt( \ + void aom_highbd_convolve8_##avg##opt( \ const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \ ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, \ const int16_t *filter_y, int y_step_q4, int w, int h, int bd) { \ @@ -185,23 +185,23 @@ typedef void highbd_filter8_1dfunction(const uint16_t *src_ptr, if (filter_x[0] || filter_x[1] || filter_x[2] || filter_x[3] == 128 || \ filter_y[0] || filter_y[1] || filter_y[2] || filter_y[3] == 128) { \ DECLARE_ALIGNED(16, uint16_t, fdata2[64 * 71]); \ - vpx_highbd_convolve8_horiz_##opt( \ + aom_highbd_convolve8_horiz_##opt( \ src - 3 * src_stride, src_stride, CONVERT_TO_BYTEPTR(fdata2), 64, \ filter_x, x_step_q4, filter_y, y_step_q4, w, h + 7, bd); \ - vpx_highbd_convolve8_##avg##vert_##opt( \ + aom_highbd_convolve8_##avg##vert_##opt( \ CONVERT_TO_BYTEPTR(fdata2) + 192, 64, dst, dst_stride, filter_x, \ x_step_q4, filter_y, y_step_q4, w, h, bd); \ } else { \ DECLARE_ALIGNED(16, uint16_t, fdata2[64 * 65]); \ - vpx_highbd_convolve8_horiz_##opt( \ + aom_highbd_convolve8_horiz_##opt( \ src, src_stride, CONVERT_TO_BYTEPTR(fdata2), 64, filter_x, \ x_step_q4, filter_y, y_step_q4, w, h + 1, bd); \ - vpx_highbd_convolve8_##avg##vert_##opt( \ + aom_highbd_convolve8_##avg##vert_##opt( \ CONVERT_TO_BYTEPTR(fdata2), 64, dst, dst_stride, filter_x, \ x_step_q4, filter_y, y_step_q4, w, h, bd); \ } \ } else { \ - vpx_highbd_convolve8_##avg##c(src, src_stride, dst, dst_stride, \ + aom_highbd_convolve8_##avg##c(src, src_stride, dst, dst_stride, \ filter_x, x_step_q4, filter_y, y_step_q4, \ w, h, bd); \ } \ diff --git a/aom_dsp/x86/fwd_dct32x32_impl_sse2.h b/aom_dsp/x86/fwd_dct32x32_impl_sse2.h index 337a700042e27abba2748fa2583a6bf0328dcfd1..e63e3759f82d73c97f78dd3edabe6a8a2a2d5714 100644 --- a/aom_dsp/x86/fwd_dct32x32_impl_sse2.h +++ b/aom_dsp/x86/fwd_dct32x32_impl_sse2.h @@ -22,31 +22,31 @@ #define ADD_EPI16 _mm_adds_epi16 #define SUB_EPI16 _mm_subs_epi16 #if FDCT32x32_HIGH_PRECISION -void vpx_fdct32x32_rows_c(const int16_t *intermediate, tran_low_t *out) { +void aom_fdct32x32_rows_c(const int16_t *intermediate, tran_low_t *out) { int i, j; for (i = 0; i < 32; ++i) { tran_high_t temp_in[32], temp_out[32]; for (j = 0; j < 32; ++j) temp_in[j] = intermediate[j * 32 + i]; - vpx_fdct32(temp_in, temp_out, 0); + aom_fdct32(temp_in, temp_out, 0); for (j = 0; j < 32; ++j) out[j + i * 32] = (tran_low_t)((temp_out[j] + 1 + (temp_out[j] < 0)) >> 2); } } -#define HIGH_FDCT32x32_2D_C vpx_highbd_fdct32x32_c -#define HIGH_FDCT32x32_2D_ROWS_C vpx_fdct32x32_rows_c +#define HIGH_FDCT32x32_2D_C aom_highbd_fdct32x32_c +#define HIGH_FDCT32x32_2D_ROWS_C aom_fdct32x32_rows_c #else -void vpx_fdct32x32_rd_rows_c(const int16_t *intermediate, tran_low_t *out) { +void aom_fdct32x32_rd_rows_c(const int16_t *intermediate, tran_low_t *out) { int i, j; for (i = 0; i < 32; ++i) { tran_high_t temp_in[32], temp_out[32]; for (j = 0; j < 32; ++j) temp_in[j] = intermediate[j * 32 + i]; - vpx_fdct32(temp_in, temp_out, 1); + aom_fdct32(temp_in, temp_out, 1); for (j = 0; j < 32; ++j) out[j + i * 32] = (tran_low_t)temp_out[j]; } } -#define HIGH_FDCT32x32_2D_C vpx_highbd_fdct32x32_rd_c -#define HIGH_FDCT32x32_2D_ROWS_C vpx_fdct32x32_rd_rows_c +#define HIGH_FDCT32x32_2D_C aom_highbd_fdct32x32_rd_c +#define HIGH_FDCT32x32_2D_ROWS_C aom_fdct32x32_rd_rows_c #endif // FDCT32x32_HIGH_PRECISION #else #define ADD_EPI16 _mm_add_epi16 diff --git a/aom_dsp/x86/fwd_txfm_avx2.c b/aom_dsp/x86/fwd_txfm_avx2.c index c94ad4e250b41c984e4c35ca97f3125e2fd723cd..670f864d0764eef883c7abb36a2c8de045474520 100644 --- a/aom_dsp/x86/fwd_txfm_avx2.c +++ b/aom_dsp/x86/fwd_txfm_avx2.c @@ -9,15 +9,15 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" +#include "./aom_config.h" -#define FDCT32x32_2D_AVX2 vpx_fdct32x32_rd_avx2 +#define FDCT32x32_2D_AVX2 aom_fdct32x32_rd_avx2 #define FDCT32x32_HIGH_PRECISION 0 #include "aom_dsp/x86/fwd_dct32x32_impl_avx2.h" #undef FDCT32x32_2D_AVX2 #undef FDCT32x32_HIGH_PRECISION -#define FDCT32x32_2D_AVX2 vpx_fdct32x32_avx2 +#define FDCT32x32_2D_AVX2 aom_fdct32x32_avx2 #define FDCT32x32_HIGH_PRECISION 1 #include "aom_dsp/x86/fwd_dct32x32_impl_avx2.h" // NOLINT #undef FDCT32x32_2D_AVX2 diff --git a/aom_dsp/x86/fwd_txfm_impl_sse2.h b/aom_dsp/x86/fwd_txfm_impl_sse2.h index 2028240eaf09c2c6e23c22ee0e7de5218d4febcd..7bb1db70af17c21b32a8bc15e27387243038e357 100644 --- a/aom_dsp/x86/fwd_txfm_impl_sse2.h +++ b/aom_dsp/x86/fwd_txfm_impl_sse2.h @@ -11,7 +11,7 @@ #include <emmintrin.h> // SSE2 -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/txfm_common.h" #include "aom_dsp/x86/fwd_txfm_sse2.h" #include "aom_dsp/x86/txfm_common_sse2.h" @@ -99,7 +99,7 @@ void FDCT4x4_2D(const int16_t *input, tran_low_t *output, int stride) { _mm_cmplt_epi16(in1, _mm_set1_epi16(0xfc00))); test = _mm_movemask_epi8(_mm_or_si128(cmp0, cmp1)); if (test) { - vpx_highbd_fdct4x4_c(input, output, stride); + aom_highbd_fdct4x4_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -170,7 +170,7 @@ void FDCT4x4_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x2(&x0, &x1); if (overflow) { - vpx_highbd_fdct4x4_c(input, output, stride); + aom_highbd_fdct4x4_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -192,7 +192,7 @@ void FDCT4x4_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x2(&t0, &t1); if (overflow) { - vpx_highbd_fdct4x4_c(input, output, stride); + aom_highbd_fdct4x4_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -231,7 +231,7 @@ void FDCT4x4_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x2(&x0, &x1); if (overflow) { - vpx_highbd_fdct4x4_c(input, output, stride); + aom_highbd_fdct4x4_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -314,7 +314,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x8(&q0, &q1, &q2, &q3, &q4, &q5, &q6, &q7); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } } @@ -329,7 +329,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&r0, &r1, &r2, &r3); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -372,7 +372,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&res0, &res4, &res2, &res6); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -402,7 +402,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x2(&r0, &r1); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -415,7 +415,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&x0, &x1, &x2, &x3); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -458,7 +458,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&res1, &res7, &res5, &res3); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -721,7 +721,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x8(&input0, &input1, &input2, &input3, &input4, &input5, &input6, &input7); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -741,7 +741,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { check_epi16_overflow_x8(&step1_0, &step1_1, &step1_2, &step1_3, &step1_4, &step1_5, &step1_6, &step1_7); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -761,7 +761,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x8(&q0, &q1, &q2, &q3, &q4, &q5, &q6, &q7); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -775,7 +775,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&r0, &r1, &r2, &r3); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -797,7 +797,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&res00, &res08, &res04, &res12); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -818,7 +818,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x2(&r0, &r1); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -831,7 +831,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&x0, &x1, &x2, &x3); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -854,7 +854,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x4(&res02, &res14, &res10, &res06); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -882,7 +882,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x4(&step2_2, &step2_3, &step2_5, &step2_4); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -902,7 +902,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { check_epi16_overflow_x8(&step3_0, &step3_1, &step3_2, &step3_3, &step3_4, &step3_5, &step3_6, &step3_7); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -925,7 +925,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x4(&step2_1, &step2_2, &step2_6, &step2_5); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -945,7 +945,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { check_epi16_overflow_x8(&step1_0, &step1_1, &step1_2, &step1_3, &step1_4, &step1_5, &step1_6, &step1_7); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -967,7 +967,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&res01, &res09, &res15, &res07); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -988,7 +988,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&res05, &res13, &res11, &res03); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH diff --git a/aom_dsp/x86/fwd_txfm_sse2.c b/aom_dsp/x86/fwd_txfm_sse2.c index ab159b407ed3197833f3730bec797e88bd98dc35..2afb212e946d0def5fc7d2425e7f34d8d3db26a9 100644 --- a/aom_dsp/x86/fwd_txfm_sse2.c +++ b/aom_dsp/x86/fwd_txfm_sse2.c @@ -11,11 +11,11 @@ #include <emmintrin.h> // SSE2 -#include "./vpx_config.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "./aom_config.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_dsp/x86/fwd_txfm_sse2.h" -void vpx_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride) { +void aom_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride) { __m128i in0, in1; __m128i tmp; const __m128i zero = _mm_setzero_si128(); @@ -44,7 +44,7 @@ void vpx_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride) { store_output(&in0, output); } -void vpx_fdct8x8_1_sse2(const int16_t *input, tran_low_t *output, int stride) { +void aom_fdct8x8_1_sse2(const int16_t *input, tran_low_t *output, int stride) { __m128i in0 = _mm_load_si128((const __m128i *)(input + 0 * stride)); __m128i in1 = _mm_load_si128((const __m128i *)(input + 1 * stride)); __m128i in2 = _mm_load_si128((const __m128i *)(input + 2 * stride)); @@ -84,7 +84,7 @@ void vpx_fdct8x8_1_sse2(const int16_t *input, tran_low_t *output, int stride) { store_output(&in1, output); } -void vpx_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, +void aom_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, int stride) { __m128i in0, in1, in2, in3; __m128i u0, u1; @@ -153,7 +153,7 @@ void vpx_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, store_output(&in1, output); } -void vpx_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, +void aom_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, int stride) { __m128i in0, in1, in2, in3; __m128i u0, u1; @@ -226,21 +226,21 @@ void vpx_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, } #define DCT_HIGH_BIT_DEPTH 0 -#define FDCT4x4_2D vpx_fdct4x4_sse2 -#define FDCT8x8_2D vpx_fdct8x8_sse2 -#define FDCT16x16_2D vpx_fdct16x16_sse2 +#define FDCT4x4_2D aom_fdct4x4_sse2 +#define FDCT8x8_2D aom_fdct8x8_sse2 +#define FDCT16x16_2D aom_fdct16x16_sse2 #include "aom_dsp/x86/fwd_txfm_impl_sse2.h" #undef FDCT4x4_2D #undef FDCT8x8_2D #undef FDCT16x16_2D -#define FDCT32x32_2D vpx_fdct32x32_rd_sse2 +#define FDCT32x32_2D aom_fdct32x32_rd_sse2 #define FDCT32x32_HIGH_PRECISION 0 #include "aom_dsp/x86/fwd_dct32x32_impl_sse2.h" #undef FDCT32x32_2D #undef FDCT32x32_HIGH_PRECISION -#define FDCT32x32_2D vpx_fdct32x32_sse2 +#define FDCT32x32_2D aom_fdct32x32_sse2 #define FDCT32x32_HIGH_PRECISION 1 #include "aom_dsp/x86/fwd_dct32x32_impl_sse2.h" // NOLINT #undef FDCT32x32_2D @@ -249,21 +249,21 @@ void vpx_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, #if CONFIG_VPX_HIGHBITDEPTH #define DCT_HIGH_BIT_DEPTH 1 -#define FDCT4x4_2D vpx_highbd_fdct4x4_sse2 -#define FDCT8x8_2D vpx_highbd_fdct8x8_sse2 -#define FDCT16x16_2D vpx_highbd_fdct16x16_sse2 +#define FDCT4x4_2D aom_highbd_fdct4x4_sse2 +#define FDCT8x8_2D aom_highbd_fdct8x8_sse2 +#define FDCT16x16_2D aom_highbd_fdct16x16_sse2 #include "aom_dsp/x86/fwd_txfm_impl_sse2.h" // NOLINT #undef FDCT4x4_2D #undef FDCT8x8_2D #undef FDCT16x16_2D -#define FDCT32x32_2D vpx_highbd_fdct32x32_rd_sse2 +#define FDCT32x32_2D aom_highbd_fdct32x32_rd_sse2 #define FDCT32x32_HIGH_PRECISION 0 #include "aom_dsp/x86/fwd_dct32x32_impl_sse2.h" // NOLINT #undef FDCT32x32_2D #undef FDCT32x32_HIGH_PRECISION -#define FDCT32x32_2D vpx_highbd_fdct32x32_sse2 +#define FDCT32x32_2D aom_highbd_fdct32x32_sse2 #define FDCT32x32_HIGH_PRECISION 1 #include "aom_dsp/x86/fwd_dct32x32_impl_sse2.h" // NOLINT #undef FDCT32x32_2D diff --git a/aom_dsp/x86/halfpix_variance_impl_sse2.asm b/aom_dsp/x86/halfpix_variance_impl_sse2.asm index b91d1dc0da5c0668f1d9d53ee64d12d689b1bcee..66e752e03a9f0a13ac1b4ad857ab72e79a146a8a 100644 --- a/aom_dsp/x86/halfpix_variance_impl_sse2.asm +++ b/aom_dsp/x86/halfpix_variance_impl_sse2.asm @@ -10,15 +10,15 @@ %include "aom_ports/x86_abi_support.asm" -;void vpx_half_horiz_vert_variance16x_h_sse2(unsigned char *ref, +;void aom_half_horiz_vert_variance16x_h_sse2(unsigned char *ref, ; int ref_stride, ; unsigned char *src, ; int src_stride, ; unsigned int height, ; int *sum, ; unsigned int *sumsquared) -global sym(vpx_half_horiz_vert_variance16x_h_sse2) PRIVATE -sym(vpx_half_horiz_vert_variance16x_h_sse2): +global sym(aom_half_horiz_vert_variance16x_h_sse2) PRIVATE +sym(aom_half_horiz_vert_variance16x_h_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -45,7 +45,7 @@ sym(vpx_half_horiz_vert_variance16x_h_sse2): lea rsi, [rsi + rax] -vpx_half_horiz_vert_variance16x_h_1: +aom_half_horiz_vert_variance16x_h_1: movdqu xmm1, XMMWORD PTR [rsi] ; movdqu xmm2, XMMWORD PTR [rsi+1] ; pavgb xmm1, xmm2 ; xmm1 = avg(xmm1,xmm3) horizontal line i+1 @@ -77,7 +77,7 @@ vpx_half_horiz_vert_variance16x_h_1: lea rdi, [rdi + rdx] sub rcx, 1 ; - jnz vpx_half_horiz_vert_variance16x_h_1 ; + jnz aom_half_horiz_vert_variance16x_h_1 ; pxor xmm1, xmm1 pxor xmm5, xmm5 @@ -123,15 +123,15 @@ vpx_half_horiz_vert_variance16x_h_1: ret -;void vpx_half_vert_variance16x_h_sse2(unsigned char *ref, +;void aom_half_vert_variance16x_h_sse2(unsigned char *ref, ; int ref_stride, ; unsigned char *src, ; int src_stride, ; unsigned int height, ; int *sum, ; unsigned int *sumsquared) -global sym(vpx_half_vert_variance16x_h_sse2) PRIVATE -sym(vpx_half_vert_variance16x_h_sse2): +global sym(aom_half_vert_variance16x_h_sse2) PRIVATE +sym(aom_half_vert_variance16x_h_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -154,7 +154,7 @@ sym(vpx_half_vert_variance16x_h_sse2): lea rsi, [rsi + rax ] pxor xmm0, xmm0 -vpx_half_vert_variance16x_h_1: +aom_half_vert_variance16x_h_1: movdqu xmm3, XMMWORD PTR [rsi] pavgb xmm5, xmm3 ; xmm5 = avg(xmm1,xmm3) @@ -182,7 +182,7 @@ vpx_half_vert_variance16x_h_1: lea rdi, [rdi + rdx] sub rcx, 1 - jnz vpx_half_vert_variance16x_h_1 + jnz aom_half_vert_variance16x_h_1 pxor xmm1, xmm1 pxor xmm5, xmm5 @@ -228,15 +228,15 @@ vpx_half_vert_variance16x_h_1: ret -;void vpx_half_horiz_variance16x_h_sse2(unsigned char *ref, +;void aom_half_horiz_variance16x_h_sse2(unsigned char *ref, ; int ref_stride ; unsigned char *src, ; int src_stride, ; unsigned int height, ; int *sum, ; unsigned int *sumsquared) -global sym(vpx_half_horiz_variance16x_h_sse2) PRIVATE -sym(vpx_half_horiz_variance16x_h_sse2): +global sym(aom_half_horiz_variance16x_h_sse2) PRIVATE +sym(aom_half_horiz_variance16x_h_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -257,7 +257,7 @@ sym(vpx_half_horiz_variance16x_h_sse2): pxor xmm0, xmm0 ; -vpx_half_horiz_variance16x_h_1: +aom_half_horiz_variance16x_h_1: movdqu xmm5, XMMWORD PTR [rsi] ; xmm5 = s0,s1,s2..s15 movdqu xmm3, XMMWORD PTR [rsi+1] ; xmm3 = s1,s2,s3..s16 @@ -284,7 +284,7 @@ vpx_half_horiz_variance16x_h_1: lea rdi, [rdi + rdx] sub rcx, 1 ; - jnz vpx_half_horiz_variance16x_h_1 ; + jnz aom_half_horiz_variance16x_h_1 ; pxor xmm1, xmm1 pxor xmm5, xmm5 @@ -335,7 +335,7 @@ align 16 xmm_bi_rd: times 8 dw 64 align 16 -vpx_bilinear_filters_sse2: +aom_bilinear_filters_sse2: dw 128, 128, 128, 128, 128, 128, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0 dw 112, 112, 112, 112, 112, 112, 112, 112, 16, 16, 16, 16, 16, 16, 16, 16 dw 96, 96, 96, 96, 96, 96, 96, 96, 32, 32, 32, 32, 32, 32, 32, 32 diff --git a/aom_dsp/x86/halfpix_variance_sse2.c b/aom_dsp/x86/halfpix_variance_sse2.c index 15cce503c656dcf82a393571b10b59814166fb65..31152b971e79b6fc0f8ca99ac4fd8ae6f18dd2f3 100644 --- a/aom_dsp/x86/halfpix_variance_sse2.c +++ b/aom_dsp/x86/halfpix_variance_sse2.c @@ -9,59 +9,59 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" -void vpx_half_horiz_vert_variance16x_h_sse2(const unsigned char *ref, +void aom_half_horiz_vert_variance16x_h_sse2(const unsigned char *ref, int ref_stride, const unsigned char *src, int src_stride, unsigned int height, int *sum, unsigned int *sumsquared); -void vpx_half_horiz_variance16x_h_sse2(const unsigned char *ref, int ref_stride, +void aom_half_horiz_variance16x_h_sse2(const unsigned char *ref, int ref_stride, const unsigned char *src, int src_stride, unsigned int height, int *sum, unsigned int *sumsquared); -void vpx_half_vert_variance16x_h_sse2(const unsigned char *ref, int ref_stride, +void aom_half_vert_variance16x_h_sse2(const unsigned char *ref, int ref_stride, const unsigned char *src, int src_stride, unsigned int height, int *sum, unsigned int *sumsquared); -uint32_t vpx_variance_halfpixvar16x16_h_sse2(const unsigned char *src, +uint32_t aom_variance_halfpixvar16x16_h_sse2(const unsigned char *src, int src_stride, const unsigned char *dst, int dst_stride, uint32_t *sse) { int xsum0; unsigned int xxsum0; - vpx_half_horiz_variance16x_h_sse2(src, src_stride, dst, dst_stride, 16, + aom_half_horiz_variance16x_h_sse2(src, src_stride, dst, dst_stride, 16, &xsum0, &xxsum0); *sse = xxsum0; return (xxsum0 - (((uint32_t)xsum0 * xsum0) >> 8)); } -uint32_t vpx_variance_halfpixvar16x16_v_sse2(const unsigned char *src, +uint32_t aom_variance_halfpixvar16x16_v_sse2(const unsigned char *src, int src_stride, const unsigned char *dst, int dst_stride, uint32_t *sse) { int xsum0; unsigned int xxsum0; - vpx_half_vert_variance16x_h_sse2(src, src_stride, dst, dst_stride, 16, &xsum0, + aom_half_vert_variance16x_h_sse2(src, src_stride, dst, dst_stride, 16, &xsum0, &xxsum0); *sse = xxsum0; return (xxsum0 - (((uint32_t)xsum0 * xsum0) >> 8)); } -uint32_t vpx_variance_halfpixvar16x16_hv_sse2(const unsigned char *src, +uint32_t aom_variance_halfpixvar16x16_hv_sse2(const unsigned char *src, int src_stride, const unsigned char *dst, int dst_stride, uint32_t *sse) { int xsum0; unsigned int xxsum0; - vpx_half_horiz_vert_variance16x_h_sse2(src, src_stride, dst, dst_stride, 16, + aom_half_horiz_vert_variance16x_h_sse2(src, src_stride, dst, dst_stride, 16, &xsum0, &xxsum0); *sse = xxsum0; diff --git a/aom_dsp/x86/highbd_loopfilter_sse2.c b/aom_dsp/x86/highbd_loopfilter_sse2.c index f12bb5489a016cf6209edf0e50885f63c221332d..f55e8ce93a1bc00953069595d4d4e2a32ba7e0ad 100644 --- a/aom_dsp/x86/highbd_loopfilter_sse2.c +++ b/aom_dsp/x86/highbd_loopfilter_sse2.c @@ -11,7 +11,7 @@ #include <emmintrin.h> // SSE2 -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" #include "aom_ports/emmintrin_compat.h" @@ -488,7 +488,7 @@ static void highbd_mb_lpf_horizontal_edge_w_sse2_16(uint16_t *s, int p, } // TODO(yunqingwang): remove count and call these 2 functions(8 or 16) directly. -void vpx_highbd_lpf_horizontal_16_sse2(uint16_t *s, int p, +void aom_highbd_lpf_horizontal_16_sse2(uint16_t *s, int p, const uint8_t *_blimit, const uint8_t *_limit, const uint8_t *_thresh, int count, @@ -499,7 +499,7 @@ void vpx_highbd_lpf_horizontal_16_sse2(uint16_t *s, int p, highbd_mb_lpf_horizontal_edge_w_sse2_16(s, p, _blimit, _limit, _thresh, bd); } -void vpx_highbd_lpf_horizontal_8_sse2(uint16_t *s, int p, +void aom_highbd_lpf_horizontal_8_sse2(uint16_t *s, int p, const uint8_t *_blimit, const uint8_t *_limit, const uint8_t *_thresh, int count, @@ -659,7 +659,7 @@ void vpx_highbd_lpf_horizontal_8_sse2(uint16_t *s, int p, filt = _mm_adds_epi16(filt, work_a); filt = _mm_adds_epi16(filt, work_a); filt = _mm_adds_epi16(filt, work_a); - // (vpx_filter + 3 * (qs0 - ps0)) & mask + // (aom_filter + 3 * (qs0 - ps0)) & mask filt = signed_char_clamp_bd_sse2(filt, bd); filt = _mm_and_si128(filt, mask); @@ -728,16 +728,16 @@ void vpx_highbd_lpf_horizontal_8_sse2(uint16_t *s, int p, _mm_store_si128((__m128i *)(s + 2 * p), q2); } -void vpx_highbd_lpf_horizontal_8_dual_sse2( +void aom_highbd_lpf_horizontal_8_dual_sse2( uint16_t *s, int p, const uint8_t *_blimit0, const uint8_t *_limit0, const uint8_t *_thresh0, const uint8_t *_blimit1, const uint8_t *_limit1, const uint8_t *_thresh1, int bd) { - vpx_highbd_lpf_horizontal_8_sse2(s, p, _blimit0, _limit0, _thresh0, 1, bd); - vpx_highbd_lpf_horizontal_8_sse2(s + 8, p, _blimit1, _limit1, _thresh1, 1, + aom_highbd_lpf_horizontal_8_sse2(s, p, _blimit0, _limit0, _thresh0, 1, bd); + aom_highbd_lpf_horizontal_8_sse2(s + 8, p, _blimit1, _limit1, _thresh1, 1, bd); } -void vpx_highbd_lpf_horizontal_4_sse2(uint16_t *s, int p, +void aom_highbd_lpf_horizontal_4_sse2(uint16_t *s, int p, const uint8_t *_blimit, const uint8_t *_limit, const uint8_t *_thresh, int count, @@ -857,7 +857,7 @@ void vpx_highbd_lpf_horizontal_4_sse2(uint16_t *s, int p, filt = _mm_adds_epi16(filt, work_a); filt = signed_char_clamp_bd_sse2(_mm_adds_epi16(filt, work_a), bd); - // (vpx_filter + 3 * (qs0 - ps0)) & mask + // (aom_filter + 3 * (qs0 - ps0)) & mask filt = _mm_and_si128(filt, mask); filter1 = signed_char_clamp_bd_sse2(_mm_adds_epi16(filt, t4), bd); @@ -902,12 +902,12 @@ void vpx_highbd_lpf_horizontal_4_sse2(uint16_t *s, int p, _mm_storeu_si128((__m128i *)(s + 1 * p), q1); } -void vpx_highbd_lpf_horizontal_4_dual_sse2( +void aom_highbd_lpf_horizontal_4_dual_sse2( uint16_t *s, int p, const uint8_t *_blimit0, const uint8_t *_limit0, const uint8_t *_thresh0, const uint8_t *_blimit1, const uint8_t *_limit1, const uint8_t *_thresh1, int bd) { - vpx_highbd_lpf_horizontal_4_sse2(s, p, _blimit0, _limit0, _thresh0, 1, bd); - vpx_highbd_lpf_horizontal_4_sse2(s + 8, p, _blimit1, _limit1, _thresh1, 1, + aom_highbd_lpf_horizontal_4_sse2(s, p, _blimit0, _limit0, _thresh0, 1, bd); + aom_highbd_lpf_horizontal_4_sse2(s + 8, p, _blimit1, _limit1, _thresh1, 1, bd); } @@ -1023,7 +1023,7 @@ static INLINE void highbd_transpose8x16(uint16_t *in0, uint16_t *in1, int in_p, highbd_transpose(src1, in_p, dest1, out_p, 1); } -void vpx_highbd_lpf_vertical_4_sse2(uint16_t *s, int p, const uint8_t *blimit, +void aom_highbd_lpf_vertical_4_sse2(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { DECLARE_ALIGNED(16, uint16_t, t_dst[8 * 8]); @@ -1038,7 +1038,7 @@ void vpx_highbd_lpf_vertical_4_sse2(uint16_t *s, int p, const uint8_t *blimit, highbd_transpose(src, p, dst, 8, 1); // Loop filtering - vpx_highbd_lpf_horizontal_4_sse2(t_dst + 4 * 8, 8, blimit, limit, thresh, 1, + aom_highbd_lpf_horizontal_4_sse2(t_dst + 4 * 8, 8, blimit, limit, thresh, 1, bd); src[0] = t_dst; @@ -1048,7 +1048,7 @@ void vpx_highbd_lpf_vertical_4_sse2(uint16_t *s, int p, const uint8_t *blimit, highbd_transpose(src, 8, dst, p, 1); } -void vpx_highbd_lpf_vertical_4_dual_sse2( +void aom_highbd_lpf_vertical_4_dual_sse2( uint16_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd) { @@ -1060,7 +1060,7 @@ void vpx_highbd_lpf_vertical_4_dual_sse2( highbd_transpose8x16(s - 4, s - 4 + p * 8, p, t_dst, 16); // Loop filtering - vpx_highbd_lpf_horizontal_4_dual_sse2(t_dst + 4 * 16, 16, blimit0, limit0, + aom_highbd_lpf_horizontal_4_dual_sse2(t_dst + 4 * 16, 16, blimit0, limit0, thresh0, blimit1, limit1, thresh1, bd); src[0] = t_dst; src[1] = t_dst + 8; @@ -1071,7 +1071,7 @@ void vpx_highbd_lpf_vertical_4_dual_sse2( highbd_transpose(src, 16, dst, p, 2); } -void vpx_highbd_lpf_vertical_8_sse2(uint16_t *s, int p, const uint8_t *blimit, +void aom_highbd_lpf_vertical_8_sse2(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { DECLARE_ALIGNED(16, uint16_t, t_dst[8 * 8]); @@ -1086,7 +1086,7 @@ void vpx_highbd_lpf_vertical_8_sse2(uint16_t *s, int p, const uint8_t *blimit, highbd_transpose(src, p, dst, 8, 1); // Loop filtering - vpx_highbd_lpf_horizontal_8_sse2(t_dst + 4 * 8, 8, blimit, limit, thresh, 1, + aom_highbd_lpf_horizontal_8_sse2(t_dst + 4 * 8, 8, blimit, limit, thresh, 1, bd); src[0] = t_dst; @@ -1096,7 +1096,7 @@ void vpx_highbd_lpf_vertical_8_sse2(uint16_t *s, int p, const uint8_t *blimit, highbd_transpose(src, 8, dst, p, 1); } -void vpx_highbd_lpf_vertical_8_dual_sse2( +void aom_highbd_lpf_vertical_8_dual_sse2( uint16_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd) { @@ -1108,7 +1108,7 @@ void vpx_highbd_lpf_vertical_8_dual_sse2( highbd_transpose8x16(s - 4, s - 4 + p * 8, p, t_dst, 16); // Loop filtering - vpx_highbd_lpf_horizontal_8_dual_sse2(t_dst + 4 * 16, 16, blimit0, limit0, + aom_highbd_lpf_horizontal_8_dual_sse2(t_dst + 4 * 16, 16, blimit0, limit0, thresh0, blimit1, limit1, thresh1, bd); src[0] = t_dst; src[1] = t_dst + 8; @@ -1120,7 +1120,7 @@ void vpx_highbd_lpf_vertical_8_dual_sse2( highbd_transpose(src, 16, dst, p, 2); } -void vpx_highbd_lpf_vertical_16_sse2(uint16_t *s, int p, const uint8_t *blimit, +void aom_highbd_lpf_vertical_16_sse2(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd) { DECLARE_ALIGNED(16, uint16_t, t_dst[8 * 16]); @@ -1147,7 +1147,7 @@ void vpx_highbd_lpf_vertical_16_sse2(uint16_t *s, int p, const uint8_t *blimit, highbd_transpose(src, 8, dst, p, 2); } -void vpx_highbd_lpf_vertical_16_dual_sse2(uint16_t *s, int p, +void aom_highbd_lpf_vertical_16_dual_sse2(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd) { diff --git a/aom_dsp/x86/highbd_quantize_intrin_sse2.c b/aom_dsp/x86/highbd_quantize_intrin_sse2.c index d7d13aa58913343c73a3ff6f76bfee122b968513..975dde788b24e961387f7dcbe6e07d0b50895ad2 100644 --- a/aom_dsp/x86/highbd_quantize_intrin_sse2.c +++ b/aom_dsp/x86/highbd_quantize_intrin_sse2.c @@ -11,12 +11,12 @@ #include <emmintrin.h> -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #if CONFIG_VPX_HIGHBITDEPTH -void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t count, +void aom_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t count, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, @@ -92,7 +92,7 @@ void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t count, *eob_ptr = eob_i + 1; } -void vpx_highbd_quantize_b_32x32_sse2( +void aom_highbd_quantize_b_32x32_sse2( const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, diff --git a/aom_dsp/x86/highbd_sad4d_sse2.asm b/aom_dsp/x86/highbd_sad4d_sse2.asm index 6c2a61e0197ea2d4e9b3ba99b4b052632bc1acbd..54501d1fe17f7311c4331ca013811404424cea71 100644 --- a/aom_dsp/x86/highbd_sad4d_sse2.asm +++ b/aom_dsp/x86/highbd_sad4d_sse2.asm @@ -209,7 +209,7 @@ SECTION .text HIGH_PROCESS_32x2x4 0, %4, %5, (%4 + 32), (%5 + 32), %6 %endmacro -; void vpx_highbd_sadNxNx4d_sse2(uint8_t *src, int src_stride, +; void aom_highbd_sadNxNx4d_sse2(uint8_t *src, int src_stride, ; uint8_t *ref[4], int ref_stride, ; uint32_t res[4]); ; where NxN = 64x64, 32x32, 16x16, 16x8, 8x16 or 8x8 diff --git a/aom_dsp/x86/highbd_sad_sse2.asm b/aom_dsp/x86/highbd_sad_sse2.asm index bc4b28db24fb260bdc0a0df9f56ab885c3b59446..2da8c83d87b0f17c0a55a4339eabbb9dcad74d7d 100644 --- a/aom_dsp/x86/highbd_sad_sse2.asm +++ b/aom_dsp/x86/highbd_sad_sse2.asm @@ -50,7 +50,7 @@ cglobal highbd_sad%1x%2_avg, 5, ARCH_X86_64 + %3, 7, src, src_stride, \ %endif %endmacro -; unsigned int vpx_highbd_sad64x{16,32,64}_sse2(uint8_t *src, int src_stride, +; unsigned int aom_highbd_sad64x{16,32,64}_sse2(uint8_t *src, int src_stride, ; uint8_t *ref, int ref_stride); %macro HIGH_SAD64XN 1-2 0 HIGH_SAD_FN 64, %1, 5, %2 @@ -157,7 +157,7 @@ HIGH_SAD64XN 64, 1 ; highbd_sad64x64_avg_sse2 HIGH_SAD64XN 32, 1 ; highbd_sad64x32_avg_sse2 -; unsigned int vpx_highbd_sad32x{16,32,64}_sse2(uint8_t *src, int src_stride, +; unsigned int aom_highbd_sad32x{16,32,64}_sse2(uint8_t *src, int src_stride, ; uint8_t *ref, int ref_stride); %macro HIGH_SAD32XN 1-2 0 HIGH_SAD_FN 32, %1, 5, %2 @@ -225,7 +225,7 @@ HIGH_SAD32XN 64, 1 ; highbd_sad32x64_avg_sse2 HIGH_SAD32XN 32, 1 ; highbd_sad32x32_avg_sse2 HIGH_SAD32XN 16, 1 ; highbd_sad32x16_avg_sse2 -; unsigned int vpx_highbd_sad16x{8,16,32}_sse2(uint8_t *src, int src_stride, +; unsigned int aom_highbd_sad16x{8,16,32}_sse2(uint8_t *src, int src_stride, ; uint8_t *ref, int ref_stride); %macro HIGH_SAD16XN 1-2 0 HIGH_SAD_FN 16, %1, 5, %2 @@ -294,7 +294,7 @@ HIGH_SAD16XN 16, 1 ; highbd_sad16x16_avg_sse2 HIGH_SAD16XN 8, 1 ; highbd_sad16x8_avg_sse2 -; unsigned int vpx_highbd_sad8x{4,8,16}_sse2(uint8_t *src, int src_stride, +; unsigned int aom_highbd_sad8x{4,8,16}_sse2(uint8_t *src, int src_stride, ; uint8_t *ref, int ref_stride); %macro HIGH_SAD8XN 1-2 0 HIGH_SAD_FN 8, %1, 7, %2 diff --git a/aom_dsp/x86/highbd_subpel_variance_impl_sse2.asm b/aom_dsp/x86/highbd_subpel_variance_impl_sse2.asm index 30ee81b68831c2bdeb90c51bb3e24b56b66524e5..1175742f9c75cb29d6c8480b65ddc82afdecb639 100644 --- a/aom_dsp/x86/highbd_subpel_variance_impl_sse2.asm +++ b/aom_dsp/x86/highbd_subpel_variance_impl_sse2.asm @@ -30,7 +30,7 @@ bilin_filter_m_sse2: times 8 dw 16 SECTION .text -; int vpx_sub_pixel_varianceNxh(const uint8_t *src, ptrdiff_t src_stride, +; int aom_sub_pixel_varianceNxh(const uint8_t *src, ptrdiff_t src_stride, ; int x_offset, int y_offset, ; const uint8_t *dst, ptrdiff_t dst_stride, ; int height, unsigned int *sse); diff --git a/aom_dsp/x86/highbd_variance_impl_sse2.asm b/aom_dsp/x86/highbd_variance_impl_sse2.asm index 1bf3abbf34f6ae0dd5d18b2df8ef235090803950..3abb44f88194460eb102b6dcc13e7a8e9f57e4cd 100644 --- a/aom_dsp/x86/highbd_variance_impl_sse2.asm +++ b/aom_dsp/x86/highbd_variance_impl_sse2.asm @@ -11,7 +11,7 @@ %include "aom_ports/x86_abi_support.asm" -;unsigned int vpx_highbd_calc16x16var_sse2 +;unsigned int aom_highbd_calc16x16var_sse2 ;( ; unsigned char * src_ptr, ; int source_stride, @@ -20,8 +20,8 @@ ; unsigned int * SSE, ; int * Sum ;) -global sym(vpx_highbd_calc16x16var_sse2) PRIVATE -sym(vpx_highbd_calc16x16var_sse2): +global sym(aom_highbd_calc16x16var_sse2) PRIVATE +sym(aom_highbd_calc16x16var_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -164,7 +164,7 @@ sym(vpx_highbd_calc16x16var_sse2): ret -;unsigned int vpx_highbd_calc8x8var_sse2 +;unsigned int aom_highbd_calc8x8var_sse2 ;( ; unsigned char * src_ptr, ; int source_stride, @@ -173,8 +173,8 @@ sym(vpx_highbd_calc16x16var_sse2): ; unsigned int * SSE, ; int * Sum ;) -global sym(vpx_highbd_calc8x8var_sse2) PRIVATE -sym(vpx_highbd_calc8x8var_sse2): +global sym(aom_highbd_calc8x8var_sse2) PRIVATE +sym(aom_highbd_calc8x8var_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 diff --git a/aom_dsp/x86/highbd_variance_sse2.c b/aom_dsp/x86/highbd_variance_sse2.c index 10684eb7cde30d9461c13b1f2dd5312304239897..2d4bd3d1bce0206f902e3bca21f8aa8e411eab6c 100644 --- a/aom_dsp/x86/highbd_variance_sse2.c +++ b/aom_dsp/x86/highbd_variance_sse2.c @@ -8,7 +8,7 @@ * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_ports/mem.h" @@ -16,11 +16,11 @@ typedef uint32_t (*high_variance_fn_t)(const uint16_t *src, int src_stride, const uint16_t *ref, int ref_stride, uint32_t *sse, int *sum); -uint32_t vpx_highbd_calc8x8var_sse2(const uint16_t *src, int src_stride, +uint32_t aom_highbd_calc8x8var_sse2(const uint16_t *src, int src_stride, const uint16_t *ref, int ref_stride, uint32_t *sse, int *sum); -uint32_t vpx_highbd_calc16x16var_sse2(const uint16_t *src, int src_stride, +uint32_t aom_highbd_calc16x16var_sse2(const uint16_t *src, int src_stride, const uint16_t *ref, int ref_stride, uint32_t *sse, int *sum); @@ -90,32 +90,32 @@ static void highbd_12_variance_sse2(const uint16_t *src, int src_stride, } #define HIGH_GET_VAR(S) \ - void vpx_highbd_get##S##x##S##var_sse2(const uint8_t *src8, int src_stride, \ + void aom_highbd_get##S##x##S##var_sse2(const uint8_t *src8, int src_stride, \ const uint8_t *ref8, int ref_stride, \ uint32_t *sse, int *sum) { \ uint16_t *src = CONVERT_TO_SHORTPTR(src8); \ uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); \ - vpx_highbd_calc##S##x##S##var_sse2(src, src_stride, ref, ref_stride, sse, \ + aom_highbd_calc##S##x##S##var_sse2(src, src_stride, ref, ref_stride, sse, \ sum); \ } \ \ - void vpx_highbd_10_get##S##x##S##var_sse2( \ + void aom_highbd_10_get##S##x##S##var_sse2( \ const uint8_t *src8, int src_stride, const uint8_t *ref8, \ int ref_stride, uint32_t *sse, int *sum) { \ uint16_t *src = CONVERT_TO_SHORTPTR(src8); \ uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); \ - vpx_highbd_calc##S##x##S##var_sse2(src, src_stride, ref, ref_stride, sse, \ + aom_highbd_calc##S##x##S##var_sse2(src, src_stride, ref, ref_stride, sse, \ sum); \ *sum = ROUND_POWER_OF_TWO(*sum, 2); \ *sse = ROUND_POWER_OF_TWO(*sse, 4); \ } \ \ - void vpx_highbd_12_get##S##x##S##var_sse2( \ + void aom_highbd_12_get##S##x##S##var_sse2( \ const uint8_t *src8, int src_stride, const uint8_t *ref8, \ int ref_stride, uint32_t *sse, int *sum) { \ uint16_t *src = CONVERT_TO_SHORTPTR(src8); \ uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); \ - vpx_highbd_calc##S##x##S##var_sse2(src, src_stride, ref, ref_stride, sse, \ + aom_highbd_calc##S##x##S##var_sse2(src, src_stride, ref, ref_stride, sse, \ sum); \ *sum = ROUND_POWER_OF_TWO(*sum, 4); \ *sse = ROUND_POWER_OF_TWO(*sse, 8); \ @@ -129,7 +129,7 @@ HIGH_GET_VAR(8) #undef HIGH_GET_VAR #define VAR_FN(w, h, block_size, shift) \ - uint32_t vpx_highbd_8_variance##w##x##h##_sse2( \ + uint32_t aom_highbd_8_variance##w##x##h##_sse2( \ const uint8_t *src8, int src_stride, const uint8_t *ref8, \ int ref_stride, uint32_t *sse) { \ int sum; \ @@ -137,11 +137,11 @@ HIGH_GET_VAR(8) uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); \ highbd_8_variance_sse2( \ src, src_stride, ref, ref_stride, w, h, sse, &sum, \ - vpx_highbd_calc##block_size##x##block_size##var_sse2, block_size); \ + aom_highbd_calc##block_size##x##block_size##var_sse2, block_size); \ return *sse - (((int64_t)sum * sum) >> shift); \ } \ \ - uint32_t vpx_highbd_10_variance##w##x##h##_sse2( \ + uint32_t aom_highbd_10_variance##w##x##h##_sse2( \ const uint8_t *src8, int src_stride, const uint8_t *ref8, \ int ref_stride, uint32_t *sse) { \ int sum; \ @@ -149,11 +149,11 @@ HIGH_GET_VAR(8) uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); \ highbd_10_variance_sse2( \ src, src_stride, ref, ref_stride, w, h, sse, &sum, \ - vpx_highbd_calc##block_size##x##block_size##var_sse2, block_size); \ + aom_highbd_calc##block_size##x##block_size##var_sse2, block_size); \ return *sse - (((int64_t)sum * sum) >> shift); \ } \ \ - uint32_t vpx_highbd_12_variance##w##x##h##_sse2( \ + uint32_t aom_highbd_12_variance##w##x##h##_sse2( \ const uint8_t *src8, int src_stride, const uint8_t *ref8, \ int ref_stride, uint32_t *sse) { \ int sum; \ @@ -161,7 +161,7 @@ HIGH_GET_VAR(8) uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); \ highbd_12_variance_sse2( \ src, src_stride, ref, ref_stride, w, h, sse, &sum, \ - vpx_highbd_calc##block_size##x##block_size##var_sse2, block_size); \ + aom_highbd_calc##block_size##x##block_size##var_sse2, block_size); \ return *sse - (((int64_t)sum * sum) >> shift); \ } @@ -180,69 +180,69 @@ VAR_FN(8, 8, 8, 6) #undef VAR_FN -unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t *src8, int src_stride, +unsigned int aom_highbd_8_mse16x16_sse2(const uint8_t *src8, int src_stride, const uint8_t *ref8, int ref_stride, unsigned int *sse) { int sum; uint16_t *src = CONVERT_TO_SHORTPTR(src8); uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); highbd_8_variance_sse2(src, src_stride, ref, ref_stride, 16, 16, sse, &sum, - vpx_highbd_calc16x16var_sse2, 16); + aom_highbd_calc16x16var_sse2, 16); return *sse; } -unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t *src8, int src_stride, +unsigned int aom_highbd_10_mse16x16_sse2(const uint8_t *src8, int src_stride, const uint8_t *ref8, int ref_stride, unsigned int *sse) { int sum; uint16_t *src = CONVERT_TO_SHORTPTR(src8); uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); highbd_10_variance_sse2(src, src_stride, ref, ref_stride, 16, 16, sse, &sum, - vpx_highbd_calc16x16var_sse2, 16); + aom_highbd_calc16x16var_sse2, 16); return *sse; } -unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t *src8, int src_stride, +unsigned int aom_highbd_12_mse16x16_sse2(const uint8_t *src8, int src_stride, const uint8_t *ref8, int ref_stride, unsigned int *sse) { int sum; uint16_t *src = CONVERT_TO_SHORTPTR(src8); uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); highbd_12_variance_sse2(src, src_stride, ref, ref_stride, 16, 16, sse, &sum, - vpx_highbd_calc16x16var_sse2, 16); + aom_highbd_calc16x16var_sse2, 16); return *sse; } -unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t *src8, int src_stride, +unsigned int aom_highbd_8_mse8x8_sse2(const uint8_t *src8, int src_stride, const uint8_t *ref8, int ref_stride, unsigned int *sse) { int sum; uint16_t *src = CONVERT_TO_SHORTPTR(src8); uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); highbd_8_variance_sse2(src, src_stride, ref, ref_stride, 8, 8, sse, &sum, - vpx_highbd_calc8x8var_sse2, 8); + aom_highbd_calc8x8var_sse2, 8); return *sse; } -unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t *src8, int src_stride, +unsigned int aom_highbd_10_mse8x8_sse2(const uint8_t *src8, int src_stride, const uint8_t *ref8, int ref_stride, unsigned int *sse) { int sum; uint16_t *src = CONVERT_TO_SHORTPTR(src8); uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); highbd_10_variance_sse2(src, src_stride, ref, ref_stride, 8, 8, sse, &sum, - vpx_highbd_calc8x8var_sse2, 8); + aom_highbd_calc8x8var_sse2, 8); return *sse; } -unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t *src8, int src_stride, +unsigned int aom_highbd_12_mse8x8_sse2(const uint8_t *src8, int src_stride, const uint8_t *ref8, int ref_stride, unsigned int *sse) { int sum; uint16_t *src = CONVERT_TO_SHORTPTR(src8); uint16_t *ref = CONVERT_TO_SHORTPTR(ref8); highbd_12_variance_sse2(src, src_stride, ref, ref_stride, 8, 8, sse, &sum, - vpx_highbd_calc8x8var_sse2, 8); + aom_highbd_calc8x8var_sse2, 8); return *sse; } @@ -251,7 +251,7 @@ unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t *src8, int src_stride, // These definitions are for functions defined in // highbd_subpel_variance_impl_sse2.asm #define DECL(w, opt) \ - int vpx_highbd_sub_pixel_variance##w##xh_##opt( \ + int aom_highbd_sub_pixel_variance##w##xh_##opt( \ const uint16_t *src, ptrdiff_t src_stride, int x_offset, int y_offset, \ const uint16_t *dst, ptrdiff_t dst_stride, int height, \ unsigned int *sse, void *unused0, void *unused); @@ -266,29 +266,29 @@ DECLS(sse2, sse); #undef DECL #define FN(w, h, wf, wlog2, hlog2, opt, cast) \ - uint32_t vpx_highbd_8_sub_pixel_variance##w##x##h##_##opt( \ + uint32_t aom_highbd_8_sub_pixel_variance##w##x##h##_##opt( \ const uint8_t *src8, int src_stride, int x_offset, int y_offset, \ const uint8_t *dst8, int dst_stride, uint32_t *sse_ptr) { \ uint32_t sse; \ uint16_t *src = CONVERT_TO_SHORTPTR(src8); \ uint16_t *dst = CONVERT_TO_SHORTPTR(dst8); \ - int se = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + int se = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src, src_stride, x_offset, y_offset, dst, dst_stride, h, &sse, NULL, \ NULL); \ if (w > wf) { \ unsigned int sse2; \ - int se2 = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + int se2 = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src + 16, src_stride, x_offset, y_offset, dst + 16, dst_stride, h, \ &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ if (w > wf * 2) { \ - se2 = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src + 32, src_stride, x_offset, y_offset, dst + 32, dst_stride, h, \ &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ - se2 = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src + 48, src_stride, x_offset, y_offset, dst + 48, dst_stride, h, \ &sse2, NULL, NULL); \ se += se2; \ @@ -299,29 +299,29 @@ DECLS(sse2, sse); return sse - ((cast se * se) >> (wlog2 + hlog2)); \ } \ \ - uint32_t vpx_highbd_10_sub_pixel_variance##w##x##h##_##opt( \ + uint32_t aom_highbd_10_sub_pixel_variance##w##x##h##_##opt( \ const uint8_t *src8, int src_stride, int x_offset, int y_offset, \ const uint8_t *dst8, int dst_stride, uint32_t *sse_ptr) { \ uint32_t sse; \ uint16_t *src = CONVERT_TO_SHORTPTR(src8); \ uint16_t *dst = CONVERT_TO_SHORTPTR(dst8); \ - int se = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + int se = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src, src_stride, x_offset, y_offset, dst, dst_stride, h, &sse, NULL, \ NULL); \ if (w > wf) { \ uint32_t sse2; \ - int se2 = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + int se2 = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src + 16, src_stride, x_offset, y_offset, dst + 16, dst_stride, h, \ &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ if (w > wf * 2) { \ - se2 = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src + 32, src_stride, x_offset, y_offset, dst + 32, dst_stride, h, \ &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ - se2 = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src + 48, src_stride, x_offset, y_offset, dst + 48, dst_stride, h, \ &sse2, NULL, NULL); \ se += se2; \ @@ -334,7 +334,7 @@ DECLS(sse2, sse); return sse - ((cast se * se) >> (wlog2 + hlog2)); \ } \ \ - uint32_t vpx_highbd_12_sub_pixel_variance##w##x##h##_##opt( \ + uint32_t aom_highbd_12_sub_pixel_variance##w##x##h##_##opt( \ const uint8_t *src8, int src_stride, int x_offset, int y_offset, \ const uint8_t *dst8, int dst_stride, uint32_t *sse_ptr) { \ int start_row; \ @@ -346,27 +346,27 @@ DECLS(sse2, sse); for (start_row = 0; start_row < h; start_row += 16) { \ uint32_t sse2; \ int height = h - start_row < 16 ? h - start_row : 16; \ - int se2 = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + int se2 = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src + (start_row * src_stride), src_stride, x_offset, y_offset, \ dst + (start_row * dst_stride), dst_stride, height, &sse2, NULL, \ NULL); \ se += se2; \ long_sse += sse2; \ if (w > wf) { \ - se2 = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src + 16 + (start_row * src_stride), src_stride, x_offset, \ y_offset, dst + 16 + (start_row * dst_stride), dst_stride, height, \ &sse2, NULL, NULL); \ se += se2; \ long_sse += sse2; \ if (w > wf * 2) { \ - se2 = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src + 32 + (start_row * src_stride), src_stride, x_offset, \ y_offset, dst + 32 + (start_row * dst_stride), dst_stride, \ height, &sse2, NULL, NULL); \ se += se2; \ long_sse += sse2; \ - se2 = vpx_highbd_sub_pixel_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_variance##wf##xh_##opt( \ src + 48 + (start_row * src_stride), src_stride, x_offset, \ y_offset, dst + 48 + (start_row * dst_stride), dst_stride, \ height, &sse2, NULL, NULL); \ @@ -401,7 +401,7 @@ FNS(sse2, sse); // The 2 unused parameters are place holders for PIC enabled build. #define DECL(w, opt) \ - int vpx_highbd_sub_pixel_avg_variance##w##xh_##opt( \ + int aom_highbd_sub_pixel_avg_variance##w##xh_##opt( \ const uint16_t *src, ptrdiff_t src_stride, int x_offset, int y_offset, \ const uint16_t *dst, ptrdiff_t dst_stride, const uint16_t *sec, \ ptrdiff_t sec_stride, int height, unsigned int *sse, void *unused0, \ @@ -415,7 +415,7 @@ DECLS(sse2); #undef DECLS #define FN(w, h, wf, wlog2, hlog2, opt, cast) \ - uint32_t vpx_highbd_8_sub_pixel_avg_variance##w##x##h##_##opt( \ + uint32_t aom_highbd_8_sub_pixel_avg_variance##w##x##h##_##opt( \ const uint8_t *src8, int src_stride, int x_offset, int y_offset, \ const uint8_t *dst8, int dst_stride, uint32_t *sse_ptr, \ const uint8_t *sec8) { \ @@ -423,23 +423,23 @@ DECLS(sse2); uint16_t *src = CONVERT_TO_SHORTPTR(src8); \ uint16_t *dst = CONVERT_TO_SHORTPTR(dst8); \ uint16_t *sec = CONVERT_TO_SHORTPTR(sec8); \ - int se = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + int se = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src, src_stride, x_offset, y_offset, dst, dst_stride, sec, w, h, &sse, \ NULL, NULL); \ if (w > wf) { \ uint32_t sse2; \ - int se2 = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + int se2 = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src + 16, src_stride, x_offset, y_offset, dst + 16, dst_stride, \ sec + 16, w, h, &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ if (w > wf * 2) { \ - se2 = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src + 32, src_stride, x_offset, y_offset, dst + 32, dst_stride, \ sec + 32, w, h, &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ - se2 = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src + 48, src_stride, x_offset, y_offset, dst + 48, dst_stride, \ sec + 48, w, h, &sse2, NULL, NULL); \ se += se2; \ @@ -450,7 +450,7 @@ DECLS(sse2); return sse - ((cast se * se) >> (wlog2 + hlog2)); \ } \ \ - uint32_t vpx_highbd_10_sub_pixel_avg_variance##w##x##h##_##opt( \ + uint32_t aom_highbd_10_sub_pixel_avg_variance##w##x##h##_##opt( \ const uint8_t *src8, int src_stride, int x_offset, int y_offset, \ const uint8_t *dst8, int dst_stride, uint32_t *sse_ptr, \ const uint8_t *sec8) { \ @@ -458,23 +458,23 @@ DECLS(sse2); uint16_t *src = CONVERT_TO_SHORTPTR(src8); \ uint16_t *dst = CONVERT_TO_SHORTPTR(dst8); \ uint16_t *sec = CONVERT_TO_SHORTPTR(sec8); \ - int se = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + int se = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src, src_stride, x_offset, y_offset, dst, dst_stride, sec, w, h, &sse, \ NULL, NULL); \ if (w > wf) { \ uint32_t sse2; \ - int se2 = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + int se2 = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src + 16, src_stride, x_offset, y_offset, dst + 16, dst_stride, \ sec + 16, w, h, &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ if (w > wf * 2) { \ - se2 = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src + 32, src_stride, x_offset, y_offset, dst + 32, dst_stride, \ sec + 32, w, h, &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ - se2 = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src + 48, src_stride, x_offset, y_offset, dst + 48, dst_stride, \ sec + 48, w, h, &sse2, NULL, NULL); \ se += se2; \ @@ -487,7 +487,7 @@ DECLS(sse2); return sse - ((cast se * se) >> (wlog2 + hlog2)); \ } \ \ - uint32_t vpx_highbd_12_sub_pixel_avg_variance##w##x##h##_##opt( \ + uint32_t aom_highbd_12_sub_pixel_avg_variance##w##x##h##_##opt( \ const uint8_t *src8, int src_stride, int x_offset, int y_offset, \ const uint8_t *dst8, int dst_stride, uint32_t *sse_ptr, \ const uint8_t *sec8) { \ @@ -501,27 +501,27 @@ DECLS(sse2); for (start_row = 0; start_row < h; start_row += 16) { \ uint32_t sse2; \ int height = h - start_row < 16 ? h - start_row : 16; \ - int se2 = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + int se2 = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src + (start_row * src_stride), src_stride, x_offset, y_offset, \ dst + (start_row * dst_stride), dst_stride, sec + (start_row * w), \ w, height, &sse2, NULL, NULL); \ se += se2; \ long_sse += sse2; \ if (w > wf) { \ - se2 = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src + 16 + (start_row * src_stride), src_stride, x_offset, \ y_offset, dst + 16 + (start_row * dst_stride), dst_stride, \ sec + 16 + (start_row * w), w, height, &sse2, NULL, NULL); \ se += se2; \ long_sse += sse2; \ if (w > wf * 2) { \ - se2 = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src + 32 + (start_row * src_stride), src_stride, x_offset, \ y_offset, dst + 32 + (start_row * dst_stride), dst_stride, \ sec + 32 + (start_row * w), w, height, &sse2, NULL, NULL); \ se += se2; \ long_sse += sse2; \ - se2 = vpx_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ + se2 = aom_highbd_sub_pixel_avg_variance##wf##xh_##opt( \ src + 48 + (start_row * src_stride), src_stride, x_offset, \ y_offset, dst + 48 + (start_row * dst_stride), dst_stride, \ sec + 48 + (start_row * w), w, height, &sse2, NULL, NULL); \ diff --git a/aom_dsp/x86/inv_txfm_sse2.c b/aom_dsp/x86/inv_txfm_sse2.c index 1fa7051a178d315b6b94cbc35dc000de2afbd845..1a8359fe024acc10f05da7ee2005e761d3c01765 100644 --- a/aom_dsp/x86/inv_txfm_sse2.c +++ b/aom_dsp/x86/inv_txfm_sse2.c @@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/x86/inv_txfm_sse2.h" #include "aom_dsp/x86/txfm_common_sse2.h" @@ -22,7 +22,7 @@ *(int *)(dest) = _mm_cvtsi128_si32(d0); \ } -void vpx_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { const __m128i zero = _mm_setzero_si128(); const __m128i eight = _mm_set1_epi16(8); @@ -153,7 +153,7 @@ void vpx_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, } } -void vpx_idct4x4_1_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct4x4_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { __m128i dc_value; const __m128i zero = _mm_setzero_si128(); @@ -449,7 +449,7 @@ void iadst4_sse2(__m128i *in) { out7 = _mm_subs_epi16(stp1_0, stp2_7); \ } -void vpx_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { const __m128i zero = _mm_setzero_si128(); const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); @@ -481,7 +481,7 @@ void vpx_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, // 2-D for (i = 0; i < 2; i++) { - // 8x8 Transpose is copied from vpx_fdct8x8_sse2() + // 8x8 Transpose is copied from aom_fdct8x8_sse2() TRANSPOSE_8X8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4, in5, in6, in7); @@ -519,7 +519,7 @@ void vpx_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, RECON_AND_STORE(dest + 7 * stride, in7); } -void vpx_idct8x8_1_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct8x8_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { __m128i dc_value; const __m128i zero = _mm_setzero_si128(); @@ -557,7 +557,7 @@ void idct8_sse2(__m128i *in) { __m128i stp2_0, stp2_1, stp2_2, stp2_3, stp2_4, stp2_5, stp2_6, stp2_7; __m128i tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; - // 8x8 Transpose is copied from vpx_fdct8x8_sse2() + // 8x8 Transpose is copied from aom_fdct8x8_sse2() TRANSPOSE_8X8(in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7], in0, in1, in2, in3, in4, in5, in6, in7); @@ -794,7 +794,7 @@ void iadst8_sse2(__m128i *in) { in[7] = _mm_sub_epi16(k__const_0, s1); } -void vpx_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { const __m128i zero = _mm_setzero_si128(); const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); @@ -1164,7 +1164,7 @@ void vpx_idct8x8_12_add_sse2(const tran_low_t *input, uint8_t *dest, stp2_12) \ } -void vpx_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); const __m128i final_rounding = _mm_set1_epi16(1 << 5); @@ -1289,7 +1289,7 @@ void vpx_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, } } -void vpx_idct16x16_1_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct16x16_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { __m128i dc_value; const __m128i zero = _mm_setzero_si128(); @@ -2148,7 +2148,7 @@ void iadst16_sse2(__m128i *in0, __m128i *in1) { iadst16_8col(in1); } -void vpx_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); const __m128i final_rounding = _mm_set1_epi16(1 << 5); @@ -3022,7 +3022,7 @@ void vpx_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest, } // Only upper-left 8x8 has non-zero coeff -void vpx_idct32x32_34_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct32x32_34_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); const __m128i final_rounding = _mm_set1_epi16(1 << 5); @@ -3179,7 +3179,7 @@ void vpx_idct32x32_34_add_sse2(const tran_low_t *input, uint8_t *dest, } } -void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); const __m128i final_rounding = _mm_set1_epi16(1 << 5); @@ -3453,7 +3453,7 @@ void vpx_idct32x32_1024_add_sse2(const tran_low_t *input, uint8_t *dest, } } -void vpx_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, +void aom_idct32x32_1_add_sse2(const tran_low_t *input, uint8_t *dest, int stride) { __m128i dc_value; const __m128i zero = _mm_setzero_si128(); @@ -3487,7 +3487,7 @@ static INLINE __m128i clamp_high_sse2(__m128i value, int bd) { return retval; } -void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[4 * 4]; tran_low_t *outptr = out; @@ -3550,7 +3550,7 @@ void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest8, } else { // Run the un-optimised row transform for (i = 0; i < 4; ++i) { - vpx_highbd_idct4_c(input, outptr, bd); + aom_highbd_idct4_c(input, outptr, bd); input += 4; outptr += 4; } @@ -3593,7 +3593,7 @@ void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest8, // Columns for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) temp_in[j] = out[j * 4 + i]; - vpx_highbd_idct4_c(temp_in, temp_out, bd); + aom_highbd_idct4_c(temp_in, temp_out, bd); for (j = 0; j < 4; ++j) { dest[j * stride + i] = highbd_clip_pixel_add( dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 4), bd); @@ -3602,7 +3602,7 @@ void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[8 * 8]; tran_low_t *outptr = out; @@ -3667,7 +3667,7 @@ void vpx_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest8, } else { // Run the un-optimised row transform for (i = 0; i < 8; ++i) { - vpx_highbd_idct8_c(input, outptr, bd); + aom_highbd_idct8_c(input, outptr, bd); input += 8; outptr += 8; } @@ -3693,7 +3693,7 @@ void vpx_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest8, tran_low_t temp_in[8], temp_out[8]; for (i = 0; i < 8; ++i) { for (j = 0; j < 8; ++j) temp_in[j] = out[j * 8 + i]; - vpx_highbd_idct8_c(temp_in, temp_out, bd); + aom_highbd_idct8_c(temp_in, temp_out, bd); for (j = 0; j < 8; ++j) { dest[j * stride + i] = highbd_clip_pixel_add( dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 5), bd); @@ -3702,7 +3702,7 @@ void vpx_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct8x8_10_add_sse2(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct8x8_10_add_sse2(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[8 * 8] = { 0 }; tran_low_t *outptr = out; @@ -3770,7 +3770,7 @@ void vpx_highbd_idct8x8_10_add_sse2(const tran_low_t *input, uint8_t *dest8, } else { // Run the un-optimised row transform for (i = 0; i < 4; ++i) { - vpx_highbd_idct8_c(input, outptr, bd); + aom_highbd_idct8_c(input, outptr, bd); input += 8; outptr += 8; } @@ -3796,7 +3796,7 @@ void vpx_highbd_idct8x8_10_add_sse2(const tran_low_t *input, uint8_t *dest8, tran_low_t temp_in[8], temp_out[8]; for (i = 0; i < 8; ++i) { for (j = 0; j < 8; ++j) temp_in[j] = out[j * 8 + i]; - vpx_highbd_idct8_c(temp_in, temp_out, bd); + aom_highbd_idct8_c(temp_in, temp_out, bd); for (j = 0; j < 8; ++j) { dest[j * stride + i] = highbd_clip_pixel_add( dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 5), bd); @@ -3805,7 +3805,7 @@ void vpx_highbd_idct8x8_10_add_sse2(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[16 * 16]; tran_low_t *outptr = out; @@ -3878,7 +3878,7 @@ void vpx_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest8, } else { // Run the un-optimised row transform for (i = 0; i < 16; ++i) { - vpx_highbd_idct16_c(input, outptr, bd); + aom_highbd_idct16_c(input, outptr, bd); input += 16; outptr += 16; } @@ -3909,7 +3909,7 @@ void vpx_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest8, tran_low_t temp_in[16], temp_out[16]; for (i = 0; i < 16; ++i) { for (j = 0; j < 16; ++j) temp_in[j] = out[j * 16 + i]; - vpx_highbd_idct16_c(temp_in, temp_out, bd); + aom_highbd_idct16_c(temp_in, temp_out, bd); for (j = 0; j < 16; ++j) { dest[j * stride + i] = highbd_clip_pixel_add( dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 6), bd); @@ -3918,7 +3918,7 @@ void vpx_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest8, } } -void vpx_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest8, +void aom_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest8, int stride, int bd) { tran_low_t out[16 * 16] = { 0 }; tran_low_t *outptr = out; @@ -3996,7 +3996,7 @@ void vpx_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest8, } else { // Run the un-optimised row transform for (i = 0; i < 4; ++i) { - vpx_highbd_idct16_c(input, outptr, bd); + aom_highbd_idct16_c(input, outptr, bd); input += 16; outptr += 16; } @@ -4027,7 +4027,7 @@ void vpx_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest8, tran_low_t temp_in[16], temp_out[16]; for (i = 0; i < 16; ++i) { for (j = 0; j < 16; ++j) temp_in[j] = out[j * 16 + i]; - vpx_highbd_idct16_c(temp_in, temp_out, bd); + aom_highbd_idct16_c(temp_in, temp_out, bd); for (j = 0; j < 16; ++j) { dest[j * stride + i] = highbd_clip_pixel_add( dest[j * stride + i], ROUND_POWER_OF_TWO(temp_out[j], 6), bd); diff --git a/aom_dsp/x86/inv_txfm_sse2.h b/aom_dsp/x86/inv_txfm_sse2.h index 1ed4c7b609ddd570029a63d55d368cb6b6cce91e..ddb680fc9de7c7f37c786890ff1dbe754c329c08 100644 --- a/aom_dsp/x86/inv_txfm_sse2.h +++ b/aom_dsp/x86/inv_txfm_sse2.h @@ -13,8 +13,8 @@ #define VPX_DSP_X86_INV_TXFM_SSE2_H_ #include <emmintrin.h> // SSE2 -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" #include "aom_dsp/inv_txfm.h" #include "aom_dsp/x86/txfm_common_sse2.h" diff --git a/aom_dsp/x86/loopfilter_avx2.c b/aom_dsp/x86/loopfilter_avx2.c index 0ae728ac5299ec00dc9bad7292e330b367ca9822..53990a84a76437bd41e6a22973809152c9e7767c 100644 --- a/aom_dsp/x86/loopfilter_avx2.c +++ b/aom_dsp/x86/loopfilter_avx2.c @@ -11,7 +11,7 @@ #include <immintrin.h> /* AVX2 */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" static void mb_lpf_horizontal_edge_w_avx2_8(unsigned char *s, int p, @@ -102,7 +102,7 @@ static void mb_lpf_horizontal_edge_w_avx2_8(unsigned char *s, int p, filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); - /* (vpx_filter + 3 * (qs0 - ps0)) & mask */ + /* (aom_filter + 3 * (qs0 - ps0)) & mask */ filt = _mm_and_si128(filt, mask); filter1 = _mm_adds_epi8(filt, t4); @@ -481,7 +481,7 @@ static void mb_lpf_horizontal_edge_w_avx2_16(unsigned char *s, int p, filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); - /* (vpx_filter + 3 * (qs0 - ps0)) & mask */ + /* (aom_filter + 3 * (qs0 - ps0)) & mask */ filt = _mm_and_si128(filt, mask); filter1 = _mm_adds_epi8(filt, t4); @@ -913,7 +913,7 @@ static void mb_lpf_horizontal_edge_w_avx2_16(unsigned char *s, int p, } } -void vpx_lpf_horizontal_16_avx2(unsigned char *s, int p, +void aom_lpf_horizontal_16_avx2(unsigned char *s, int p, const unsigned char *_blimit, const unsigned char *_limit, const unsigned char *_thresh, int count) { diff --git a/aom_dsp/x86/loopfilter_mmx.asm b/aom_dsp/x86/loopfilter_mmx.asm index dd47c99f34df63bd399014b9a108e8efd7fccecf..23777391892d572c0145f0b3c0d942dc9fc5fedf 100644 --- a/aom_dsp/x86/loopfilter_mmx.asm +++ b/aom_dsp/x86/loopfilter_mmx.asm @@ -12,7 +12,7 @@ %include "aom_ports/x86_abi_support.asm" -;void vpx_lpf_horizontal_4_mmx +;void aom_lpf_horizontal_4_mmx ;( ; unsigned char *src_ptr, ; int src_pixel_step, @@ -21,8 +21,8 @@ ; const char *thresh, ; int count ;) -global sym(vpx_lpf_horizontal_4_mmx) PRIVATE -sym(vpx_lpf_horizontal_4_mmx): +global sym(aom_lpf_horizontal_4_mmx) PRIVATE +sym(aom_lpf_horizontal_4_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -224,7 +224,7 @@ sym(vpx_lpf_horizontal_4_mmx): ret -;void vpx_lpf_vertical_4_mmx +;void aom_lpf_vertical_4_mmx ;( ; unsigned char *src_ptr, ; int src_pixel_step, @@ -233,8 +233,8 @@ sym(vpx_lpf_horizontal_4_mmx): ; const char *thresh, ; int count ;) -global sym(vpx_lpf_vertical_4_mmx) PRIVATE -sym(vpx_lpf_vertical_4_mmx): +global sym(aom_lpf_vertical_4_mmx) PRIVATE +sym(aom_lpf_vertical_4_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 diff --git a/aom_dsp/x86/loopfilter_sse2.c b/aom_dsp/x86/loopfilter_sse2.c index dcccd92402cd925a8830a6a1879f3c8cc11fd35d..d77077b326b692f0a99b01ea1a7094a51edeaa9f 100644 --- a/aom_dsp/x86/loopfilter_sse2.c +++ b/aom_dsp/x86/loopfilter_sse2.c @@ -11,7 +11,7 @@ #include <emmintrin.h> // SSE2 -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" #include "aom_ports/emmintrin_compat.h" @@ -99,7 +99,7 @@ static void mb_lpf_horizontal_edge_w_sse2_8(unsigned char *s, int p, filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); - // (vpx_filter + 3 * (qs0 - ps0)) & mask + // (aom_filter + 3 * (qs0 - ps0)) & mask filt = _mm_and_si128(filt, mask); filter1 = _mm_adds_epi8(filt, t4); @@ -492,7 +492,7 @@ static void mb_lpf_horizontal_edge_w_sse2_16(unsigned char *s, int p, filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); - // (vpx_filter + 3 * (qs0 - ps0)) & mask + // (aom_filter + 3 * (qs0 - ps0)) & mask filt = _mm_and_si128(filt, mask); filter1 = _mm_adds_epi8(filt, t4); filter2 = _mm_adds_epi8(filt, t3); @@ -714,7 +714,7 @@ static void mb_lpf_horizontal_edge_w_sse2_16(unsigned char *s, int p, } // TODO(yunqingwang): remove count and call these 2 functions(8 or 16) directly. -void vpx_lpf_horizontal_16_sse2(unsigned char *s, int p, +void aom_lpf_horizontal_16_sse2(unsigned char *s, int p, const unsigned char *_blimit, const unsigned char *_limit, const unsigned char *_thresh, int count) { @@ -724,7 +724,7 @@ void vpx_lpf_horizontal_16_sse2(unsigned char *s, int p, mb_lpf_horizontal_edge_w_sse2_16(s, p, _blimit, _limit, _thresh); } -void vpx_lpf_horizontal_8_sse2(unsigned char *s, int p, +void aom_lpf_horizontal_8_sse2(unsigned char *s, int p, const unsigned char *_blimit, const unsigned char *_limit, const unsigned char *_thresh, int count) { @@ -869,7 +869,7 @@ void vpx_lpf_horizontal_8_sse2(unsigned char *s, int p, filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); - // (vpx_filter + 3 * (qs0 - ps0)) & mask + // (aom_filter + 3 * (qs0 - ps0)) & mask filt = _mm_and_si128(filt, mask); filter1 = _mm_adds_epi8(filt, t4); @@ -938,7 +938,7 @@ void vpx_lpf_horizontal_8_sse2(unsigned char *s, int p, } } -void vpx_lpf_horizontal_8_dual_sse2(uint8_t *s, int p, const uint8_t *_blimit0, +void aom_lpf_horizontal_8_dual_sse2(uint8_t *s, int p, const uint8_t *_blimit0, const uint8_t *_limit0, const uint8_t *_thresh0, const uint8_t *_blimit1, @@ -1105,7 +1105,7 @@ void vpx_lpf_horizontal_8_dual_sse2(uint8_t *s, int p, const uint8_t *_blimit0, filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); - // (vpx_filter + 3 * (qs0 - ps0)) & mask + // (aom_filter + 3 * (qs0 - ps0)) & mask filt = _mm_and_si128(filt, mask); filter1 = _mm_adds_epi8(filt, t4); @@ -1180,7 +1180,7 @@ void vpx_lpf_horizontal_8_dual_sse2(uint8_t *s, int p, const uint8_t *_blimit0, } } -void vpx_lpf_horizontal_4_dual_sse2(unsigned char *s, int p, +void aom_lpf_horizontal_4_dual_sse2(unsigned char *s, int p, const unsigned char *_blimit0, const unsigned char *_limit0, const unsigned char *_thresh0, @@ -1274,7 +1274,7 @@ void vpx_lpf_horizontal_4_dual_sse2(unsigned char *s, int p, filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); filt = _mm_adds_epi8(filt, work_a); - // (vpx_filter + 3 * (qs0 - ps0)) & mask + // (aom_filter + 3 * (qs0 - ps0)) & mask filt = _mm_and_si128(filt, mask); filter1 = _mm_adds_epi8(filt, t4); @@ -1460,7 +1460,7 @@ static INLINE void transpose(unsigned char *src[], int in_p, } while (++idx8x8 < num_8x8_to_transpose); } -void vpx_lpf_vertical_4_dual_sse2(uint8_t *s, int p, const uint8_t *blimit0, +void aom_lpf_vertical_4_dual_sse2(uint8_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { @@ -1472,7 +1472,7 @@ void vpx_lpf_vertical_4_dual_sse2(uint8_t *s, int p, const uint8_t *blimit0, transpose8x16(s - 4, s - 4 + p * 8, p, t_dst, 16); // Loop filtering - vpx_lpf_horizontal_4_dual_sse2(t_dst + 4 * 16, 16, blimit0, limit0, thresh0, + aom_lpf_horizontal_4_dual_sse2(t_dst + 4 * 16, 16, blimit0, limit0, thresh0, blimit1, limit1, thresh1); src[0] = t_dst; src[1] = t_dst + 8; @@ -1483,7 +1483,7 @@ void vpx_lpf_vertical_4_dual_sse2(uint8_t *s, int p, const uint8_t *blimit0, transpose(src, 16, dst, p, 2); } -void vpx_lpf_vertical_8_sse2(unsigned char *s, int p, +void aom_lpf_vertical_8_sse2(unsigned char *s, int p, const unsigned char *blimit, const unsigned char *limit, const unsigned char *thresh, int count) { @@ -1499,7 +1499,7 @@ void vpx_lpf_vertical_8_sse2(unsigned char *s, int p, transpose(src, p, dst, 8, 1); // Loop filtering - vpx_lpf_horizontal_8_sse2(t_dst + 4 * 8, 8, blimit, limit, thresh, 1); + aom_lpf_horizontal_8_sse2(t_dst + 4 * 8, 8, blimit, limit, thresh, 1); src[0] = t_dst; dst[0] = s - 4; @@ -1508,7 +1508,7 @@ void vpx_lpf_vertical_8_sse2(unsigned char *s, int p, transpose(src, 8, dst, p, 1); } -void vpx_lpf_vertical_8_dual_sse2(uint8_t *s, int p, const uint8_t *blimit0, +void aom_lpf_vertical_8_dual_sse2(uint8_t *s, int p, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1) { @@ -1520,7 +1520,7 @@ void vpx_lpf_vertical_8_dual_sse2(uint8_t *s, int p, const uint8_t *blimit0, transpose8x16(s - 4, s - 4 + p * 8, p, t_dst, 16); // Loop filtering - vpx_lpf_horizontal_8_dual_sse2(t_dst + 4 * 16, 16, blimit0, limit0, thresh0, + aom_lpf_horizontal_8_dual_sse2(t_dst + 4 * 16, 16, blimit0, limit0, thresh0, blimit1, limit1, thresh1); src[0] = t_dst; src[1] = t_dst + 8; @@ -1532,7 +1532,7 @@ void vpx_lpf_vertical_8_dual_sse2(uint8_t *s, int p, const uint8_t *blimit0, transpose(src, 16, dst, p, 2); } -void vpx_lpf_vertical_16_sse2(unsigned char *s, int p, +void aom_lpf_vertical_16_sse2(unsigned char *s, int p, const unsigned char *blimit, const unsigned char *limit, const unsigned char *thresh) { @@ -1560,7 +1560,7 @@ void vpx_lpf_vertical_16_sse2(unsigned char *s, int p, transpose(src, 8, dst, p, 2); } -void vpx_lpf_vertical_16_dual_sse2(unsigned char *s, int p, +void aom_lpf_vertical_16_dual_sse2(unsigned char *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh) { DECLARE_ALIGNED(16, unsigned char, t_dst[256]); diff --git a/aom_dsp/x86/quantize_sse2.c b/aom_dsp/x86/quantize_sse2.c index 843290c335125a180b26491ee6071f22e1a36bfa..3a2655fe3cfc667e4cf0cb07349ca26f8d7fc0e1 100644 --- a/aom_dsp/x86/quantize_sse2.c +++ b/aom_dsp/x86/quantize_sse2.c @@ -12,8 +12,8 @@ #include <emmintrin.h> #include <xmmintrin.h> -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" static INLINE __m128i load_coefficients(const tran_low_t* coeff_ptr) { #if CONFIG_VPX_HIGHBITDEPTH @@ -41,7 +41,7 @@ static INLINE void store_coefficients(__m128i coeff_vals, #endif } -void vpx_quantize_b_sse2(const tran_low_t* coeff_ptr, intptr_t n_coeffs, +void aom_quantize_b_sse2(const tran_low_t* coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t* zbin_ptr, const int16_t* round_ptr, const int16_t* quant_ptr, const int16_t* quant_shift_ptr, tran_low_t* qcoeff_ptr, diff --git a/aom_dsp/x86/sad4d_avx2.c b/aom_dsp/x86/sad4d_avx2.c index 9e3207a9c23bbc0d7c317321d9f9cb28a9471322..686ee2436b448c5f89cb0fb619c6fbd176fb1ed5 100644 --- a/aom_dsp/x86/sad4d_avx2.c +++ b/aom_dsp/x86/sad4d_avx2.c @@ -9,10 +9,10 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ #include <immintrin.h> // AVX2 -#include "./vpx_dsp_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_dsp_rtcd.h" +#include "aom/aom_integer.h" -void vpx_sad32x32x4d_avx2(const uint8_t *src, int src_stride, +void aom_sad32x32x4d_avx2(const uint8_t *src, int src_stride, const uint8_t *const ref[4], int ref_stride, uint32_t res[4]) { __m256i src_reg, ref0_reg, ref1_reg, ref2_reg, ref3_reg; @@ -80,7 +80,7 @@ void vpx_sad32x32x4d_avx2(const uint8_t *src, int src_stride, } } -void vpx_sad64x64x4d_avx2(const uint8_t *src, int src_stride, +void aom_sad64x64x4d_avx2(const uint8_t *src, int src_stride, const uint8_t *const ref[4], int ref_stride, uint32_t res[4]) { __m256i src_reg, srcnext_reg, ref0_reg, ref0next_reg; diff --git a/aom_dsp/x86/sad4d_sse2.asm b/aom_dsp/x86/sad4d_sse2.asm index a2f0ae79e3a86d844cac3d37c95a84b4febebabb..cf0b6a6d7279cd08424e094ec3cc9c39f8936c22 100644 --- a/aom_dsp/x86/sad4d_sse2.asm +++ b/aom_dsp/x86/sad4d_sse2.asm @@ -167,7 +167,7 @@ SECTION .text PROCESS_32x2x4 0, %4, %5, %4 + 32, %5 + 32, %6 %endmacro -; void vpx_sadNxNx4d_sse2(uint8_t *src, int src_stride, +; void aom_sadNxNx4d_sse2(uint8_t *src, int src_stride, ; uint8_t *ref[4], int ref_stride, ; uint32_t res[4]); ; where NxN = 64x64, 32x32, 16x16, 16x8, 8x16 or 8x8 diff --git a/aom_dsp/x86/sad_avx2.c b/aom_dsp/x86/sad_avx2.c index cf5143965deeb29b5eba88578a76a0ea3232ffa7..6ce61fd7f8b13ad8858600efd93a1258278709ab 100644 --- a/aom_dsp/x86/sad_avx2.c +++ b/aom_dsp/x86/sad_avx2.c @@ -9,11 +9,11 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ #include <immintrin.h> -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" #define FSAD64_H(h) \ - unsigned int vpx_sad64x##h##_avx2(const uint8_t *src_ptr, int src_stride, \ + unsigned int aom_sad64x##h##_avx2(const uint8_t *src_ptr, int src_stride, \ const uint8_t *ref_ptr, int ref_stride) { \ int i, res; \ __m256i sad1_reg, sad2_reg, ref1_reg, ref2_reg; \ @@ -41,7 +41,7 @@ } #define FSAD32_H(h) \ - unsigned int vpx_sad32x##h##_avx2(const uint8_t *src_ptr, int src_stride, \ + unsigned int aom_sad32x##h##_avx2(const uint8_t *src_ptr, int src_stride, \ const uint8_t *ref_ptr, int ref_stride) { \ int i, res; \ __m256i sad1_reg, sad2_reg, ref1_reg, ref2_reg; \ @@ -92,7 +92,7 @@ FSAD32 #undef FSAD32_H #define FSADAVG64_H(h) \ - unsigned int vpx_sad64x##h##_avg_avx2( \ + unsigned int aom_sad64x##h##_avg_avx2( \ const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, \ int ref_stride, const uint8_t *second_pred) { \ int i, res; \ @@ -126,7 +126,7 @@ FSAD32 } #define FSADAVG32_H(h) \ - unsigned int vpx_sad32x##h##_avg_avx2( \ + unsigned int aom_sad32x##h##_avg_avx2( \ const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, \ int ref_stride, const uint8_t *second_pred) { \ int i, res; \ diff --git a/aom_dsp/x86/sad_mmx.asm b/aom_dsp/x86/sad_mmx.asm index 9a64416bb91587e32570560f5e6bfa66fccfb398..02acd281b6be47a8da3519307a733144d74eb052 100644 --- a/aom_dsp/x86/sad_mmx.asm +++ b/aom_dsp/x86/sad_mmx.asm @@ -11,18 +11,18 @@ %include "aom_ports/x86_abi_support.asm" -global sym(vpx_sad16x16_mmx) PRIVATE -global sym(vpx_sad8x16_mmx) PRIVATE -global sym(vpx_sad8x8_mmx) PRIVATE -global sym(vpx_sad4x4_mmx) PRIVATE -global sym(vpx_sad16x8_mmx) PRIVATE +global sym(aom_sad16x16_mmx) PRIVATE +global sym(aom_sad8x16_mmx) PRIVATE +global sym(aom_sad8x8_mmx) PRIVATE +global sym(aom_sad4x4_mmx) PRIVATE +global sym(aom_sad16x8_mmx) PRIVATE -;unsigned int vpx_sad16x16_mmx( +;unsigned int aom_sad16x16_mmx( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride) -sym(vpx_sad16x16_mmx): +sym(aom_sad16x16_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 4 @@ -109,12 +109,12 @@ sym(vpx_sad16x16_mmx): ret -;unsigned int vpx_sad8x16_mmx( +;unsigned int aom_sad8x16_mmx( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride) -sym(vpx_sad8x16_mmx): +sym(aom_sad8x16_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 4 @@ -181,12 +181,12 @@ sym(vpx_sad8x16_mmx): ret -;unsigned int vpx_sad8x8_mmx( +;unsigned int aom_sad8x8_mmx( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride) -sym(vpx_sad8x8_mmx): +sym(aom_sad8x8_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 4 @@ -251,12 +251,12 @@ sym(vpx_sad8x8_mmx): ret -;unsigned int vpx_sad4x4_mmx( +;unsigned int aom_sad4x4_mmx( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride) -sym(vpx_sad4x4_mmx): +sym(aom_sad4x4_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 4 @@ -340,12 +340,12 @@ sym(vpx_sad4x4_mmx): ret -;unsigned int vpx_sad16x8_mmx( +;unsigned int aom_sad16x8_mmx( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride) -sym(vpx_sad16x8_mmx): +sym(aom_sad16x8_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 4 diff --git a/aom_dsp/x86/sad_sse2.asm b/aom_dsp/x86/sad_sse2.asm index 1ec906c236047794ccd9ceaf7ef7fb869226c2ba..c914c42724dcdeeaaad5fa2a970ad7aa5f3d8591 100644 --- a/aom_dsp/x86/sad_sse2.asm +++ b/aom_dsp/x86/sad_sse2.asm @@ -44,7 +44,7 @@ cglobal sad%1x%2_avg, 5, ARCH_X86_64 + %3, 6, src, src_stride, \ %endif ; %3 == 7 %endmacro -; unsigned int vpx_sad64x64_sse2(uint8_t *src, int src_stride, +; unsigned int aom_sad64x64_sse2(uint8_t *src, int src_stride, ; uint8_t *ref, int ref_stride); %macro SAD64XN 1-2 0 SAD_FN 64, %1, 5, %2 @@ -87,7 +87,7 @@ SAD64XN 32 ; sad64x32_sse2 SAD64XN 64, 1 ; sad64x64_avg_sse2 SAD64XN 32, 1 ; sad64x32_avg_sse2 -; unsigned int vpx_sad32x32_sse2(uint8_t *src, int src_stride, +; unsigned int aom_sad32x32_sse2(uint8_t *src, int src_stride, ; uint8_t *ref, int ref_stride); %macro SAD32XN 1-2 0 SAD_FN 32, %1, 5, %2 @@ -132,7 +132,7 @@ SAD32XN 64, 1 ; sad32x64_avg_sse2 SAD32XN 32, 1 ; sad32x32_avg_sse2 SAD32XN 16, 1 ; sad32x16_avg_sse2 -; unsigned int vpx_sad16x{8,16}_sse2(uint8_t *src, int src_stride, +; unsigned int aom_sad16x{8,16}_sse2(uint8_t *src, int src_stride, ; uint8_t *ref, int ref_stride); %macro SAD16XN 1-2 0 SAD_FN 16, %1, 7, %2 @@ -178,7 +178,7 @@ SAD16XN 32, 1 ; sad16x32_avg_sse2 SAD16XN 16, 1 ; sad16x16_avg_sse2 SAD16XN 8, 1 ; sad16x8_avg_sse2 -; unsigned int vpx_sad8x{8,16}_sse2(uint8_t *src, int src_stride, +; unsigned int aom_sad8x{8,16}_sse2(uint8_t *src, int src_stride, ; uint8_t *ref, int ref_stride); %macro SAD8XN 1-2 0 SAD_FN 8, %1, 7, %2 @@ -222,7 +222,7 @@ SAD8XN 16, 1 ; sad8x16_avg_sse2 SAD8XN 8, 1 ; sad8x8_avg_sse2 SAD8XN 4, 1 ; sad8x4_avg_sse2 -; unsigned int vpx_sad4x{4, 8}_sse2(uint8_t *src, int src_stride, +; unsigned int aom_sad4x{4, 8}_sse2(uint8_t *src, int src_stride, ; uint8_t *ref, int ref_stride); %macro SAD4XN 1-2 0 SAD_FN 4, %1, 7, %2 diff --git a/aom_dsp/x86/sad_sse3.asm b/aom_dsp/x86/sad_sse3.asm index 4665fb96d229b051822d96580d1fbfc17885d476..1de346ec458b32572e7a122b552a9029de12dd19 100644 --- a/aom_dsp/x86/sad_sse3.asm +++ b/aom_dsp/x86/sad_sse3.asm @@ -165,14 +165,14 @@ paddw mm7, mm3 %endmacro -;void int vpx_sad16x16x3_sse3( +;void int aom_sad16x16x3_sse3( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride, ; int *results) -global sym(vpx_sad16x16x3_sse3) PRIVATE -sym(vpx_sad16x16x3_sse3): +global sym(aom_sad16x16x3_sse3) PRIVATE +sym(aom_sad16x16x3_sse3): STACK_FRAME_CREATE_X3 @@ -207,14 +207,14 @@ sym(vpx_sad16x16x3_sse3): STACK_FRAME_DESTROY_X3 -;void int vpx_sad16x8x3_sse3( +;void int aom_sad16x8x3_sse3( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride, ; int *results) -global sym(vpx_sad16x8x3_sse3) PRIVATE -sym(vpx_sad16x8x3_sse3): +global sym(aom_sad16x8x3_sse3) PRIVATE +sym(aom_sad16x8x3_sse3): STACK_FRAME_CREATE_X3 @@ -245,14 +245,14 @@ sym(vpx_sad16x8x3_sse3): STACK_FRAME_DESTROY_X3 -;void int vpx_sad8x16x3_sse3( +;void int aom_sad8x16x3_sse3( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride, ; int *results) -global sym(vpx_sad8x16x3_sse3) PRIVATE -sym(vpx_sad8x16x3_sse3): +global sym(aom_sad8x16x3_sse3) PRIVATE +sym(aom_sad8x16x3_sse3): STACK_FRAME_CREATE_X3 @@ -274,14 +274,14 @@ sym(vpx_sad8x16x3_sse3): STACK_FRAME_DESTROY_X3 -;void int vpx_sad8x8x3_sse3( +;void int aom_sad8x8x3_sse3( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride, ; int *results) -global sym(vpx_sad8x8x3_sse3) PRIVATE -sym(vpx_sad8x8x3_sse3): +global sym(aom_sad8x8x3_sse3) PRIVATE +sym(aom_sad8x8x3_sse3): STACK_FRAME_CREATE_X3 @@ -299,14 +299,14 @@ sym(vpx_sad8x8x3_sse3): STACK_FRAME_DESTROY_X3 -;void int vpx_sad4x4x3_sse3( +;void int aom_sad4x4x3_sse3( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride, ; int *results) -global sym(vpx_sad4x4x3_sse3) PRIVATE -sym(vpx_sad4x4x3_sse3): +global sym(aom_sad4x4x3_sse3) PRIVATE +sym(aom_sad4x4x3_sse3): STACK_FRAME_CREATE_X3 diff --git a/aom_dsp/x86/sad_sse4.asm b/aom_dsp/x86/sad_sse4.asm index 07e28b48a2d9ad3ed50a113f5378799b54fb95a7..fd2c70b1fbaf751d627f1bca936b467c6c69624d 100644 --- a/aom_dsp/x86/sad_sse4.asm +++ b/aom_dsp/x86/sad_sse4.asm @@ -165,14 +165,14 @@ movdqa [rdi + 16], xmm2 %endmacro -;void vpx_sad16x16x8_sse4_1( +;void aom_sad16x16x8_sse4_1( ; const unsigned char *src_ptr, ; int src_stride, ; const unsigned char *ref_ptr, ; int ref_stride, ; unsigned short *sad_array); -global sym(vpx_sad16x16x8_sse4_1) PRIVATE -sym(vpx_sad16x16x8_sse4_1): +global sym(aom_sad16x16x8_sse4_1) PRIVATE +sym(aom_sad16x16x8_sse4_1): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 5 @@ -205,15 +205,15 @@ sym(vpx_sad16x16x8_sse4_1): ret -;void vpx_sad16x8x8_sse4_1( +;void aom_sad16x8x8_sse4_1( ; const unsigned char *src_ptr, ; int src_stride, ; const unsigned char *ref_ptr, ; int ref_stride, ; unsigned short *sad_array ;); -global sym(vpx_sad16x8x8_sse4_1) PRIVATE -sym(vpx_sad16x8x8_sse4_1): +global sym(aom_sad16x8x8_sse4_1) PRIVATE +sym(aom_sad16x8x8_sse4_1): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 5 @@ -242,15 +242,15 @@ sym(vpx_sad16x8x8_sse4_1): ret -;void vpx_sad8x8x8_sse4_1( +;void aom_sad8x8x8_sse4_1( ; const unsigned char *src_ptr, ; int src_stride, ; const unsigned char *ref_ptr, ; int ref_stride, ; unsigned short *sad_array ;); -global sym(vpx_sad8x8x8_sse4_1) PRIVATE -sym(vpx_sad8x8x8_sse4_1): +global sym(aom_sad8x8x8_sse4_1) PRIVATE +sym(aom_sad8x8x8_sse4_1): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 5 @@ -279,15 +279,15 @@ sym(vpx_sad8x8x8_sse4_1): ret -;void vpx_sad8x16x8_sse4_1( +;void aom_sad8x16x8_sse4_1( ; const unsigned char *src_ptr, ; int src_stride, ; const unsigned char *ref_ptr, ; int ref_stride, ; unsigned short *sad_array ;); -global sym(vpx_sad8x16x8_sse4_1) PRIVATE -sym(vpx_sad8x16x8_sse4_1): +global sym(aom_sad8x16x8_sse4_1) PRIVATE +sym(aom_sad8x16x8_sse4_1): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 5 @@ -320,15 +320,15 @@ sym(vpx_sad8x16x8_sse4_1): ret -;void vpx_sad4x4x8_sse4_1( +;void aom_sad4x4x8_sse4_1( ; const unsigned char *src_ptr, ; int src_stride, ; const unsigned char *ref_ptr, ; int ref_stride, ; unsigned short *sad_array ;); -global sym(vpx_sad4x4x8_sse4_1) PRIVATE -sym(vpx_sad4x4x8_sse4_1): +global sym(aom_sad4x4x8_sse4_1) PRIVATE +sym(aom_sad4x4x8_sse4_1): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 5 diff --git a/aom_dsp/x86/sad_ssse3.asm b/aom_dsp/x86/sad_ssse3.asm index 8315f97fec43b0e91dbce020e2d86ef0c071756f..b1c97ea87025fd5981e4ffa3ffaa91fbb68c8f8a 100644 --- a/aom_dsp/x86/sad_ssse3.asm +++ b/aom_dsp/x86/sad_ssse3.asm @@ -146,14 +146,14 @@ %endmacro -;void int vpx_sad16x16x3_ssse3( +;void int aom_sad16x16x3_ssse3( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride, ; int *results) -global sym(vpx_sad16x16x3_ssse3) PRIVATE -sym(vpx_sad16x16x3_ssse3): +global sym(aom_sad16x16x3_ssse3) PRIVATE +sym(aom_sad16x16x3_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 5 @@ -169,31 +169,31 @@ sym(vpx_sad16x16x3_ssse3): mov rdx, 0xf and rdx, rdi - jmp .vpx_sad16x16x3_ssse3_skiptable -.vpx_sad16x16x3_ssse3_jumptable: - dd .vpx_sad16x16x3_ssse3_aligned_by_0 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_1 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_2 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_3 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_4 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_5 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_6 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_7 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_8 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_9 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_10 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_11 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_12 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_13 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_14 - .vpx_sad16x16x3_ssse3_do_jump - dd .vpx_sad16x16x3_ssse3_aligned_by_15 - .vpx_sad16x16x3_ssse3_do_jump -.vpx_sad16x16x3_ssse3_skiptable: - - call .vpx_sad16x16x3_ssse3_do_jump -.vpx_sad16x16x3_ssse3_do_jump: + jmp .aom_sad16x16x3_ssse3_skiptable +.aom_sad16x16x3_ssse3_jumptable: + dd .aom_sad16x16x3_ssse3_aligned_by_0 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_1 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_2 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_3 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_4 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_5 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_6 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_7 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_8 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_9 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_10 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_11 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_12 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_13 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_14 - .aom_sad16x16x3_ssse3_do_jump + dd .aom_sad16x16x3_ssse3_aligned_by_15 - .aom_sad16x16x3_ssse3_do_jump +.aom_sad16x16x3_ssse3_skiptable: + + call .aom_sad16x16x3_ssse3_do_jump +.aom_sad16x16x3_ssse3_do_jump: pop rcx ; get the address of do_jump - mov rax, .vpx_sad16x16x3_ssse3_jumptable - .vpx_sad16x16x3_ssse3_do_jump - add rax, rcx ; get the absolute address of vpx_sad16x16x3_ssse3_jumptable + mov rax, .aom_sad16x16x3_ssse3_jumptable - .aom_sad16x16x3_ssse3_do_jump + add rax, rcx ; get the absolute address of aom_sad16x16x3_ssse3_jumptable movsxd rax, dword [rax + 4*rdx] ; get the 32 bit offset from the jumptable add rcx, rax @@ -203,23 +203,23 @@ sym(vpx_sad16x16x3_ssse3): jmp rcx - PROCESS_16X16X3_OFFSET 0, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 1, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 2, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 3, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 4, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 5, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 6, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 7, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 8, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 9, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 10, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 11, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 12, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 13, .vpx_sad16x16x3_ssse3 - PROCESS_16X16X3_OFFSET 14, .vpx_sad16x16x3_ssse3 - -.vpx_sad16x16x3_ssse3_aligned_by_15: + PROCESS_16X16X3_OFFSET 0, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 1, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 2, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 3, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 4, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 5, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 6, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 7, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 8, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 9, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 10, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 11, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 12, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 13, .aom_sad16x16x3_ssse3 + PROCESS_16X16X3_OFFSET 14, .aom_sad16x16x3_ssse3 + +.aom_sad16x16x3_ssse3_aligned_by_15: PROCESS_16X2X3 1 PROCESS_16X2X3 0 PROCESS_16X2X3 0 @@ -229,7 +229,7 @@ sym(vpx_sad16x16x3_ssse3): PROCESS_16X2X3 0 PROCESS_16X2X3 0 -.vpx_sad16x16x3_ssse3_store_off: +.aom_sad16x16x3_ssse3_store_off: mov rdi, arg(4) ;Results movq xmm0, xmm5 @@ -259,14 +259,14 @@ sym(vpx_sad16x16x3_ssse3): pop rbp ret -;void int vpx_sad16x8x3_ssse3( +;void int aom_sad16x8x3_ssse3( ; unsigned char *src_ptr, ; int src_stride, ; unsigned char *ref_ptr, ; int ref_stride, ; int *results) -global sym(vpx_sad16x8x3_ssse3) PRIVATE -sym(vpx_sad16x8x3_ssse3): +global sym(aom_sad16x8x3_ssse3) PRIVATE +sym(aom_sad16x8x3_ssse3): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 5 @@ -282,31 +282,31 @@ sym(vpx_sad16x8x3_ssse3): mov rdx, 0xf and rdx, rdi - jmp .vpx_sad16x8x3_ssse3_skiptable -.vpx_sad16x8x3_ssse3_jumptable: - dd .vpx_sad16x8x3_ssse3_aligned_by_0 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_1 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_2 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_3 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_4 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_5 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_6 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_7 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_8 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_9 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_10 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_11 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_12 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_13 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_14 - .vpx_sad16x8x3_ssse3_do_jump - dd .vpx_sad16x8x3_ssse3_aligned_by_15 - .vpx_sad16x8x3_ssse3_do_jump -.vpx_sad16x8x3_ssse3_skiptable: - - call .vpx_sad16x8x3_ssse3_do_jump -.vpx_sad16x8x3_ssse3_do_jump: + jmp .aom_sad16x8x3_ssse3_skiptable +.aom_sad16x8x3_ssse3_jumptable: + dd .aom_sad16x8x3_ssse3_aligned_by_0 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_1 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_2 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_3 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_4 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_5 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_6 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_7 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_8 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_9 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_10 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_11 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_12 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_13 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_14 - .aom_sad16x8x3_ssse3_do_jump + dd .aom_sad16x8x3_ssse3_aligned_by_15 - .aom_sad16x8x3_ssse3_do_jump +.aom_sad16x8x3_ssse3_skiptable: + + call .aom_sad16x8x3_ssse3_do_jump +.aom_sad16x8x3_ssse3_do_jump: pop rcx ; get the address of do_jump - mov rax, .vpx_sad16x8x3_ssse3_jumptable - .vpx_sad16x8x3_ssse3_do_jump - add rax, rcx ; get the absolute address of vpx_sad16x8x3_ssse3_jumptable + mov rax, .aom_sad16x8x3_ssse3_jumptable - .aom_sad16x8x3_ssse3_do_jump + add rax, rcx ; get the absolute address of aom_sad16x8x3_ssse3_jumptable movsxd rax, dword [rax + 4*rdx] ; get the 32 bit offset from the jumptable add rcx, rax @@ -316,30 +316,30 @@ sym(vpx_sad16x8x3_ssse3): jmp rcx - PROCESS_16X8X3_OFFSET 0, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 1, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 2, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 3, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 4, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 5, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 6, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 7, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 8, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 9, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 10, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 11, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 12, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 13, .vpx_sad16x8x3_ssse3 - PROCESS_16X8X3_OFFSET 14, .vpx_sad16x8x3_ssse3 - -.vpx_sad16x8x3_ssse3_aligned_by_15: + PROCESS_16X8X3_OFFSET 0, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 1, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 2, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 3, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 4, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 5, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 6, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 7, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 8, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 9, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 10, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 11, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 12, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 13, .aom_sad16x8x3_ssse3 + PROCESS_16X8X3_OFFSET 14, .aom_sad16x8x3_ssse3 + +.aom_sad16x8x3_ssse3_aligned_by_15: PROCESS_16X2X3 1 PROCESS_16X2X3 0 PROCESS_16X2X3 0 PROCESS_16X2X3 0 -.vpx_sad16x8x3_ssse3_store_off: +.aom_sad16x8x3_ssse3_store_off: mov rdi, arg(4) ;Results movq xmm0, xmm5 diff --git a/aom_dsp/x86/ssim_opt_x86_64.asm b/aom_dsp/x86/ssim_opt_x86_64.asm index fc49c30d530a40b41e991b21b24362f64a374fc8..ebc37031068cbedf57aa221be0c7de7dcd10315e 100644 --- a/aom_dsp/x86/ssim_opt_x86_64.asm +++ b/aom_dsp/x86/ssim_opt_x86_64.asm @@ -61,8 +61,8 @@ ; or pavgb At this point this is just meant to be first pass for calculating ; all the parms needed for 16x16 ssim so we can play with dssim as distortion ; in mode selection code. -global sym(vpx_ssim_parms_16x16_sse2) PRIVATE -sym(vpx_ssim_parms_16x16_sse2): +global sym(aom_ssim_parms_16x16_sse2) PRIVATE +sym(aom_ssim_parms_16x16_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 9 @@ -151,8 +151,8 @@ sym(vpx_ssim_parms_16x16_sse2): ; or pavgb At this point this is just meant to be first pass for calculating ; all the parms needed for 16x16 ssim so we can play with dssim as distortion ; in mode selection code. -global sym(vpx_ssim_parms_8x8_sse2) PRIVATE -sym(vpx_ssim_parms_8x8_sse2): +global sym(aom_ssim_parms_8x8_sse2) PRIVATE +sym(aom_ssim_parms_8x8_sse2): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 9 diff --git a/aom_dsp/x86/subpel_variance_sse2.asm b/aom_dsp/x86/subpel_variance_sse2.asm index c655e4b346923465dedac786376d504ebd7ed023..541d1b29a7368370cf9e903d0c5eece9acad8d76 100644 --- a/aom_dsp/x86/subpel_variance_sse2.asm +++ b/aom_dsp/x86/subpel_variance_sse2.asm @@ -39,7 +39,7 @@ bilin_filter_m_ssse3: times 8 db 16, 0 SECTION .text -; int vpx_sub_pixel_varianceNxh(const uint8_t *src, ptrdiff_t src_stride, +; int aom_sub_pixel_varianceNxh(const uint8_t *src, ptrdiff_t src_stride, ; int x_offset, int y_offset, ; const uint8_t *dst, ptrdiff_t dst_stride, ; int height, unsigned int *sse); diff --git a/aom_dsp/x86/subtract_sse2.asm b/aom_dsp/x86/subtract_sse2.asm index 4273efb85465fb89cf3640d23a2c293b3d60eb83..f47cefee52a3b4cef8c8c1ab8fb5956062c9241e 100644 --- a/aom_dsp/x86/subtract_sse2.asm +++ b/aom_dsp/x86/subtract_sse2.asm @@ -12,7 +12,7 @@ SECTION .text -; void vpx_subtract_block(int rows, int cols, +; void aom_subtract_block(int rows, int cols, ; int16_t *diff, ptrdiff_t diff_stride, ; const uint8_t *src, ptrdiff_t src_stride, ; const uint8_t *pred, ptrdiff_t pred_stride) diff --git a/aom_dsp/x86/txfm_common_sse2.h b/aom_dsp/x86/txfm_common_sse2.h index bcaa3443ee6bd4a115bb7bcfd09c7898eb8f37b9..0a6a2272ddbb23b8240dde9b4ffe171e91656a7a 100644 --- a/aom_dsp/x86/txfm_common_sse2.h +++ b/aom_dsp/x86/txfm_common_sse2.h @@ -13,7 +13,7 @@ #define VPX_DSP_X86_TXFM_COMMON_SSE2_H_ #include <emmintrin.h> -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #define pair_set_epi16(a, b) \ _mm_set_epi16((int16_t)(b), (int16_t)(a), (int16_t)(b), (int16_t)(a), \ diff --git a/aom_dsp/x86/variance_avx2.c b/aom_dsp/x86/variance_avx2.c index ffe4ae55d13908225c8d39f27907d04419325508..a02ebd08f5af1c2d06e3551706cfc8e710dec3cf 100644 --- a/aom_dsp/x86/variance_avx2.c +++ b/aom_dsp/x86/variance_avx2.c @@ -8,13 +8,13 @@ * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" typedef void (*get_var_avx2)(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse, int *sum); -void vpx_get32x32var_avx2(const uint8_t *src, int src_stride, +void aom_get32x32var_avx2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse, int *sum); @@ -39,104 +39,104 @@ static void variance_avx2(const uint8_t *src, int src_stride, } } -unsigned int vpx_variance16x16_avx2(const uint8_t *src, int src_stride, +unsigned int aom_variance16x16_avx2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_avx2(src, src_stride, ref, ref_stride, 16, 16, sse, &sum, - vpx_get16x16var_avx2, 16); + aom_get16x16var_avx2, 16); return *sse - (((unsigned int)sum * sum) >> 8); } -unsigned int vpx_mse16x16_avx2(const uint8_t *src, int src_stride, +unsigned int aom_mse16x16_avx2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; - vpx_get16x16var_avx2(src, src_stride, ref, ref_stride, sse, &sum); + aom_get16x16var_avx2(src, src_stride, ref, ref_stride, sse, &sum); return *sse; } -unsigned int vpx_variance32x16_avx2(const uint8_t *src, int src_stride, +unsigned int aom_variance32x16_avx2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_avx2(src, src_stride, ref, ref_stride, 32, 16, sse, &sum, - vpx_get32x32var_avx2, 32); + aom_get32x32var_avx2, 32); return *sse - (((int64_t)sum * sum) >> 9); } -unsigned int vpx_variance32x32_avx2(const uint8_t *src, int src_stride, +unsigned int aom_variance32x32_avx2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_avx2(src, src_stride, ref, ref_stride, 32, 32, sse, &sum, - vpx_get32x32var_avx2, 32); + aom_get32x32var_avx2, 32); return *sse - (((int64_t)sum * sum) >> 10); } -unsigned int vpx_variance64x64_avx2(const uint8_t *src, int src_stride, +unsigned int aom_variance64x64_avx2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_avx2(src, src_stride, ref, ref_stride, 64, 64, sse, &sum, - vpx_get32x32var_avx2, 32); + aom_get32x32var_avx2, 32); return *sse - (((int64_t)sum * sum) >> 12); } -unsigned int vpx_variance64x32_avx2(const uint8_t *src, int src_stride, +unsigned int aom_variance64x32_avx2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_avx2(src, src_stride, ref, ref_stride, 64, 32, sse, &sum, - vpx_get32x32var_avx2, 32); + aom_get32x32var_avx2, 32); return *sse - (((int64_t)sum * sum) >> 11); } -unsigned int vpx_sub_pixel_variance32xh_avx2(const uint8_t *src, int src_stride, +unsigned int aom_sub_pixel_variance32xh_avx2(const uint8_t *src, int src_stride, int x_offset, int y_offset, const uint8_t *dst, int dst_stride, int height, unsigned int *sse); -unsigned int vpx_sub_pixel_avg_variance32xh_avx2( +unsigned int aom_sub_pixel_avg_variance32xh_avx2( const uint8_t *src, int src_stride, int x_offset, int y_offset, const uint8_t *dst, int dst_stride, const uint8_t *sec, int sec_stride, int height, unsigned int *sseptr); -unsigned int vpx_sub_pixel_variance64x64_avx2(const uint8_t *src, +unsigned int aom_sub_pixel_variance64x64_avx2(const uint8_t *src, int src_stride, int x_offset, int y_offset, const uint8_t *dst, int dst_stride, unsigned int *sse) { unsigned int sse1; - const int se1 = vpx_sub_pixel_variance32xh_avx2( + const int se1 = aom_sub_pixel_variance32xh_avx2( src, src_stride, x_offset, y_offset, dst, dst_stride, 64, &sse1); unsigned int sse2; const int se2 = - vpx_sub_pixel_variance32xh_avx2(src + 32, src_stride, x_offset, y_offset, + aom_sub_pixel_variance32xh_avx2(src + 32, src_stride, x_offset, y_offset, dst + 32, dst_stride, 64, &sse2); const int se = se1 + se2; *sse = sse1 + sse2; return *sse - (((int64_t)se * se) >> 12); } -unsigned int vpx_sub_pixel_variance32x32_avx2(const uint8_t *src, +unsigned int aom_sub_pixel_variance32x32_avx2(const uint8_t *src, int src_stride, int x_offset, int y_offset, const uint8_t *dst, int dst_stride, unsigned int *sse) { - const int se = vpx_sub_pixel_variance32xh_avx2( + const int se = aom_sub_pixel_variance32xh_avx2( src, src_stride, x_offset, y_offset, dst, dst_stride, 32, sse); return *sse - (((int64_t)se * se) >> 10); } -unsigned int vpx_sub_pixel_avg_variance64x64_avx2( +unsigned int aom_sub_pixel_avg_variance64x64_avx2( const uint8_t *src, int src_stride, int x_offset, int y_offset, const uint8_t *dst, int dst_stride, unsigned int *sse, const uint8_t *sec) { unsigned int sse1; - const int se1 = vpx_sub_pixel_avg_variance32xh_avx2( + const int se1 = aom_sub_pixel_avg_variance32xh_avx2( src, src_stride, x_offset, y_offset, dst, dst_stride, sec, 64, 64, &sse1); unsigned int sse2; - const int se2 = vpx_sub_pixel_avg_variance32xh_avx2( + const int se2 = aom_sub_pixel_avg_variance32xh_avx2( src + 32, src_stride, x_offset, y_offset, dst + 32, dst_stride, sec + 32, 64, 64, &sse2); const int se = se1 + se2; @@ -146,11 +146,11 @@ unsigned int vpx_sub_pixel_avg_variance64x64_avx2( return *sse - (((int64_t)se * se) >> 12); } -unsigned int vpx_sub_pixel_avg_variance32x32_avx2( +unsigned int aom_sub_pixel_avg_variance32x32_avx2( const uint8_t *src, int src_stride, int x_offset, int y_offset, const uint8_t *dst, int dst_stride, unsigned int *sse, const uint8_t *sec) { // Process 32 elements in parallel. - const int se = vpx_sub_pixel_avg_variance32xh_avx2( + const int se = aom_sub_pixel_avg_variance32xh_avx2( src, src_stride, x_offset, y_offset, dst, dst_stride, sec, 32, 32, sse); return *sse - (((int64_t)se * se) >> 10); } diff --git a/aom_dsp/x86/variance_impl_avx2.c b/aom_dsp/x86/variance_impl_avx2.c index af5b93cf3a2b8d950d23a9662fbea803139caa09..e925df7aff890999ccfb3d085e02f9c3d258ea73 100644 --- a/aom_dsp/x86/variance_impl_avx2.c +++ b/aom_dsp/x86/variance_impl_avx2.c @@ -11,7 +11,7 @@ #include <immintrin.h> // AVX2 -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" DECLARE_ALIGNED(32, static const uint8_t, bilinear_filters_avx2[512]) = { @@ -31,7 +31,7 @@ DECLARE_ALIGNED(32, static const uint8_t, bilinear_filters_avx2[512]) = { 14, 2, 14, 2, 14, 2, 14, 2, 14, }; -void vpx_get16x16var_avx2(const unsigned char *src_ptr, int source_stride, +void aom_get16x16var_avx2(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int recon_stride, unsigned int *SSE, int *Sum) { __m256i src, src_expand_low, src_expand_high, ref, ref_expand_low; @@ -137,7 +137,7 @@ void vpx_get16x16var_avx2(const unsigned char *src_ptr, int source_stride, } } -void vpx_get32x32var_avx2(const unsigned char *src_ptr, int source_stride, +void aom_get32x32var_avx2(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int recon_stride, unsigned int *SSE, int *Sum) { __m256i src, src_expand_low, src_expand_high, ref, ref_expand_low; @@ -294,7 +294,7 @@ void vpx_get32x32var_avx2(const unsigned char *src_ptr, int source_stride, sum = _mm_cvtsi128_si32(_mm256_castsi256_si128(sum_reg)) + \ _mm_cvtsi128_si32(_mm256_extractf128_si256(sum_reg, 1)); -unsigned int vpx_sub_pixel_variance32xh_avx2(const uint8_t *src, int src_stride, +unsigned int aom_sub_pixel_variance32xh_avx2(const uint8_t *src, int src_stride, int x_offset, int y_offset, const uint8_t *dst, int dst_stride, int height, unsigned int *sse) { @@ -481,7 +481,7 @@ unsigned int vpx_sub_pixel_variance32xh_avx2(const uint8_t *src, int src_stride, return sum; } -unsigned int vpx_sub_pixel_avg_variance32xh_avx2( +unsigned int aom_sub_pixel_avg_variance32xh_avx2( const uint8_t *src, int src_stride, int x_offset, int y_offset, const uint8_t *dst, int dst_stride, const uint8_t *sec, int sec_stride, int height, unsigned int *sse) { diff --git a/aom_dsp/x86/variance_impl_mmx.asm b/aom_dsp/x86/variance_impl_mmx.asm index 5500d975b9524132c80e2433ca3fde684d286f59..7c79448fcc47ef366072aef6a7386002c3c5f111 100644 --- a/aom_dsp/x86/variance_impl_mmx.asm +++ b/aom_dsp/x86/variance_impl_mmx.asm @@ -13,9 +13,9 @@ %define mmx_filter_shift 7 -;unsigned int vpx_get_mb_ss_mmx( short *src_ptr ) -global sym(vpx_get_mb_ss_mmx) PRIVATE -sym(vpx_get_mb_ss_mmx): +;unsigned int aom_get_mb_ss_mmx( short *src_ptr ) +global sym(aom_get_mb_ss_mmx) PRIVATE +sym(aom_get_mb_ss_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 7 @@ -63,7 +63,7 @@ sym(vpx_get_mb_ss_mmx): pop rbp ret -;void vpx_get8x8var_mmx +;void aom_get8x8var_mmx ;( ; unsigned char *src_ptr, ; int source_stride, @@ -72,8 +72,8 @@ sym(vpx_get_mb_ss_mmx): ; unsigned int *SSE, ; int *Sum ;) -global sym(vpx_get8x8var_mmx) PRIVATE -sym(vpx_get8x8var_mmx): +global sym(aom_get8x8var_mmx) PRIVATE +sym(aom_get8x8var_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -306,7 +306,7 @@ sym(vpx_get8x8var_mmx): ret ;void -;vpx_get4x4var_mmx +;aom_get4x4var_mmx ;( ; unsigned char *src_ptr, ; int source_stride, @@ -315,8 +315,8 @@ sym(vpx_get8x8var_mmx): ; unsigned int *SSE, ; int *Sum ;) -global sym(vpx_get4x4var_mmx) PRIVATE -sym(vpx_get4x4var_mmx): +global sym(aom_get4x4var_mmx) PRIVATE +sym(aom_get4x4var_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 6 @@ -414,7 +414,7 @@ sym(vpx_get4x4var_mmx): pop rbp ret -;void vpx_filter_block2d_bil4x4_var_mmx +;void aom_filter_block2d_bil4x4_var_mmx ;( ; unsigned char *ref_ptr, ; int ref_pixels_per_line, @@ -425,8 +425,8 @@ sym(vpx_get4x4var_mmx): ; int *sum, ; unsigned int *sumsquared ;) -global sym(vpx_filter_block2d_bil4x4_var_mmx) PRIVATE -sym(vpx_filter_block2d_bil4x4_var_mmx): +global sym(aom_filter_block2d_bil4x4_var_mmx) PRIVATE +sym(aom_filter_block2d_bil4x4_var_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 8 @@ -550,7 +550,7 @@ sym(vpx_filter_block2d_bil4x4_var_mmx): pop rbp ret -;void vpx_filter_block2d_bil_var_mmx +;void aom_filter_block2d_bil_var_mmx ;( ; unsigned char *ref_ptr, ; int ref_pixels_per_line, @@ -562,8 +562,8 @@ sym(vpx_filter_block2d_bil4x4_var_mmx): ; int *sum, ; unsigned int *sumsquared ;) -global sym(vpx_filter_block2d_bil_var_mmx) PRIVATE -sym(vpx_filter_block2d_bil_var_mmx): +global sym(aom_filter_block2d_bil_var_mmx) PRIVATE +sym(aom_filter_block2d_bil_var_mmx): push rbp mov rbp, rsp SHADOW_ARGS_TO_STACK 9 diff --git a/aom_dsp/x86/variance_mmx.c b/aom_dsp/x86/variance_mmx.c index a168a7e06ea0ba174c447453e6cb2b801442a985..da67fa5fdb83bd81813dc5c244d442472dbe0bcb 100644 --- a/aom_dsp/x86/variance_mmx.c +++ b/aom_dsp/x86/variance_mmx.c @@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" @@ -20,10 +20,10 @@ DECLARE_ALIGNED(16, static const int16_t, bilinear_filters_mmx[8][8]) = { { 32, 32, 32, 32, 96, 96, 96, 96 }, { 16, 16, 16, 16, 112, 112, 112, 112 } }; -extern void vpx_get4x4var_mmx(const uint8_t *a, int a_stride, const uint8_t *b, +extern void aom_get4x4var_mmx(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, unsigned int *sse, int *sum); -extern void vpx_filter_block2d_bil4x4_var_mmx(const unsigned char *ref_ptr, +extern void aom_filter_block2d_bil4x4_var_mmx(const unsigned char *ref_ptr, int ref_pixels_per_line, const unsigned char *src_ptr, int src_pixels_per_line, @@ -31,46 +31,46 @@ extern void vpx_filter_block2d_bil4x4_var_mmx(const unsigned char *ref_ptr, const int16_t *VFilter, int *sum, unsigned int *sumsquared); -extern void vpx_filter_block2d_bil_var_mmx( +extern void aom_filter_block2d_bil_var_mmx( const unsigned char *ref_ptr, int ref_pixels_per_line, const unsigned char *src_ptr, int src_pixels_per_line, unsigned int Height, const int16_t *HFilter, const int16_t *VFilter, int *sum, unsigned int *sumsquared); -unsigned int vpx_variance4x4_mmx(const unsigned char *a, int a_stride, +unsigned int aom_variance4x4_mmx(const unsigned char *a, int a_stride, const unsigned char *b, int b_stride, unsigned int *sse) { unsigned int var; int avg; - vpx_get4x4var_mmx(a, a_stride, b, b_stride, &var, &avg); + aom_get4x4var_mmx(a, a_stride, b, b_stride, &var, &avg); *sse = var; return (var - (((unsigned int)avg * avg) >> 4)); } -unsigned int vpx_variance8x8_mmx(const unsigned char *a, int a_stride, +unsigned int aom_variance8x8_mmx(const unsigned char *a, int a_stride, const unsigned char *b, int b_stride, unsigned int *sse) { unsigned int var; int avg; - vpx_get8x8var_mmx(a, a_stride, b, b_stride, &var, &avg); + aom_get8x8var_mmx(a, a_stride, b, b_stride, &var, &avg); *sse = var; return (var - (((unsigned int)avg * avg) >> 6)); } -unsigned int vpx_mse16x16_mmx(const unsigned char *a, int a_stride, +unsigned int aom_mse16x16_mmx(const unsigned char *a, int a_stride, const unsigned char *b, int b_stride, unsigned int *sse) { unsigned int sse0, sse1, sse2, sse3, var; int sum0, sum1, sum2, sum3; - vpx_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0); - vpx_get8x8var_mmx(a + 8, a_stride, b + 8, b_stride, &sse1, &sum1); - vpx_get8x8var_mmx(a + 8 * a_stride, a_stride, b + 8 * b_stride, b_stride, + aom_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0); + aom_get8x8var_mmx(a + 8, a_stride, b + 8, b_stride, &sse1, &sum1); + aom_get8x8var_mmx(a + 8 * a_stride, a_stride, b + 8 * b_stride, b_stride, &sse2, &sum2); - vpx_get8x8var_mmx(a + 8 * a_stride + 8, a_stride, b + 8 * b_stride + 8, + aom_get8x8var_mmx(a + 8 * a_stride + 8, a_stride, b + 8 * b_stride + 8, b_stride, &sse3, &sum3); var = sse0 + sse1 + sse2 + sse3; @@ -78,17 +78,17 @@ unsigned int vpx_mse16x16_mmx(const unsigned char *a, int a_stride, return var; } -unsigned int vpx_variance16x16_mmx(const unsigned char *a, int a_stride, +unsigned int aom_variance16x16_mmx(const unsigned char *a, int a_stride, const unsigned char *b, int b_stride, unsigned int *sse) { unsigned int sse0, sse1, sse2, sse3, var; int sum0, sum1, sum2, sum3, avg; - vpx_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0); - vpx_get8x8var_mmx(a + 8, a_stride, b + 8, b_stride, &sse1, &sum1); - vpx_get8x8var_mmx(a + 8 * a_stride, a_stride, b + 8 * b_stride, b_stride, + aom_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0); + aom_get8x8var_mmx(a + 8, a_stride, b + 8, b_stride, &sse1, &sum1); + aom_get8x8var_mmx(a + 8 * a_stride, a_stride, b + 8 * b_stride, b_stride, &sse2, &sum2); - vpx_get8x8var_mmx(a + 8 * a_stride + 8, a_stride, b + 8 * b_stride + 8, + aom_get8x8var_mmx(a + 8 * a_stride + 8, a_stride, b + 8 * b_stride + 8, b_stride, &sse3, &sum3); var = sse0 + sse1 + sse2 + sse3; @@ -97,14 +97,14 @@ unsigned int vpx_variance16x16_mmx(const unsigned char *a, int a_stride, return (var - (((unsigned int)avg * avg) >> 8)); } -unsigned int vpx_variance16x8_mmx(const unsigned char *a, int a_stride, +unsigned int aom_variance16x8_mmx(const unsigned char *a, int a_stride, const unsigned char *b, int b_stride, unsigned int *sse) { unsigned int sse0, sse1, var; int sum0, sum1, avg; - vpx_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0); - vpx_get8x8var_mmx(a + 8, a_stride, b + 8, b_stride, &sse1, &sum1); + aom_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0); + aom_get8x8var_mmx(a + 8, a_stride, b + 8, b_stride, &sse1, &sum1); var = sse0 + sse1; avg = sum0 + sum1; @@ -112,14 +112,14 @@ unsigned int vpx_variance16x8_mmx(const unsigned char *a, int a_stride, return (var - (((unsigned int)avg * avg) >> 7)); } -unsigned int vpx_variance8x16_mmx(const unsigned char *a, int a_stride, +unsigned int aom_variance8x16_mmx(const unsigned char *a, int a_stride, const unsigned char *b, int b_stride, unsigned int *sse) { unsigned int sse0, sse1, var; int sum0, sum1, avg; - vpx_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0); - vpx_get8x8var_mmx(a + 8 * a_stride, a_stride, b + 8 * b_stride, b_stride, + aom_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0); + aom_get8x8var_mmx(a + 8 * a_stride, a_stride, b + 8 * b_stride, b_stride, &sse1, &sum1); var = sse0 + sse1; @@ -129,44 +129,44 @@ unsigned int vpx_variance8x16_mmx(const unsigned char *a, int a_stride, return (var - (((unsigned int)avg * avg) >> 7)); } -uint32_t vpx_sub_pixel_variance4x4_mmx(const uint8_t *a, int a_stride, +uint32_t aom_sub_pixel_variance4x4_mmx(const uint8_t *a, int a_stride, int xoffset, int yoffset, const uint8_t *b, int b_stride, uint32_t *sse) { int xsum; unsigned int xxsum; - vpx_filter_block2d_bil4x4_var_mmx( + aom_filter_block2d_bil4x4_var_mmx( a, a_stride, b, b_stride, bilinear_filters_mmx[xoffset], bilinear_filters_mmx[yoffset], &xsum, &xxsum); *sse = xxsum; return (xxsum - (((unsigned int)xsum * xsum) >> 4)); } -uint32_t vpx_sub_pixel_variance8x8_mmx(const uint8_t *a, int a_stride, +uint32_t aom_sub_pixel_variance8x8_mmx(const uint8_t *a, int a_stride, int xoffset, int yoffset, const uint8_t *b, int b_stride, uint32_t *sse) { int xsum; uint32_t xxsum; - vpx_filter_block2d_bil_var_mmx(a, a_stride, b, b_stride, 8, + aom_filter_block2d_bil_var_mmx(a, a_stride, b, b_stride, 8, bilinear_filters_mmx[xoffset], bilinear_filters_mmx[yoffset], &xsum, &xxsum); *sse = xxsum; return (xxsum - (((uint32_t)xsum * xsum) >> 6)); } -uint32_t vpx_sub_pixel_variance16x16_mmx(const uint8_t *a, int a_stride, +uint32_t aom_sub_pixel_variance16x16_mmx(const uint8_t *a, int a_stride, int xoffset, int yoffset, const uint8_t *b, int b_stride, uint32_t *sse) { int xsum0, xsum1; unsigned int xxsum0, xxsum1; - vpx_filter_block2d_bil_var_mmx( + aom_filter_block2d_bil_var_mmx( a, a_stride, b, b_stride, 16, bilinear_filters_mmx[xoffset], bilinear_filters_mmx[yoffset], &xsum0, &xxsum0); - vpx_filter_block2d_bil_var_mmx( + aom_filter_block2d_bil_var_mmx( a + 8, a_stride, b + 8, b_stride, 16, bilinear_filters_mmx[xoffset], bilinear_filters_mmx[yoffset], &xsum1, &xxsum1); @@ -177,18 +177,18 @@ uint32_t vpx_sub_pixel_variance16x16_mmx(const uint8_t *a, int a_stride, return (xxsum0 - (((uint32_t)xsum0 * xsum0) >> 8)); } -uint32_t vpx_sub_pixel_variance16x8_mmx(const uint8_t *a, int a_stride, +uint32_t aom_sub_pixel_variance16x8_mmx(const uint8_t *a, int a_stride, int xoffset, int yoffset, const uint8_t *b, int b_stride, uint32_t *sse) { int xsum0, xsum1; unsigned int xxsum0, xxsum1; - vpx_filter_block2d_bil_var_mmx( + aom_filter_block2d_bil_var_mmx( a, a_stride, b, b_stride, 8, bilinear_filters_mmx[xoffset], bilinear_filters_mmx[yoffset], &xsum0, &xxsum0); - vpx_filter_block2d_bil_var_mmx( + aom_filter_block2d_bil_var_mmx( a + 8, a_stride, b + 8, b_stride, 8, bilinear_filters_mmx[xoffset], bilinear_filters_mmx[yoffset], &xsum1, &xxsum1); @@ -199,33 +199,33 @@ uint32_t vpx_sub_pixel_variance16x8_mmx(const uint8_t *a, int a_stride, return (xxsum0 - (((uint32_t)xsum0 * xsum0) >> 7)); } -uint32_t vpx_sub_pixel_variance8x16_mmx(const uint8_t *a, int a_stride, +uint32_t aom_sub_pixel_variance8x16_mmx(const uint8_t *a, int a_stride, int xoffset, int yoffset, const uint8_t *b, int b_stride, uint32_t *sse) { int xsum; unsigned int xxsum; - vpx_filter_block2d_bil_var_mmx(a, a_stride, b, b_stride, 16, + aom_filter_block2d_bil_var_mmx(a, a_stride, b, b_stride, 16, bilinear_filters_mmx[xoffset], bilinear_filters_mmx[yoffset], &xsum, &xxsum); *sse = xxsum; return (xxsum - (((uint32_t)xsum * xsum) >> 7)); } -uint32_t vpx_variance_halfpixvar16x16_h_mmx(const uint8_t *a, int a_stride, +uint32_t aom_variance_halfpixvar16x16_h_mmx(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, uint32_t *sse) { - return vpx_sub_pixel_variance16x16_mmx(a, a_stride, 4, 0, b, b_stride, sse); + return aom_sub_pixel_variance16x16_mmx(a, a_stride, 4, 0, b, b_stride, sse); } -uint32_t vpx_variance_halfpixvar16x16_v_mmx(const uint8_t *a, int a_stride, +uint32_t aom_variance_halfpixvar16x16_v_mmx(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, uint32_t *sse) { - return vpx_sub_pixel_variance16x16_mmx(a, a_stride, 0, 4, b, b_stride, sse); + return aom_sub_pixel_variance16x16_mmx(a, a_stride, 0, 4, b, b_stride, sse); } -uint32_t vpx_variance_halfpixvar16x16_hv_mmx(const uint8_t *a, int a_stride, +uint32_t aom_variance_halfpixvar16x16_hv_mmx(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, uint32_t *sse) { - return vpx_sub_pixel_variance16x16_mmx(a, a_stride, 4, 4, b, b_stride, sse); + return aom_sub_pixel_variance16x16_mmx(a, a_stride, 4, 4, b, b_stride, sse); } diff --git a/aom_dsp/x86/variance_sse2.c b/aom_dsp/x86/variance_sse2.c index 1e7f0fb9ca66385d691e1e1c587e026cb323ee1d..823e016caa109f39dfc0324f2715c7a2cf660f9b 100644 --- a/aom_dsp/x86/variance_sse2.c +++ b/aom_dsp/x86/variance_sse2.c @@ -11,8 +11,8 @@ #include <emmintrin.h> // SSE2 -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "aom_ports/mem.h" @@ -20,7 +20,7 @@ typedef void (*getNxMvar_fn_t)(const unsigned char *src, int src_stride, const unsigned char *ref, int ref_stride, unsigned int *sse, int *sum); -unsigned int vpx_get_mb_ss_sse2(const int16_t *src) { +unsigned int aom_get_mb_ss_sse2(const int16_t *src) { __m128i vsum = _mm_setzero_si128(); int i; @@ -66,7 +66,7 @@ static void get4x4var_sse2(const uint8_t *src, int src_stride, *sse = _mm_cvtsi128_si32(vsum); } -void vpx_get8x8var_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, +void aom_get8x8var_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse, int *sum) { const __m128i zero = _mm_setzero_si128(); __m128i vsum = _mm_setzero_si128(); @@ -104,7 +104,7 @@ void vpx_get8x8var_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, *sse = _mm_cvtsi128_si32(vsse); } -void vpx_get16x16var_sse2(const uint8_t *src, int src_stride, +void aom_get16x16var_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse, int *sum) { const __m128i zero = _mm_setzero_si128(); @@ -166,7 +166,7 @@ static void variance_sse2(const unsigned char *src, int src_stride, } } -unsigned int vpx_variance4x4_sse2(const unsigned char *src, int src_stride, +unsigned int aom_variance4x4_sse2(const unsigned char *src, int src_stride, const unsigned char *ref, int ref_stride, unsigned int *sse) { int sum; @@ -174,7 +174,7 @@ unsigned int vpx_variance4x4_sse2(const unsigned char *src, int src_stride, return *sse - (((unsigned int)sum * sum) >> 4); } -unsigned int vpx_variance8x4_sse2(const uint8_t *src, int src_stride, +unsigned int aom_variance8x4_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; @@ -183,7 +183,7 @@ unsigned int vpx_variance8x4_sse2(const uint8_t *src, int src_stride, return *sse - (((unsigned int)sum * sum) >> 5); } -unsigned int vpx_variance4x8_sse2(const uint8_t *src, int src_stride, +unsigned int aom_variance4x8_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; @@ -192,119 +192,119 @@ unsigned int vpx_variance4x8_sse2(const uint8_t *src, int src_stride, return *sse - (((unsigned int)sum * sum) >> 5); } -unsigned int vpx_variance8x8_sse2(const unsigned char *src, int src_stride, +unsigned int aom_variance8x8_sse2(const unsigned char *src, int src_stride, const unsigned char *ref, int ref_stride, unsigned int *sse) { int sum; - vpx_get8x8var_sse2(src, src_stride, ref, ref_stride, sse, &sum); + aom_get8x8var_sse2(src, src_stride, ref, ref_stride, sse, &sum); return *sse - (((unsigned int)sum * sum) >> 6); } -unsigned int vpx_variance16x8_sse2(const unsigned char *src, int src_stride, +unsigned int aom_variance16x8_sse2(const unsigned char *src, int src_stride, const unsigned char *ref, int ref_stride, unsigned int *sse) { int sum; variance_sse2(src, src_stride, ref, ref_stride, 16, 8, sse, &sum, - vpx_get8x8var_sse2, 8); + aom_get8x8var_sse2, 8); return *sse - (((unsigned int)sum * sum) >> 7); } -unsigned int vpx_variance8x16_sse2(const unsigned char *src, int src_stride, +unsigned int aom_variance8x16_sse2(const unsigned char *src, int src_stride, const unsigned char *ref, int ref_stride, unsigned int *sse) { int sum; variance_sse2(src, src_stride, ref, ref_stride, 8, 16, sse, &sum, - vpx_get8x8var_sse2, 8); + aom_get8x8var_sse2, 8); return *sse - (((unsigned int)sum * sum) >> 7); } -unsigned int vpx_variance16x16_sse2(const unsigned char *src, int src_stride, +unsigned int aom_variance16x16_sse2(const unsigned char *src, int src_stride, const unsigned char *ref, int ref_stride, unsigned int *sse) { int sum; - vpx_get16x16var_sse2(src, src_stride, ref, ref_stride, sse, &sum); + aom_get16x16var_sse2(src, src_stride, ref, ref_stride, sse, &sum); return *sse - (((unsigned int)sum * sum) >> 8); } -unsigned int vpx_variance32x32_sse2(const uint8_t *src, int src_stride, +unsigned int aom_variance32x32_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_sse2(src, src_stride, ref, ref_stride, 32, 32, sse, &sum, - vpx_get16x16var_sse2, 16); + aom_get16x16var_sse2, 16); return *sse - (((int64_t)sum * sum) >> 10); } -unsigned int vpx_variance32x16_sse2(const uint8_t *src, int src_stride, +unsigned int aom_variance32x16_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_sse2(src, src_stride, ref, ref_stride, 32, 16, sse, &sum, - vpx_get16x16var_sse2, 16); + aom_get16x16var_sse2, 16); return *sse - (((int64_t)sum * sum) >> 9); } -unsigned int vpx_variance16x32_sse2(const uint8_t *src, int src_stride, +unsigned int aom_variance16x32_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_sse2(src, src_stride, ref, ref_stride, 16, 32, sse, &sum, - vpx_get16x16var_sse2, 16); + aom_get16x16var_sse2, 16); return *sse - (((int64_t)sum * sum) >> 9); } -unsigned int vpx_variance64x64_sse2(const uint8_t *src, int src_stride, +unsigned int aom_variance64x64_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_sse2(src, src_stride, ref, ref_stride, 64, 64, sse, &sum, - vpx_get16x16var_sse2, 16); + aom_get16x16var_sse2, 16); return *sse - (((int64_t)sum * sum) >> 12); } -unsigned int vpx_variance64x32_sse2(const uint8_t *src, int src_stride, +unsigned int aom_variance64x32_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_sse2(src, src_stride, ref, ref_stride, 64, 32, sse, &sum, - vpx_get16x16var_sse2, 16); + aom_get16x16var_sse2, 16); return *sse - (((int64_t)sum * sum) >> 11); } -unsigned int vpx_variance32x64_sse2(const uint8_t *src, int src_stride, +unsigned int aom_variance32x64_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { int sum; variance_sse2(src, src_stride, ref, ref_stride, 32, 64, sse, &sum, - vpx_get16x16var_sse2, 16); + aom_get16x16var_sse2, 16); return *sse - (((int64_t)sum * sum) >> 11); } -unsigned int vpx_mse8x8_sse2(const uint8_t *src, int src_stride, +unsigned int aom_mse8x8_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { - vpx_variance8x8_sse2(src, src_stride, ref, ref_stride, sse); + aom_variance8x8_sse2(src, src_stride, ref, ref_stride, sse); return *sse; } -unsigned int vpx_mse8x16_sse2(const uint8_t *src, int src_stride, +unsigned int aom_mse8x16_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { - vpx_variance8x16_sse2(src, src_stride, ref, ref_stride, sse); + aom_variance8x16_sse2(src, src_stride, ref, ref_stride, sse); return *sse; } -unsigned int vpx_mse16x8_sse2(const uint8_t *src, int src_stride, +unsigned int aom_mse16x8_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { - vpx_variance16x8_sse2(src, src_stride, ref, ref_stride, sse); + aom_variance16x8_sse2(src, src_stride, ref, ref_stride, sse); return *sse; } -unsigned int vpx_mse16x16_sse2(const uint8_t *src, int src_stride, +unsigned int aom_mse16x16_sse2(const uint8_t *src, int src_stride, const uint8_t *ref, int ref_stride, unsigned int *sse) { - vpx_variance16x16_sse2(src, src_stride, ref, ref_stride, sse); + aom_variance16x16_sse2(src, src_stride, ref, ref_stride, sse); return *sse; } @@ -312,7 +312,7 @@ unsigned int vpx_mse16x16_sse2(const uint8_t *src, int src_stride, // The 2 unused parameters are place holders for PIC enabled build. // These definitions are for functions defined in subpel_variance.asm #define DECL(w, opt) \ - int vpx_sub_pixel_variance##w##xh_##opt( \ + int aom_sub_pixel_variance##w##xh_##opt( \ const uint8_t *src, ptrdiff_t src_stride, int x_offset, int y_offset, \ const uint8_t *dst, ptrdiff_t dst_stride, int height, unsigned int *sse, \ void *unused0, void *unused) @@ -327,27 +327,27 @@ DECLS(ssse3, ssse3); #undef DECL #define FN(w, h, wf, wlog2, hlog2, opt, cast) \ - unsigned int vpx_sub_pixel_variance##w##x##h##_##opt( \ + unsigned int aom_sub_pixel_variance##w##x##h##_##opt( \ const uint8_t *src, int src_stride, int x_offset, int y_offset, \ const uint8_t *dst, int dst_stride, unsigned int *sse_ptr) { \ unsigned int sse; \ - int se = vpx_sub_pixel_variance##wf##xh_##opt(src, src_stride, x_offset, \ + int se = aom_sub_pixel_variance##wf##xh_##opt(src, src_stride, x_offset, \ y_offset, dst, dst_stride, \ h, &sse, NULL, NULL); \ if (w > wf) { \ unsigned int sse2; \ - int se2 = vpx_sub_pixel_variance##wf##xh_##opt( \ + int se2 = aom_sub_pixel_variance##wf##xh_##opt( \ src + 16, src_stride, x_offset, y_offset, dst + 16, dst_stride, h, \ &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ if (w > wf * 2) { \ - se2 = vpx_sub_pixel_variance##wf##xh_##opt( \ + se2 = aom_sub_pixel_variance##wf##xh_##opt( \ src + 32, src_stride, x_offset, y_offset, dst + 32, dst_stride, h, \ &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ - se2 = vpx_sub_pixel_variance##wf##xh_##opt( \ + se2 = aom_sub_pixel_variance##wf##xh_##opt( \ src + 48, src_stride, x_offset, y_offset, dst + 48, dst_stride, h, \ &sse2, NULL, NULL); \ se += se2; \ @@ -381,7 +381,7 @@ FNS(ssse3, ssse3); // The 2 unused parameters are place holders for PIC enabled build. #define DECL(w, opt) \ - int vpx_sub_pixel_avg_variance##w##xh_##opt( \ + int aom_sub_pixel_avg_variance##w##xh_##opt( \ const uint8_t *src, ptrdiff_t src_stride, int x_offset, int y_offset, \ const uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *sec, \ ptrdiff_t sec_stride, int height, unsigned int *sse, void *unused0, \ @@ -397,28 +397,28 @@ DECLS(ssse3, ssse3); #undef DECLS #define FN(w, h, wf, wlog2, hlog2, opt, cast) \ - unsigned int vpx_sub_pixel_avg_variance##w##x##h##_##opt( \ + unsigned int aom_sub_pixel_avg_variance##w##x##h##_##opt( \ const uint8_t *src, int src_stride, int x_offset, int y_offset, \ const uint8_t *dst, int dst_stride, unsigned int *sseptr, \ const uint8_t *sec) { \ unsigned int sse; \ - int se = vpx_sub_pixel_avg_variance##wf##xh_##opt( \ + int se = aom_sub_pixel_avg_variance##wf##xh_##opt( \ src, src_stride, x_offset, y_offset, dst, dst_stride, sec, w, h, &sse, \ NULL, NULL); \ if (w > wf) { \ unsigned int sse2; \ - int se2 = vpx_sub_pixel_avg_variance##wf##xh_##opt( \ + int se2 = aom_sub_pixel_avg_variance##wf##xh_##opt( \ src + 16, src_stride, x_offset, y_offset, dst + 16, dst_stride, \ sec + 16, w, h, &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ if (w > wf * 2) { \ - se2 = vpx_sub_pixel_avg_variance##wf##xh_##opt( \ + se2 = aom_sub_pixel_avg_variance##wf##xh_##opt( \ src + 32, src_stride, x_offset, y_offset, dst + 32, dst_stride, \ sec + 32, w, h, &sse2, NULL, NULL); \ se += se2; \ sse += sse2; \ - se2 = vpx_sub_pixel_avg_variance##wf##xh_##opt( \ + se2 = aom_sub_pixel_avg_variance##wf##xh_##opt( \ src + 48, src_stride, x_offset, y_offset, dst + 48, dst_stride, \ sec + 48, w, h, &sse2, NULL, NULL); \ se += se2; \ diff --git a/aom_mem/vpx_mem.c b/aom_mem/aom_mem.c similarity index 82% rename from aom_mem/vpx_mem.c rename to aom_mem/aom_mem.c index e15c7c32dd3f797e5731f2dfe8407eb788efea35..68693527862bd6e86ebae4e2b795e314172a993c 100644 --- a/aom_mem/vpx_mem.c +++ b/aom_mem/aom_mem.c @@ -11,14 +11,14 @@ #define __VPX_MEM_C__ -#include "vpx_mem.h" +#include "aom_mem.h" #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "include/vpx_mem_intrnl.h" -#include "aom/vpx_integer.h" +#include "include/aom_mem_intrnl.h" +#include "aom/aom_integer.h" -void *vpx_memalign(size_t align, size_t size) { +void *aom_memalign(size_t align, size_t size) { void *addr, *x = NULL; addr = malloc(size + align - 1 + ADDRESS_STORAGE_SIZE); @@ -32,19 +32,19 @@ void *vpx_memalign(size_t align, size_t size) { return x; } -void *vpx_malloc(size_t size) { return vpx_memalign(DEFAULT_ALIGNMENT, size); } +void *aom_malloc(size_t size) { return aom_memalign(DEFAULT_ALIGNMENT, size); } -void *vpx_calloc(size_t num, size_t size) { +void *aom_calloc(size_t num, size_t size) { void *x; - x = vpx_memalign(DEFAULT_ALIGNMENT, num * size); + x = aom_memalign(DEFAULT_ALIGNMENT, num * size); if (x) memset(x, 0, num * size); return x; } -void *vpx_realloc(void *memblk, size_t size) { +void *aom_realloc(void *memblk, size_t size) { void *addr, *new_addr = NULL; int align = DEFAULT_ALIGNMENT; @@ -57,9 +57,9 @@ void *vpx_realloc(void *memblk, size_t size) { not a null pointer, the object pointed to is freed. */ if (!memblk) - new_addr = vpx_malloc(size); + new_addr = aom_malloc(size); else if (!size) - vpx_free(memblk); + aom_free(memblk); else { addr = (void *)(((size_t *)memblk)[-1]); memblk = NULL; @@ -80,7 +80,7 @@ void *vpx_realloc(void *memblk, size_t size) { return new_addr; } -void vpx_free(void *memblk) { +void aom_free(void *memblk) { if (memblk) { void *addr = (void *)(((size_t *)memblk)[-1]); free(addr); @@ -88,7 +88,7 @@ void vpx_free(void *memblk) { } #if CONFIG_VPX_HIGHBITDEPTH -void *vpx_memset16(void *dest, int val, size_t length) { +void *aom_memset16(void *dest, int val, size_t length) { size_t i; uint16_t *dest16 = (uint16_t *)dest; for (i = 0; i < length; i++) *dest16++ = val; diff --git a/aom_mem/vpx_mem.h b/aom_mem/aom_mem.h similarity index 76% rename from aom_mem/vpx_mem.h rename to aom_mem/aom_mem.h index 35cbfddad401c7e61b94f4d66e31de0b04747108..32744eb6d4db36e9062f46f04f61d3c13be41927 100644 --- a/aom_mem/vpx_mem.h +++ b/aom_mem/aom_mem.h @@ -12,7 +12,7 @@ #ifndef VPX_MEM_VPX_MEM_H_ #define VPX_MEM_VPX_MEM_H_ -#include "vpx_config.h" +#include "aom_config.h" #if defined(__uClinux__) #include <lddk.h> #endif @@ -24,14 +24,14 @@ extern "C" { #endif -void *vpx_memalign(size_t align, size_t size); -void *vpx_malloc(size_t size); -void *vpx_calloc(size_t num, size_t size); -void *vpx_realloc(void *memblk, size_t size); -void vpx_free(void *memblk); +void *aom_memalign(size_t align, size_t size); +void *aom_malloc(size_t size); +void *aom_calloc(size_t num, size_t size); +void *aom_realloc(void *memblk, size_t size); +void aom_free(void *memblk); #if CONFIG_VPX_HIGHBITDEPTH -void *vpx_memset16(void *dest, int val, size_t length); +void *aom_memset16(void *dest, int val, size_t length); #endif #include <string.h> diff --git a/aom_mem/aom_mem.mk b/aom_mem/aom_mem.mk new file mode 100644 index 0000000000000000000000000000000000000000..e9162c2842d8ee9038c51559468be280fc991ebf --- /dev/null +++ b/aom_mem/aom_mem.mk @@ -0,0 +1,4 @@ +MEM_SRCS-yes += aom_mem.mk +MEM_SRCS-yes += aom_mem.c +MEM_SRCS-yes += aom_mem.h +MEM_SRCS-yes += include/aom_mem_intrnl.h diff --git a/aom_mem/include/vpx_mem_intrnl.h b/aom_mem/include/aom_mem_intrnl.h similarity index 90% rename from aom_mem/include/vpx_mem_intrnl.h rename to aom_mem/include/aom_mem_intrnl.h index 5c120b89949e36e39fb4559cb7daf47ccc01f392..7dae6d93cb22edf54e401d3e1341612e2f46a289 100644 --- a/aom_mem/include/vpx_mem_intrnl.h +++ b/aom_mem/include/aom_mem_intrnl.h @@ -11,14 +11,14 @@ #ifndef VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_ #define VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_ -#include "./vpx_config.h" +#include "./aom_config.h" #define ADDRESS_STORAGE_SIZE sizeof(size_t) #ifndef DEFAULT_ALIGNMENT #if defined(VXWORKS) -/*default addr alignment to use in calls to vpx_* functions other than - vpx_memalign*/ +/*default addr alignment to use in calls to aom_* functions other than + aom_memalign*/ #define DEFAULT_ALIGNMENT 32 #else #define DEFAULT_ALIGNMENT (2 * sizeof(void *)) /* NOLINT */ diff --git a/aom_mem/vpx_mem.mk b/aom_mem/vpx_mem.mk deleted file mode 100644 index 7f275eabf927a2bbf47e05be6e8777e0215c6465..0000000000000000000000000000000000000000 --- a/aom_mem/vpx_mem.mk +++ /dev/null @@ -1,4 +0,0 @@ -MEM_SRCS-yes += vpx_mem.mk -MEM_SRCS-yes += vpx_mem.c -MEM_SRCS-yes += vpx_mem.h -MEM_SRCS-yes += include/vpx_mem_intrnl.h diff --git a/aom_ports/vpx_once.h b/aom_ports/aom_once.h similarity index 96% rename from aom_ports/vpx_once.h rename to aom_ports/aom_once.h index b58939daf5eae49caba2682906958ded5c246de5..f5cfa5075da33f31d1a2e0636b46fefa144b9f93 100644 --- a/aom_ports/vpx_once.h +++ b/aom_ports/aom_once.h @@ -12,7 +12,7 @@ #ifndef VPX_PORTS_VPX_ONCE_H_ #define VPX_PORTS_VPX_ONCE_H_ -#include "vpx_config.h" +#include "aom_config.h" /* Implement a function wrapper to guarantee initialization * thread-safety for library singletons. @@ -21,18 +21,18 @@ * used with one common argument per compilation unit. So * * file1.c: - * vpx_once(foo); + * aom_once(foo); * ... - * vpx_once(foo); + * aom_once(foo); * * file2.c: - * vpx_once(bar); + * aom_once(bar); * * will ensure foo() and bar() are each called only once, but in * * file1.c: - * vpx_once(foo); - * vpx_once(bar): + * aom_once(foo); + * aom_once(bar): * * bar() will never be called because the lock is used up * by the call to foo(). diff --git a/aom_ports/vpx_ports.mk b/aom_ports/aom_ports.mk similarity index 92% rename from aom_ports/vpx_ports.mk rename to aom_ports/aom_ports.mk index 36b14936dfe96d657cb7d001fcd7263f5ad2acca..4afbc9af7b19735a62bcadb52d58c91102603f39 100644 --- a/aom_ports/vpx_ports.mk +++ b/aom_ports/aom_ports.mk @@ -9,13 +9,13 @@ ## -PORTS_SRCS-yes += vpx_ports.mk +PORTS_SRCS-yes += aom_ports.mk PORTS_SRCS-yes += bitops.h PORTS_SRCS-yes += mem.h PORTS_SRCS-yes += msvc.h PORTS_SRCS-yes += system_state.h -PORTS_SRCS-yes += vpx_timer.h +PORTS_SRCS-yes += aom_timer.h ifeq ($(ARCH_X86)$(ARCH_X86_64),yes) PORTS_SRCS-yes += emms.asm diff --git a/aom_ports/vpx_timer.h b/aom_ports/aom_timer.h similarity index 82% rename from aom_ports/vpx_timer.h rename to aom_ports/aom_timer.h index af8971448c0446852a137f9f9b222a06a06d1be5..b1c9a504fc93639c6b7229d9009549a947460a5d 100644 --- a/aom_ports/vpx_timer.h +++ b/aom_ports/aom_timer.h @@ -12,9 +12,9 @@ #ifndef VPX_PORTS_VPX_TIMER_H_ #define VPX_PORTS_VPX_TIMER_H_ -#include "./vpx_config.h" +#include "./aom_config.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #if CONFIG_OS_SUPPORT @@ -46,7 +46,7 @@ #endif #endif -struct vpx_usec_timer { +struct aom_usec_timer { #if defined(_WIN32) LARGE_INTEGER begin, end; #else @@ -54,7 +54,7 @@ struct vpx_usec_timer { #endif }; -static INLINE void vpx_usec_timer_start(struct vpx_usec_timer *t) { +static INLINE void aom_usec_timer_start(struct aom_usec_timer *t) { #if defined(_WIN32) QueryPerformanceCounter(&t->begin); #else @@ -62,7 +62,7 @@ static INLINE void vpx_usec_timer_start(struct vpx_usec_timer *t) { #endif } -static INLINE void vpx_usec_timer_mark(struct vpx_usec_timer *t) { +static INLINE void aom_usec_timer_mark(struct aom_usec_timer *t) { #if defined(_WIN32) QueryPerformanceCounter(&t->end); #else @@ -70,7 +70,7 @@ static INLINE void vpx_usec_timer_mark(struct vpx_usec_timer *t) { #endif } -static INLINE int64_t vpx_usec_timer_elapsed(struct vpx_usec_timer *t) { +static INLINE int64_t aom_usec_timer_elapsed(struct aom_usec_timer *t) { #if defined(_WIN32) LARGE_INTEGER freq, diff; @@ -93,15 +93,15 @@ static INLINE int64_t vpx_usec_timer_elapsed(struct vpx_usec_timer *t) { #define timersub(a, b, result) #endif -struct vpx_usec_timer { +struct aom_usec_timer { void *dummy; }; -static INLINE void vpx_usec_timer_start(struct vpx_usec_timer *t) {} +static INLINE void aom_usec_timer_start(struct aom_usec_timer *t) {} -static INLINE void vpx_usec_timer_mark(struct vpx_usec_timer *t) {} +static INLINE void aom_usec_timer_mark(struct aom_usec_timer *t) {} -static INLINE int vpx_usec_timer_elapsed(struct vpx_usec_timer *t) { return 0; } +static INLINE int aom_usec_timer_elapsed(struct aom_usec_timer *t) { return 0; } #endif /* CONFIG_OS_SUPPORT */ diff --git a/aom_ports/arm.h b/aom_ports/arm.h index 5df58591cad26ad2c38aa339516eb4bf4b40ca97..ba8ffbc02b84971b43752838eab28c4d39e381d9 100644 --- a/aom_ports/arm.h +++ b/aom_ports/arm.h @@ -12,7 +12,7 @@ #ifndef VPX_PORTS_ARM_H_ #define VPX_PORTS_ARM_H_ #include <stdlib.h> -#include "vpx_config.h" +#include "aom_config.h" #ifdef __cplusplus extern "C" { diff --git a/aom_ports/arm_cpudetect.c b/aom_ports/arm_cpudetect.c index 5dc5540631a5c77e08cc404564bda429f183f48c..ae0571bf9c3820cf14345de8f063a5ebf5de13d8 100644 --- a/aom_ports/arm_cpudetect.c +++ b/aom_ports/arm_cpudetect.c @@ -12,7 +12,7 @@ #include <stdlib.h> #include <string.h> #include "aom_ports/arm.h" -#include "./vpx_config.h" +#include "./aom_config.h" #ifdef WINAPI_FAMILY #include <winapifamily.h> diff --git a/aom_ports/config.h b/aom_ports/config.h index 1c3c4678a9f7bb30999e19f57873548e4c0a0214..f9eb332e4b9c5ed659655e983c4caad848d2e2c6 100644 --- a/aom_ports/config.h +++ b/aom_ports/config.h @@ -12,6 +12,6 @@ #ifndef VPX_PORTS_CONFIG_H_ #define VPX_PORTS_CONFIG_H_ -#include "vpx_config.h" +#include "aom_config.h" #endif // VPX_PORTS_CONFIG_H_ diff --git a/aom_ports/emms.asm b/aom_ports/emms.asm index e26ec9a864879b855501e11c189e3ee69e3b6f34..547d582ab4f54d9acea3379d2ffa9209542cae6a 100644 --- a/aom_ports/emms.asm +++ b/aom_ports/emms.asm @@ -12,15 +12,15 @@ %include "aom_ports/x86_abi_support.asm" section .text -global sym(vpx_reset_mmx_state) PRIVATE -sym(vpx_reset_mmx_state): +global sym(aom_reset_mmx_state) PRIVATE +sym(aom_reset_mmx_state): emms ret %if LIBAOM_YASM_WIN64 -global sym(vpx_winx64_fldcw) PRIVATE -sym(vpx_winx64_fldcw): +global sym(aom_winx64_fldcw) PRIVATE +sym(aom_winx64_fldcw): sub rsp, 8 mov [rsp], rcx ; win x64 specific fldcw [rsp] @@ -28,8 +28,8 @@ sym(vpx_winx64_fldcw): ret -global sym(vpx_winx64_fstcw) PRIVATE -sym(vpx_winx64_fstcw): +global sym(aom_winx64_fstcw) PRIVATE +sym(aom_winx64_fstcw): sub rsp, 8 fstcw [rsp] mov rax, [rsp] diff --git a/aom_ports/mem.h b/aom_ports/mem.h index 3d3bf7229405bdac88295bc2d77d1e1393c441ea..08337a787113b1b0967ee0bccf76f82670251b81 100644 --- a/aom_ports/mem.h +++ b/aom_ports/mem.h @@ -12,8 +12,8 @@ #ifndef VPX_PORTS_MEM_H_ #define VPX_PORTS_MEM_H_ -#include "vpx_config.h" -#include "aom/vpx_integer.h" +#include "aom_config.h" +#include "aom/aom_integer.h" #if (defined(__GNUC__) && __GNUC__) || defined(__SUNPRO_C) #define DECLARE_ALIGNED(n, typ, val) typ val __attribute__((aligned(n))) diff --git a/aom_ports/mem_ops_aligned.h b/aom_ports/mem_ops_aligned.h index 44a48d9c5951a9254970a6f8b6482d68504b494b..2c35bddffefb01685a1a3f35f0801210baa2d3e8 100644 --- a/aom_ports/mem_ops_aligned.h +++ b/aom_ports/mem_ops_aligned.h @@ -12,7 +12,7 @@ #ifndef VPX_PORTS_MEM_OPS_ALIGNED_H_ #define VPX_PORTS_MEM_OPS_ALIGNED_H_ -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" /* \file * \brief Provides portable memory access primitives for operating on aligned @@ -91,7 +91,7 @@ *mem = (uint##sz##_t)raw; \ } -#include "vpx_config.h" +#include "aom_config.h" #if CONFIG_BIG_ENDIAN #define mem_get_be_aligned_generic(sz) mem_get_ne_aligned_generic(be, sz) #define mem_get_sbe_aligned_generic(sz) mem_get_sne_aligned_generic(be, sz) diff --git a/aom_ports/msvc.h b/aom_ports/msvc.h index b7c64f18261e61bda5cb7e696274d13ed4526760..132478bfdad48268ba870271f2138e22bf5de9c3 100644 --- a/aom_ports/msvc.h +++ b/aom_ports/msvc.h @@ -13,7 +13,7 @@ #define VPX_PORTS_MSVC_H_ #ifdef _MSC_VER -#include "./vpx_config.h" +#include "./aom_config.h" #if _MSC_VER < 1900 // VS2015 provides snprintf #define snprintf _snprintf diff --git a/aom_ports/system_state.h b/aom_ports/system_state.h index db8d77d708b14800513089d8eded5d3ca9ef3d87..0a277edd652ff47c30f57bd4e238598c9553bacf 100644 --- a/aom_ports/system_state.h +++ b/aom_ports/system_state.h @@ -12,12 +12,12 @@ #ifndef VPX_PORTS_SYSTEM_STATE_H_ #define VPX_PORTS_SYSTEM_STATE_H_ -#include "./vpx_config.h" +#include "./aom_config.h" #if ARCH_X86 || ARCH_X86_64 -void vpx_reset_mmx_state(void); -#define vpx_clear_system_state() vpx_reset_mmx_state() +void aom_reset_mmx_state(void); +#define aom_clear_system_state() aom_reset_mmx_state() #else -#define vpx_clear_system_state() +#define aom_clear_system_state() #endif // ARCH_X86 || ARCH_X86_64 #endif // VPX_PORTS_SYSTEM_STATE_H_ diff --git a/aom_ports/x86.h b/aom_ports/x86.h index 2d70ee8a9eacf2fd132399d9ca5f85f2e347d1a0..a088cdddc36fef264d2a24e175665a6430591f29 100644 --- a/aom_ports/x86.h +++ b/aom_ports/x86.h @@ -12,8 +12,8 @@ #ifndef VPX_PORTS_X86_H_ #define VPX_PORTS_X86_H_ #include <stdlib.h> -#include "vpx_config.h" -#include "aom/vpx_integer.h" +#include "aom_config.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { @@ -36,7 +36,7 @@ typedef enum { VPX_CPU_VIA, VPX_CPU_LAST -} vpx_cpu_t; +} aom_cpu_t; #if defined(__GNUC__) && __GNUC__ || defined(__ANDROID__) #if ARCH_X86_64 @@ -272,10 +272,10 @@ static unsigned short x87_get_control_word(void) { } #elif ARCH_X86_64 /* No fldcw intrinsics on Windows x64, punt to external asm */ -extern void vpx_winx64_fldcw(unsigned short mode); -extern unsigned short vpx_winx64_fstcw(void); -#define x87_set_control_word vpx_winx64_fldcw -#define x87_get_control_word vpx_winx64_fstcw +extern void aom_winx64_fldcw(unsigned short mode); +extern unsigned short aom_winx64_fstcw(void); +#define x87_set_control_word aom_winx64_fldcw +#define x87_get_control_word aom_winx64_fstcw #else static void x87_set_control_word(unsigned short mode) { __asm { fldcw mode } @@ -293,7 +293,7 @@ static INLINE unsigned int x87_set_double_precision(void) { return mode; } -extern void vpx_reset_mmx_state(void); +extern void aom_reset_mmx_state(void); #ifdef __cplusplus } // extern "C" diff --git a/aom_ports/x86_abi_support.asm b/aom_ports/x86_abi_support.asm index a2281a9b2d3b4e14f2e39dd6611c2b42f1837276..799cea51b13866a340fddb507b1a2513187d18b7 100644 --- a/aom_ports/x86_abi_support.asm +++ b/aom_ports/x86_abi_support.asm @@ -9,7 +9,7 @@ ; -%include "vpx_config.asm" +%include "aom_config.asm" ; 32/64 bit compatibility macros ; diff --git a/aom_scale/vpx_scale.h b/aom_scale/aom_scale.h similarity index 93% rename from aom_scale/vpx_scale.h rename to aom_scale/aom_scale.h index 354583fbff7a747207f5230fe03d69a228da0013..d0c6cd8fa359fc86a2ad251bc2255e866e63f5c2 100644 --- a/aom_scale/vpx_scale.h +++ b/aom_scale/aom_scale.h @@ -14,7 +14,7 @@ #include "aom_scale/yv12config.h" -extern void vpx_scale_frame(YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst, +extern void aom_scale_frame(YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst, unsigned char *temp_area, unsigned char temp_height, unsigned int hscale, unsigned int hratio, unsigned int vscale, unsigned int vratio, diff --git a/aom_scale/vpx_scale.mk b/aom_scale/aom_scale.mk similarity index 51% rename from aom_scale/vpx_scale.mk rename to aom_scale/aom_scale.mk index 2ae0d847f2bbbd244353d37a04e1eaaffcdcffed..e3a68cfcf02e76760b7565cc2efcd9059a480cbc 100644 --- a/aom_scale/vpx_scale.mk +++ b/aom_scale/aom_scale.mk @@ -1,16 +1,16 @@ -SCALE_SRCS-yes += vpx_scale.mk +SCALE_SRCS-yes += aom_scale.mk SCALE_SRCS-yes += yv12config.h -SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += vpx_scale.h -SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/vpx_scale.c +SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += aom_scale.h +SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/aom_scale.c SCALE_SRCS-yes += generic/yv12config.c SCALE_SRCS-yes += generic/yv12extend.c SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/gen_scalers.c -SCALE_SRCS-yes += vpx_scale_rtcd.c -SCALE_SRCS-yes += vpx_scale_rtcd.pl +SCALE_SRCS-yes += aom_scale_rtcd.c +SCALE_SRCS-yes += aom_scale_rtcd.pl #mips(dspr2) SCALE_SRCS-$(HAVE_DSPR2) += mips/dspr2/yv12extend_dspr2.c SCALE_SRCS-no += $(SCALE_SRCS_REMOVE-yes) -$(eval $(call rtcd_h_template,vpx_scale_rtcd,aom_scale/vpx_scale_rtcd.pl)) +$(eval $(call rtcd_h_template,aom_scale_rtcd,aom_scale/aom_scale_rtcd.pl)) diff --git a/aom_scale/vpx_scale_rtcd.c b/aom_scale/aom_scale_rtcd.c similarity index 79% rename from aom_scale/vpx_scale_rtcd.c rename to aom_scale/aom_scale_rtcd.c index 60f55b1ddba25d2fc9de6c100dff6eec885ac69e..dec23735bfd88bdda6a1abe4f0a35aba985a78bc 100644 --- a/aom_scale/vpx_scale_rtcd.c +++ b/aom_scale/aom_scale_rtcd.c @@ -8,9 +8,9 @@ * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" +#include "./aom_config.h" #define RTCD_C -#include "./vpx_scale_rtcd.h" -#include "aom_ports/vpx_once.h" +#include "./aom_scale_rtcd.h" +#include "aom_ports/aom_once.h" -void vpx_scale_rtcd() { once(setup_rtcd_internal); } +void aom_scale_rtcd() { once(setup_rtcd_internal); } diff --git a/aom_scale/aom_scale_rtcd.pl b/aom_scale/aom_scale_rtcd.pl new file mode 100644 index 0000000000000000000000000000000000000000..856abcd8e9da7430ee6e0c85ca0231bd4c280482 --- /dev/null +++ b/aom_scale/aom_scale_rtcd.pl @@ -0,0 +1,32 @@ +sub aom_scale_forward_decls() { +print <<EOF +struct yv12_buffer_config; +EOF +} +forward_decls qw/aom_scale_forward_decls/; + +# Scaler functions +if (aom_config("CONFIG_SPATIAL_RESAMPLING") eq "yes") { + add_proto qw/void aom_horizontal_line_5_4_scale/, "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"; + add_proto qw/void aom_vertical_band_5_4_scale/, "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"; + add_proto qw/void aom_horizontal_line_5_3_scale/, "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"; + add_proto qw/void aom_vertical_band_5_3_scale/, "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"; + add_proto qw/void aom_horizontal_line_2_1_scale/, "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"; + add_proto qw/void aom_vertical_band_2_1_scale/, "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"; + add_proto qw/void aom_vertical_band_2_1_scale_i/, "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"; +} + +add_proto qw/void aom_yv12_extend_frame_borders/, "struct yv12_buffer_config *ybf"; + +add_proto qw/void aom_yv12_copy_frame/, "const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"; + +add_proto qw/void aom_yv12_copy_y/, "const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"; + +if (aom_config("CONFIG_VP10") eq "yes") { + add_proto qw/void aom_extend_frame_borders/, "struct yv12_buffer_config *ybf"; + specialize qw/aom_extend_frame_borders dspr2/; + + add_proto qw/void aom_extend_frame_inner_borders/, "struct yv12_buffer_config *ybf"; + specialize qw/aom_extend_frame_inner_borders dspr2/; +} +1; diff --git a/aom_scale/generic/vpx_scale.c b/aom_scale/generic/aom_scale.c similarity index 97% rename from aom_scale/generic/vpx_scale.c rename to aom_scale/generic/aom_scale.c index 71650e19f2c94b43ae366b567b563c7bf2415240..e1b6d8e50f1c20bb194aa84082e9b24f4d4e58f3 100644 --- a/aom_scale/generic/vpx_scale.c +++ b/aom_scale/generic/aom_scale.c @@ -20,9 +20,9 @@ /**************************************************************************** * Header Files ****************************************************************************/ -#include "./vpx_scale_rtcd.h" -#include "aom_mem/vpx_mem.h" -#include "aom_scale/vpx_scale.h" +#include "./aom_scale_rtcd.h" +#include "aom_mem/aom_mem.h" +#include "aom_scale/aom_scale.h" #include "aom_scale/yv12config.h" typedef struct { @@ -278,15 +278,15 @@ static void Scale2D( switch (hratio * 10 / hscale) { case 8: /* 4-5 Scale in Width direction */ - horiz_line_scale = vpx_horizontal_line_5_4_scale; + horiz_line_scale = aom_horizontal_line_5_4_scale; break; case 6: /* 3-5 Scale in Width direction */ - horiz_line_scale = vpx_horizontal_line_5_3_scale; + horiz_line_scale = aom_horizontal_line_5_3_scale; break; case 5: /* 1-2 Scale in Width direction */ - horiz_line_scale = vpx_horizontal_line_2_1_scale; + horiz_line_scale = aom_horizontal_line_2_1_scale; break; default: /* The ratio is not acceptable now */ @@ -298,13 +298,13 @@ static void Scale2D( switch (vratio * 10 / vscale) { case 8: /* 4-5 Scale in vertical direction */ - vert_band_scale = vpx_vertical_band_5_4_scale; + vert_band_scale = aom_vertical_band_5_4_scale; source_band_height = 5; dest_band_height = 4; break; case 6: /* 3-5 Scale in vertical direction */ - vert_band_scale = vpx_vertical_band_5_3_scale; + vert_band_scale = aom_vertical_band_5_3_scale; source_band_height = 5; dest_band_height = 3; break; @@ -313,11 +313,11 @@ static void Scale2D( if (interlaced) { /* if the content is interlaced, point sampling is used */ - vert_band_scale = vpx_vertical_band_2_1_scale; + vert_band_scale = aom_vertical_band_2_1_scale; } else { interpolation = 1; /* if the content is progressive, interplo */ - vert_band_scale = vpx_vertical_band_2_1_scale_i; + vert_band_scale = aom_vertical_band_2_1_scale_i; } source_band_height = 2; @@ -446,7 +446,7 @@ static void Scale2D( /**************************************************************************** * - * ROUTINE : vpx_scale_frame + * ROUTINE : aom_scale_frame * * INPUTS : YV12_BUFFER_CONFIG *src : Pointer to frame to be * scaled. @@ -474,7 +474,7 @@ static void Scale2D( * caching. * ****************************************************************************/ -void vpx_scale_frame(YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst, +void aom_scale_frame(YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst, unsigned char *temp_area, unsigned char temp_height, unsigned int hscale, unsigned int hratio, unsigned int vscale, unsigned int vratio, diff --git a/aom_scale/generic/gen_scalers.c b/aom_scale/generic/gen_scalers.c index 148ecad4ebb5fa52f7331ccf3f787515412f4aea..57c464dc1c579721992f3f65ba0257bf0d3d21e1 100644 --- a/aom_scale/generic/gen_scalers.c +++ b/aom_scale/generic/gen_scalers.c @@ -9,9 +9,9 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_scale_rtcd.h" -#include "aom_scale/vpx_scale.h" -#include "aom_mem/vpx_mem.h" +#include "./aom_scale_rtcd.h" +#include "aom_scale/aom_scale.h" +#include "aom_mem/aom_mem.h" /**************************************************************************** * Imports ****************************************************************************/ @@ -35,7 +35,7 @@ * SPECIAL NOTES : None. * ****************************************************************************/ -void vpx_horizontal_line_5_4_scale_c(const unsigned char *source, +void aom_horizontal_line_5_4_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) { @@ -63,7 +63,7 @@ void vpx_horizontal_line_5_4_scale_c(const unsigned char *source, } } -void vpx_vertical_band_5_4_scale_c(unsigned char *source, +void aom_vertical_band_5_4_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { @@ -91,7 +91,7 @@ void vpx_vertical_band_5_4_scale_c(unsigned char *source, /*7*************************************************************************** * - * ROUTINE : vpx_horizontal_line_3_5_scale_c + * ROUTINE : aom_horizontal_line_3_5_scale_c * * INPUTS : const unsigned char *source : Pointer to source data. * unsigned int source_width : Stride of source. @@ -110,7 +110,7 @@ void vpx_vertical_band_5_4_scale_c(unsigned char *source, * * ****************************************************************************/ -void vpx_horizontal_line_5_3_scale_c(const unsigned char *source, +void aom_horizontal_line_5_3_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) { @@ -137,7 +137,7 @@ void vpx_horizontal_line_5_3_scale_c(const unsigned char *source, } } -void vpx_vertical_band_5_3_scale_c(unsigned char *source, +void aom_vertical_band_5_3_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { @@ -164,7 +164,7 @@ void vpx_vertical_band_5_3_scale_c(unsigned char *source, /**************************************************************************** * - * ROUTINE : vpx_horizontal_line_1_2_scale_c + * ROUTINE : aom_horizontal_line_1_2_scale_c * * INPUTS : const unsigned char *source : Pointer to source data. * unsigned int source_width : Stride of source. @@ -182,7 +182,7 @@ void vpx_vertical_band_5_3_scale_c(unsigned char *source, * SPECIAL NOTES : None. * ****************************************************************************/ -void vpx_horizontal_line_2_1_scale_c(const unsigned char *source, +void aom_horizontal_line_2_1_scale_c(const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width) { @@ -201,7 +201,7 @@ void vpx_horizontal_line_2_1_scale_c(const unsigned char *source, } } -void vpx_vertical_band_2_1_scale_c(unsigned char *source, +void aom_vertical_band_2_1_scale_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width) { @@ -210,7 +210,7 @@ void vpx_vertical_band_2_1_scale_c(unsigned char *source, memcpy(dest, source, dest_width); } -void vpx_vertical_band_2_1_scale_i_c(unsigned char *source, +void aom_vertical_band_2_1_scale_i_c(unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, diff --git a/aom_scale/generic/yv12config.c b/aom_scale/generic/yv12config.c index 14e994236671c5b1c1740ab0d74ee045e2fa1c42..b7897227f9bde3ca9d1e2cab8f35731f2de26fa2 100644 --- a/aom_scale/generic/yv12config.c +++ b/aom_scale/generic/yv12config.c @@ -12,7 +12,7 @@ #include <assert.h> #include "aom_scale/yv12config.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" /**************************************************************************** @@ -25,12 +25,12 @@ #define yv12_align_addr(addr, align) \ (void *)(((size_t)(addr) + ((align)-1)) & (size_t) - (align)) -int vpx_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf) { +int aom_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf) { if (ybf) { // If libaom is using frame buffer callbacks then buffer_alloc_sz must // not be set. if (ybf->buffer_alloc_sz > 0) { - vpx_free(ybf->buffer_alloc); + aom_free(ybf->buffer_alloc); } /* buffer_alloc isn't accessed by most functions. Rather y_buffer, @@ -44,7 +44,7 @@ int vpx_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf) { return 0; } -int vpx_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, +int aom_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int border) { if (ybf) { int aligned_width = (width + 15) & ~15; @@ -60,7 +60,7 @@ int vpx_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, const int frame_size = yplane_size + 2 * uvplane_size; if (!ybf->buffer_alloc) { - ybf->buffer_alloc = (uint8_t *)vpx_memalign(32, frame_size); + ybf->buffer_alloc = (uint8_t *)aom_memalign(32, frame_size); ybf->buffer_alloc_sz = frame_size; } @@ -70,7 +70,7 @@ int vpx_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, * of 32. The border restriction is required to get 16-byte alignment of * the start of the chroma rows without introducing an arbitrary gap * between planes, which would break the semantics of things like - * vpx_img_set_rect(). */ + * aom_img_set_rect(). */ if (border & 0x1f) return -3; ybf->y_crop_width = width; @@ -105,22 +105,22 @@ int vpx_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, return -2; } -int vpx_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, +int aom_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int border) { if (ybf) { - vpx_yv12_de_alloc_frame_buffer(ybf); - return vpx_yv12_realloc_frame_buffer(ybf, width, height, border); + aom_yv12_de_alloc_frame_buffer(ybf); + return aom_yv12_realloc_frame_buffer(ybf, width, height, border); } return -2; } #if CONFIG_VP10 -// TODO(jkoleszar): Maybe replace this with struct vpx_image +// TODO(jkoleszar): Maybe replace this with struct aom_image -int vpx_free_frame_buffer(YV12_BUFFER_CONFIG *ybf) { +int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf) { if (ybf) { if (ybf->buffer_alloc_sz > 0) { - vpx_free(ybf->buffer_alloc); + aom_free(ybf->buffer_alloc); } /* buffer_alloc isn't accessed by most functions. Rather y_buffer, @@ -134,16 +134,16 @@ int vpx_free_frame_buffer(YV12_BUFFER_CONFIG *ybf) { return 0; } -int vpx_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, +int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int ss_x, int ss_y, #if CONFIG_VPX_HIGHBITDEPTH int use_highbitdepth, #endif int border, int byte_alignment, - vpx_codec_frame_buffer_t *fb, - vpx_get_frame_buffer_cb_fn_t cb, void *cb_priv) { + aom_codec_frame_buffer_t *fb, + aom_get_frame_buffer_cb_fn_t cb, void *cb_priv) { if (ybf) { - const int vpx_byte_align = (byte_alignment == 0) ? 1 : byte_alignment; + const int aom_byte_align = (byte_alignment == 0) ? 1 : byte_alignment; const int aligned_width = (width + 7) & ~7; const int aligned_height = (height + 7) & ~7; const int y_stride = ((aligned_width + 2 * border) + 31) & ~31; @@ -210,12 +210,12 @@ int vpx_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, #endif } else if (frame_size > (size_t)ybf->buffer_alloc_sz) { // Allocation to hold larger frame, or first allocation. - vpx_free(ybf->buffer_alloc); + aom_free(ybf->buffer_alloc); ybf->buffer_alloc = NULL; if (frame_size != (size_t)frame_size) return -1; - ybf->buffer_alloc = (uint8_t *)vpx_memalign(32, (size_t)frame_size); + ybf->buffer_alloc = (uint8_t *)aom_memalign(32, (size_t)frame_size); if (!ybf->buffer_alloc) return -1; ybf->buffer_alloc_sz = (int)frame_size; @@ -230,7 +230,7 @@ int vpx_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, * of 32. The border restriction is required to get 16-byte alignment of * the start of the chroma rows without introducing an arbitrary gap * between planes, which would break the semantics of things like - * vpx_img_set_rect(). */ + * aom_img_set_rect(). */ if (border & 0x1f) return -3; ybf->y_crop_width = width; @@ -262,14 +262,14 @@ int vpx_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, #endif // CONFIG_VPX_HIGHBITDEPTH ybf->y_buffer = (uint8_t *)yv12_align_addr( - buf + (border * y_stride) + border, vpx_byte_align); + buf + (border * y_stride) + border, aom_byte_align); ybf->u_buffer = (uint8_t *)yv12_align_addr( buf + yplane_size + (uv_border_h * uv_stride) + uv_border_w, - vpx_byte_align); + aom_byte_align); ybf->v_buffer = (uint8_t *)yv12_align_addr(buf + yplane_size + uvplane_size + (uv_border_h * uv_stride) + uv_border_w, - vpx_byte_align); + aom_byte_align); #if CONFIG_ALPHA ybf->alpha_width = alpha_width; @@ -278,7 +278,7 @@ int vpx_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, ybf->alpha_buffer = (uint8_t *)yv12_align_addr( buf + yplane_size + 2 * uvplane_size + (alpha_border_h * alpha_stride) + alpha_border_w, - vpx_byte_align); + aom_byte_align); #endif ybf->corrupted = 0; /* assume not corrupted by errors */ return 0; @@ -286,15 +286,15 @@ int vpx_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, return -2; } -int vpx_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, +int aom_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int ss_x, int ss_y, #if CONFIG_VPX_HIGHBITDEPTH int use_highbitdepth, #endif int border, int byte_alignment) { if (ybf) { - vpx_free_frame_buffer(ybf); - return vpx_realloc_frame_buffer(ybf, width, height, ss_x, ss_y, + aom_free_frame_buffer(ybf); + return aom_realloc_frame_buffer(ybf, width, height, ss_x, ss_y, #if CONFIG_VPX_HIGHBITDEPTH use_highbitdepth, #endif diff --git a/aom_scale/generic/yv12extend.c b/aom_scale/generic/yv12extend.c index 73c88e69a27925060484e72f619784bda5f6c469..2dacbed901e8c2442d2aac67ce94d097da2123c2 100644 --- a/aom_scale/generic/yv12extend.c +++ b/aom_scale/generic/yv12extend.c @@ -10,10 +10,10 @@ */ #include <assert.h> -#include "./vpx_config.h" -#include "./vpx_scale_rtcd.h" -#include "aom/vpx_integer.h" -#include "aom_mem/vpx_mem.h" +#include "./aom_config.h" +#include "./aom_scale_rtcd.h" +#include "aom/aom_integer.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "aom_scale/yv12config.h" #if CONFIG_VPX_HIGHBITDEPTH @@ -75,8 +75,8 @@ static void extend_plane_high(uint8_t *const src8, int src_stride, int width, uint16_t *dst_ptr2 = src + width; for (i = 0; i < height; ++i) { - vpx_memset16(dst_ptr1, src_ptr1[0], extend_left); - vpx_memset16(dst_ptr2, src_ptr2[0], extend_right); + aom_memset16(dst_ptr1, src_ptr1[0], extend_left); + aom_memset16(dst_ptr2, src_ptr2[0], extend_right); src_ptr1 += src_stride; src_ptr2 += src_stride; dst_ptr1 += src_stride; @@ -103,7 +103,7 @@ static void extend_plane_high(uint8_t *const src8, int src_stride, int width, } #endif -void vpx_yv12_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf) { +void aom_yv12_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf) { const int uv_border = ybf->border / 2; assert(ybf->border % 2 == 0); @@ -186,11 +186,11 @@ static void extend_frame(YV12_BUFFER_CONFIG *const ybf, int ext_size) { extend_plane(ybf->v_buffer, ybf->uv_stride, c_w, c_h, c_et, c_el, c_eb, c_er); } -void vpx_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf) { +void aom_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf) { extend_frame(ybf, ybf->border); } -void vpx_extend_frame_inner_borders_c(YV12_BUFFER_CONFIG *ybf) { +void aom_extend_frame_inner_borders_c(YV12_BUFFER_CONFIG *ybf) { const int inner_bw = (ybf->border > VPXINNERBORDERINPIXELS) ? VPXINNERBORDERINPIXELS : ybf->border; @@ -209,7 +209,7 @@ void memcpy_short_addr(uint8_t *dst8, const uint8_t *src8, int num) { // Copies the source image into the destination image and updates the // destination's UMV borders. // Note: The frames are assumed to be identical in size. -void vpx_yv12_copy_frame_c(const YV12_BUFFER_CONFIG *src_ybc, +void aom_yv12_copy_frame_c(const YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc) { int row; const uint8_t *src = src_ybc->y_buffer; @@ -250,7 +250,7 @@ void vpx_yv12_copy_frame_c(const YV12_BUFFER_CONFIG *src_ybc, dst += dst_ybc->uv_stride; } - vpx_yv12_extend_frame_borders_c(dst_ybc); + aom_yv12_extend_frame_borders_c(dst_ybc); return; } else { assert(!(dst_ybc->flags & YV12_FLAG_HIGHBITDEPTH)); @@ -281,10 +281,10 @@ void vpx_yv12_copy_frame_c(const YV12_BUFFER_CONFIG *src_ybc, dst += dst_ybc->uv_stride; } - vpx_yv12_extend_frame_borders_c(dst_ybc); + aom_yv12_extend_frame_borders_c(dst_ybc); } -void vpx_yv12_copy_y_c(const YV12_BUFFER_CONFIG *src_ybc, +void aom_yv12_copy_y_c(const YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc) { int row; const uint8_t *src = src_ybc->y_buffer; diff --git a/aom_scale/mips/dspr2/yv12extend_dspr2.c b/aom_scale/mips/dspr2/yv12extend_dspr2.c index 1b0fafd58138aecd2a16e48d6c214e42a04d7d98..7e0ce141121ece4dd8de5c8bce24fceccefd53c7 100644 --- a/aom_scale/mips/dspr2/yv12extend_dspr2.c +++ b/aom_scale/mips/dspr2/yv12extend_dspr2.c @@ -11,10 +11,10 @@ #include <assert.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_scale/yv12config.h" -#include "aom_mem/vpx_mem.h" -#include "aom_scale/vpx_scale.h" +#include "aom_mem/aom_mem.h" +#include "aom_scale/aom_scale.h" #if HAVE_DSPR2 static void extend_plane(uint8_t *const src, int src_stride, int width, @@ -126,11 +126,11 @@ static void extend_frame(YV12_BUFFER_CONFIG *const ybf, int ext_size) { extend_plane(ybf->v_buffer, ybf->uv_stride, c_w, c_h, c_et, c_el, c_eb, c_er); } -void vpx_extend_frame_borders_dspr2(YV12_BUFFER_CONFIG *ybf) { +void aom_extend_frame_borders_dspr2(YV12_BUFFER_CONFIG *ybf) { extend_frame(ybf, ybf->border); } -void vpx_extend_frame_inner_borders_dspr2(YV12_BUFFER_CONFIG *ybf) { +void aom_extend_frame_inner_borders_dspr2(YV12_BUFFER_CONFIG *ybf) { const int inner_bw = (ybf->border > VPXINNERBORDERINPIXELS) ? VPXINNERBORDERINPIXELS : ybf->border; diff --git a/aom_scale/vpx_scale_rtcd.pl b/aom_scale/vpx_scale_rtcd.pl deleted file mode 100644 index f46157283f4d54355d5113a047657e1dc1d70952..0000000000000000000000000000000000000000 --- a/aom_scale/vpx_scale_rtcd.pl +++ /dev/null @@ -1,32 +0,0 @@ -sub vpx_scale_forward_decls() { -print <<EOF -struct yv12_buffer_config; -EOF -} -forward_decls qw/vpx_scale_forward_decls/; - -# Scaler functions -if (vpx_config("CONFIG_SPATIAL_RESAMPLING") eq "yes") { - add_proto qw/void vpx_horizontal_line_5_4_scale/, "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"; - add_proto qw/void vpx_vertical_band_5_4_scale/, "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"; - add_proto qw/void vpx_horizontal_line_5_3_scale/, "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"; - add_proto qw/void vpx_vertical_band_5_3_scale/, "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"; - add_proto qw/void vpx_horizontal_line_2_1_scale/, "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"; - add_proto qw/void vpx_vertical_band_2_1_scale/, "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"; - add_proto qw/void vpx_vertical_band_2_1_scale_i/, "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"; -} - -add_proto qw/void vpx_yv12_extend_frame_borders/, "struct yv12_buffer_config *ybf"; - -add_proto qw/void vpx_yv12_copy_frame/, "const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"; - -add_proto qw/void vpx_yv12_copy_y/, "const struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"; - -if (vpx_config("CONFIG_VP10") eq "yes") { - add_proto qw/void vpx_extend_frame_borders/, "struct yv12_buffer_config *ybf"; - specialize qw/vpx_extend_frame_borders dspr2/; - - add_proto qw/void vpx_extend_frame_inner_borders/, "struct yv12_buffer_config *ybf"; - specialize qw/vpx_extend_frame_inner_borders dspr2/; -} -1; diff --git a/aom_scale/yv12config.h b/aom_scale/yv12config.h index faf7f5888f7ab33ebcc56997815e4aa8cd07828e..3b0e044b7fe1567fc614b74310c49dd06a7e8da3 100644 --- a/aom_scale/yv12config.h +++ b/aom_scale/yv12config.h @@ -16,10 +16,10 @@ extern "C" { #endif -#include "./vpx_config.h" -#include "aom/vpx_codec.h" -#include "aom/vpx_frame_buffer.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_codec.h" +#include "aom/aom_frame_buffer.h" +#include "aom/aom_integer.h" #define VP8BORDERINPIXELS 32 #define VPXINNERBORDERINPIXELS 96 @@ -56,8 +56,8 @@ typedef struct yv12_buffer_config { int subsampling_x; int subsampling_y; unsigned int bit_depth; - vpx_color_space_t color_space; - vpx_color_range_t color_range; + aom_color_space_t color_space; + aom_color_range_t color_range; int render_width; int render_height; @@ -67,13 +67,13 @@ typedef struct yv12_buffer_config { #define YV12_FLAG_HIGHBITDEPTH 8 -int vpx_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, +int aom_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int border); -int vpx_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, +int aom_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int border); -int vpx_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf); +int aom_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf); -int vpx_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, +int aom_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int ss_x, int ss_y, #if CONFIG_VPX_HIGHBITDEPTH int use_highbitdepth, @@ -87,15 +87,15 @@ int vpx_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, // to decode the current frame. If cb is NULL, libaom will allocate memory // internally to decode the current frame. Returns 0 on success. Returns < 0 // on failure. -int vpx_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, +int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int ss_x, int ss_y, #if CONFIG_VPX_HIGHBITDEPTH int use_highbitdepth, #endif int border, int byte_alignment, - vpx_codec_frame_buffer_t *fb, - vpx_get_frame_buffer_cb_fn_t cb, void *cb_priv); -int vpx_free_frame_buffer(YV12_BUFFER_CONFIG *ybf); + aom_codec_frame_buffer_t *fb, + aom_get_frame_buffer_cb_fn_t cb, void *cb_priv); +int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf); #ifdef __cplusplus } diff --git a/aom_util/vpx_thread.c b/aom_util/aom_thread.c similarity index 94% rename from aom_util/vpx_thread.c rename to aom_util/aom_thread.c index b9f04a3753d84d39d8d5ea74ef08d0b0f367d736..e93f1683cbba6fffbe7fa01c16bc8d81f5fdca22 100644 --- a/aom_util/vpx_thread.c +++ b/aom_util/aom_thread.c @@ -17,8 +17,8 @@ #include <assert.h> #include <string.h> // for memset() -#include "./vpx_thread.h" -#include "aom_mem/vpx_mem.h" +#include "./aom_thread.h" +#include "aom_mem/aom_mem.h" #if CONFIG_MULTITHREAD @@ -97,7 +97,7 @@ static int reset(VPxWorker *const worker) { worker->had_error = 0; if (worker->status_ < OK) { #if CONFIG_MULTITHREAD - worker->impl_ = (VPxWorkerImpl *)vpx_calloc(1, sizeof(*worker->impl_)); + worker->impl_ = (VPxWorkerImpl *)aom_calloc(1, sizeof(*worker->impl_)); if (worker->impl_ == NULL) { return 0; } @@ -116,7 +116,7 @@ static int reset(VPxWorker *const worker) { pthread_mutex_destroy(&worker->impl_->mutex_); pthread_cond_destroy(&worker->impl_->condition_); Error: - vpx_free(worker->impl_); + aom_free(worker->impl_); worker->impl_ = NULL; return 0; } @@ -151,7 +151,7 @@ static void end(VPxWorker *const worker) { pthread_join(worker->impl_->thread_, NULL); pthread_mutex_destroy(&worker->impl_->mutex_); pthread_cond_destroy(&worker->impl_->condition_); - vpx_free(worker->impl_); + aom_free(worker->impl_); worker->impl_ = NULL; } #else @@ -166,7 +166,7 @@ static void end(VPxWorker *const worker) { static VPxWorkerInterface g_worker_interface = { init, reset, sync, launch, execute, end }; -int vpx_set_worker_interface(const VPxWorkerInterface *const winterface) { +int aom_set_worker_interface(const VPxWorkerInterface *const winterface) { if (winterface == NULL || winterface->init == NULL || winterface->reset == NULL || winterface->sync == NULL || winterface->launch == NULL || winterface->execute == NULL || @@ -177,7 +177,7 @@ int vpx_set_worker_interface(const VPxWorkerInterface *const winterface) { return 1; } -const VPxWorkerInterface *vpx_get_worker_interface(void) { +const VPxWorkerInterface *aom_get_worker_interface(void) { return &g_worker_interface; } diff --git a/aom_util/vpx_thread.h b/aom_util/aom_thread.h similarity index 98% rename from aom_util/vpx_thread.h rename to aom_util/aom_thread.h index 9577bcd53d72ae09115f037385bf5286de32e5ed..6c9752c70f6f5695fd5087d4e9f15d88389aa54b 100644 --- a/aom_util/vpx_thread.h +++ b/aom_util/aom_thread.h @@ -18,7 +18,7 @@ #ifndef VPX_THREAD_H_ #define VPX_THREAD_H_ -#include "./vpx_config.h" +#include "./aom_config.h" #ifdef __cplusplus extern "C" { @@ -207,10 +207,10 @@ typedef struct { // decoding takes place. The contents of the interface struct are copied, it // is safe to free the corresponding memory after this call. This function is // not thread-safe. Return false in case of invalid pointer or methods. -int vpx_set_worker_interface(const VPxWorkerInterface *const winterface); +int aom_set_worker_interface(const VPxWorkerInterface *const winterface); // Retrieve the currently set thread worker interface. -const VPxWorkerInterface *vpx_get_worker_interface(void); +const VPxWorkerInterface *aom_get_worker_interface(void); //------------------------------------------------------------------------------ diff --git a/aom_util/vpx_util.mk b/aom_util/aom_util.mk similarity index 83% rename from aom_util/vpx_util.mk rename to aom_util/aom_util.mk index c0ef8d3362917dd193c97a7e649f874d2e9f0c3f..310fef013c43dcd2d2c70928832fbc830796bcec 100644 --- a/aom_util/vpx_util.mk +++ b/aom_util/aom_util.mk @@ -8,7 +8,7 @@ ## be found in the AUTHORS file in the root of the source tree. ## -UTIL_SRCS-yes += vpx_util.mk -UTIL_SRCS-yes += vpx_thread.c -UTIL_SRCS-yes += vpx_thread.h +UTIL_SRCS-yes += aom_util.mk +UTIL_SRCS-yes += aom_thread.c +UTIL_SRCS-yes += aom_thread.h UTIL_SRCS-yes += endian_inl.h diff --git a/aom_util/endian_inl.h b/aom_util/endian_inl.h index 88f7975bdfebcefc2a306fba89348e1ce5a19d6d..fcee5ddd6550bbdd334317d30641353231f505d6 100644 --- a/aom_util/endian_inl.h +++ b/aom_util/endian_inl.h @@ -15,8 +15,8 @@ #define VPX_UTIL_ENDIAN_INL_H_ #include <stdlib.h> -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" #if defined(__GNUC__) #define LOCAL_GCC_VERSION ((__GNUC__ << 8) | __GNUC_MINOR__) diff --git a/vpxdec.c b/aomdec.c similarity index 86% rename from vpxdec.c rename to aomdec.c index c0f0d3938cf7a3edb44988f40d188b354f5ed6b7..282418997861d0a2aaa05c988bd52cc09a6bd7b4 100644 --- a/vpxdec.c +++ b/aomdec.c @@ -16,7 +16,7 @@ #include <string.h> #include <limits.h> -#include "./vpx_config.h" +#include "./aom_config.h" #if CONFIG_LIBYUV #include "third_party/libyuv/include/libyuv/scale.h" @@ -25,9 +25,9 @@ #include "./args.h" #include "./ivfdec.h" -#include "aom/vpx_decoder.h" +#include "aom/aom_decoder.h" #include "aom_ports/mem_ops.h" -#include "aom_ports/vpx_timer.h" +#include "aom_ports/aom_timer.h" #if CONFIG_VP10_DECODER #include "aom/vp8dx.h" @@ -44,7 +44,7 @@ static const char *exec_name; struct VpxDecInputContext { - struct VpxInputContext *vpx_input_ctx; + struct VpxInputContext *aom_input_ctx; struct WebmInputContext *webm_ctx; }; @@ -108,7 +108,7 @@ static const arg_def_t *all_args[] = { /* clang-format on */ #if CONFIG_LIBYUV -static INLINE int libyuv_scale(vpx_image_t *src, vpx_image_t *dst, +static INLINE int libyuv_scale(aom_image_t *src, aom_image_t *dst, FilterModeEnum mode) { #if CONFIG_VPX_HIGHBITDEPTH if (src->fmt == VPX_IMG_FMT_I42016) { @@ -159,10 +159,10 @@ void usage_exit(void) { "not specified, the output will be\n directed to stdout.\n"); fprintf(stderr, "\nIncluded decoders:\n\n"); - for (i = 0; i < get_vpx_decoder_count(); ++i) { - const VpxInterface *const decoder = get_vpx_decoder_by_index(i); + for (i = 0; i < get_aom_decoder_count(); ++i) { + const VpxInterface *const decoder = get_aom_decoder_by_index(i); fprintf(stderr, " %-6s - %s\n", decoder->name, - vpx_codec_iface_name(decoder->codec_interface())); + aom_codec_iface_name(decoder->codec_interface())); } exit(EXIT_FAILURE); @@ -215,23 +215,23 @@ static int raw_read_frame(FILE *infile, uint8_t **buffer, size_t *bytes_read, static int read_frame(struct VpxDecInputContext *input, uint8_t **buf, size_t *bytes_in_buffer, size_t *buffer_size) { - switch (input->vpx_input_ctx->file_type) { + switch (input->aom_input_ctx->file_type) { #if CONFIG_WEBM_IO case FILE_TYPE_WEBM: return webm_read_frame(input->webm_ctx, buf, bytes_in_buffer, buffer_size); #endif case FILE_TYPE_RAW: - return raw_read_frame(input->vpx_input_ctx->file, buf, bytes_in_buffer, + return raw_read_frame(input->aom_input_ctx->file, buf, bytes_in_buffer, buffer_size); case FILE_TYPE_IVF: - return ivf_read_frame(input->vpx_input_ctx->file, buf, bytes_in_buffer, + return ivf_read_frame(input->aom_input_ctx->file, buf, bytes_in_buffer, buffer_size); default: return 1; } } -static void update_image_md5(const vpx_image_t *img, const int planes[3], +static void update_image_md5(const aom_image_t *img, const int planes[3], MD5Context *md5) { int i, y; @@ -239,9 +239,9 @@ static void update_image_md5(const vpx_image_t *img, const int planes[3], const int plane = planes[i]; const unsigned char *buf = img->planes[plane]; const int stride = img->stride[plane]; - const int w = vpx_img_plane_width(img, plane) * + const int w = aom_img_plane_width(img, plane) * ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1); - const int h = vpx_img_plane_height(img, plane); + const int h = aom_img_plane_height(img, plane); for (y = 0; y < h; ++y) { MD5Update(md5, buf, w); @@ -250,7 +250,7 @@ static void update_image_md5(const vpx_image_t *img, const int planes[3], } } -static void write_image_file(const vpx_image_t *img, const int planes[3], +static void write_image_file(const aom_image_t *img, const int planes[3], FILE *file) { int i, y; #if CONFIG_VPX_HIGHBITDEPTH @@ -263,8 +263,8 @@ static void write_image_file(const vpx_image_t *img, const int planes[3], const int plane = planes[i]; const unsigned char *buf = img->planes[plane]; const int stride = img->stride[plane]; - const int w = vpx_img_plane_width(img, plane); - const int h = vpx_img_plane_height(img, plane); + const int w = aom_img_plane_width(img, plane); + const int h = aom_img_plane_height(img, plane); for (y = 0; y < h; ++y) { fwrite(buf, bytes_per_sample, w, file); @@ -276,7 +276,7 @@ static void write_image_file(const vpx_image_t *img, const int planes[3], static int file_is_raw(struct VpxInputContext *input) { uint8_t buf[32]; int is_raw = 0; - vpx_codec_stream_info_t si; + aom_codec_stream_info_t si; si.sz = sizeof(si); @@ -284,9 +284,9 @@ static int file_is_raw(struct VpxInputContext *input) { int i; if (mem_get_le32(buf) < 256 * 1024 * 1024) { - for (i = 0; i < get_vpx_decoder_count(); ++i) { - const VpxInterface *const decoder = get_vpx_decoder_by_index(i); - if (!vpx_codec_peek_stream_info(decoder->codec_interface(), buf + 4, + for (i = 0; i < get_aom_decoder_count(); ++i) { + const VpxInterface *const decoder = get_aom_decoder_by_index(i); + if (!aom_codec_peek_stream_info(decoder->codec_interface(), buf + 4, 32 - 4, &si)) { is_raw = 1; input->fourcc = decoder->fourcc; @@ -327,7 +327,7 @@ struct ExternalFrameBufferList { // minimum size in bytes needed to decode the next frame. |fb| pointer to the // frame buffer. static int get_vp9_frame_buffer(void *cb_priv, size_t min_size, - vpx_codec_frame_buffer_t *fb) { + aom_codec_frame_buffer_t *fb) { int i; struct ExternalFrameBufferList *const ext_fb_list = (struct ExternalFrameBufferList *)cb_priv; @@ -361,7 +361,7 @@ static int get_vp9_frame_buffer(void *cb_priv, size_t min_size, // |cb_priv| user private data passed into the set function. |fb| pointer // to the frame buffer. static int release_vp9_frame_buffer(void *cb_priv, - vpx_codec_frame_buffer_t *fb) { + aom_codec_frame_buffer_t *fb) { struct ExternalFrameBuffer *const ext_fb = (struct ExternalFrameBuffer *)fb->priv; (void)cb_priv; @@ -455,16 +455,16 @@ static FILE *open_outfile(const char *name) { } #if CONFIG_VPX_HIGHBITDEPTH -static int img_shifted_realloc_required(const vpx_image_t *img, - const vpx_image_t *shifted, - vpx_img_fmt_t required_fmt) { +static int img_shifted_realloc_required(const aom_image_t *img, + const aom_image_t *shifted, + aom_img_fmt_t required_fmt) { return img->d_w != shifted->d_w || img->d_h != shifted->d_h || required_fmt != shifted->fmt; } #endif static int main_loop(int argc, const char **argv_) { - vpx_codec_ctx_t decoder; + aom_codec_ctx_t decoder; char *fn = NULL; int i; uint8_t *buf = NULL; @@ -486,16 +486,16 @@ static int main_loop(int argc, const char **argv_) { int use_y4m = 1; int opt_yv12 = 0; int opt_i420 = 0; - vpx_codec_dec_cfg_t cfg = { 0, 0, 0 }; + aom_codec_dec_cfg_t cfg = { 0, 0, 0 }; #if CONFIG_VPX_HIGHBITDEPTH unsigned int output_bit_depth = 0; #endif int frames_corrupted = 0; int dec_flags = 0; int do_scale = 0; - vpx_image_t *scaled_img = NULL; + aom_image_t *scaled_img = NULL; #if CONFIG_VPX_HIGHBITDEPTH - vpx_image_t *img_shifted = NULL; + aom_image_t *img_shifted = NULL; #endif int frame_avail, got_data, flush_decoder = 0; int num_external_frame_buffers = 0; @@ -509,13 +509,13 @@ static int main_loop(int argc, const char **argv_) { unsigned char md5_digest[16]; struct VpxDecInputContext input = { NULL, NULL }; - struct VpxInputContext vpx_input_ctx; + struct VpxInputContext aom_input_ctx; #if CONFIG_WEBM_IO struct WebmInputContext webm_ctx; memset(&(webm_ctx), 0, sizeof(webm_ctx)); input.webm_ctx = &webm_ctx; #endif - input.vpx_input_ctx = &vpx_input_ctx; + input.aom_input_ctx = &aom_input_ctx; /* Parse command line */ exec_name = argv_[0]; @@ -526,7 +526,7 @@ static int main_loop(int argc, const char **argv_) { arg.argv_step = 1; if (arg_match(&arg, &codecarg, argi)) { - interface = get_vpx_decoder_by_name(arg.val); + interface = get_aom_decoder_by_name(arg.val); if (!interface) die("Error: Unrecognized argument (%s) to --codec\n", arg.val); } else if (arg_match(&arg, &looparg, argi)) { @@ -609,19 +609,19 @@ static int main_loop(int argc, const char **argv_) { return EXIT_FAILURE; } #endif - input.vpx_input_ctx->file = infile; - if (file_is_ivf(input.vpx_input_ctx)) - input.vpx_input_ctx->file_type = FILE_TYPE_IVF; + input.aom_input_ctx->file = infile; + if (file_is_ivf(input.aom_input_ctx)) + input.aom_input_ctx->file_type = FILE_TYPE_IVF; #if CONFIG_WEBM_IO - else if (file_is_webm(input.webm_ctx, input.vpx_input_ctx)) - input.vpx_input_ctx->file_type = FILE_TYPE_WEBM; + else if (file_is_webm(input.webm_ctx, input.aom_input_ctx)) + input.aom_input_ctx->file_type = FILE_TYPE_WEBM; #endif - else if (file_is_raw(input.vpx_input_ctx)) - input.vpx_input_ctx->file_type = FILE_TYPE_RAW; + else if (file_is_raw(input.aom_input_ctx)) + input.aom_input_ctx->file_type = FILE_TYPE_RAW; else { fprintf(stderr, "Unrecognized input file type.\n"); #if !CONFIG_WEBM_IO - fprintf(stderr, "vpxdec was built without WebM container support.\n"); + fprintf(stderr, "aomdec was built without WebM container support.\n"); #endif return EXIT_FAILURE; } @@ -631,7 +631,7 @@ static int main_loop(int argc, const char **argv_) { if (!noblit && single_file) { generate_filename(outfile_pattern, outfile_name, PATH_MAX, - vpx_input_ctx.width, vpx_input_ctx.height, 0); + aom_input_ctx.width, aom_input_ctx.height, 0); if (do_md5) MD5Init(&md5_ctx); else @@ -647,8 +647,8 @@ static int main_loop(int argc, const char **argv_) { } #if CONFIG_WEBM_IO - if (vpx_input_ctx.file_type == FILE_TYPE_WEBM) { - if (webm_guess_framerate(input.webm_ctx, input.vpx_input_ctx)) { + if (aom_input_ctx.file_type == FILE_TYPE_WEBM) { + if (webm_guess_framerate(input.webm_ctx, input.aom_input_ctx)) { fprintf(stderr, "Failed to guess framerate -- error parsing " "webm file?\n"); @@ -658,21 +658,21 @@ static int main_loop(int argc, const char **argv_) { #endif } - fourcc_interface = get_vpx_decoder_by_fourcc(vpx_input_ctx.fourcc); + fourcc_interface = get_aom_decoder_by_fourcc(aom_input_ctx.fourcc); if (interface && fourcc_interface && interface != fourcc_interface) warn("Header indicates codec: %s\n", fourcc_interface->name); else interface = fourcc_interface; - if (!interface) interface = get_vpx_decoder_by_index(0); + if (!interface) interface = get_aom_decoder_by_index(0); dec_flags = (postproc ? VPX_CODEC_USE_POSTPROC : 0) | (ec_enabled ? VPX_CODEC_USE_ERROR_CONCEALMENT : 0) | (frame_parallel ? VPX_CODEC_USE_FRAME_THREADING : 0); - if (vpx_codec_dec_init(&decoder, interface->codec_interface(), &cfg, + if (aom_codec_dec_init(&decoder, interface->codec_interface(), &cfg, dec_flags)) { fprintf(stderr, "Failed to initialize decoder: %s\n", - vpx_codec_error(&decoder)); + aom_codec_error(&decoder)); return EXIT_FAILURE; } @@ -688,11 +688,11 @@ static int main_loop(int argc, const char **argv_) { ext_fb_list.num_external_frame_buffers = num_external_frame_buffers; ext_fb_list.ext_fb = (struct ExternalFrameBuffer *)calloc( num_external_frame_buffers, sizeof(*ext_fb_list.ext_fb)); - if (vpx_codec_set_frame_buffer_functions(&decoder, get_vp9_frame_buffer, + if (aom_codec_set_frame_buffer_functions(&decoder, get_vp9_frame_buffer, release_vp9_frame_buffer, &ext_fb_list)) { fprintf(stderr, "Failed to configure external frame buffers: %s\n", - vpx_codec_error(&decoder)); + aom_codec_error(&decoder)); return EXIT_FAILURE; } } @@ -702,9 +702,9 @@ static int main_loop(int argc, const char **argv_) { /* Decode file */ while (frame_avail || got_data) { - vpx_codec_iter_t iter = NULL; - vpx_image_t *img; - struct vpx_usec_timer timer; + aom_codec_iter_t iter = NULL; + aom_image_t *img; + struct aom_usec_timer timer; int corrupted = 0; frame_avail = 0; @@ -713,20 +713,20 @@ static int main_loop(int argc, const char **argv_) { frame_avail = 1; frame_in++; - vpx_usec_timer_start(&timer); + aom_usec_timer_start(&timer); - if (vpx_codec_decode(&decoder, buf, (unsigned int)bytes_in_buffer, NULL, + if (aom_codec_decode(&decoder, buf, (unsigned int)bytes_in_buffer, NULL, 0)) { - const char *detail = vpx_codec_error_detail(&decoder); + const char *detail = aom_codec_error_detail(&decoder); warn("Failed to decode frame %d: %s", frame_in, - vpx_codec_error(&decoder)); + aom_codec_error(&decoder)); if (detail) warn("Additional information: %s", detail); if (!keep_going) goto fail; } - vpx_usec_timer_mark(&timer); - dx_time += vpx_usec_timer_elapsed(&timer); + aom_usec_timer_mark(&timer); + dx_time += aom_usec_timer_elapsed(&timer); } else { flush_decoder = 1; } @@ -734,27 +734,27 @@ static int main_loop(int argc, const char **argv_) { flush_decoder = 1; } - vpx_usec_timer_start(&timer); + aom_usec_timer_start(&timer); if (flush_decoder) { // Flush the decoder in frame parallel decode. - if (vpx_codec_decode(&decoder, NULL, 0, NULL, 0)) { - warn("Failed to flush decoder: %s", vpx_codec_error(&decoder)); + if (aom_codec_decode(&decoder, NULL, 0, NULL, 0)) { + warn("Failed to flush decoder: %s", aom_codec_error(&decoder)); } } got_data = 0; - if ((img = vpx_codec_get_frame(&decoder, &iter))) { + if ((img = aom_codec_get_frame(&decoder, &iter))) { ++frame_out; got_data = 1; } - vpx_usec_timer_mark(&timer); - dx_time += (unsigned int)vpx_usec_timer_elapsed(&timer); + aom_usec_timer_mark(&timer); + dx_time += (unsigned int)aom_usec_timer_elapsed(&timer); if (!frame_parallel && - vpx_codec_control(&decoder, VP8D_GET_FRAME_CORRUPTED, &corrupted)) { - warn("Failed VP8_GET_FRAME_CORRUPTED: %s", vpx_codec_error(&decoder)); + aom_codec_control(&decoder, VP8D_GET_FRAME_CORRUPTED, &corrupted)) { + warn("Failed VP8_GET_FRAME_CORRUPTED: %s", aom_codec_error(&decoder)); if (!keep_going) goto fail; } frames_corrupted += corrupted; @@ -773,11 +773,11 @@ static int main_loop(int argc, const char **argv_) { // these is set to 0, use the display size set in the first frame // header. If that is unavailable, use the raw decoded size of the // first decoded frame. - int render_width = vpx_input_ctx.width; - int render_height = vpx_input_ctx.height; + int render_width = aom_input_ctx.width; + int render_height = aom_input_ctx.height; if (!render_width || !render_height) { int render_size[2]; - if (vpx_codec_control(&decoder, VP9D_GET_DISPLAY_SIZE, + if (aom_codec_control(&decoder, VP9D_GET_DISPLAY_SIZE, render_size)) { // As last resort use size of first frame as display size. render_width = img->d_w; @@ -788,7 +788,7 @@ static int main_loop(int argc, const char **argv_) { } } scaled_img = - vpx_img_alloc(NULL, img->fmt, render_width, render_height, 16); + aom_img_alloc(NULL, img->fmt, render_width, render_height, 16); scaled_img->bit_depth = img->bit_depth; } @@ -801,7 +801,7 @@ static int main_loop(int argc, const char **argv_) { "Failed to scale output frame: %s.\n" "Scaling is disabled in this configuration. " "To enable scaling, configure with --enable-libyuv\n", - vpx_codec_error(&decoder)); + aom_codec_error(&decoder)); return EXIT_FAILURE; #endif } @@ -813,24 +813,24 @@ static int main_loop(int argc, const char **argv_) { } // Shift up or down if necessary if (output_bit_depth != 0 && output_bit_depth != img->bit_depth) { - const vpx_img_fmt_t shifted_fmt = + const aom_img_fmt_t shifted_fmt = output_bit_depth == 8 ? img->fmt ^ (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) : img->fmt | VPX_IMG_FMT_HIGHBITDEPTH; if (img_shifted && img_shifted_realloc_required(img, img_shifted, shifted_fmt)) { - vpx_img_free(img_shifted); + aom_img_free(img_shifted); img_shifted = NULL; } if (!img_shifted) { img_shifted = - vpx_img_alloc(NULL, shifted_fmt, img->d_w, img->d_h, 16); + aom_img_alloc(NULL, shifted_fmt, img->d_w, img->d_h, 16); img_shifted->bit_depth = output_bit_depth; } if (output_bit_depth > img->bit_depth) { - vpx_img_upshift(img_shifted, img, output_bit_depth - img->bit_depth); + aom_img_upshift(img_shifted, img, output_bit_depth - img->bit_depth); } else { - vpx_img_downshift(img_shifted, img, + aom_img_downshift(img_shifted, img, img->bit_depth - output_bit_depth); } img = img_shifted; @@ -848,8 +848,8 @@ static int main_loop(int argc, const char **argv_) { if (frame_out == 1) { // Y4M file header len = y4m_write_file_header( - buf, sizeof(buf), vpx_input_ctx.width, vpx_input_ctx.height, - &vpx_input_ctx.framerate, img->fmt, img->bit_depth); + buf, sizeof(buf), aom_input_ctx.width, aom_input_ctx.height, + &aom_input_ctx.framerate, img->fmt, img->bit_depth); if (do_md5) { MD5Update(&md5_ctx, (md5byte *)buf, (unsigned int)len); } else { @@ -918,9 +918,9 @@ static int main_loop(int argc, const char **argv_) { fail: - if (vpx_codec_destroy(&decoder)) { + if (aom_codec_destroy(&decoder)) { fprintf(stderr, "Failed to destroy decoder: %s\n", - vpx_codec_error(&decoder)); + aom_codec_error(&decoder)); return EXIT_FAILURE; } @@ -934,15 +934,15 @@ fail: } #if CONFIG_WEBM_IO - if (input.vpx_input_ctx->file_type == FILE_TYPE_WEBM) + if (input.aom_input_ctx->file_type == FILE_TYPE_WEBM) webm_free(input.webm_ctx); #endif - if (input.vpx_input_ctx->file_type != FILE_TYPE_WEBM) free(buf); + if (input.aom_input_ctx->file_type != FILE_TYPE_WEBM) free(buf); - if (scaled_img) vpx_img_free(scaled_img); + if (scaled_img) aom_img_free(scaled_img); #if CONFIG_VPX_HIGHBITDEPTH - if (img_shifted) vpx_img_free(img_shifted); + if (img_shifted) aom_img_free(img_shifted); #endif for (i = 0; i < ext_fb_list.num_external_frame_buffers; ++i) { diff --git a/vpxenc.c b/aomenc.c similarity index 94% rename from vpxenc.c rename to aomenc.c index f1835bce7aa614bca55f5abd8e3445ab2367d1a6..c6e2ec02360feb59d3a5327e90d642b5ac5e6352 100644 --- a/vpxenc.c +++ b/aomenc.c @@ -9,8 +9,8 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpxenc.h" -#include "./vpx_config.h" +#include "./aomenc.h" +#include "./aom_config.h" #include <assert.h> #include <limits.h> @@ -24,9 +24,9 @@ #include "third_party/libyuv/include/libyuv/scale.h" #endif -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #if CONFIG_DECODERS -#include "aom/vpx_decoder.h" +#include "aom/aom_decoder.h" #endif #include "./args.h" @@ -40,11 +40,11 @@ #include "aom/vp8dx.h" #endif -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_ports/mem_ops.h" -#include "aom_ports/vpx_timer.h" +#include "aom_ports/aom_timer.h" #include "./rate_hist.h" -#include "./vpxstats.h" +#include "./aomstats.h" #include "./warnings.h" #if CONFIG_WEBM_IO #include "./webmenc.h" @@ -65,13 +65,13 @@ static size_t wrap_fwrite(const void *ptr, size_t size, size_t nmemb, static const char *exec_name; -static void warn_or_exit_on_errorv(vpx_codec_ctx_t *ctx, int fatal, +static void warn_or_exit_on_errorv(aom_codec_ctx_t *ctx, int fatal, const char *s, va_list ap) { if (ctx->err) { - const char *detail = vpx_codec_error_detail(ctx); + const char *detail = aom_codec_error_detail(ctx); vfprintf(stderr, s, ap); - fprintf(stderr, ": %s\n", vpx_codec_error(ctx)); + fprintf(stderr, ": %s\n", aom_codec_error(ctx)); if (detail) fprintf(stderr, " %s\n", detail); @@ -79,7 +79,7 @@ static void warn_or_exit_on_errorv(vpx_codec_ctx_t *ctx, int fatal, } } -static void ctx_exit_on_error(vpx_codec_ctx_t *ctx, const char *s, ...) { +static void ctx_exit_on_error(aom_codec_ctx_t *ctx, const char *s, ...) { va_list ap; va_start(ap, s); @@ -87,7 +87,7 @@ static void ctx_exit_on_error(vpx_codec_ctx_t *ctx, const char *s, ...) { va_end(ap); } -static void warn_or_exit_on_error(vpx_codec_ctx_t *ctx, int fatal, +static void warn_or_exit_on_error(aom_codec_ctx_t *ctx, int fatal, const char *s, ...) { va_list ap; @@ -96,7 +96,7 @@ static void warn_or_exit_on_error(vpx_codec_ctx_t *ctx, int fatal, va_end(ap); } -static int read_frame(struct VpxInputContext *input_ctx, vpx_image_t *img) { +static int read_frame(struct VpxInputContext *input_ctx, aom_image_t *img) { FILE *f = input_ctx->file; y4m_input *y4m = &input_ctx->y4m; int shortread = 0; @@ -475,7 +475,7 @@ static const arg_def_t *no_args[] = { NULL }; void usage_exit(void) { int i; - const int num_encoder = get_vpx_encoder_count(); + const int num_encoder = get_aom_encoder_count(); fprintf(stderr, "Usage: %s <options> -o dst_filename src_filename \n", exec_name); @@ -501,10 +501,10 @@ void usage_exit(void) { fprintf(stderr, "\nIncluded encoders:\n\n"); for (i = 0; i < num_encoder; ++i) { - const VpxInterface *const encoder = get_vpx_encoder_by_index(i); + const VpxInterface *const encoder = get_aom_encoder_by_index(i); const char *defstr = (i == (num_encoder - 1)) ? "(default)" : ""; fprintf(stderr, " %-6s - %s %s\n", encoder->name, - vpx_codec_iface_name(encoder->codec_interface()), defstr); + aom_codec_iface_name(encoder->codec_interface()), defstr); } fprintf(stderr, "\n "); fprintf(stderr, "Use --codec to switch to a non-default encoder.\n\n"); @@ -515,8 +515,8 @@ void usage_exit(void) { #define mmin(a, b) ((a) < (b) ? (a) : (b)) #if CONFIG_VPX_HIGHBITDEPTH -static void find_mismatch_high(const vpx_image_t *const img1, - const vpx_image_t *const img2, int yloc[4], +static void find_mismatch_high(const aom_image_t *const img1, + const aom_image_t *const img2, int yloc[4], int uloc[4], int vloc[4]) { uint16_t *plane1, *plane2; uint32_t stride1, stride2; @@ -609,8 +609,8 @@ static void find_mismatch_high(const vpx_image_t *const img1, } #endif -static void find_mismatch(const vpx_image_t *const img1, - const vpx_image_t *const img2, int yloc[4], +static void find_mismatch(const aom_image_t *const img1, + const aom_image_t *const img2, int yloc[4], int uloc[4], int vloc[4]) { const uint32_t bsize = 64; const uint32_t bsizey = bsize >> img1->y_chroma_shift; @@ -699,8 +699,8 @@ static void find_mismatch(const vpx_image_t *const img1, } } -static int compare_img(const vpx_image_t *const img1, - const vpx_image_t *const img2) { +static int compare_img(const aom_image_t *const img1, + const aom_image_t *const img2) { uint32_t l_w = img1->d_w; uint32_t c_w = (img1->d_w + img1->x_chroma_shift) >> img1->x_chroma_shift; const uint32_t c_h = @@ -750,7 +750,7 @@ struct EbmlGlobal { /* Per-stream configuration */ struct stream_config { - struct vpx_codec_enc_cfg cfg; + struct aom_codec_enc_cfg cfg; const char *out_fn; const char *stats_fn; #if CONFIG_FP_MB_STATS @@ -779,7 +779,7 @@ struct stream_state { double psnr_totals[4]; int psnr_count; int counts[64]; - vpx_codec_ctx_t encoder; + aom_codec_ctx_t encoder; unsigned int frames_out; uint64_t cx_time; size_t nbytes; @@ -787,13 +787,13 @@ struct stream_state { #if CONFIG_FP_MB_STATS stats_io_t fpmb_stats; #endif - struct vpx_image *img; - vpx_codec_ctx_t decoder; + struct aom_image *img; + aom_codec_ctx_t decoder; int mismatch_seen; }; static void validate_positive_rational(const char *msg, - struct vpx_rational *rat) { + struct aom_rational *rat) { if (rat->den < 0) { rat->num *= -1; rat->den *= -1; @@ -807,13 +807,13 @@ static void validate_positive_rational(const char *msg, static void parse_global_config(struct VpxEncoderConfig *global, char **argv) { char **argi, **argj; struct arg arg; - const int num_encoder = get_vpx_encoder_count(); + const int num_encoder = get_aom_encoder_count(); if (num_encoder < 1) die("Error: no valid encoder available\n"); /* Initialize default parameters */ memset(global, 0, sizeof(*global)); - global->codec = get_vpx_encoder_by_index(num_encoder - 1); + global->codec = get_aom_encoder_by_index(num_encoder - 1); global->passes = 0; global->color_type = I420; /* Assign default deadline to good quality */ @@ -823,7 +823,7 @@ static void parse_global_config(struct VpxEncoderConfig *global, char **argv) { arg.argv_step = 1; if (arg_match(&arg, &codecarg, argi)) { - global->codec = get_vpx_encoder_by_name(arg.val); + global->codec = get_aom_encoder_by_name(arg.val); if (!global->codec) die("Error: Unrecognized argument (%s) to --codec\n", arg.val); } else if (arg_match(&arg, &passes, argi)) { @@ -952,7 +952,7 @@ static void open_input_file(struct VpxInputContext *input) { input->pixel_aspect_ratio.denominator = input->y4m.par_d; input->framerate.numerator = input->y4m.fps_n; input->framerate.denominator = input->y4m.fps_d; - input->fmt = input->y4m.vpx_fmt; + input->fmt = input->y4m.aom_fmt; input->bit_depth = input->y4m.bit_depth; } else fatal("Unsupported Y4M stream."); @@ -982,12 +982,12 @@ static struct stream_state *new_stream(struct VpxEncoderConfig *global, stream->index++; prev->next = stream; } else { - vpx_codec_err_t res; + aom_codec_err_t res; /* Populate encoder configuration */ - res = vpx_codec_enc_config_default(global->codec->codec_interface(), + res = aom_codec_enc_config_default(global->codec->codec_interface(), &stream->config.cfg, global->usage); - if (res) fatal("Failed to get config: %s\n", vpx_codec_err_to_string(res)); + if (res) fatal("Failed to get config: %s\n", aom_codec_err_to_string(res)); /* Change the default timebase to a high enough value so that the * encoder will always create strictly increasing timestamps. @@ -1299,7 +1299,7 @@ static const char *file_type_to_string(enum VideoFileType t) { } } -static const char *image_format_to_string(vpx_img_fmt_t f) { +static const char *image_format_to_string(aom_img_fmt_t f) { switch (f) { case VPX_IMG_FMT_I420: return "I420"; case VPX_IMG_FMT_I422: return "I422"; @@ -1322,7 +1322,7 @@ static void show_stream_config(struct stream_state *stream, if (stream->index == 0) { fprintf(stderr, "Codec: %s\n", - vpx_codec_iface_name(global->codec->codec_interface())); + aom_codec_iface_name(global->codec->codec_interface())); fprintf(stderr, "Source file: %s File Type: %s Format: %s\n", input->filename, file_type_to_string(input->file_type), image_format_to_string(input->fmt)); @@ -1371,7 +1371,7 @@ static void open_output_file(struct stream_state *stream, struct VpxEncoderConfig *global, const struct VpxRational *pixel_aspect_ratio) { const char *fn = stream->config.out_fn; - const struct vpx_codec_enc_cfg *const cfg = &stream->config.cfg; + const struct aom_codec_enc_cfg *const cfg = &stream->config.cfg; if (cfg->g_pass == VPX_RC_FIRST_PASS) return; @@ -1398,7 +1398,7 @@ static void open_output_file(struct stream_state *stream, static void close_output_file(struct stream_state *stream, unsigned int fourcc) { - const struct vpx_codec_enc_cfg *const cfg = &stream->config.cfg; + const struct aom_codec_enc_cfg *const cfg = &stream->config.cfg; if (cfg->g_pass == VPX_RC_FIRST_PASS) return; @@ -1466,18 +1466,18 @@ static void initialize_encoder(struct stream_state *stream, #endif /* Construct Encoder Context */ - vpx_codec_enc_init(&stream->encoder, global->codec->codec_interface(), + aom_codec_enc_init(&stream->encoder, global->codec->codec_interface(), &stream->config.cfg, flags); ctx_exit_on_error(&stream->encoder, "Failed to initialize encoder"); - /* Note that we bypass the vpx_codec_control wrapper macro because + /* Note that we bypass the aom_codec_control wrapper macro because * we're being clever to store the control IDs in an array. Real * applications will want to make use of the enumerations directly */ for (i = 0; i < stream->config.arg_ctrl_cnt; i++) { int ctrl = stream->config.arg_ctrls[i][0]; int value = stream->config.arg_ctrls[i][1]; - if (vpx_codec_control_(&stream->encoder, ctrl, value)) + if (aom_codec_control_(&stream->encoder, ctrl, value)) fprintf(stderr, "Error: Tried to set control %d = %d\n", ctrl, value); ctx_exit_on_error(&stream->encoder, "Failed to control codec"); @@ -1485,18 +1485,18 @@ static void initialize_encoder(struct stream_state *stream, #if CONFIG_DECODERS if (global->test_decode != TEST_DECODE_OFF) { - const VpxInterface *decoder = get_vpx_decoder_by_name(global->codec->name); - vpx_codec_dec_init(&stream->decoder, decoder->codec_interface(), NULL, 0); + const VpxInterface *decoder = get_aom_decoder_by_name(global->codec->name); + aom_codec_dec_init(&stream->decoder, decoder->codec_interface(), NULL, 0); } #endif } static void encode_frame(struct stream_state *stream, - struct VpxEncoderConfig *global, struct vpx_image *img, + struct VpxEncoderConfig *global, struct aom_image *img, unsigned int frames_in) { - vpx_codec_pts_t frame_start, next_frame_start; - struct vpx_codec_enc_cfg *cfg = &stream->config.cfg; - struct vpx_usec_timer timer; + aom_codec_pts_t frame_start, next_frame_start; + struct aom_codec_enc_cfg *cfg = &stream->config.cfg; + struct aom_usec_timer timer; frame_start = (cfg->g_timebase.den * (int64_t)(frames_in - 1) * global->framerate.den) / @@ -1517,7 +1517,7 @@ static void encode_frame(struct stream_state *stream, #if CONFIG_LIBYUV if (!stream->img) { stream->img = - vpx_img_alloc(NULL, VPX_IMG_FMT_I42016, cfg->g_w, cfg->g_h, 16); + aom_img_alloc(NULL, VPX_IMG_FMT_I42016, cfg->g_w, cfg->g_h, 16); } I420Scale_16( (uint16 *)img->planes[VPX_PLANE_Y], img->stride[VPX_PLANE_Y] / 2, @@ -1550,7 +1550,7 @@ static void encode_frame(struct stream_state *stream, #if CONFIG_LIBYUV if (!stream->img) stream->img = - vpx_img_alloc(NULL, VPX_IMG_FMT_I420, cfg->g_w, cfg->g_h, 16); + aom_img_alloc(NULL, VPX_IMG_FMT_I420, cfg->g_w, cfg->g_h, 16); I420Scale( img->planes[VPX_PLANE_Y], img->stride[VPX_PLANE_Y], img->planes[VPX_PLANE_U], img->stride[VPX_PLANE_U], @@ -1570,12 +1570,12 @@ static void encode_frame(struct stream_state *stream, #endif } - vpx_usec_timer_start(&timer); - vpx_codec_encode(&stream->encoder, img, frame_start, + aom_usec_timer_start(&timer); + aom_codec_encode(&stream->encoder, img, frame_start, (unsigned long)(next_frame_start - frame_start), 0, global->deadline); - vpx_usec_timer_mark(&timer); - stream->cx_time += vpx_usec_timer_elapsed(&timer); + aom_usec_timer_mark(&timer); + stream->cx_time += aom_usec_timer_elapsed(&timer); ctx_exit_on_error(&stream->encoder, "Stream %d: Failed to encode frame", stream->index); } @@ -1584,7 +1584,7 @@ static void update_quantizer_histogram(struct stream_state *stream) { if (stream->config.cfg.g_pass != VPX_RC_FIRST_PASS) { int q; - vpx_codec_control(&stream->encoder, VP8E_GET_LAST_QUANTIZER_64, &q); + aom_codec_control(&stream->encoder, VP8E_GET_LAST_QUANTIZER_64, &q); ctx_exit_on_error(&stream->encoder, "Failed to read quantizer"); stream->counts[q]++; } @@ -1592,12 +1592,12 @@ static void update_quantizer_histogram(struct stream_state *stream) { static void get_cx_data(struct stream_state *stream, struct VpxEncoderConfig *global, int *got_data) { - const vpx_codec_cx_pkt_t *pkt; - const struct vpx_codec_enc_cfg *cfg = &stream->config.cfg; - vpx_codec_iter_t iter = NULL; + const aom_codec_cx_pkt_t *pkt; + const struct aom_codec_enc_cfg *cfg = &stream->config.cfg; + aom_codec_iter_t iter = NULL; *got_data = 0; - while ((pkt = vpx_codec_get_cx_data(&stream->encoder, &iter))) { + while ((pkt = aom_codec_get_cx_data(&stream->encoder, &iter))) { static size_t fsize = 0; static int64_t ivf_header_pos = 0; @@ -1640,7 +1640,7 @@ static void get_cx_data(struct stream_state *stream, *got_data = 1; #if CONFIG_DECODERS if (global->test_decode != TEST_DECODE_OFF && !stream->mismatch_seen) { - vpx_codec_decode(&stream->decoder, pkt->data.frame.buf, + aom_codec_decode(&stream->decoder, pkt->data.frame.buf, (unsigned int)pkt->data.frame.sz, NULL, 0); if (stream->decoder.err) { warn_or_exit_on_error(&stream->decoder, @@ -1710,29 +1710,29 @@ static float usec_to_fps(uint64_t usec, unsigned int frames) { static void test_decode(struct stream_state *stream, enum TestDecodeFatality fatal, const VpxInterface *codec) { - vpx_image_t enc_img, dec_img; + aom_image_t enc_img, dec_img; struct vp9_ref_frame ref_enc, ref_dec; if (stream->mismatch_seen) return; ref_enc.idx = 0; ref_dec.idx = 0; - vpx_codec_control(&stream->encoder, VP9_GET_REFERENCE, &ref_enc); + aom_codec_control(&stream->encoder, VP9_GET_REFERENCE, &ref_enc); enc_img = ref_enc.img; - vpx_codec_control(&stream->decoder, VP9_GET_REFERENCE, &ref_dec); + aom_codec_control(&stream->decoder, VP9_GET_REFERENCE, &ref_dec); dec_img = ref_dec.img; #if CONFIG_VPX_HIGHBITDEPTH if ((enc_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH) != (dec_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH)) { if (enc_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH) { - vpx_img_alloc(&enc_img, enc_img.fmt - VPX_IMG_FMT_HIGHBITDEPTH, + aom_img_alloc(&enc_img, enc_img.fmt - VPX_IMG_FMT_HIGHBITDEPTH, enc_img.d_w, enc_img.d_h, 16); - vpx_img_truncate_16_to_8(&enc_img, &ref_enc.img); + aom_img_truncate_16_to_8(&enc_img, &ref_enc.img); } if (dec_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH) { - vpx_img_alloc(&dec_img, dec_img.fmt - VPX_IMG_FMT_HIGHBITDEPTH, + aom_img_alloc(&dec_img, dec_img.fmt - VPX_IMG_FMT_HIGHBITDEPTH, dec_img.d_w, dec_img.d_h, 16); - vpx_img_truncate_16_to_8(&dec_img, &ref_dec.img); + aom_img_truncate_16_to_8(&dec_img, &ref_dec.img); } } #endif @@ -1761,8 +1761,8 @@ static void test_decode(struct stream_state *stream, stream->mismatch_seen = stream->frames_out; } - vpx_img_free(&enc_img); - vpx_img_free(&dec_img); + aom_img_free(&enc_img); + aom_img_free(&dec_img); } static void print_time(const char *label, int64_t etl) { @@ -1786,9 +1786,9 @@ static void print_time(const char *label, int64_t etl) { int main(int argc, const char **argv_) { int pass; - vpx_image_t raw; + aom_image_t raw; #if CONFIG_VPX_HIGHBITDEPTH - vpx_image_t raw_shift; + aom_image_t raw_shift; int allocated_raw_shift = 0; int use_16bit_internal = 0; int input_shift = 0; @@ -1926,7 +1926,7 @@ int main(int argc, const char **argv_) { if (stream->config.write_webm) { stream->config.write_webm = 0; warn( - "vpxenc was compiled without WebM container support." + "aomenc was compiled without WebM container support." "Producing IVF output"); } }); @@ -1953,7 +1953,7 @@ int main(int argc, const char **argv_) { frames.*/ memset(&raw, 0, sizeof(raw)); else - vpx_img_alloc(&raw, input.fmt, input.width, input.height, 32); + aom_img_alloc(&raw, input.fmt, input.width, input.height, 32); FOREACH_STREAM(stream->rate_hist = init_rate_histogram( &stream->config.cfg, &global.framerate)); @@ -1988,7 +1988,7 @@ int main(int argc, const char **argv_) { got_data = 0; while (frame_avail || got_data) { - struct vpx_usec_timer timer; + struct aom_usec_timer timer; if (!global.limit || frames_in < global.limit) { frame_avail = read_frame(&input, &raw); @@ -2019,22 +2019,22 @@ int main(int argc, const char **argv_) { if (frames_in > global.skip_frames) { #if CONFIG_VPX_HIGHBITDEPTH - vpx_image_t *frame_to_encode; + aom_image_t *frame_to_encode; if (input_shift || (use_16bit_internal && input.bit_depth == 8)) { assert(use_16bit_internal); // Input bit depth and stream bit depth do not match, so up // shift frame to stream bit depth if (!allocated_raw_shift) { - vpx_img_alloc(&raw_shift, raw.fmt | VPX_IMG_FMT_HIGHBITDEPTH, + aom_img_alloc(&raw_shift, raw.fmt | VPX_IMG_FMT_HIGHBITDEPTH, input.width, input.height, 32); allocated_raw_shift = 1; } - vpx_img_upshift(&raw_shift, &raw, input_shift); + aom_img_upshift(&raw_shift, &raw, input_shift); frame_to_encode = &raw_shift; } else { frame_to_encode = &raw; } - vpx_usec_timer_start(&timer); + aom_usec_timer_start(&timer); if (use_16bit_internal) { assert(frame_to_encode->fmt & VPX_IMG_FMT_HIGHBITDEPTH); FOREACH_STREAM({ @@ -2051,12 +2051,12 @@ int main(int argc, const char **argv_) { frames_in)); } #else - vpx_usec_timer_start(&timer); + aom_usec_timer_start(&timer); FOREACH_STREAM(encode_frame(stream, &global, frame_avail ? &raw : NULL, frames_in)); #endif - vpx_usec_timer_mark(&timer); - cx_time += vpx_usec_timer_elapsed(&timer); + aom_usec_timer_mark(&timer); + cx_time += aom_usec_timer_elapsed(&timer); FOREACH_STREAM(update_quantizer_histogram(stream)); @@ -2126,10 +2126,10 @@ int main(int argc, const char **argv_) { } } - FOREACH_STREAM(vpx_codec_destroy(&stream->encoder)); + FOREACH_STREAM(aom_codec_destroy(&stream->encoder)); if (global.test_decode != TEST_DECODE_OFF) { - FOREACH_STREAM(vpx_codec_destroy(&stream->decoder)); + FOREACH_STREAM(aom_codec_destroy(&stream->decoder)); } close_input_file(&input); @@ -2175,9 +2175,9 @@ int main(int argc, const char **argv_) { #endif #if CONFIG_VPX_HIGHBITDEPTH - if (allocated_raw_shift) vpx_img_free(&raw_shift); + if (allocated_raw_shift) aom_img_free(&raw_shift); #endif - vpx_img_free(&raw); + aom_img_free(&raw); free(argv); free(streams); return res ? EXIT_FAILURE : EXIT_SUCCESS; diff --git a/vpxenc.h b/aomenc.h similarity index 96% rename from vpxenc.h rename to aomenc.h index a511d29f37393badcd8a64a043dfc7854ce94c9d..7f64bfe2f2092cb9c8357335182cdcf1e59b6a9a 100644 --- a/vpxenc.h +++ b/aomenc.h @@ -11,7 +11,7 @@ #ifndef VPXENC_H_ #define VPXENC_H_ -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #ifdef __cplusplus extern "C" { @@ -48,7 +48,7 @@ struct VpxEncoderConfig { int show_psnr; enum TestDecodeFatality test_decode; int have_framerate; - struct vpx_rational framerate; + struct aom_rational framerate; int out_part; int debug; int show_q_hist_buckets; diff --git a/vpxstats.c b/aomstats.c similarity index 96% rename from vpxstats.c rename to aomstats.c index af65c285245bf19adf4a89eabad37bdab7c5c29b..0cfeea2f14387ca85652ca34712347f48b41614f 100644 --- a/vpxstats.c +++ b/aomstats.c @@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpxstats.h" +#include "./aomstats.h" #include <math.h> #include <stdlib.h> @@ -103,4 +103,4 @@ void stats_write(stats_io_t *stats, const void *pkt, size_t len) { } } -vpx_fixed_buf_t stats_get(stats_io_t *stats) { return stats->buf; } +aom_fixed_buf_t stats_get(stats_io_t *stats) { return stats->buf; } diff --git a/vpxstats.h b/aomstats.h similarity index 92% rename from vpxstats.h rename to aomstats.h index 10338ff17de6559b599cb49d64d43b8c4c61f433..c59bc99741dd84f02ff78f20069ef96d6689df04 100644 --- a/vpxstats.h +++ b/aomstats.h @@ -14,7 +14,7 @@ #include <stdio.h> -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #ifdef __cplusplus extern "C" { @@ -24,7 +24,7 @@ extern "C" { * first pass statistics */ typedef struct { - vpx_fixed_buf_t buf; + aom_fixed_buf_t buf; int pass; FILE *file; char *buf_ptr; @@ -35,7 +35,7 @@ int stats_open_file(stats_io_t *stats, const char *fpf, int pass); int stats_open_mem(stats_io_t *stats, int pass); void stats_close(stats_io_t *stats, int last_pass); void stats_write(stats_io_t *stats, const void *pkt, size_t len); -vpx_fixed_buf_t stats_get(stats_io_t *stats); +aom_fixed_buf_t stats_get(stats_io_t *stats); #ifdef __cplusplus } // extern "C" diff --git a/args.c b/args.c index fda919264cbca1c96d8ff741dfdf88b4a40a46a7..e12f16bed9719209f5dc778fce73c6d2f7102aee 100644 --- a/args.c +++ b/args.c @@ -152,14 +152,14 @@ int arg_parse_int(const struct arg *arg) { return 0; } -struct vpx_rational { +struct aom_rational { int num; /**< fraction numerator */ int den; /**< fraction denominator */ }; -struct vpx_rational arg_parse_rational(const struct arg *arg) { +struct aom_rational arg_parse_rational(const struct arg *arg) { long int rawval; char *endptr; - struct vpx_rational rat; + struct aom_rational rat; /* parse numerator */ rawval = strtol(arg->val, &endptr, 10); diff --git a/args.h b/args.h index 4c0932cf7a88d87cdbeac7e7ed09dfef01eb6ea7..e7841fc6462148106464c9e568bb702fd5c08d0a 100644 --- a/args.h +++ b/args.h @@ -54,7 +54,7 @@ char **argv_dup(int argc, const char **argv); unsigned int arg_parse_uint(const struct arg *arg); int arg_parse_int(const struct arg *arg); -struct vpx_rational arg_parse_rational(const struct arg *arg); +struct aom_rational arg_parse_rational(const struct arg *arg); int arg_parse_enum(const struct arg *arg); int arg_parse_enum_or_int(const struct arg *arg); #ifdef __cplusplus diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c index 5b045f2706916b25574ecd4d626ddbe50306f21a..162ee065f31001d6952e01c31e507ceca07a5375 100644 --- a/av1/av1_cx_iface.c +++ b/av1/av1_cx_iface.c @@ -12,11 +12,11 @@ #include <stdlib.h> #include <string.h> -#include "./vpx_config.h" -#include "aom/vpx_encoder.h" -#include "aom_ports/vpx_once.h" -#include "aom/internal/vpx_codec_internal.h" -#include "./vpx_version.h" +#include "./aom_config.h" +#include "aom/aom_encoder.h" +#include "aom_ports/aom_once.h" +#include "aom/internal/aom_codec_internal.h" +#include "./aom_version.h" #include "av1/encoder/encoder.h" #include "aom/vp8cx.h" #include "av1/encoder/firstpass.h" @@ -34,7 +34,7 @@ struct vp10_extracfg { unsigned int arnr_strength; unsigned int min_gf_interval; unsigned int max_gf_interval; - vpx_tune_metric tuning; + aom_tune_metric tuning; unsigned int cq_level; // constrained quality level unsigned int rc_max_intra_bitrate_pct; unsigned int rc_max_inter_bitrate_pct; @@ -48,9 +48,9 @@ struct vp10_extracfg { unsigned int frame_parallel_decoding_mode; AQ_MODE aq_mode; unsigned int frame_periodic_boost; - vpx_bit_depth_t bit_depth; - vpx_tune_content content; - vpx_color_space_t color_space; + aom_bit_depth_t bit_depth; + aom_tune_content content; + aom_color_space_t color_space; int color_range; int render_width; int render_height; @@ -90,9 +90,9 @@ static struct vp10_extracfg default_extra_cfg = { 0, // render height }; -struct vpx_codec_alg_priv { - vpx_codec_priv_t base; - vpx_codec_enc_cfg_t cfg; +struct aom_codec_alg_priv { + aom_codec_priv_t base; + aom_codec_enc_cfg_t cfg; struct vp10_extracfg extra_cfg; VP10EncoderConfig oxcf; VP10_COMP *cpi; @@ -105,17 +105,17 @@ struct vpx_codec_alg_priv { #if !CONFIG_MISC_FIXES size_t pending_frame_magnitude; #endif - vpx_image_t preview_img; - vpx_enc_frame_flags_t next_frame_flags; + aom_image_t preview_img; + aom_enc_frame_flags_t next_frame_flags; vp8_postproc_cfg_t preview_ppcfg; - vpx_codec_pkt_list_decl(256) pkt_list; + aom_codec_pkt_list_decl(256) pkt_list; unsigned int fixed_kf_cntr; - vpx_codec_priv_output_cx_pkt_cb_pair_t output_cx_pkt_cb; + aom_codec_priv_output_cx_pkt_cb_pair_t output_cx_pkt_cb; // BufferPool that holds all reference frames. BufferPool *buffer_pool; }; -static VPX_REFFRAME ref_frame_to_vp10_reframe(vpx_ref_frame_type_t frame) { +static VPX_REFFRAME ref_frame_to_vp10_reframe(aom_ref_frame_type_t frame) { switch (frame) { case VP8_LAST_FRAME: return VPX_LAST_FLAG; case VP8_GOLD_FRAME: return VPX_GOLD_FLAG; @@ -125,9 +125,9 @@ static VPX_REFFRAME ref_frame_to_vp10_reframe(vpx_ref_frame_type_t frame) { return VPX_LAST_FLAG; } -static vpx_codec_err_t update_error_state( - vpx_codec_alg_priv_t *ctx, const struct vpx_internal_error_info *error) { - const vpx_codec_err_t res = error->error_code; +static aom_codec_err_t update_error_state( + aom_codec_alg_priv_t *ctx, const struct aom_internal_error_info *error) { + const aom_codec_err_t res = error->error_code; if (res != VPX_CODEC_OK) ctx->base.err_detail = error->has_detail ? error->detail : NULL; @@ -163,8 +163,8 @@ static vpx_codec_err_t update_error_state( if (!!((p)->memb) != (p)->memb) ERROR(#memb " expected boolean"); \ } while (0) -static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, - const vpx_codec_enc_cfg_t *cfg, +static aom_codec_err_t validate_config(aom_codec_alg_priv_t *ctx, + const aom_codec_enc_cfg_t *cfg, const struct vp10_extracfg *extra_cfg) { RANGE_CHECK(cfg, g_w, 1, 65535); // 16 bits available RANGE_CHECK(cfg, g_h, 1, 65535); // 16 bits available @@ -275,8 +275,8 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_OK; } -static vpx_codec_err_t validate_img(vpx_codec_alg_priv_t *ctx, - const vpx_image_t *img) { +static aom_codec_err_t validate_img(aom_codec_alg_priv_t *ctx, + const aom_image_t *img) { switch (img->fmt) { case VPX_IMG_FMT_YV12: case VPX_IMG_FMT_I420: @@ -313,7 +313,7 @@ static vpx_codec_err_t validate_img(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_OK; } -static int get_image_bps(const vpx_image_t *img) { +static int get_image_bps(const aom_image_t *img) { switch (img->fmt) { case VPX_IMG_FMT_YV12: case VPX_IMG_FMT_I420: return 12; @@ -329,8 +329,8 @@ static int get_image_bps(const vpx_image_t *img) { return 0; } -static vpx_codec_err_t set_encoder_config( - VP10EncoderConfig *oxcf, const vpx_codec_enc_cfg_t *cfg, +static aom_codec_err_t set_encoder_config( + VP10EncoderConfig *oxcf, const aom_codec_enc_cfg_t *cfg, const struct vp10_extracfg *extra_cfg) { const int is_vbr = cfg->rc_end_usage == VPX_VBR; oxcf->profile = cfg->g_profile; @@ -472,9 +472,9 @@ static vpx_codec_err_t set_encoder_config( return VPX_CODEC_OK; } -static vpx_codec_err_t encoder_set_config(vpx_codec_alg_priv_t *ctx, - const vpx_codec_enc_cfg_t *cfg) { - vpx_codec_err_t res; +static aom_codec_err_t encoder_set_config(aom_codec_alg_priv_t *ctx, + const aom_codec_enc_cfg_t *cfg) { + aom_codec_err_t res; int force_key = 0; if (cfg->g_w != ctx->cfg.g_w || cfg->g_h != ctx->cfg.g_h) { @@ -508,7 +508,7 @@ static vpx_codec_err_t encoder_set_config(vpx_codec_alg_priv_t *ctx, return res; } -static vpx_codec_err_t ctrl_get_quantizer(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_get_quantizer(aom_codec_alg_priv_t *ctx, va_list args) { int *const arg = va_arg(args, int *); if (arg == NULL) return VPX_CODEC_INVALID_PARAM; @@ -516,7 +516,7 @@ static vpx_codec_err_t ctrl_get_quantizer(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_OK; } -static vpx_codec_err_t ctrl_get_quantizer64(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_get_quantizer64(aom_codec_alg_priv_t *ctx, va_list args) { int *const arg = va_arg(args, int *); if (arg == NULL) return VPX_CODEC_INVALID_PARAM; @@ -524,9 +524,9 @@ static vpx_codec_err_t ctrl_get_quantizer64(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_OK; } -static vpx_codec_err_t update_extra_cfg(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t update_extra_cfg(aom_codec_alg_priv_t *ctx, const struct vp10_extracfg *extra_cfg) { - const vpx_codec_err_t res = validate_config(ctx, &ctx->cfg, extra_cfg); + const aom_codec_err_t res = validate_config(ctx, &ctx->cfg, extra_cfg); if (res == VPX_CODEC_OK) { ctx->extra_cfg = *extra_cfg; set_encoder_config(&ctx->oxcf, &ctx->cfg, &ctx->extra_cfg); @@ -535,114 +535,114 @@ static vpx_codec_err_t update_extra_cfg(vpx_codec_alg_priv_t *ctx, return res; } -static vpx_codec_err_t ctrl_set_cpuused(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_cpuused(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.cpu_used = CAST(VP8E_SET_CPUUSED, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_enable_auto_alt_ref(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_enable_auto_alt_ref(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.enable_auto_alt_ref = CAST(VP8E_SET_ENABLEAUTOALTREF, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_noise_sensitivity(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_noise_sensitivity(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.noise_sensitivity = CAST(VP9E_SET_NOISE_SENSITIVITY, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_sharpness(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_sharpness(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.sharpness = CAST(VP8E_SET_SHARPNESS, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_static_thresh(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_static_thresh(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.static_thresh = CAST(VP8E_SET_STATIC_THRESHOLD, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_tile_columns(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_tile_columns(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.tile_columns = CAST(VP9E_SET_TILE_COLUMNS, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_tile_rows(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_tile_rows(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.tile_rows = CAST(VP9E_SET_TILE_ROWS, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_arnr_max_frames(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_arnr_max_frames(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.arnr_max_frames = CAST(VP8E_SET_ARNR_MAXFRAMES, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_arnr_strength(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_arnr_strength(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.arnr_strength = CAST(VP8E_SET_ARNR_STRENGTH, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_arnr_type(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_arnr_type(aom_codec_alg_priv_t *ctx, va_list args) { (void)ctx; (void)args; return VPX_CODEC_OK; } -static vpx_codec_err_t ctrl_set_tuning(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_tuning(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.tuning = CAST(VP8E_SET_TUNING, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_cq_level(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_cq_level(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.cq_level = CAST(VP8E_SET_CQ_LEVEL, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_rc_max_intra_bitrate_pct( - vpx_codec_alg_priv_t *ctx, va_list args) { +static aom_codec_err_t ctrl_set_rc_max_intra_bitrate_pct( + aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.rc_max_intra_bitrate_pct = CAST(VP8E_SET_MAX_INTRA_BITRATE_PCT, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_rc_max_inter_bitrate_pct( - vpx_codec_alg_priv_t *ctx, va_list args) { +static aom_codec_err_t ctrl_set_rc_max_inter_bitrate_pct( + aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.rc_max_inter_bitrate_pct = CAST(VP8E_SET_MAX_INTER_BITRATE_PCT, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_rc_gf_cbr_boost_pct(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_rc_gf_cbr_boost_pct(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.gf_cbr_boost_pct = CAST(VP9E_SET_GF_CBR_BOOST_PCT, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_lossless(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_lossless(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.lossless = CAST(VP9E_SET_LOSSLESS, args); @@ -650,21 +650,21 @@ static vpx_codec_err_t ctrl_set_lossless(vpx_codec_alg_priv_t *ctx, } #if CONFIG_AOM_QM -static vpx_codec_err_t ctrl_set_enable_qm(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_enable_qm(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.enable_qm = CAST(VP9E_SET_ENABLE_QM, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_qm_min(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_qm_min(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.qm_min = CAST(VP9E_SET_QM_MIN, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_qm_max(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_qm_max(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.qm_max = CAST(VP9E_SET_QM_MAX, args); @@ -672,55 +672,55 @@ static vpx_codec_err_t ctrl_set_qm_max(vpx_codec_alg_priv_t *ctx, } #endif -static vpx_codec_err_t ctrl_set_frame_parallel_decoding_mode( - vpx_codec_alg_priv_t *ctx, va_list args) { +static aom_codec_err_t ctrl_set_frame_parallel_decoding_mode( + aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.frame_parallel_decoding_mode = CAST(VP9E_SET_FRAME_PARALLEL_DECODING, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_aq_mode(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_aq_mode(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.aq_mode = CAST(VP9E_SET_AQ_MODE, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_min_gf_interval(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_min_gf_interval(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.min_gf_interval = CAST(VP9E_SET_MIN_GF_INTERVAL, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_max_gf_interval(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_max_gf_interval(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.max_gf_interval = CAST(VP9E_SET_MAX_GF_INTERVAL, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_frame_periodic_boost(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_frame_periodic_boost(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.frame_periodic_boost = CAST(VP9E_SET_FRAME_PERIODIC_BOOST, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t encoder_init(vpx_codec_ctx_t *ctx, - vpx_codec_priv_enc_mr_cfg_t *data) { - vpx_codec_err_t res = VPX_CODEC_OK; +static aom_codec_err_t encoder_init(aom_codec_ctx_t *ctx, + aom_codec_priv_enc_mr_cfg_t *data) { + aom_codec_err_t res = VPX_CODEC_OK; (void)data; if (ctx->priv == NULL) { - vpx_codec_alg_priv_t *const priv = vpx_calloc(1, sizeof(*priv)); + aom_codec_alg_priv_t *const priv = aom_calloc(1, sizeof(*priv)); if (priv == NULL) return VPX_CODEC_MEM_ERROR; - ctx->priv = (vpx_codec_priv_t *)priv; + ctx->priv = (aom_codec_priv_t *)priv; ctx->priv->init_flags = ctx->init_flags; ctx->priv->enc.total_encoders = 1; - priv->buffer_pool = (BufferPool *)vpx_calloc(1, sizeof(BufferPool)); + priv->buffer_pool = (BufferPool *)aom_calloc(1, sizeof(BufferPool)); if (priv->buffer_pool == NULL) return VPX_CODEC_MEM_ERROR; #if CONFIG_MULTITHREAD @@ -757,18 +757,18 @@ static vpx_codec_err_t encoder_init(vpx_codec_ctx_t *ctx, return res; } -static vpx_codec_err_t encoder_destroy(vpx_codec_alg_priv_t *ctx) { +static aom_codec_err_t encoder_destroy(aom_codec_alg_priv_t *ctx) { free(ctx->cx_data); vp10_remove_compressor(ctx->cpi); #if CONFIG_MULTITHREAD pthread_mutex_destroy(&ctx->buffer_pool->pool_mutex); #endif - vpx_free(ctx->buffer_pool); - vpx_free(ctx); + aom_free(ctx->buffer_pool); + aom_free(ctx); return VPX_CODEC_OK; } -static void pick_quickcompress_mode(vpx_codec_alg_priv_t *ctx, +static void pick_quickcompress_mode(aom_codec_alg_priv_t *ctx, unsigned long duration, unsigned long deadline) { MODE new_mode = BEST; @@ -776,7 +776,7 @@ static void pick_quickcompress_mode(vpx_codec_alg_priv_t *ctx, switch (ctx->cfg.g_pass) { case VPX_RC_ONE_PASS: if (deadline > 0) { - const vpx_codec_enc_cfg_t *const cfg = &ctx->cfg; + const aom_codec_enc_cfg_t *const cfg = &ctx->cfg; // Convert duration parameter from stream timebase to microseconds. const uint64_t duration_us = (uint64_t)duration * 1000000 * @@ -802,7 +802,7 @@ static void pick_quickcompress_mode(vpx_codec_alg_priv_t *ctx, // Turn on to test if supplemental superframe data breaks decoding // #define TEST_SUPPLEMENTAL_SUPERFRAME_DATA -static int write_superframe_index(vpx_codec_alg_priv_t *ctx) { +static int write_superframe_index(aom_codec_alg_priv_t *ctx) { uint8_t marker = 0xc0; unsigned int mask; int mag, index_sz; @@ -878,20 +878,20 @@ static int write_superframe_index(vpx_codec_alg_priv_t *ctx) { // vp10 uses 10,000,000 ticks/second as time stamp #define TICKS_PER_SEC 10000000LL -static int64_t timebase_units_to_ticks(const vpx_rational_t *timebase, +static int64_t timebase_units_to_ticks(const aom_rational_t *timebase, int64_t n) { return n * TICKS_PER_SEC * timebase->num / timebase->den; } -static int64_t ticks_to_timebase_units(const vpx_rational_t *timebase, +static int64_t ticks_to_timebase_units(const aom_rational_t *timebase, int64_t n) { const int64_t round = TICKS_PER_SEC * timebase->num / 2 - 1; return (n * timebase->den + round) / timebase->num / TICKS_PER_SEC; } -static vpx_codec_frame_flags_t get_frame_pkt_flags(const VP10_COMP *cpi, +static aom_codec_frame_flags_t get_frame_pkt_flags(const VP10_COMP *cpi, unsigned int lib_flags) { - vpx_codec_frame_flags_t flags = lib_flags << 16; + aom_codec_frame_flags_t flags = lib_flags << 16; if (lib_flags & FRAMEFLAGS_KEY) flags |= VPX_FRAME_IS_KEY; @@ -900,15 +900,15 @@ static vpx_codec_frame_flags_t get_frame_pkt_flags(const VP10_COMP *cpi, return flags; } -static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, - const vpx_image_t *img, - vpx_codec_pts_t pts, +static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx, + const aom_image_t *img, + aom_codec_pts_t pts, unsigned long duration, - vpx_enc_frame_flags_t flags, + aom_enc_frame_flags_t flags, unsigned long deadline) { - vpx_codec_err_t res = VPX_CODEC_OK; + aom_codec_err_t res = VPX_CODEC_OK; VP10_COMP *const cpi = ctx->cpi; - const vpx_rational_t *const timebase = &ctx->cfg.g_timebase; + const aom_rational_t *const timebase = &ctx->cfg.g_timebase; size_t data_sz; if (img != NULL) { @@ -933,7 +933,7 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, } pick_quickcompress_mode(ctx, duration, deadline); - vpx_codec_pkt_list_init(&ctx->pkt_list); + aom_codec_pkt_list_init(&ctx->pkt_list); // Handle Flags if (((flags & VP8_EFLAG_NO_UPD_GF) && (flags & VP8_EFLAG_FORCE_GF)) || @@ -1002,7 +1002,7 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, &dst_time_stamp, &dst_end_time_stamp, !img)) { if (size) { - vpx_codec_cx_pkt_t pkt; + aom_codec_cx_pkt_t pkt; // Pack invisible frames with the next visible frame if (!cpi->common.show_frame) { @@ -1070,7 +1070,7 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, ctx->output_cx_pkt_cb.output_cx_pkt(&pkt, ctx->output_cx_pkt_cb.user_priv); else - vpx_codec_pkt_list_add(&ctx->pkt_list.head, &pkt); + aom_codec_pkt_list_add(&ctx->pkt_list.head, &pkt); cx_data += size; cx_data_sz -= size; @@ -1081,14 +1081,14 @@ static vpx_codec_err_t encoder_encode(vpx_codec_alg_priv_t *ctx, return res; } -static const vpx_codec_cx_pkt_t *encoder_get_cxdata(vpx_codec_alg_priv_t *ctx, - vpx_codec_iter_t *iter) { - return vpx_codec_pkt_list_get(&ctx->pkt_list.head, iter); +static const aom_codec_cx_pkt_t *encoder_get_cxdata(aom_codec_alg_priv_t *ctx, + aom_codec_iter_t *iter) { + return aom_codec_pkt_list_get(&ctx->pkt_list.head, iter); } -static vpx_codec_err_t ctrl_set_reference(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx, va_list args) { - vpx_ref_frame_t *const frame = va_arg(args, vpx_ref_frame_t *); + aom_ref_frame_t *const frame = va_arg(args, aom_ref_frame_t *); if (frame != NULL) { YV12_BUFFER_CONFIG sd; @@ -1102,9 +1102,9 @@ static vpx_codec_err_t ctrl_set_reference(vpx_codec_alg_priv_t *ctx, } } -static vpx_codec_err_t ctrl_copy_reference(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx, va_list args) { - vpx_ref_frame_t *const frame = va_arg(args, vpx_ref_frame_t *); + aom_ref_frame_t *const frame = va_arg(args, aom_ref_frame_t *); if (frame != NULL) { YV12_BUFFER_CONFIG sd; @@ -1118,7 +1118,7 @@ static vpx_codec_err_t ctrl_copy_reference(vpx_codec_alg_priv_t *ctx, } } -static vpx_codec_err_t ctrl_get_reference(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_get_reference(aom_codec_alg_priv_t *ctx, va_list args) { vp9_ref_frame_t *const frame = va_arg(args, vp9_ref_frame_t *); @@ -1133,14 +1133,14 @@ static vpx_codec_err_t ctrl_get_reference(vpx_codec_alg_priv_t *ctx, } } -static vpx_codec_err_t ctrl_set_previewpp(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_previewpp(aom_codec_alg_priv_t *ctx, va_list args) { (void)ctx; (void)args; return VPX_CODEC_INCAPABLE; } -static vpx_image_t *encoder_get_preview(vpx_codec_alg_priv_t *ctx) { +static aom_image_t *encoder_get_preview(aom_codec_alg_priv_t *ctx) { YV12_BUFFER_CONFIG sd; if (vp10_get_preview_raw_frame(ctx->cpi, &sd) == 0) { @@ -1151,7 +1151,7 @@ static vpx_image_t *encoder_get_preview(vpx_codec_alg_priv_t *ctx) { } } -static vpx_codec_err_t ctrl_set_roi_map(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_roi_map(aom_codec_alg_priv_t *ctx, va_list args) { (void)ctx; (void)args; @@ -1160,9 +1160,9 @@ static vpx_codec_err_t ctrl_set_roi_map(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_INVALID_PARAM; } -static vpx_codec_err_t ctrl_set_active_map(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_active_map(aom_codec_alg_priv_t *ctx, va_list args) { - vpx_active_map_t *const map = va_arg(args, vpx_active_map_t *); + aom_active_map_t *const map = va_arg(args, aom_active_map_t *); if (map) { if (!vp10_set_active_map(ctx->cpi, map->active_map, (int)map->rows, @@ -1175,9 +1175,9 @@ static vpx_codec_err_t ctrl_set_active_map(vpx_codec_alg_priv_t *ctx, } } -static vpx_codec_err_t ctrl_get_active_map(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_get_active_map(aom_codec_alg_priv_t *ctx, va_list args) { - vpx_active_map_t *const map = va_arg(args, vpx_active_map_t *); + aom_active_map_t *const map = va_arg(args, aom_active_map_t *); if (map) { if (!vp10_get_active_map(ctx->cpi, map->active_map, (int)map->rows, @@ -1190,9 +1190,9 @@ static vpx_codec_err_t ctrl_get_active_map(vpx_codec_alg_priv_t *ctx, } } -static vpx_codec_err_t ctrl_set_scale_mode(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_scale_mode(aom_codec_alg_priv_t *ctx, va_list args) { - vpx_scaling_mode_t *const mode = va_arg(args, vpx_scaling_mode_t *); + aom_scaling_mode_t *const mode = va_arg(args, aom_scaling_mode_t *); if (mode) { const int res = @@ -1204,38 +1204,38 @@ static vpx_codec_err_t ctrl_set_scale_mode(vpx_codec_alg_priv_t *ctx, } } -static vpx_codec_err_t ctrl_register_cx_callback(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_register_cx_callback(aom_codec_alg_priv_t *ctx, va_list args) { - vpx_codec_priv_output_cx_pkt_cb_pair_t *cbp = - (vpx_codec_priv_output_cx_pkt_cb_pair_t *)va_arg(args, void *); + aom_codec_priv_output_cx_pkt_cb_pair_t *cbp = + (aom_codec_priv_output_cx_pkt_cb_pair_t *)va_arg(args, void *); ctx->output_cx_pkt_cb.output_cx_pkt = cbp->output_cx_pkt; ctx->output_cx_pkt_cb.user_priv = cbp->user_priv; return VPX_CODEC_OK; } -static vpx_codec_err_t ctrl_set_tune_content(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_tune_content(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.content = CAST(VP9E_SET_TUNE_CONTENT, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_color_space(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_color_space(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.color_space = CAST(VP9E_SET_COLOR_SPACE, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_color_range(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_color_range(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.color_range = CAST(VP9E_SET_COLOR_RANGE, args); return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_err_t ctrl_set_render_size(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_render_size(aom_codec_alg_priv_t *ctx, va_list args) { struct vp10_extracfg extra_cfg = ctx->extra_cfg; int *const render_size = va_arg(args, int *); @@ -1244,7 +1244,7 @@ static vpx_codec_err_t ctrl_set_render_size(vpx_codec_alg_priv_t *ctx, return update_extra_cfg(ctx, &extra_cfg); } -static vpx_codec_ctrl_fn_map_t encoder_ctrl_maps[] = { +static aom_codec_ctrl_fn_map_t encoder_ctrl_maps[] = { { VP8_COPY_REFERENCE, ctrl_copy_reference }, // Setters @@ -1294,7 +1294,7 @@ static vpx_codec_ctrl_fn_map_t encoder_ctrl_maps[] = { { -1, NULL }, }; -static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { +static aom_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { { 0, { // NOLINT @@ -1363,33 +1363,33 @@ static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = { #ifndef VERSION_STRING #define VERSION_STRING #endif -CODEC_INTERFACE(vpx_codec_vp10_cx) = { +CODEC_INTERFACE(aom_codec_vp10_cx) = { "WebM Project VP10 Encoder" VERSION_STRING, VPX_CODEC_INTERNAL_ABI_VERSION, #if CONFIG_VPX_HIGHBITDEPTH VPX_CODEC_CAP_HIGHBITDEPTH | #endif - VPX_CODEC_CAP_ENCODER | VPX_CODEC_CAP_PSNR, // vpx_codec_caps_t - encoder_init, // vpx_codec_init_fn_t - encoder_destroy, // vpx_codec_destroy_fn_t - encoder_ctrl_maps, // vpx_codec_ctrl_fn_map_t + VPX_CODEC_CAP_ENCODER | VPX_CODEC_CAP_PSNR, // aom_codec_caps_t + encoder_init, // aom_codec_init_fn_t + encoder_destroy, // aom_codec_destroy_fn_t + encoder_ctrl_maps, // aom_codec_ctrl_fn_map_t { // NOLINT - NULL, // vpx_codec_peek_si_fn_t - NULL, // vpx_codec_get_si_fn_t - NULL, // vpx_codec_decode_fn_t - NULL, // vpx_codec_frame_get_fn_t - NULL // vpx_codec_set_fb_fn_t + NULL, // aom_codec_peek_si_fn_t + NULL, // aom_codec_get_si_fn_t + NULL, // aom_codec_decode_fn_t + NULL, // aom_codec_frame_get_fn_t + NULL // aom_codec_set_fb_fn_t }, { // NOLINT 1, // 1 cfg map - encoder_usage_cfg_map, // vpx_codec_enc_cfg_map_t - encoder_encode, // vpx_codec_encode_fn_t - encoder_get_cxdata, // vpx_codec_get_cx_data_fn_t - encoder_set_config, // vpx_codec_enc_config_set_fn_t - NULL, // vpx_codec_get_global_headers_fn_t - encoder_get_preview, // vpx_codec_get_preview_frame_fn_t - NULL // vpx_codec_enc_mr_get_mem_loc_fn_t + encoder_usage_cfg_map, // aom_codec_enc_cfg_map_t + encoder_encode, // aom_codec_encode_fn_t + encoder_get_cxdata, // aom_codec_get_cx_data_fn_t + encoder_set_config, // aom_codec_enc_config_set_fn_t + NULL, // aom_codec_get_global_headers_fn_t + encoder_get_preview, // aom_codec_get_preview_frame_fn_t + NULL // aom_codec_enc_mr_get_mem_loc_fn_t } }; diff --git a/av1/av1_dx_iface.c b/av1/av1_dx_iface.c index 5bfaf2872a52577b56555e3304f65bbdc7a08c90..f4fee9723a847ecbe0cfc72ebd5a896f0bb27cbc 100644 --- a/av1/av1_dx_iface.c +++ b/av1/av1_dx_iface.c @@ -12,15 +12,15 @@ #include <stdlib.h> #include <string.h> -#include "./vpx_config.h" -#include "./vpx_version.h" +#include "./aom_config.h" +#include "./aom_version.h" -#include "aom/internal/vpx_codec_internal.h" +#include "aom/internal/aom_codec_internal.h" #include "aom/vp8dx.h" -#include "aom/vpx_decoder.h" +#include "aom/aom_decoder.h" #include "aom_dsp/bitreader_buffer.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_util/vpx_thread.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_util/aom_thread.h" #include "av1/common/alloccommon.h" #include "av1/common/frame_buffers.h" @@ -30,7 +30,7 @@ #include "av1/av1_iface_common.h" -typedef vpx_codec_stream_info_t vp10_stream_info_t; +typedef aom_codec_stream_info_t vp10_stream_info_t; // This limit is due to framebuffer numbers. // TODO(hkuang): Remove this limit after implementing ondemand framebuffers. @@ -38,18 +38,18 @@ typedef vpx_codec_stream_info_t vp10_stream_info_t; typedef struct cache_frame { int fb_idx; - vpx_image_t img; + aom_image_t img; } cache_frame; -struct vpx_codec_alg_priv { - vpx_codec_priv_t base; - vpx_codec_dec_cfg_t cfg; +struct aom_codec_alg_priv { + aom_codec_priv_t base; + aom_codec_dec_cfg_t cfg; vp10_stream_info_t si; int postproc_cfg_set; vp8_postproc_cfg_t postproc_cfg; - vpx_decrypt_cb decrypt_cb; + aom_decrypt_cb decrypt_cb; void *decrypt_state; - vpx_image_t img; + aom_image_t img; int img_avail; int flushed; int invert_tile_order; @@ -75,23 +75,23 @@ struct vpx_codec_alg_priv { // External frame buffer info to save for VP10 common. void *ext_priv; // Private data associated with the external frame buffers. - vpx_get_frame_buffer_cb_fn_t get_ext_fb_cb; - vpx_release_frame_buffer_cb_fn_t release_ext_fb_cb; + aom_get_frame_buffer_cb_fn_t get_ext_fb_cb; + aom_release_frame_buffer_cb_fn_t release_ext_fb_cb; }; -static vpx_codec_err_t decoder_init(vpx_codec_ctx_t *ctx, - vpx_codec_priv_enc_mr_cfg_t *data) { - // This function only allocates space for the vpx_codec_alg_priv_t +static aom_codec_err_t decoder_init(aom_codec_ctx_t *ctx, + aom_codec_priv_enc_mr_cfg_t *data) { + // This function only allocates space for the aom_codec_alg_priv_t // structure. More memory may be required at the time the stream // information becomes known. (void)data; if (!ctx->priv) { - vpx_codec_alg_priv_t *const priv = - (vpx_codec_alg_priv_t *)vpx_calloc(1, sizeof(*priv)); + aom_codec_alg_priv_t *const priv = + (aom_codec_alg_priv_t *)aom_calloc(1, sizeof(*priv)); if (priv == NULL) return VPX_CODEC_MEM_ERROR; - ctx->priv = (vpx_codec_priv_t *)priv; + ctx->priv = (aom_codec_priv_t *)priv; ctx->priv->init_flags = ctx->init_flags; priv->si.sz = sizeof(priv->si); priv->flushed = 0; @@ -110,22 +110,22 @@ static vpx_codec_err_t decoder_init(vpx_codec_ctx_t *ctx, return VPX_CODEC_OK; } -static vpx_codec_err_t decoder_destroy(vpx_codec_alg_priv_t *ctx) { +static aom_codec_err_t decoder_destroy(aom_codec_alg_priv_t *ctx) { if (ctx->frame_workers != NULL) { int i; for (i = 0; i < ctx->num_frame_workers; ++i) { VPxWorker *const worker = &ctx->frame_workers[i]; FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; - vpx_get_worker_interface()->end(worker); + aom_get_worker_interface()->end(worker); vp10_remove_common(&frame_worker_data->pbi->common); vp10_decoder_remove(frame_worker_data->pbi); - vpx_free(frame_worker_data->scratch_buffer); + aom_free(frame_worker_data->scratch_buffer); #if CONFIG_MULTITHREAD pthread_mutex_destroy(&frame_worker_data->stats_mutex); pthread_cond_destroy(&frame_worker_data->stats_cond); #endif - vpx_free(frame_worker_data); + aom_free(frame_worker_data); } #if CONFIG_MULTITHREAD pthread_mutex_destroy(&ctx->buffer_pool->pool_mutex); @@ -137,17 +137,17 @@ static vpx_codec_err_t decoder_destroy(vpx_codec_alg_priv_t *ctx) { vp10_free_internal_frame_buffers(&ctx->buffer_pool->int_frame_buffers); } - vpx_free(ctx->frame_workers); - vpx_free(ctx->buffer_pool); - vpx_free(ctx); + aom_free(ctx->frame_workers); + aom_free(ctx->buffer_pool); + aom_free(ctx); return VPX_CODEC_OK; } static int parse_bitdepth_colorspace_sampling(BITSTREAM_PROFILE profile, - struct vpx_read_bit_buffer *rb) { - vpx_color_space_t color_space; + struct aom_read_bit_buffer *rb) { + aom_color_space_t color_space; if (profile >= PROFILE_2) rb->bit_offset += 1; // Bit-depth 10 or 12. - color_space = (vpx_color_space_t)vpx_rb_read_literal(rb, 3); + color_space = (aom_color_space_t)aom_rb_read_literal(rb, 3); if (color_space != VPX_CS_SRGB) { rb->bit_offset += 1; // [16,235] (including xvycc) vs [0,255] range. if (profile == PROFILE_1 || profile == PROFILE_3) { @@ -165,9 +165,9 @@ static int parse_bitdepth_colorspace_sampling(BITSTREAM_PROFILE profile, return 1; } -static vpx_codec_err_t decoder_peek_si_internal( - const uint8_t *data, unsigned int data_sz, vpx_codec_stream_info_t *si, - int *is_intra_only, vpx_decrypt_cb decrypt_cb, void *decrypt_state) { +static aom_codec_err_t decoder_peek_si_internal( + const uint8_t *data, unsigned int data_sz, aom_codec_stream_info_t *si, + int *is_intra_only, aom_decrypt_cb decrypt_cb, void *decrypt_state) { int intra_only_flag = 0; uint8_t clear_buffer[9]; @@ -185,8 +185,8 @@ static vpx_codec_err_t decoder_peek_si_internal( { int show_frame; int error_resilient; - struct vpx_read_bit_buffer rb = { data, data + data_sz, 0, NULL, NULL }; - const int frame_marker = vpx_rb_read_literal(&rb, 2); + struct aom_read_bit_buffer rb = { data, data + data_sz, 0, NULL, NULL }; + const int frame_marker = aom_rb_read_literal(&rb, 2); const BITSTREAM_PROFILE profile = vp10_read_profile(&rb); if (frame_marker != VPX_FRAME_MARKER) return VPX_CODEC_UNSUP_BITSTREAM; @@ -196,16 +196,16 @@ static vpx_codec_err_t decoder_peek_si_internal( if ((profile >= 2 && data_sz <= 1) || data_sz < 1) return VPX_CODEC_UNSUP_BITSTREAM; - if (vpx_rb_read_bit(&rb)) { // show an existing frame - vpx_rb_read_literal(&rb, 3); // Frame buffer to show. + if (aom_rb_read_bit(&rb)) { // show an existing frame + aom_rb_read_literal(&rb, 3); // Frame buffer to show. return VPX_CODEC_OK; } if (data_sz <= 8) return VPX_CODEC_UNSUP_BITSTREAM; - si->is_kf = !vpx_rb_read_bit(&rb); - show_frame = vpx_rb_read_bit(&rb); - error_resilient = vpx_rb_read_bit(&rb); + si->is_kf = !aom_rb_read_bit(&rb); + show_frame = aom_rb_read_bit(&rb); + error_resilient = aom_rb_read_bit(&rb); if (si->is_kf) { if (!vp10_read_sync_code(&rb)) return VPX_CODEC_UNSUP_BITSTREAM; @@ -214,7 +214,7 @@ static vpx_codec_err_t decoder_peek_si_internal( return VPX_CODEC_UNSUP_BITSTREAM; vp10_read_frame_size(&rb, (int *)&si->w, (int *)&si->h); } else { - intra_only_flag = show_frame ? 0 : vpx_rb_read_bit(&rb); + intra_only_flag = show_frame ? 0 : aom_rb_read_bit(&rb); rb.bit_offset += error_resilient ? 0 : 2; // reset_frame_context @@ -233,37 +233,37 @@ static vpx_codec_err_t decoder_peek_si_internal( return VPX_CODEC_OK; } -static vpx_codec_err_t decoder_peek_si(const uint8_t *data, +static aom_codec_err_t decoder_peek_si(const uint8_t *data, unsigned int data_sz, - vpx_codec_stream_info_t *si) { + aom_codec_stream_info_t *si) { return decoder_peek_si_internal(data, data_sz, si, NULL, NULL, NULL); } -static vpx_codec_err_t decoder_get_si(vpx_codec_alg_priv_t *ctx, - vpx_codec_stream_info_t *si) { +static aom_codec_err_t decoder_get_si(aom_codec_alg_priv_t *ctx, + aom_codec_stream_info_t *si) { const size_t sz = (si->sz >= sizeof(vp10_stream_info_t)) ? sizeof(vp10_stream_info_t) - : sizeof(vpx_codec_stream_info_t); + : sizeof(aom_codec_stream_info_t); memcpy(si, &ctx->si, sz); si->sz = (unsigned int)sz; return VPX_CODEC_OK; } -static void set_error_detail(vpx_codec_alg_priv_t *ctx, +static void set_error_detail(aom_codec_alg_priv_t *ctx, const char *const error) { ctx->base.err_detail = error; } -static vpx_codec_err_t update_error_state( - vpx_codec_alg_priv_t *ctx, const struct vpx_internal_error_info *error) { +static aom_codec_err_t update_error_state( + aom_codec_alg_priv_t *ctx, const struct aom_internal_error_info *error) { if (error->error_code) set_error_detail(ctx, error->has_detail ? error->detail : NULL); return error->error_code; } -static void init_buffer_callbacks(vpx_codec_alg_priv_t *ctx) { +static void init_buffer_callbacks(aom_codec_alg_priv_t *ctx) { int i; for (i = 0; i < ctx->num_frame_workers; ++i) { @@ -285,7 +285,7 @@ static void init_buffer_callbacks(vpx_codec_alg_priv_t *ctx) { pool->release_fb_cb = vp10_release_frame_buffer; if (vp10_alloc_internal_frame_buffers(&pool->int_frame_buffers)) - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to initialize internal frame buffers"); pool->cb_priv = &pool->int_frame_buffers; @@ -334,9 +334,9 @@ static int frame_worker_hook(void *arg1, void *arg2) { return !frame_worker_data->result; } -static vpx_codec_err_t init_decoder(vpx_codec_alg_priv_t *ctx) { +static aom_codec_err_t init_decoder(aom_codec_alg_priv_t *ctx) { int i; - const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); + const VPxWorkerInterface *const winterface = aom_get_worker_interface(); ctx->last_show_frame = -1; ctx->next_submit_worker_id = 0; @@ -353,7 +353,7 @@ static vpx_codec_err_t init_decoder(vpx_codec_alg_priv_t *ctx) { ctx->available_threads = ctx->num_frame_workers; ctx->flushed = 0; - ctx->buffer_pool = (BufferPool *)vpx_calloc(1, sizeof(BufferPool)); + ctx->buffer_pool = (BufferPool *)aom_calloc(1, sizeof(BufferPool)); if (ctx->buffer_pool == NULL) return VPX_CODEC_MEM_ERROR; #if CONFIG_MULTITHREAD @@ -363,7 +363,7 @@ static vpx_codec_err_t init_decoder(vpx_codec_alg_priv_t *ctx) { } #endif - ctx->frame_workers = (VPxWorker *)vpx_malloc(ctx->num_frame_workers * + ctx->frame_workers = (VPxWorker *)aom_malloc(ctx->num_frame_workers * sizeof(*ctx->frame_workers)); if (ctx->frame_workers == NULL) { set_error_detail(ctx, "Failed to allocate frame_workers"); @@ -374,7 +374,7 @@ static vpx_codec_err_t init_decoder(vpx_codec_alg_priv_t *ctx) { VPxWorker *const worker = &ctx->frame_workers[i]; FrameWorkerData *frame_worker_data = NULL; winterface->init(worker); - worker->data1 = vpx_memalign(32, sizeof(FrameWorkerData)); + worker->data1 = aom_memalign(32, sizeof(FrameWorkerData)); if (worker->data1 == NULL) { set_error_detail(ctx, "Failed to allocate frame_worker_data"); return VPX_CODEC_MEM_ERROR; @@ -427,7 +427,7 @@ static vpx_codec_err_t init_decoder(vpx_codec_alg_priv_t *ctx) { return VPX_CODEC_OK; } -static INLINE void check_resync(vpx_codec_alg_priv_t *const ctx, +static INLINE void check_resync(aom_codec_alg_priv_t *const ctx, const VP10Decoder *const pbi) { // Clear resync flag if worker got a key frame or intra only frame. if (ctx->need_resync == 1 && pbi->need_resync == 0 && @@ -435,10 +435,10 @@ static INLINE void check_resync(vpx_codec_alg_priv_t *const ctx, ctx->need_resync = 0; } -static vpx_codec_err_t decode_one(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t decode_one(aom_codec_alg_priv_t *ctx, const uint8_t **data, unsigned int data_sz, void *user_priv, int64_t deadline) { - const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); + const VPxWorkerInterface *const winterface = aom_get_worker_interface(); (void)deadline; // Determine the stream parameters. Note that we rely on peek_si to @@ -446,7 +446,7 @@ static vpx_codec_err_t decode_one(vpx_codec_alg_priv_t *ctx, // of the heap. if (!ctx->si.h) { int is_intra_only = 0; - const vpx_codec_err_t res = + const aom_codec_err_t res = decoder_peek_si_internal(*data, data_sz, &ctx->si, &is_intra_only, ctx->decrypt_cb, ctx->decrypt_state); if (res != VPX_CODEC_OK) return res; @@ -493,7 +493,7 @@ static vpx_codec_err_t decode_one(vpx_codec_alg_priv_t *ctx, // avoid too many deallocate and allocate. if (frame_worker_data->scratch_buffer_size < data_sz) { frame_worker_data->scratch_buffer = - (uint8_t *)vpx_realloc(frame_worker_data->scratch_buffer, data_sz); + (uint8_t *)aom_realloc(frame_worker_data->scratch_buffer, data_sz); if (frame_worker_data->scratch_buffer == NULL) { set_error_detail(ctx, "Failed to reallocate scratch buffer"); return VPX_CODEC_MEM_ERROR; @@ -523,9 +523,9 @@ static vpx_codec_err_t decode_one(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_OK; } -static void wait_worker_and_cache_frame(vpx_codec_alg_priv_t *ctx) { +static void wait_worker_and_cache_frame(aom_codec_alg_priv_t *ctx) { YV12_BUFFER_CONFIG sd; - const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); + const VPxWorkerInterface *const winterface = aom_get_worker_interface(); VPxWorker *const worker = &ctx->frame_workers[ctx->next_output_worker_id]; FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; ctx->next_output_worker_id = @@ -550,12 +550,12 @@ static void wait_worker_and_cache_frame(vpx_codec_alg_priv_t *ctx) { } } -static vpx_codec_err_t decoder_decode(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t decoder_decode(aom_codec_alg_priv_t *ctx, const uint8_t *data, unsigned int data_sz, void *user_priv, long deadline) { const uint8_t *data_start = data; const uint8_t *const data_end = data + data_sz; - vpx_codec_err_t res; + aom_codec_err_t res; uint32_t frame_sizes[8]; int frame_count; @@ -569,7 +569,7 @@ static vpx_codec_err_t decoder_decode(vpx_codec_alg_priv_t *ctx, // Initialize the decoder workers on the first frame. if (ctx->frame_workers == NULL) { - const vpx_codec_err_t res = init_decoder(ctx); + const aom_codec_err_t res = init_decoder(ctx); if (res != VPX_CODEC_OK) return res; } @@ -635,7 +635,7 @@ static vpx_codec_err_t decoder_decode(vpx_codec_alg_priv_t *ctx, for (i = 0; i < frame_count; ++i) { const uint8_t *data_start_copy = data_start; const uint32_t frame_size = frame_sizes[i]; - vpx_codec_err_t res; + aom_codec_err_t res; if (data_start < data || frame_size > (uint32_t)(data_end - data_start)) { set_error_detail(ctx, "Invalid frame size in index"); @@ -651,7 +651,7 @@ static vpx_codec_err_t decoder_decode(vpx_codec_alg_priv_t *ctx, } else { while (data_start < data_end) { const uint32_t frame_size = (uint32_t)(data_end - data_start); - const vpx_codec_err_t res = + const aom_codec_err_t res = decode_one(ctx, &data_start, frame_size, user_priv, deadline); if (res != VPX_CODEC_OK) return res; @@ -669,7 +669,7 @@ static vpx_codec_err_t decoder_decode(vpx_codec_alg_priv_t *ctx, return res; } -static void release_last_output_frame(vpx_codec_alg_priv_t *ctx) { +static void release_last_output_frame(aom_codec_alg_priv_t *ctx) { RefCntBuffer *const frame_bufs = ctx->buffer_pool->frame_bufs; // Decrease reference count of last output frame in frame parallel mode. if (ctx->frame_parallel_decode && ctx->last_show_frame >= 0) { @@ -680,9 +680,9 @@ static void release_last_output_frame(vpx_codec_alg_priv_t *ctx) { } } -static vpx_image_t *decoder_get_frame(vpx_codec_alg_priv_t *ctx, - vpx_codec_iter_t *iter) { - vpx_image_t *img = NULL; +static aom_image_t *decoder_get_frame(aom_codec_alg_priv_t *ctx, + aom_codec_iter_t *iter) { + aom_image_t *img = NULL; // Only return frame when all the cpu are busy or // application fluhsed the decoder in frame parallel decode. @@ -707,7 +707,7 @@ static vpx_image_t *decoder_get_frame(vpx_codec_alg_priv_t *ctx, if (*iter == NULL && ctx->frame_workers != NULL) { do { YV12_BUFFER_CONFIG sd; - const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); + const VPxWorkerInterface *const winterface = aom_get_worker_interface(); VPxWorker *const worker = &ctx->frame_workers[ctx->next_output_worker_id]; FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; @@ -744,9 +744,9 @@ static vpx_image_t *decoder_get_frame(vpx_codec_alg_priv_t *ctx, return NULL; } -static vpx_codec_err_t decoder_set_fb_fn( - vpx_codec_alg_priv_t *ctx, vpx_get_frame_buffer_cb_fn_t cb_get, - vpx_release_frame_buffer_cb_fn_t cb_release, void *cb_priv) { +static aom_codec_err_t decoder_set_fb_fn( + aom_codec_alg_priv_t *ctx, aom_get_frame_buffer_cb_fn_t cb_get, + aom_release_frame_buffer_cb_fn_t cb_release, void *cb_priv) { if (cb_get == NULL || cb_release == NULL) { return VPX_CODEC_INVALID_PARAM; } else if (ctx->frame_workers == NULL) { @@ -761,9 +761,9 @@ static vpx_codec_err_t decoder_set_fb_fn( return VPX_CODEC_ERROR; } -static vpx_codec_err_t ctrl_set_reference(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx, va_list args) { - vpx_ref_frame_t *const data = va_arg(args, vpx_ref_frame_t *); + aom_ref_frame_t *const data = va_arg(args, aom_ref_frame_t *); // Only support this function in serial decode. if (ctx->frame_parallel_decode) { @@ -772,7 +772,7 @@ static vpx_codec_err_t ctrl_set_reference(vpx_codec_alg_priv_t *ctx, } if (data) { - vpx_ref_frame_t *const frame = (vpx_ref_frame_t *)data; + aom_ref_frame_t *const frame = (aom_ref_frame_t *)data; YV12_BUFFER_CONFIG sd; VPxWorker *const worker = ctx->frame_workers; FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; @@ -784,9 +784,9 @@ static vpx_codec_err_t ctrl_set_reference(vpx_codec_alg_priv_t *ctx, } } -static vpx_codec_err_t ctrl_copy_reference(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx, va_list args) { - vpx_ref_frame_t *data = va_arg(args, vpx_ref_frame_t *); + aom_ref_frame_t *data = va_arg(args, aom_ref_frame_t *); // Only support this function in serial decode. if (ctx->frame_parallel_decode) { @@ -795,7 +795,7 @@ static vpx_codec_err_t ctrl_copy_reference(vpx_codec_alg_priv_t *ctx, } if (data) { - vpx_ref_frame_t *frame = (vpx_ref_frame_t *)data; + aom_ref_frame_t *frame = (aom_ref_frame_t *)data; YV12_BUFFER_CONFIG sd; VPxWorker *const worker = ctx->frame_workers; FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; @@ -807,7 +807,7 @@ static vpx_codec_err_t ctrl_copy_reference(vpx_codec_alg_priv_t *ctx, } } -static vpx_codec_err_t ctrl_get_reference(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_get_reference(aom_codec_alg_priv_t *ctx, va_list args) { vp9_ref_frame_t *data = va_arg(args, vp9_ref_frame_t *); @@ -830,21 +830,21 @@ static vpx_codec_err_t ctrl_get_reference(vpx_codec_alg_priv_t *ctx, } } -static vpx_codec_err_t ctrl_set_postproc(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_postproc(aom_codec_alg_priv_t *ctx, va_list args) { (void)ctx; (void)args; return VPX_CODEC_INCAPABLE; } -static vpx_codec_err_t ctrl_set_dbg_options(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_dbg_options(aom_codec_alg_priv_t *ctx, va_list args) { (void)ctx; (void)args; return VPX_CODEC_INCAPABLE; } -static vpx_codec_err_t ctrl_get_last_ref_updates(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_get_last_ref_updates(aom_codec_alg_priv_t *ctx, va_list args) { int *const update_info = va_arg(args, int *); @@ -869,7 +869,7 @@ static vpx_codec_err_t ctrl_get_last_ref_updates(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_INVALID_PARAM; } -static vpx_codec_err_t ctrl_get_frame_corrupted(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_get_frame_corrupted(aom_codec_alg_priv_t *ctx, va_list args) { int *corrupted = va_arg(args, int *); @@ -893,7 +893,7 @@ static vpx_codec_err_t ctrl_get_frame_corrupted(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_INVALID_PARAM; } -static vpx_codec_err_t ctrl_get_frame_size(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_get_frame_size(aom_codec_alg_priv_t *ctx, va_list args) { int *const frame_size = va_arg(args, int *); @@ -920,7 +920,7 @@ static vpx_codec_err_t ctrl_get_frame_size(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_INVALID_PARAM; } -static vpx_codec_err_t ctrl_get_render_size(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_get_render_size(aom_codec_alg_priv_t *ctx, va_list args) { int *const render_size = va_arg(args, int *); @@ -947,7 +947,7 @@ static vpx_codec_err_t ctrl_get_render_size(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_INVALID_PARAM; } -static vpx_codec_err_t ctrl_get_bit_depth(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_get_bit_depth(aom_codec_alg_priv_t *ctx, va_list args) { unsigned int *const bit_depth = va_arg(args, unsigned int *); VPxWorker *const worker = &ctx->frame_workers[ctx->next_output_worker_id]; @@ -967,21 +967,21 @@ static vpx_codec_err_t ctrl_get_bit_depth(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_INVALID_PARAM; } -static vpx_codec_err_t ctrl_set_invert_tile_order(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_invert_tile_order(aom_codec_alg_priv_t *ctx, va_list args) { ctx->invert_tile_order = va_arg(args, int); return VPX_CODEC_OK; } -static vpx_codec_err_t ctrl_set_decryptor(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_decryptor(aom_codec_alg_priv_t *ctx, va_list args) { - vpx_decrypt_init *init = va_arg(args, vpx_decrypt_init *); + aom_decrypt_init *init = va_arg(args, aom_decrypt_init *); ctx->decrypt_cb = init ? init->decrypt_cb : NULL; ctx->decrypt_state = init ? init->decrypt_state : NULL; return VPX_CODEC_OK; } -static vpx_codec_err_t ctrl_set_byte_alignment(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_byte_alignment(aom_codec_alg_priv_t *ctx, va_list args) { const int legacy_byte_alignment = 0; const int min_byte_alignment = 32; @@ -1003,7 +1003,7 @@ static vpx_codec_err_t ctrl_set_byte_alignment(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_OK; } -static vpx_codec_err_t ctrl_set_skip_loop_filter(vpx_codec_alg_priv_t *ctx, +static aom_codec_err_t ctrl_set_skip_loop_filter(aom_codec_alg_priv_t *ctx, va_list args) { ctx->skip_loop_filter = va_arg(args, int); @@ -1016,7 +1016,7 @@ static vpx_codec_err_t ctrl_set_skip_loop_filter(vpx_codec_alg_priv_t *ctx, return VPX_CODEC_OK; } -static vpx_codec_ctrl_fn_map_t decoder_ctrl_maps[] = { +static aom_codec_ctrl_fn_map_t decoder_ctrl_maps[] = { { VP8_COPY_REFERENCE, ctrl_copy_reference }, // Setters @@ -1045,31 +1045,31 @@ static vpx_codec_ctrl_fn_map_t decoder_ctrl_maps[] = { #ifndef VERSION_STRING #define VERSION_STRING #endif -CODEC_INTERFACE(vpx_codec_vp10_dx) = { +CODEC_INTERFACE(aom_codec_vp10_dx) = { "WebM Project VP10 Decoder" VERSION_STRING, VPX_CODEC_INTERNAL_ABI_VERSION, VPX_CODEC_CAP_DECODER | - VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER, // vpx_codec_caps_t - decoder_init, // vpx_codec_init_fn_t - decoder_destroy, // vpx_codec_destroy_fn_t - decoder_ctrl_maps, // vpx_codec_ctrl_fn_map_t + VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER, // aom_codec_caps_t + decoder_init, // aom_codec_init_fn_t + decoder_destroy, // aom_codec_destroy_fn_t + decoder_ctrl_maps, // aom_codec_ctrl_fn_map_t { // NOLINT - decoder_peek_si, // vpx_codec_peek_si_fn_t - decoder_get_si, // vpx_codec_get_si_fn_t - decoder_decode, // vpx_codec_decode_fn_t - decoder_get_frame, // vpx_codec_frame_get_fn_t - decoder_set_fb_fn, // vpx_codec_set_fb_fn_t + decoder_peek_si, // aom_codec_peek_si_fn_t + decoder_get_si, // aom_codec_get_si_fn_t + decoder_decode, // aom_codec_decode_fn_t + decoder_get_frame, // aom_codec_frame_get_fn_t + decoder_set_fb_fn, // aom_codec_set_fb_fn_t }, { // NOLINT 0, - NULL, // vpx_codec_enc_cfg_map_t - NULL, // vpx_codec_encode_fn_t - NULL, // vpx_codec_get_cx_data_fn_t - NULL, // vpx_codec_enc_config_set_fn_t - NULL, // vpx_codec_get_global_headers_fn_t - NULL, // vpx_codec_get_preview_frame_fn_t - NULL // vpx_codec_enc_mr_get_mem_loc_fn_t + NULL, // aom_codec_enc_cfg_map_t + NULL, // aom_codec_encode_fn_t + NULL, // aom_codec_get_cx_data_fn_t + NULL, // aom_codec_enc_config_set_fn_t + NULL, // aom_codec_get_global_headers_fn_t + NULL, // aom_codec_get_preview_frame_fn_t + NULL // aom_codec_enc_mr_get_mem_loc_fn_t } }; diff --git a/av1/av1_iface_common.h b/av1/av1_iface_common.h index aec6e2990eef17487ac829b83917a226c9e1b6d6..1a91c3b0c795b72058ea04c8004724d21ddbc6cd 100644 --- a/av1/av1_iface_common.h +++ b/av1/av1_iface_common.h @@ -13,9 +13,9 @@ #include "aom_ports/mem.h" -static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12, +static void yuvconfig2image(aom_image_t *img, const YV12_BUFFER_CONFIG *yv12, void *user_priv) { - /** vpx_img_wrap() doesn't allow specifying independent strides for + /** aom_img_wrap() doesn't allow specifying independent strides for * the Y, U, and V planes, nor other alignment adjustments that * might be representable by a YV12_BUFFER_CONFIG, so we just * initialize all the fields.*/ @@ -58,9 +58,9 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12, img->stride[VPX_PLANE_ALPHA] = yv12->y_stride; #if CONFIG_VPX_HIGHBITDEPTH if (yv12->flags & YV12_FLAG_HIGHBITDEPTH) { - // vpx_image_t uses byte strides and a pointer to the first byte + // aom_image_t uses byte strides and a pointer to the first byte // of the image. - img->fmt = (vpx_img_fmt_t)(img->fmt | VPX_IMG_FMT_HIGHBITDEPTH); + img->fmt = (aom_img_fmt_t)(img->fmt | VPX_IMG_FMT_HIGHBITDEPTH); img->bit_depth = yv12->bit_depth; img->planes[VPX_PLANE_Y] = (uint8_t *)CONVERT_TO_SHORTPTR(yv12->y_buffer); img->planes[VPX_PLANE_U] = (uint8_t *)CONVERT_TO_SHORTPTR(yv12->u_buffer); @@ -79,7 +79,7 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12, img->self_allocd = 0; } -static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img, +static aom_codec_err_t image2yuvconfig(const aom_image_t *img, YV12_BUFFER_CONFIG *yv12) { yv12->y_buffer = img->planes[VPX_PLANE_Y]; yv12->u_buffer = img->planes[VPX_PLANE_U]; @@ -106,7 +106,7 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img, #if CONFIG_VPX_HIGHBITDEPTH if (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) { - // In vpx_image_t + // In aom_image_t // planes point to uint8 address of start of data // stride counts uint8s to reach next row // In YV12_BUFFER_CONFIG diff --git a/av1/common/alloccommon.c b/av1/common/alloccommon.c index 42aca8135c59315637b1335120eedc9eedd9a6a9..0cd5e7cf2b33768e1d6b9d51f6d82ff6df83c764 100644 --- a/av1/common/alloccommon.c +++ b/av1/common/alloccommon.c @@ -9,8 +9,8 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "aom_mem/vpx_mem.h" +#include "./aom_config.h" +#include "aom_mem/aom_mem.h" #include "av1/common/alloccommon.h" #include "av1/common/blockd.h" @@ -35,7 +35,7 @@ static int alloc_seg_map(VP10_COMMON *cm, int seg_map_size) { int i; for (i = 0; i < NUM_PING_PONG_BUFFERS; ++i) { - cm->seg_map_array[i] = (uint8_t *)vpx_calloc(seg_map_size, 1); + cm->seg_map_array[i] = (uint8_t *)aom_calloc(seg_map_size, 1); if (cm->seg_map_array[i] == NULL) return 1; } cm->seg_map_alloc_size = seg_map_size; @@ -55,7 +55,7 @@ static void free_seg_map(VP10_COMMON *cm) { int i; for (i = 0; i < NUM_PING_PONG_BUFFERS; ++i) { - vpx_free(cm->seg_map_array[i]); + aom_free(cm->seg_map_array[i]); cm->seg_map_array[i] = NULL; } @@ -75,18 +75,18 @@ void vp10_free_ref_frame_buffers(BufferPool *pool) { pool->release_fb_cb(pool->cb_priv, &pool->frame_bufs[i].raw_frame_buffer); pool->frame_bufs[i].ref_count = 0; } - vpx_free(pool->frame_bufs[i].mvs); + aom_free(pool->frame_bufs[i].mvs); pool->frame_bufs[i].mvs = NULL; - vpx_free_frame_buffer(&pool->frame_bufs[i].buf); + aom_free_frame_buffer(&pool->frame_bufs[i].buf); } } void vp10_free_context_buffers(VP10_COMMON *cm) { cm->free_mi(cm); free_seg_map(cm); - vpx_free(cm->above_context); + aom_free(cm->above_context); cm->above_context = NULL; - vpx_free(cm->above_seg_context); + aom_free(cm->above_seg_context); cm->above_seg_context = NULL; } @@ -107,14 +107,14 @@ int vp10_alloc_context_buffers(VP10_COMMON *cm, int width, int height) { } if (cm->above_context_alloc_cols < cm->mi_cols) { - vpx_free(cm->above_context); - cm->above_context = (ENTROPY_CONTEXT *)vpx_calloc( + aom_free(cm->above_context); + cm->above_context = (ENTROPY_CONTEXT *)aom_calloc( 2 * mi_cols_aligned_to_sb(cm->mi_cols) * MAX_MB_PLANE, sizeof(*cm->above_context)); if (!cm->above_context) goto fail; - vpx_free(cm->above_seg_context); - cm->above_seg_context = (PARTITION_CONTEXT *)vpx_calloc( + aom_free(cm->above_seg_context); + cm->above_seg_context = (PARTITION_CONTEXT *)aom_calloc( mi_cols_aligned_to_sb(cm->mi_cols), sizeof(*cm->above_seg_context)); if (!cm->above_seg_context) goto fail; cm->above_context_alloc_cols = cm->mi_cols; @@ -130,9 +130,9 @@ fail: void vp10_remove_common(VP10_COMMON *cm) { vp10_free_context_buffers(cm); - vpx_free(cm->fc); + aom_free(cm->fc); cm->fc = NULL; - vpx_free(cm->frame_contexts); + aom_free(cm->frame_contexts); cm->frame_contexts = NULL; } diff --git a/av1/common/arm/neon/iht4x4_add_neon.c b/av1/common/arm/neon/iht4x4_add_neon.c index 9f27f51f09fc2a78919aeed7fec37bc4c8abb080..d7f3e9cf8225489ca9d315bb4324b34747f05736 100644 --- a/av1/common/arm/neon/iht4x4_add_neon.c +++ b/av1/common/arm/neon/iht4x4_add_neon.c @@ -13,7 +13,7 @@ #include <assert.h> #include "./av1_rtcd.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "av1/common/common.h" static int16_t sinpi_1_9 = 0x14a3; diff --git a/av1/common/arm/neon/iht8x8_add_neon.c b/av1/common/arm/neon/iht8x8_add_neon.c index 0643883f7fa4e4a8d701c307dfe8f76f84ea3439..f90d192186e24c70ec3001e45070bc8ecbb14792 100644 --- a/av1/common/arm/neon/iht8x8_add_neon.c +++ b/av1/common/arm/neon/iht8x8_add_neon.c @@ -13,7 +13,7 @@ #include <assert.h> #include "./av1_rtcd.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "av1/common/common.h" static int16_t cospi_2_64 = 16305; diff --git a/av1/common/av1_inv_txfm.h b/av1/common/av1_inv_txfm.h index 94836ff3477d15e9886d123e97ef53e84d08f725..032d7f18e92cfe053805695a89197ef903640b4b 100644 --- a/av1/common/av1_inv_txfm.h +++ b/av1/common/av1_inv_txfm.h @@ -14,7 +14,7 @@ #include <assert.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/txfm_common.h" #include "aom_ports/mem.h" diff --git a/av1/common/av1_rtcd.c b/av1/common/av1_rtcd.c index 5bb99a72997e17b66ab6c8587dd6445d91c06960..f9ccd197954a57762ffda9f845d0f3e8d95842f1 100644 --- a/av1/common/av1_rtcd.c +++ b/av1/common/av1_rtcd.c @@ -8,10 +8,10 @@ * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" +#include "./aom_config.h" #define RTCD_C #include "./av1_rtcd.h" -#include "aom_ports/vpx_once.h" +#include "aom_ports/aom_once.h" void av1_rtcd() { // TODO(JBB): Remove this once, by insuring that both the encoder and diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl index 7582b07de6479b1d5779730a315af4376e83dcaf..094da4e8b47a2f505c0ddf323c03ca26b516d150 100644 --- a/av1/common/av1_rtcd_defs.pl +++ b/av1/common/av1_rtcd_defs.pl @@ -4,7 +4,7 @@ print <<EOF * VP10 */ -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "av1/common/common.h" #include "av1/common/enums.h" @@ -12,7 +12,7 @@ struct macroblockd; /* Encoder forward decls */ struct macroblock; -struct vpx_variance_vtable; +struct aom_variance_vtable; struct search_site_config; struct mv; union int_mv; @@ -27,7 +27,7 @@ $mmx_x86inc = $sse_x86inc = $sse2_x86inc = $ssse3_x86inc = $avx_x86inc = $avx2_x86inc = ''; $mmx_x86_64_x86inc = $sse_x86_64_x86inc = $sse2_x86_64_x86inc = $ssse3_x86_64_x86inc = $avx_x86_64_x86inc = $avx2_x86_64_x86inc = ''; -if (vpx_config("CONFIG_USE_X86INC") eq "yes") { +if (aom_config("CONFIG_USE_X86INC") eq "yes") { $mmx_x86inc = 'mmx'; $sse_x86inc = 'sse'; $sse2_x86inc = 'sse2'; @@ -57,10 +57,10 @@ if ($opts{arch} eq "x86_64") { # # dct # -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { # Note as optimized versions of these functions are added we need to add a check to ensure # that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only. - if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") { + if (aom_config("CONFIG_EMULATE_HARDWARE") eq "yes") { add_proto qw/void vp10_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type"; specialize qw/vp10_iht4x4_16_add/; @@ -183,7 +183,7 @@ if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { } } else { # Force C versions if CONFIG_EMULATE_HARDWARE is 1 - if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") { + if (aom_config("CONFIG_EMULATE_HARDWARE") eq "yes") { add_proto qw/void vp10_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type"; specialize qw/vp10_iht4x4_16_add/; @@ -259,7 +259,7 @@ if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { } # High bitdepth functions -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { # # Sub Pixel Filters # @@ -305,12 +305,12 @@ if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { # # Encoder functions below this point. # -if (vpx_config("CONFIG_VP10_ENCODER") eq "yes") { +if (aom_config("CONFIG_VP10_ENCODER") eq "yes") { # ENCODEMB INVOKE -if (vpx_config("CONFIG_AOM_QM") eq "yes") { - if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { +if (aom_config("CONFIG_AOM_QM") eq "yes") { + if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { # the transform coefficients are held in 32-bit # values, so the assembler code for vp10_block_error can no longer be used. add_proto qw/int64_t vp10_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz"; @@ -336,7 +336,7 @@ if (vpx_config("CONFIG_AOM_QM") eq "yes") { add_proto qw/void vp10_fdct8x8_quant/, "const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t *iqm_ptr"; } } else { - if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { + if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { # the transform coefficients are held in 32-bit # values, so the assembler code for vp10_block_error can no longer be used. add_proto qw/int64_t vp10_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz"; @@ -372,7 +372,7 @@ if (vpx_config("CONFIG_AOM_QM") eq "yes") { # fdct functions -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { add_proto qw/void vp10_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type"; specialize qw/vp10_fht4x4 sse2/; @@ -399,7 +399,7 @@ if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { } # Inverse transform -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { # Note as optimized versions of these functions are added we need to add a check to ensure # that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only. add_proto qw/void vp10_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; @@ -466,7 +466,7 @@ if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { specialize qw/vp10_highbd_iwht4x4_16_add/; # Force C versions if CONFIG_EMULATE_HARDWARE is 1 - if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") { + if (aom_config("CONFIG_EMULATE_HARDWARE") eq "yes") { add_proto qw/void vp10_highbd_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd"; specialize qw/vp10_highbd_idct4x4_16_add/; @@ -499,7 +499,7 @@ if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { } # CONFIG_EMULATE_HARDWARE } else { # Force C versions if CONFIG_EMULATE_HARDWARE is 1 - if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") { + if (aom_config("CONFIG_EMULATE_HARDWARE") eq "yes") { add_proto qw/void vp10_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; specialize qw/vp10_idct4x4_1_add/; @@ -583,28 +583,28 @@ if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { # # Motion search # -add_proto qw/int vp10_full_search_sad/, "const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vpx_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv"; +add_proto qw/int vp10_full_search_sad/, "const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct aom_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv"; specialize qw/vp10_full_search_sad sse3 sse4_1/; $vp10_full_search_sad_sse3=vp10_full_search_sadx3; $vp10_full_search_sad_sse4_1=vp10_full_search_sadx8; -add_proto qw/int vp10_diamond_search_sad/, "const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vpx_variance_vtable *fn_ptr, const struct mv *center_mv"; +add_proto qw/int vp10_diamond_search_sad/, "const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct aom_variance_vtable *fn_ptr, const struct mv *center_mv"; specialize qw/vp10_diamond_search_sad/; -add_proto qw/int vp10_full_range_search/, "const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vpx_variance_vtable *fn_ptr, const struct mv *center_mv"; +add_proto qw/int vp10_full_range_search/, "const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct aom_variance_vtable *fn_ptr, const struct mv *center_mv"; specialize qw/vp10_full_range_search/; add_proto qw/void vp10_temporal_filter_apply/, "uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count"; specialize qw/vp10_temporal_filter_apply sse2 msa/; -if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { +if (aom_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") { # ENCODEMB INVOKE add_proto qw/int64_t vp10_highbd_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd"; specialize qw/vp10_highbd_block_error sse2/; - if (vpx_config("CONFIG_AOM_QM") eq "yes") { + if (aom_config("CONFIG_AOM_QM") eq "yes") { add_proto qw/void vp10_highbd_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr"; add_proto qw/void vp10_highbd_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr"; diff --git a/av1/common/blockd.h b/av1/common/blockd.h index 0d088aebe5503608e5973934e0d1622ccf57bae1..c57827a333f837683db96d7998cf741ae0f92e81 100644 --- a/av1/common/blockd.h +++ b/av1/common/blockd.h @@ -12,9 +12,9 @@ #ifndef VP10_COMMON_BLOCKD_H_ #define VP10_COMMON_BLOCKD_H_ -#include "./vpx_config.h" +#include "./aom_config.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" #include "aom_scale/yv12config.h" @@ -207,7 +207,7 @@ typedef struct macroblockd { int lossless[MAX_SEGMENTS]; int corrupted; - struct vpx_internal_error_info *error_info; + struct aom_internal_error_info *error_info; } MACROBLOCKD; static INLINE BLOCK_SIZE get_subsize(BLOCK_SIZE bsize, diff --git a/av1/common/common.h b/av1/common/common.h index 43ec2c40a5e270f668b0fc813b23e135f02049db..e97e15bed41141012ad8010334e220c2e17373d6 100644 --- a/av1/common/common.h +++ b/av1/common/common.h @@ -16,10 +16,10 @@ #include <assert.h> -#include "./vpx_config.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" +#include "aom/aom_integer.h" #include "aom_ports/bitops.h" #ifdef __cplusplus @@ -52,7 +52,7 @@ static INLINE int get_unsigned_bits(unsigned int num_values) { do { \ lval = (expr); \ if (!lval) \ - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \ + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \ "Failed to allocate " #lval " at %s:%d", __FILE__, \ __LINE__); \ } while (0) @@ -61,7 +61,7 @@ static INLINE int get_unsigned_bits(unsigned int num_values) { do { \ lval = (expr); \ if (!lval) \ - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \ + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \ "Failed to allocate " #lval); \ } while (0) #endif diff --git a/av1/common/common_data.h b/av1/common/common_data.h index 20d86afff7e2ec2f20a8a36f175f6600efb841c7..d0885f14009da5dde1f043f224c1cdfc27bedb6d 100644 --- a/av1/common/common_data.h +++ b/av1/common/common_data.h @@ -13,8 +13,8 @@ #define VP10_COMMON_COMMON_DATA_H_ #include "av1/common/enums.h" -#include "aom/vpx_integer.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom/aom_integer.h" +#include "aom_dsp/aom_dsp_common.h" #ifdef __cplusplus extern "C" { diff --git a/av1/common/dering.c b/av1/common/dering.c index 2f1af854fc8a3ba9d16571e7035f9eb7fc06c00b..948e77eaf9cc302b149c31d62aaa9e59db151f5f 100644 --- a/av1/common/dering.c +++ b/av1/common/dering.c @@ -12,8 +12,8 @@ #include <string.h> #include <math.h> -#include "./vpx_scale_rtcd.h" -#include "aom/vpx_integer.h" +#include "./aom_scale_rtcd.h" +#include "aom/aom_integer.h" #include "av1/common/dering.h" #include "av1/common/onyxc_int.h" #include "av1/common/reconinter.h" @@ -61,7 +61,7 @@ void vp10_dering_frame(YV12_BUFFER_CONFIG *frame, VP10_COMMON *cm, int coeff_shift = VPXMAX(cm->bit_depth - 8, 0); nvsb = (cm->mi_rows + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE; nhsb = (cm->mi_cols + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE; - bskip = vpx_malloc(sizeof(*bskip)*cm->mi_rows*cm->mi_cols); + bskip = aom_malloc(sizeof(*bskip)*cm->mi_rows*cm->mi_cols); vp10_setup_dst_planes(xd->plane, frame, 0, 0); for (pli = 0; pli < 3; pli++) { dec[pli] = xd->plane[pli].subsampling_x; @@ -69,7 +69,7 @@ void vp10_dering_frame(YV12_BUFFER_CONFIG *frame, VP10_COMMON *cm, } stride = bsize[0]*cm->mi_cols; for (pli = 0; pli < 3; pli++) { - src[pli] = vpx_malloc(sizeof(*src)*cm->mi_rows*cm->mi_cols*64); + src[pli] = aom_malloc(sizeof(*src)*cm->mi_rows*cm->mi_cols*64); for (r = 0; r < bsize[pli]*cm->mi_rows; ++r) { for (c = 0; c < bsize[pli]*cm->mi_cols; ++c) { #if CONFIG_VPX_HIGHBITDEPTH @@ -148,7 +148,7 @@ void vp10_dering_frame(YV12_BUFFER_CONFIG *frame, VP10_COMMON *cm, } } for (pli = 0; pli < 3; pli++) { - vpx_free(src[pli]); + aom_free(src[pli]); } - vpx_free(bskip); + aom_free(bskip); } diff --git a/av1/common/dering.h b/av1/common/dering.h index 177cba933ee4113a1b98dc5c4875993a3b0d214e..98a6f93302eb6a560325f62c65f6a302538aa425 100644 --- a/av1/common/dering.h +++ b/av1/common/dering.h @@ -13,8 +13,8 @@ #include "av1/common/od_dering.h" #include "av1/common/onyxc_int.h" -#include "aom/vpx_integer.h" -#include "./vpx_config.h" +#include "aom/aom_integer.h" +#include "./aom_config.h" #include "aom_ports/mem.h" #ifdef __cplusplus diff --git a/av1/common/entropy.c b/av1/common/entropy.c index 39b82c75d985da20838581242e227c04e042ed32..f013376993f536bd4da1778a575079f512a15be5 100644 --- a/av1/common/entropy.c +++ b/av1/common/entropy.c @@ -13,11 +13,11 @@ #include "av1/common/blockd.h" #include "av1/common/onyxc_int.h" #include "av1/common/entropymode.h" -#include "aom_mem/vpx_mem.h" -#include "aom/vpx_integer.h" +#include "aom_mem/aom_mem.h" +#include "aom/aom_integer.h" // Unconstrained Node Tree -const vpx_tree_index vp10_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)] = { +const aom_tree_index vp10_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)] = { 2, 6, // 0 = LOW_VAL -TWO_TOKEN, @@ -36,28 +36,28 @@ const vpx_tree_index vp10_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)] = { -CATEGORY6_TOKEN // 7 = CAT_FIVE }; -const vpx_prob vp10_cat1_prob[] = { 159 }; -const vpx_prob vp10_cat2_prob[] = { 165, 145 }; -const vpx_prob vp10_cat3_prob[] = { 173, 148, 140 }; -const vpx_prob vp10_cat4_prob[] = { 176, 155, 140, 135 }; -const vpx_prob vp10_cat5_prob[] = { 180, 157, 141, 134, 130 }; -const vpx_prob vp10_cat6_prob[] = { 254, 254, 254, 252, 249, 243, 230, +const aom_prob vp10_cat1_prob[] = { 159 }; +const aom_prob vp10_cat2_prob[] = { 165, 145 }; +const aom_prob vp10_cat3_prob[] = { 173, 148, 140 }; +const aom_prob vp10_cat4_prob[] = { 176, 155, 140, 135 }; +const aom_prob vp10_cat5_prob[] = { 180, 157, 141, 134, 130 }; +const aom_prob vp10_cat6_prob[] = { 254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129 }; #if CONFIG_VPX_HIGHBITDEPTH -const vpx_prob vp10_cat1_prob_high10[] = { 159 }; -const vpx_prob vp10_cat2_prob_high10[] = { 165, 145 }; -const vpx_prob vp10_cat3_prob_high10[] = { 173, 148, 140 }; -const vpx_prob vp10_cat4_prob_high10[] = { 176, 155, 140, 135 }; -const vpx_prob vp10_cat5_prob_high10[] = { 180, 157, 141, 134, 130 }; -const vpx_prob vp10_cat6_prob_high10[] = { +const aom_prob vp10_cat1_prob_high10[] = { 159 }; +const aom_prob vp10_cat2_prob_high10[] = { 165, 145 }; +const aom_prob vp10_cat3_prob_high10[] = { 173, 148, 140 }; +const aom_prob vp10_cat4_prob_high10[] = { 176, 155, 140, 135 }; +const aom_prob vp10_cat5_prob_high10[] = { 180, 157, 141, 134, 130 }; +const aom_prob vp10_cat6_prob_high10[] = { 255, 255, 254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129 }; -const vpx_prob vp10_cat1_prob_high12[] = { 159 }; -const vpx_prob vp10_cat2_prob_high12[] = { 165, 145 }; -const vpx_prob vp10_cat3_prob_high12[] = { 173, 148, 140 }; -const vpx_prob vp10_cat4_prob_high12[] = { 176, 155, 140, 135 }; -const vpx_prob vp10_cat5_prob_high12[] = { 180, 157, 141, 134, 130 }; -const vpx_prob vp10_cat6_prob_high12[] = { 255, 255, 255, 255, 254, 254, +const aom_prob vp10_cat1_prob_high12[] = { 159 }; +const aom_prob vp10_cat2_prob_high12[] = { 165, 145 }; +const aom_prob vp10_cat3_prob_high12[] = { 173, 148, 140 }; +const aom_prob vp10_cat4_prob_high12[] = { 176, 155, 140, 135 }; +const aom_prob vp10_cat5_prob_high12[] = { 180, 157, 141, 134, 130 }; +const aom_prob vp10_cat6_prob_high12[] = { 255, 255, 255, 255, 254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129 }; #endif @@ -127,7 +127,7 @@ const uint8_t vp10_pt_energy_class[ENTROPY_TOKENS] = { 0, 1, 2, 3, 3, 4, // by averaging : // vp10_pareto8_full[l][node] = (vp10_pareto8_full[l-1][node] + // vp10_pareto8_full[l+1][node] ) >> 1; -const vpx_prob vp10_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES] = { +const aom_prob vp10_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES] = { { 3, 86, 128, 6, 86, 23, 88, 29 }, { 6, 86, 128, 11, 87, 42, 91, 52 }, { 9, 86, 129, 17, 88, 61, 94, 76 }, @@ -1045,16 +1045,16 @@ static const vp10_coeff_probs_model default_coef_probs_32x32[PLANE_TYPES] = { { 1, 16, 6 } } } } }; -static void extend_to_full_distribution(vpx_prob *probs, vpx_prob p) { +static void extend_to_full_distribution(aom_prob *probs, aom_prob p) { // TODO(aconverse): model[PIVOT_NODE] should never be zero. // https://code.google.com/p/webm/issues/detail?id=1089 memcpy(probs, vp10_pareto8_full[p == 0 ? 254 : p - 1], - MODEL_NODES * sizeof(vpx_prob)); + MODEL_NODES * sizeof(aom_prob)); } -void vp10_model_to_full_probs(const vpx_prob *model, vpx_prob *full) { +void vp10_model_to_full_probs(const aom_prob *model, aom_prob *full) { if (full != model) - memcpy(full, model, sizeof(vpx_prob) * UNCONSTRAINED_NODES); + memcpy(full, model, sizeof(aom_prob) * UNCONSTRAINED_NODES); extend_to_full_distribution(&full[UNCONSTRAINED_NODES], model[PIVOT_NODE]); } diff --git a/av1/common/entropy.h b/av1/common/entropy.h index 2610ab103d4515673b39c88475b2da95ff6004c4..21a09870247a57490f9c73987b2d2353dee54463 100644 --- a/av1/common/entropy.h +++ b/av1/common/entropy.h @@ -12,7 +12,7 @@ #ifndef VP10_COMMON_ENTROPY_H_ #define VP10_COMMON_ENTROPY_H_ -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_dsp/prob.h" #include "av1/common/common.h" @@ -78,8 +78,8 @@ DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat6_prob_high12[18]); #define EOB_MODEL_TOKEN 3 typedef struct { - const vpx_tree_index *tree; - const vpx_prob *prob; + const aom_tree_index *tree; + const aom_prob *prob; int len; int base_val; const int16_t *cost; @@ -162,16 +162,16 @@ static INLINE const uint8_t *get_band_translate(TX_SIZE tx_size) { #define PIVOT_NODE 2 // which node is pivot #define MODEL_NODES (ENTROPY_NODES - UNCONSTRAINED_NODES) -extern const vpx_tree_index vp10_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)]; -extern const vpx_prob vp10_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES]; +extern const aom_tree_index vp10_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)]; +extern const aom_prob vp10_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES]; -typedef vpx_prob vp10_coeff_probs_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] +typedef aom_prob vp10_coeff_probs_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] [UNCONSTRAINED_NODES]; typedef unsigned int vp10_coeff_count_model [REF_TYPES][COEF_BANDS][COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1]; -void vp10_model_to_full_probs(const vpx_prob *model, vpx_prob *full); +void vp10_model_to_full_probs(const aom_prob *model, aom_prob *full); typedef char ENTROPY_CONTEXT; diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c index 1057783874141c1de967454705f10482881c91ba..0753288f9d34c360b8019121813a0a0eafe6a88e 100644 --- a/av1/common/entropymode.c +++ b/av1/common/entropymode.c @@ -9,12 +9,12 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "av1/common/onyxc_int.h" #include "av1/common/seg_common.h" -const vpx_prob vp10_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = +const aom_prob vp10_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = { { // above = dc { 137, 30, 42, 148, 151, 207, 70, 52, 91 }, // left = dc @@ -147,7 +147,7 @@ const vpx_prob vp10_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = } }; #if !CONFIG_MISC_FIXES -const vpx_prob vp10_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] = { +const aom_prob vp10_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] = { { 144, 11, 54, 157, 195, 130, 46, 58, 108 }, // y = dc { 118, 15, 123, 148, 131, 101, 44, 93, 131 }, // y = v { 113, 12, 23, 188, 226, 142, 26, 32, 125 }, // y = h @@ -161,14 +161,14 @@ const vpx_prob vp10_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1] = { }; #endif -static const vpx_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = { +static const aom_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = { { 65, 32, 18, 144, 162, 194, 41, 51, 98 }, // block_size < 8x8 { 132, 68, 18, 165, 217, 196, 45, 40, 78 }, // block_size < 16x16 { 173, 80, 19, 176, 240, 193, 64, 35, 46 }, // block_size < 32x32 { 221, 135, 38, 194, 248, 121, 96, 85, 29 } // block_size >= 32x32 }; -static const vpx_prob default_uv_probs[INTRA_MODES][INTRA_MODES - 1] = { +static const aom_prob default_uv_probs[INTRA_MODES][INTRA_MODES - 1] = { { 120, 7, 76, 176, 208, 126, 28, 54, 103 }, // y = dc { 48, 12, 154, 155, 139, 90, 34, 117, 119 }, // y = v { 67, 6, 25, 204, 243, 158, 13, 21, 96 }, // y = h @@ -182,7 +182,7 @@ static const vpx_prob default_uv_probs[INTRA_MODES][INTRA_MODES - 1] = { }; #if !CONFIG_MISC_FIXES -const vpx_prob +const aom_prob vp10_kf_partition_probs[PARTITION_CONTEXTS][PARTITION_TYPES - 1] = { // 8x8 -> 4x4 { 158, 97, 94 }, // a/l both not split @@ -207,7 +207,7 @@ const vpx_prob }; #endif -static const vpx_prob +static const aom_prob default_partition_probs[PARTITION_CONTEXTS][PARTITION_TYPES - 1] = { // 8x8 -> 4x4 { 199, 122, 141 }, // a/l both not split @@ -231,7 +231,7 @@ static const vpx_prob { 10, 7, 6 }, // a/l both split }; -static const vpx_prob +static const aom_prob default_inter_mode_probs[INTER_MODE_CONTEXTS][INTER_MODES - 1] = { { 2, 173, 34 }, // 0 = both zero mv { 7, 145, 85 }, // 1 = one zero mv + one a predicted mv @@ -243,7 +243,7 @@ static const vpx_prob }; /* Array indices are identical to previously-existing INTRAMODECONTEXTNODES. */ -const vpx_tree_index vp10_intra_mode_tree[TREE_SIZE(INTRA_MODES)] = { +const aom_tree_index vp10_intra_mode_tree[TREE_SIZE(INTRA_MODES)] = { -DC_PRED, 2, /* 0 = DC_NODE */ -TM_PRED, 4, /* 1 = TM_NODE */ -V_PRED, 6, /* 2 = V_NODE */ @@ -255,27 +255,27 @@ const vpx_tree_index vp10_intra_mode_tree[TREE_SIZE(INTRA_MODES)] = { -D153_PRED, -D207_PRED /* 8 = D153_NODE */ }; -const vpx_tree_index vp10_inter_mode_tree[TREE_SIZE(INTER_MODES)] = { +const aom_tree_index vp10_inter_mode_tree[TREE_SIZE(INTER_MODES)] = { -INTER_OFFSET(ZEROMV), 2, -INTER_OFFSET(NEARESTMV), 4, -INTER_OFFSET(NEARMV), -INTER_OFFSET(NEWMV) }; -const vpx_tree_index vp10_partition_tree[TREE_SIZE(PARTITION_TYPES)] = { +const aom_tree_index vp10_partition_tree[TREE_SIZE(PARTITION_TYPES)] = { -PARTITION_NONE, 2, -PARTITION_HORZ, 4, -PARTITION_VERT, -PARTITION_SPLIT }; -static const vpx_prob default_intra_inter_p[INTRA_INTER_CONTEXTS] = { +static const aom_prob default_intra_inter_p[INTRA_INTER_CONTEXTS] = { 9, 102, 187, 225 }; -static const vpx_prob default_comp_inter_p[COMP_INTER_CONTEXTS] = { +static const aom_prob default_comp_inter_p[COMP_INTER_CONTEXTS] = { 239, 183, 119, 96, 41 }; -static const vpx_prob default_comp_ref_p[REF_CONTEXTS] = { 50, 126, 123, 221, +static const aom_prob default_comp_ref_p[REF_CONTEXTS] = { 50, 126, 123, 221, 226 }; -static const vpx_prob default_single_ref_p[REF_CONTEXTS][2] = { +static const aom_prob default_single_ref_p[REF_CONTEXTS][2] = { { 33, 16 }, { 77, 74 }, { 142, 142 }, { 172, 170 }, { 238, 247 } }; @@ -311,9 +311,9 @@ void vp10_tx_counts_to_branch_counts_8x8(const unsigned int *tx_count_8x8p, ct_8x8p[0][1] = tx_count_8x8p[TX_8X8]; } -static const vpx_prob default_skip_probs[SKIP_CONTEXTS] = { 192, 128, 64 }; +static const aom_prob default_skip_probs[SKIP_CONTEXTS] = { 192, 128, 64 }; -static const vpx_prob default_switchable_interp_prob +static const aom_prob default_switchable_interp_prob [SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS - 1] = { { 235, 162 }, { 36, 255 }, { 34, 3 }, { 149, 144 }, }; @@ -325,18 +325,18 @@ static const struct segmentation_probs default_seg_probs = { }; #endif -const vpx_tree_index vp10_ext_tx_tree[TREE_SIZE(TX_TYPES)] = { +const aom_tree_index vp10_ext_tx_tree[TREE_SIZE(TX_TYPES)] = { -DCT_DCT, 2, -ADST_ADST, 4, -ADST_DCT, -DCT_ADST }; -static const vpx_prob +static const aom_prob default_intra_ext_tx_prob[EXT_TX_SIZES][TX_TYPES][TX_TYPES - 1] = { { { 240, 85, 128 }, { 4, 1, 248 }, { 4, 1, 8 }, { 4, 248, 128 } }, { { 244, 85, 128 }, { 8, 2, 248 }, { 8, 2, 8 }, { 8, 248, 128 } }, { { 248, 85, 128 }, { 16, 4, 248 }, { 16, 4, 8 }, { 16, 248, 128 } }, }; -static const vpx_prob default_inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1] = { +static const aom_prob default_inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1] = { { 160, 85, 128 }, { 176, 85, 128 }, { 192, 85, 128 }, }; @@ -360,7 +360,7 @@ static void init_mode_probs(FRAME_CONTEXT *fc) { vp10_copy(fc->inter_ext_tx_prob, default_inter_ext_tx_prob); } -const vpx_tree_index vp10_switchable_interp_tree[TREE_SIZE( +const aom_tree_index vp10_switchable_interp_tree[TREE_SIZE( SWITCHABLE_FILTERS)] = { -EIGHTTAP, 2, -EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP }; void vp10_adapt_inter_frame_probs(VP10_COMMON *cm) { @@ -384,26 +384,26 @@ void vp10_adapt_inter_frame_probs(VP10_COMMON *cm) { pre_fc->single_ref_prob[i][j], counts->single_ref[i][j]); for (i = 0; i < INTER_MODE_CONTEXTS; i++) - vpx_tree_merge_probs(vp10_inter_mode_tree, pre_fc->inter_mode_probs[i], + aom_tree_merge_probs(vp10_inter_mode_tree, pre_fc->inter_mode_probs[i], counts->inter_mode[i], fc->inter_mode_probs[i]); for (i = 0; i < BLOCK_SIZE_GROUPS; i++) - vpx_tree_merge_probs(vp10_intra_mode_tree, pre_fc->y_mode_prob[i], + aom_tree_merge_probs(vp10_intra_mode_tree, pre_fc->y_mode_prob[i], counts->y_mode[i], fc->y_mode_prob[i]); #if !CONFIG_MISC_FIXES for (i = 0; i < INTRA_MODES; ++i) - vpx_tree_merge_probs(vp10_intra_mode_tree, pre_fc->uv_mode_prob[i], + aom_tree_merge_probs(vp10_intra_mode_tree, pre_fc->uv_mode_prob[i], counts->uv_mode[i], fc->uv_mode_prob[i]); for (i = 0; i < PARTITION_CONTEXTS; i++) - vpx_tree_merge_probs(vp10_partition_tree, pre_fc->partition_prob[i], + aom_tree_merge_probs(vp10_partition_tree, pre_fc->partition_prob[i], counts->partition[i], fc->partition_prob[i]); #endif if (cm->interp_filter == SWITCHABLE) { for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; i++) - vpx_tree_merge_probs( + aom_tree_merge_probs( vp10_switchable_interp_tree, pre_fc->switchable_interp_prob[i], counts->switchable_interp[i], fc->switchable_interp_prob[i]); } @@ -448,12 +448,12 @@ void vp10_adapt_intra_frame_probs(VP10_COMMON *cm) { for (i = TX_4X4; i < EXT_TX_SIZES; ++i) { int j; for (j = 0; j < TX_TYPES; ++j) - vpx_tree_merge_probs(vp10_ext_tx_tree, pre_fc->intra_ext_tx_prob[i][j], + aom_tree_merge_probs(vp10_ext_tx_tree, pre_fc->intra_ext_tx_prob[i][j], counts->intra_ext_tx[i][j], fc->intra_ext_tx_prob[i][j]); } for (i = TX_4X4; i < EXT_TX_SIZES; ++i) { - vpx_tree_merge_probs(vp10_ext_tx_tree, pre_fc->inter_ext_tx_prob[i], + aom_tree_merge_probs(vp10_ext_tx_tree, pre_fc->inter_ext_tx_prob[i], counts->inter_ext_tx[i], fc->inter_ext_tx_prob[i]); } @@ -463,19 +463,19 @@ void vp10_adapt_intra_frame_probs(VP10_COMMON *cm) { fc->seg.pred_probs[i] = mode_mv_merge_probs(pre_fc->seg.pred_probs[i], counts->seg.pred[i]); - vpx_tree_merge_probs(vp10_segment_tree, pre_fc->seg.tree_probs, + aom_tree_merge_probs(vp10_segment_tree, pre_fc->seg.tree_probs, counts->seg.tree_mispred, fc->seg.tree_probs); } else { - vpx_tree_merge_probs(vp10_segment_tree, pre_fc->seg.tree_probs, + aom_tree_merge_probs(vp10_segment_tree, pre_fc->seg.tree_probs, counts->seg.tree_total, fc->seg.tree_probs); } for (i = 0; i < INTRA_MODES; ++i) - vpx_tree_merge_probs(vp10_intra_mode_tree, pre_fc->uv_mode_prob[i], + aom_tree_merge_probs(vp10_intra_mode_tree, pre_fc->uv_mode_prob[i], counts->uv_mode[i], fc->uv_mode_prob[i]); for (i = 0; i < PARTITION_CONTEXTS; i++) - vpx_tree_merge_probs(vp10_partition_tree, pre_fc->partition_prob[i], + aom_tree_merge_probs(vp10_partition_tree, pre_fc->partition_prob[i], counts->partition[i], fc->partition_prob[i]); #endif } diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h index 54dbcedc931d777bdbf99f20a20208837220d027..40b4fc37b0e7d9805c2142d3bab6ee91cc16cabf 100644 --- a/av1/common/entropymode.h +++ b/av1/common/entropymode.h @@ -16,7 +16,7 @@ #include "av1/common/entropymv.h" #include "av1/common/filter.h" #include "av1/common/seg_common.h" -#include "aom_dsp/vpx_filter.h" +#include "aom_dsp/aom_filter.h" #ifdef __cplusplus extern "C" { @@ -31,9 +31,9 @@ extern "C" { struct VP10Common; struct tx_probs { - vpx_prob p32x32[TX_SIZE_CONTEXTS][TX_SIZES - 1]; - vpx_prob p16x16[TX_SIZE_CONTEXTS][TX_SIZES - 2]; - vpx_prob p8x8[TX_SIZE_CONTEXTS][TX_SIZES - 3]; + aom_prob p32x32[TX_SIZE_CONTEXTS][TX_SIZES - 1]; + aom_prob p16x16[TX_SIZE_CONTEXTS][TX_SIZES - 2]; + aom_prob p8x8[TX_SIZE_CONTEXTS][TX_SIZES - 3]; }; struct tx_counts { @@ -50,26 +50,26 @@ struct seg_counts { }; typedef struct frame_contexts { - vpx_prob y_mode_prob[BLOCK_SIZE_GROUPS][INTRA_MODES - 1]; - vpx_prob uv_mode_prob[INTRA_MODES][INTRA_MODES - 1]; - vpx_prob partition_prob[PARTITION_CONTEXTS][PARTITION_TYPES - 1]; + aom_prob y_mode_prob[BLOCK_SIZE_GROUPS][INTRA_MODES - 1]; + aom_prob uv_mode_prob[INTRA_MODES][INTRA_MODES - 1]; + aom_prob partition_prob[PARTITION_CONTEXTS][PARTITION_TYPES - 1]; vp10_coeff_probs_model coef_probs[TX_SIZES][PLANE_TYPES]; - vpx_prob + aom_prob switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS - 1]; - vpx_prob inter_mode_probs[INTER_MODE_CONTEXTS][INTER_MODES - 1]; - vpx_prob intra_inter_prob[INTRA_INTER_CONTEXTS]; - vpx_prob comp_inter_prob[COMP_INTER_CONTEXTS]; - vpx_prob single_ref_prob[REF_CONTEXTS][2]; - vpx_prob comp_ref_prob[REF_CONTEXTS]; + aom_prob inter_mode_probs[INTER_MODE_CONTEXTS][INTER_MODES - 1]; + aom_prob intra_inter_prob[INTRA_INTER_CONTEXTS]; + aom_prob comp_inter_prob[COMP_INTER_CONTEXTS]; + aom_prob single_ref_prob[REF_CONTEXTS][2]; + aom_prob comp_ref_prob[REF_CONTEXTS]; struct tx_probs tx_probs; - vpx_prob skip_probs[SKIP_CONTEXTS]; + aom_prob skip_probs[SKIP_CONTEXTS]; nmv_context nmvc; #if CONFIG_MISC_FIXES struct segmentation_probs seg; #endif - vpx_prob intra_ext_tx_prob[EXT_TX_SIZES][TX_TYPES][TX_TYPES - 1]; - vpx_prob inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1]; + aom_prob intra_ext_tx_prob[EXT_TX_SIZES][TX_TYPES][TX_TYPES - 1]; + aom_prob inter_ext_tx_prob[EXT_TX_SIZES][TX_TYPES - 1]; int initialized; } FRAME_CONTEXT; @@ -98,18 +98,18 @@ typedef struct FRAME_COUNTS { unsigned int inter_ext_tx[EXT_TX_SIZES][TX_TYPES]; } FRAME_COUNTS; -extern const vpx_prob +extern const aom_prob vp10_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1]; #if !CONFIG_MISC_FIXES -extern const vpx_prob vp10_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1]; -extern const vpx_prob +extern const aom_prob vp10_kf_uv_mode_prob[INTRA_MODES][INTRA_MODES - 1]; +extern const aom_prob vp10_kf_partition_probs[PARTITION_CONTEXTS][PARTITION_TYPES - 1]; #endif -extern const vpx_tree_index vp10_intra_mode_tree[TREE_SIZE(INTRA_MODES)]; -extern const vpx_tree_index vp10_inter_mode_tree[TREE_SIZE(INTER_MODES)]; -extern const vpx_tree_index vp10_partition_tree[TREE_SIZE(PARTITION_TYPES)]; -extern const vpx_tree_index +extern const aom_tree_index vp10_intra_mode_tree[TREE_SIZE(INTRA_MODES)]; +extern const aom_tree_index vp10_inter_mode_tree[TREE_SIZE(INTER_MODES)]; +extern const aom_tree_index vp10_partition_tree[TREE_SIZE(PARTITION_TYPES)]; +extern const aom_tree_index vp10_switchable_interp_tree[TREE_SIZE(SWITCHABLE_FILTERS)]; void vp10_setup_past_independence(struct VP10Common *cm); @@ -124,7 +124,7 @@ void vp10_tx_counts_to_branch_counts_16x16(const unsigned int *tx_count_16x16p, void vp10_tx_counts_to_branch_counts_8x8(const unsigned int *tx_count_8x8p, unsigned int (*ct_8x8p)[2]); -extern const vpx_tree_index vp10_ext_tx_tree[TREE_SIZE(TX_TYPES)]; +extern const aom_tree_index vp10_ext_tx_tree[TREE_SIZE(TX_TYPES)]; static INLINE int vp10_ceil_log2(int n) { int i = 1, p = 2; diff --git a/av1/common/entropymv.c b/av1/common/entropymv.c index 93179c7069590a137ad027fc75ce56079e32c1e6..521d326f2893fb9586950d490202889b9e9db05b 100644 --- a/av1/common/entropymv.c +++ b/av1/common/entropymv.c @@ -15,12 +15,12 @@ // Integer pel reference mv threshold for use of high-precision 1/8 mv #define COMPANDED_MVREF_THRESH 8 -const vpx_tree_index vp10_mv_joint_tree[TREE_SIZE(MV_JOINTS)] = { +const aom_tree_index vp10_mv_joint_tree[TREE_SIZE(MV_JOINTS)] = { -MV_JOINT_ZERO, 2, -MV_JOINT_HNZVZ, 4, -MV_JOINT_HZVNZ, -MV_JOINT_HNZVNZ }; /* clang-format off */ -const vpx_tree_index vp10_mv_class_tree[TREE_SIZE(MV_CLASSES)] = { +const aom_tree_index vp10_mv_class_tree[TREE_SIZE(MV_CLASSES)] = { -MV_CLASS_0, 2, -MV_CLASS_1, 4, 6, 8, @@ -34,11 +34,11 @@ const vpx_tree_index vp10_mv_class_tree[TREE_SIZE(MV_CLASSES)] = { }; /* clang-format on */ -const vpx_tree_index vp10_mv_class0_tree[TREE_SIZE(CLASS0_SIZE)] = { +const aom_tree_index vp10_mv_class0_tree[TREE_SIZE(CLASS0_SIZE)] = { -0, -1, }; -const vpx_tree_index vp10_mv_fp_tree[TREE_SIZE(MV_FP_SIZE)] = { -0, 2, -1, +const aom_tree_index vp10_mv_fp_tree[TREE_SIZE(MV_FP_SIZE)] = { -0, 2, -1, 4, -2, -3 }; static const nmv_context default_nmv_context = { @@ -184,7 +184,7 @@ void vp10_adapt_mv_probs(VP10_COMMON *cm, int allow_hp) { const nmv_context *pre_fc = &cm->frame_contexts[cm->frame_context_idx].nmvc; const nmv_context_counts *counts = &cm->counts.mv; - vpx_tree_merge_probs(vp10_mv_joint_tree, pre_fc->joints, counts->joints, + aom_tree_merge_probs(vp10_mv_joint_tree, pre_fc->joints, counts->joints, fc->joints); for (i = 0; i < 2; ++i) { @@ -193,19 +193,19 @@ void vp10_adapt_mv_probs(VP10_COMMON *cm, int allow_hp) { const nmv_component_counts *c = &counts->comps[i]; comp->sign = mode_mv_merge_probs(pre_comp->sign, c->sign); - vpx_tree_merge_probs(vp10_mv_class_tree, pre_comp->classes, c->classes, + aom_tree_merge_probs(vp10_mv_class_tree, pre_comp->classes, c->classes, comp->classes); - vpx_tree_merge_probs(vp10_mv_class0_tree, pre_comp->class0, c->class0, + aom_tree_merge_probs(vp10_mv_class0_tree, pre_comp->class0, c->class0, comp->class0); for (j = 0; j < MV_OFFSET_BITS; ++j) comp->bits[j] = mode_mv_merge_probs(pre_comp->bits[j], c->bits[j]); for (j = 0; j < CLASS0_SIZE; ++j) - vpx_tree_merge_probs(vp10_mv_fp_tree, pre_comp->class0_fp[j], + aom_tree_merge_probs(vp10_mv_fp_tree, pre_comp->class0_fp[j], c->class0_fp[j], comp->class0_fp[j]); - vpx_tree_merge_probs(vp10_mv_fp_tree, pre_comp->fp, c->fp, comp->fp); + aom_tree_merge_probs(vp10_mv_fp_tree, pre_comp->fp, c->fp, comp->fp); if (allow_hp) { comp->class0_hp = mode_mv_merge_probs(pre_comp->class0_hp, c->class0_hp); diff --git a/av1/common/entropymv.h b/av1/common/entropymv.h index 2bc6d95cf0f0cd902e5f9b13d13835cdb9b8df72..89a5570b7ce050d64f7b62c946e5454aa0d3f1fb 100644 --- a/av1/common/entropymv.h +++ b/av1/common/entropymv.h @@ -12,7 +12,7 @@ #ifndef VP10_COMMON_ENTROPYMV_H_ #define VP10_COMMON_ENTROPYMV_H_ -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_dsp/prob.h" @@ -77,24 +77,24 @@ typedef enum { #define MV_UPP ((1 << MV_IN_USE_BITS) - 1) #define MV_LOW (-(1 << MV_IN_USE_BITS)) -extern const vpx_tree_index vp10_mv_joint_tree[]; -extern const vpx_tree_index vp10_mv_class_tree[]; -extern const vpx_tree_index vp10_mv_class0_tree[]; -extern const vpx_tree_index vp10_mv_fp_tree[]; +extern const aom_tree_index vp10_mv_joint_tree[]; +extern const aom_tree_index vp10_mv_class_tree[]; +extern const aom_tree_index vp10_mv_class0_tree[]; +extern const aom_tree_index vp10_mv_fp_tree[]; typedef struct { - vpx_prob sign; - vpx_prob classes[MV_CLASSES - 1]; - vpx_prob class0[CLASS0_SIZE - 1]; - vpx_prob bits[MV_OFFSET_BITS]; - vpx_prob class0_fp[CLASS0_SIZE][MV_FP_SIZE - 1]; - vpx_prob fp[MV_FP_SIZE - 1]; - vpx_prob class0_hp; - vpx_prob hp; + aom_prob sign; + aom_prob classes[MV_CLASSES - 1]; + aom_prob class0[CLASS0_SIZE - 1]; + aom_prob bits[MV_OFFSET_BITS]; + aom_prob class0_fp[CLASS0_SIZE][MV_FP_SIZE - 1]; + aom_prob fp[MV_FP_SIZE - 1]; + aom_prob class0_hp; + aom_prob hp; } nmv_component; typedef struct { - vpx_prob joints[MV_JOINTS - 1]; + aom_prob joints[MV_JOINTS - 1]; nmv_component comps[2]; } nmv_context; diff --git a/av1/common/enums.h b/av1/common/enums.h index 43da348eed1be32f6eec36704f21d2ed1370797b..52c9592c119f85b36cf45ae42e1efea8514cb949 100644 --- a/av1/common/enums.h +++ b/av1/common/enums.h @@ -12,8 +12,8 @@ #ifndef VP10_COMMON_ENUMS_H_ #define VP10_COMMON_ENUMS_H_ -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { diff --git a/av1/common/filter.h b/av1/common/filter.h index 58571bb79b362de81c247e56cf82dc3f9d2d8a22..07a1bd6a04fc59a243a1f105d09808ded5a6c788 100644 --- a/av1/common/filter.h +++ b/av1/common/filter.h @@ -12,9 +12,9 @@ #ifndef VP10_COMMON_FILTER_H_ #define VP10_COMMON_FILTER_H_ -#include "./vpx_config.h" -#include "aom/vpx_integer.h" -#include "aom_dsp/vpx_filter.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" +#include "aom_dsp/aom_filter.h" #include "aom_ports/mem.h" #ifdef __cplusplus diff --git a/av1/common/frame_buffers.c b/av1/common/frame_buffers.c index e4d47b5b28e2c3dd8ced7174527daaa9222414e9..c9eeb256935e3b3571059f54316633313179bc86 100644 --- a/av1/common/frame_buffers.c +++ b/av1/common/frame_buffers.c @@ -12,7 +12,7 @@ #include <assert.h> #include "av1/common/frame_buffers.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" int vp10_alloc_internal_frame_buffers(InternalFrameBufferList *list) { assert(list != NULL); @@ -20,7 +20,7 @@ int vp10_alloc_internal_frame_buffers(InternalFrameBufferList *list) { list->num_internal_frame_buffers = VPX_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS; - list->int_fb = (InternalFrameBuffer *)vpx_calloc( + list->int_fb = (InternalFrameBuffer *)aom_calloc( list->num_internal_frame_buffers, sizeof(*list->int_fb)); return (list->int_fb == NULL); } @@ -31,15 +31,15 @@ void vp10_free_internal_frame_buffers(InternalFrameBufferList *list) { assert(list != NULL); for (i = 0; i < list->num_internal_frame_buffers; ++i) { - vpx_free(list->int_fb[i].data); + aom_free(list->int_fb[i].data); list->int_fb[i].data = NULL; } - vpx_free(list->int_fb); + aom_free(list->int_fb); list->int_fb = NULL; } int vp10_get_frame_buffer(void *cb_priv, size_t min_size, - vpx_codec_frame_buffer_t *fb) { + aom_codec_frame_buffer_t *fb) { int i; InternalFrameBufferList *const int_fb_list = (InternalFrameBufferList *)cb_priv; @@ -54,7 +54,7 @@ int vp10_get_frame_buffer(void *cb_priv, size_t min_size, if (int_fb_list->int_fb[i].size < min_size) { int_fb_list->int_fb[i].data = - (uint8_t *)vpx_realloc(int_fb_list->int_fb[i].data, min_size); + (uint8_t *)aom_realloc(int_fb_list->int_fb[i].data, min_size); if (!int_fb_list->int_fb[i].data) return -1; // This memset is needed for fixing valgrind error from C loop filter @@ -73,7 +73,7 @@ int vp10_get_frame_buffer(void *cb_priv, size_t min_size, return 0; } -int vp10_release_frame_buffer(void *cb_priv, vpx_codec_frame_buffer_t *fb) { +int vp10_release_frame_buffer(void *cb_priv, aom_codec_frame_buffer_t *fb) { InternalFrameBuffer *const int_fb = (InternalFrameBuffer *)fb->priv; (void)cb_priv; if (int_fb) int_fb->in_use = 0; diff --git a/av1/common/frame_buffers.h b/av1/common/frame_buffers.h index 1914d8cfcd604403aef65f2dc9c8e28430d84015..51d3a0cd5d2fbdbf2d61ca48631d26c072beacb1 100644 --- a/av1/common/frame_buffers.h +++ b/av1/common/frame_buffers.h @@ -12,8 +12,8 @@ #ifndef VP10_COMMON_FRAME_BUFFERS_H_ #define VP10_COMMON_FRAME_BUFFERS_H_ -#include "aom/vpx_frame_buffer.h" -#include "aom/vpx_integer.h" +#include "aom/aom_frame_buffer.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { @@ -41,11 +41,11 @@ void vp10_free_internal_frame_buffers(InternalFrameBufferList *list); // |min_size| is the minimum size in bytes needed to decode the next frame. // |fb| pointer to the frame buffer. int vp10_get_frame_buffer(void *cb_priv, size_t min_size, - vpx_codec_frame_buffer_t *fb); + aom_codec_frame_buffer_t *fb); // Callback used by libaom when there are no references to the frame buffer. // |cb_priv| is not used. |fb| pointer to the frame buffer. -int vp10_release_frame_buffer(void *cb_priv, vpx_codec_frame_buffer_t *fb); +int vp10_release_frame_buffer(void *cb_priv, aom_codec_frame_buffer_t *fb); #ifdef __cplusplus } // extern "C" diff --git a/av1/common/idct.c b/av1/common/idct.c index 251e778190cd6805031d831a615346add352b879..b9679d836c3793b1426ccc5924c86820903187c5 100644 --- a/av1/common/idct.c +++ b/av1/common/idct.c @@ -12,7 +12,7 @@ #include <math.h> #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "av1/common/blockd.h" #include "av1/common/idct.h" #include "aom_dsp/inv_txfm.h" @@ -120,17 +120,17 @@ void vp10_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, void vp10_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride, int eob) { if (eob > 1) - vpx_idct4x4_16_add(input, dest, stride); + aom_idct4x4_16_add(input, dest, stride); else - vpx_idct4x4_1_add(input, dest, stride); + aom_idct4x4_1_add(input, dest, stride); } void vp10_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, int eob) { if (eob > 1) - vpx_iwht4x4_16_add(input, dest, stride); + aom_iwht4x4_16_add(input, dest, stride); else - vpx_iwht4x4_1_add(input, dest, stride); + aom_iwht4x4_1_add(input, dest, stride); } void vp10_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride, @@ -144,11 +144,11 @@ void vp10_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride, // Combine that with code here. if (eob == 1) // DC only DCT coefficient - vpx_idct8x8_1_add(input, dest, stride); + aom_idct8x8_1_add(input, dest, stride); else if (eob <= 12) - vpx_idct8x8_12_add(input, dest, stride); + aom_idct8x8_12_add(input, dest, stride); else - vpx_idct8x8_64_add(input, dest, stride); + aom_idct8x8_64_add(input, dest, stride); } void vp10_idct16x16_add(const tran_low_t *input, uint8_t *dest, int stride, @@ -156,22 +156,22 @@ void vp10_idct16x16_add(const tran_low_t *input, uint8_t *dest, int stride, /* The calculation can be simplified if there are not many non-zero dct * coefficients. Use eobs to separate different cases. */ if (eob == 1) /* DC only DCT coefficient. */ - vpx_idct16x16_1_add(input, dest, stride); + aom_idct16x16_1_add(input, dest, stride); else if (eob <= 10) - vpx_idct16x16_10_add(input, dest, stride); + aom_idct16x16_10_add(input, dest, stride); else - vpx_idct16x16_256_add(input, dest, stride); + aom_idct16x16_256_add(input, dest, stride); } void vp10_idct32x32_add(const tran_low_t *input, uint8_t *dest, int stride, int eob) { if (eob == 1) - vpx_idct32x32_1_add(input, dest, stride); + aom_idct32x32_1_add(input, dest, stride); else if (eob <= 34) // non-zero coeff only in upper-left 8x8 - vpx_idct32x32_34_add(input, dest, stride); + aom_idct32x32_34_add(input, dest, stride); else - vpx_idct32x32_1024_add(input, dest, stride); + aom_idct32x32_1024_add(input, dest, stride); } void vp10_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, int stride, @@ -227,10 +227,10 @@ void vp10_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest, int stride, void vp10_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, int stride, int tx_type, int bd) { const highbd_transform_2d IHT_4[] = { - { vpx_highbd_idct4_c, vpx_highbd_idct4_c }, // DCT_DCT = 0 - { vpx_highbd_iadst4_c, vpx_highbd_idct4_c }, // ADST_DCT = 1 - { vpx_highbd_idct4_c, vpx_highbd_iadst4_c }, // DCT_ADST = 2 - { vpx_highbd_iadst4_c, vpx_highbd_iadst4_c } // ADST_ADST = 3 + { aom_highbd_idct4_c, aom_highbd_idct4_c }, // DCT_DCT = 0 + { aom_highbd_iadst4_c, aom_highbd_idct4_c }, // ADST_DCT = 1 + { aom_highbd_idct4_c, aom_highbd_iadst4_c }, // DCT_ADST = 2 + { aom_highbd_iadst4_c, aom_highbd_iadst4_c } // ADST_ADST = 3 }; uint16_t *dest = CONVERT_TO_SHORTPTR(dest8); @@ -258,10 +258,10 @@ void vp10_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, } static const highbd_transform_2d HIGH_IHT_8[] = { - { vpx_highbd_idct8_c, vpx_highbd_idct8_c }, // DCT_DCT = 0 - { vpx_highbd_iadst8_c, vpx_highbd_idct8_c }, // ADST_DCT = 1 - { vpx_highbd_idct8_c, vpx_highbd_iadst8_c }, // DCT_ADST = 2 - { vpx_highbd_iadst8_c, vpx_highbd_iadst8_c } // ADST_ADST = 3 + { aom_highbd_idct8_c, aom_highbd_idct8_c }, // DCT_DCT = 0 + { aom_highbd_iadst8_c, aom_highbd_idct8_c }, // ADST_DCT = 1 + { aom_highbd_idct8_c, aom_highbd_iadst8_c }, // DCT_ADST = 2 + { aom_highbd_iadst8_c, aom_highbd_iadst8_c } // ADST_ADST = 3 }; void vp10_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, @@ -292,10 +292,10 @@ void vp10_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, } static const highbd_transform_2d HIGH_IHT_16[] = { - { vpx_highbd_idct16_c, vpx_highbd_idct16_c }, // DCT_DCT = 0 - { vpx_highbd_iadst16_c, vpx_highbd_idct16_c }, // ADST_DCT = 1 - { vpx_highbd_idct16_c, vpx_highbd_iadst16_c }, // DCT_ADST = 2 - { vpx_highbd_iadst16_c, vpx_highbd_iadst16_c } // ADST_ADST = 3 + { aom_highbd_idct16_c, aom_highbd_idct16_c }, // DCT_DCT = 0 + { aom_highbd_iadst16_c, aom_highbd_idct16_c }, // ADST_DCT = 1 + { aom_highbd_idct16_c, aom_highbd_iadst16_c }, // DCT_ADST = 2 + { aom_highbd_iadst16_c, aom_highbd_iadst16_c } // ADST_ADST = 3 }; void vp10_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, @@ -329,17 +329,17 @@ void vp10_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, void vp10_highbd_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride, int eob, int bd) { if (eob > 1) - vpx_highbd_idct4x4_16_add(input, dest, stride, bd); + aom_highbd_idct4x4_16_add(input, dest, stride, bd); else - vpx_highbd_idct4x4_1_add(input, dest, stride, bd); + aom_highbd_idct4x4_1_add(input, dest, stride, bd); } void vp10_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, int eob, int bd) { if (eob > 1) - vpx_highbd_iwht4x4_16_add(input, dest, stride, bd); + aom_highbd_iwht4x4_16_add(input, dest, stride, bd); else - vpx_highbd_iwht4x4_1_add(input, dest, stride, bd); + aom_highbd_iwht4x4_1_add(input, dest, stride, bd); } void vp10_highbd_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride, @@ -353,11 +353,11 @@ void vp10_highbd_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride, // Combine that with code here. // DC only DCT coefficient if (eob == 1) { - vpx_highbd_idct8x8_1_add(input, dest, stride, bd); + aom_highbd_idct8x8_1_add(input, dest, stride, bd); } else if (eob <= 10) { - vpx_highbd_idct8x8_10_add(input, dest, stride, bd); + aom_highbd_idct8x8_10_add(input, dest, stride, bd); } else { - vpx_highbd_idct8x8_64_add(input, dest, stride, bd); + aom_highbd_idct8x8_64_add(input, dest, stride, bd); } } @@ -367,11 +367,11 @@ void vp10_highbd_idct16x16_add(const tran_low_t *input, uint8_t *dest, // coefficients. Use eobs to separate different cases. // DC only DCT coefficient. if (eob == 1) { - vpx_highbd_idct16x16_1_add(input, dest, stride, bd); + aom_highbd_idct16x16_1_add(input, dest, stride, bd); } else if (eob <= 10) { - vpx_highbd_idct16x16_10_add(input, dest, stride, bd); + aom_highbd_idct16x16_10_add(input, dest, stride, bd); } else { - vpx_highbd_idct16x16_256_add(input, dest, stride, bd); + aom_highbd_idct16x16_256_add(input, dest, stride, bd); } } @@ -379,11 +379,11 @@ void vp10_highbd_idct32x32_add(const tran_low_t *input, uint8_t *dest, int stride, int eob, int bd) { // Non-zero coeff only in upper-left 8x8 if (eob == 1) { - vpx_highbd_idct32x32_1_add(input, dest, stride, bd); + aom_highbd_idct32x32_1_add(input, dest, stride, bd); } else if (eob <= 34) { - vpx_highbd_idct32x32_34_add(input, dest, stride, bd); + aom_highbd_idct32x32_34_add(input, dest, stride, bd); } else { - vpx_highbd_idct32x32_1024_add(input, dest, stride, bd); + aom_highbd_idct32x32_1024_add(input, dest, stride, bd); } } diff --git a/av1/common/idct.h b/av1/common/idct.h index e929749a17ada5c21d5c996013d018009c1c6d8c..2d554ab9d125ec197d2544383666fa8a49e76f75 100644 --- a/av1/common/idct.h +++ b/av1/common/idct.h @@ -14,7 +14,7 @@ #include <assert.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "av1/common/common.h" #include "av1/common/enums.h" #include "aom_dsp/inv_txfm.h" diff --git a/av1/common/loopfilter.c b/av1/common/loopfilter.c index 0843e75b8d74ea984b9facf80c3539ff0e8d3160..2cb16f5239a663954f5cd03d48cae3f8f22ea04b 100644 --- a/av1/common/loopfilter.c +++ b/av1/common/loopfilter.c @@ -9,13 +9,13 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "av1/common/loopfilter.h" #include "av1/common/onyxc_int.h" #include "av1/common/reconinter.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "av1/common/seg_common.h" @@ -327,54 +327,54 @@ static void filter_selectively_vert_row2(int subsampling_factor, uint8_t *s, if (mask & 1) { if ((mask_16x16_0 | mask_16x16_1) & 1) { if ((mask_16x16_0 & mask_16x16_1) & 1) { - vpx_lpf_vertical_16_dual(s, pitch, lfi0->mblim, lfi0->lim, + aom_lpf_vertical_16_dual(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr); } else if (mask_16x16_0 & 1) { - vpx_lpf_vertical_16(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr); + aom_lpf_vertical_16(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr); } else { - vpx_lpf_vertical_16(s + 8 * pitch, pitch, lfi1->mblim, lfi1->lim, + aom_lpf_vertical_16(s + 8 * pitch, pitch, lfi1->mblim, lfi1->lim, lfi1->hev_thr); } } if ((mask_8x8_0 | mask_8x8_1) & 1) { if ((mask_8x8_0 & mask_8x8_1) & 1) { - vpx_lpf_vertical_8_dual(s, pitch, lfi0->mblim, lfi0->lim, + aom_lpf_vertical_8_dual(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, lfi1->mblim, lfi1->lim, lfi1->hev_thr); } else if (mask_8x8_0 & 1) { - vpx_lpf_vertical_8(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, + aom_lpf_vertical_8(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, 1); } else { - vpx_lpf_vertical_8(s + 8 * pitch, pitch, lfi1->mblim, lfi1->lim, + aom_lpf_vertical_8(s + 8 * pitch, pitch, lfi1->mblim, lfi1->lim, lfi1->hev_thr, 1); } } if ((mask_4x4_0 | mask_4x4_1) & 1) { if ((mask_4x4_0 & mask_4x4_1) & 1) { - vpx_lpf_vertical_4_dual(s, pitch, lfi0->mblim, lfi0->lim, + aom_lpf_vertical_4_dual(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, lfi1->mblim, lfi1->lim, lfi1->hev_thr); } else if (mask_4x4_0 & 1) { - vpx_lpf_vertical_4(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, + aom_lpf_vertical_4(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, 1); } else { - vpx_lpf_vertical_4(s + 8 * pitch, pitch, lfi1->mblim, lfi1->lim, + aom_lpf_vertical_4(s + 8 * pitch, pitch, lfi1->mblim, lfi1->lim, lfi1->hev_thr, 1); } } if ((mask_4x4_int_0 | mask_4x4_int_1) & 1) { if ((mask_4x4_int_0 & mask_4x4_int_1) & 1) { - vpx_lpf_vertical_4_dual(s + 4, pitch, lfi0->mblim, lfi0->lim, + aom_lpf_vertical_4_dual(s + 4, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, lfi1->mblim, lfi1->lim, lfi1->hev_thr); } else if (mask_4x4_int_0 & 1) { - vpx_lpf_vertical_4(s + 4, pitch, lfi0->mblim, lfi0->lim, + aom_lpf_vertical_4(s + 4, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, 1); } else { - vpx_lpf_vertical_4(s + 8 * pitch + 4, pitch, lfi1->mblim, lfi1->lim, + aom_lpf_vertical_4(s + 8 * pitch + 4, pitch, lfi1->mblim, lfi1->lim, lfi1->hev_thr, 1); } } @@ -423,55 +423,55 @@ static void highbd_filter_selectively_vert_row2( if (mask & 1) { if ((mask_16x16_0 | mask_16x16_1) & 1) { if ((mask_16x16_0 & mask_16x16_1) & 1) { - vpx_highbd_lpf_vertical_16_dual(s, pitch, lfi0->mblim, lfi0->lim, + aom_highbd_lpf_vertical_16_dual(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, bd); } else if (mask_16x16_0 & 1) { - vpx_highbd_lpf_vertical_16(s, pitch, lfi0->mblim, lfi0->lim, + aom_highbd_lpf_vertical_16(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, bd); } else { - vpx_highbd_lpf_vertical_16(s + 8 * pitch, pitch, lfi1->mblim, + aom_highbd_lpf_vertical_16(s + 8 * pitch, pitch, lfi1->mblim, lfi1->lim, lfi1->hev_thr, bd); } } if ((mask_8x8_0 | mask_8x8_1) & 1) { if ((mask_8x8_0 & mask_8x8_1) & 1) { - vpx_highbd_lpf_vertical_8_dual(s, pitch, lfi0->mblim, lfi0->lim, + aom_highbd_lpf_vertical_8_dual(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, lfi1->mblim, lfi1->lim, lfi1->hev_thr, bd); } else if (mask_8x8_0 & 1) { - vpx_highbd_lpf_vertical_8(s, pitch, lfi0->mblim, lfi0->lim, + aom_highbd_lpf_vertical_8(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, 1, bd); } else { - vpx_highbd_lpf_vertical_8(s + 8 * pitch, pitch, lfi1->mblim, + aom_highbd_lpf_vertical_8(s + 8 * pitch, pitch, lfi1->mblim, lfi1->lim, lfi1->hev_thr, 1, bd); } } if ((mask_4x4_0 | mask_4x4_1) & 1) { if ((mask_4x4_0 & mask_4x4_1) & 1) { - vpx_highbd_lpf_vertical_4_dual(s, pitch, lfi0->mblim, lfi0->lim, + aom_highbd_lpf_vertical_4_dual(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, lfi1->mblim, lfi1->lim, lfi1->hev_thr, bd); } else if (mask_4x4_0 & 1) { - vpx_highbd_lpf_vertical_4(s, pitch, lfi0->mblim, lfi0->lim, + aom_highbd_lpf_vertical_4(s, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, 1, bd); } else { - vpx_highbd_lpf_vertical_4(s + 8 * pitch, pitch, lfi1->mblim, + aom_highbd_lpf_vertical_4(s + 8 * pitch, pitch, lfi1->mblim, lfi1->lim, lfi1->hev_thr, 1, bd); } } if ((mask_4x4_int_0 | mask_4x4_int_1) & 1) { if ((mask_4x4_int_0 & mask_4x4_int_1) & 1) { - vpx_highbd_lpf_vertical_4_dual(s + 4, pitch, lfi0->mblim, lfi0->lim, + aom_highbd_lpf_vertical_4_dual(s + 4, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, lfi1->mblim, lfi1->lim, lfi1->hev_thr, bd); } else if (mask_4x4_int_0 & 1) { - vpx_highbd_lpf_vertical_4(s + 4, pitch, lfi0->mblim, lfi0->lim, + aom_highbd_lpf_vertical_4(s + 4, pitch, lfi0->mblim, lfi0->lim, lfi0->hev_thr, 1, bd); } else { - vpx_highbd_lpf_vertical_4(s + 8 * pitch + 4, pitch, lfi1->mblim, + aom_highbd_lpf_vertical_4(s + 8 * pitch + 4, pitch, lfi1->mblim, lfi1->lim, lfi1->hev_thr, 1, bd); } } @@ -506,11 +506,11 @@ static void filter_selectively_horiz( if (mask & 1) { if (mask_16x16 & 1) { if ((mask_16x16 & 3) == 3) { - vpx_lpf_horizontal_16(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, + aom_lpf_horizontal_16(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 2); count = 2; } else { - vpx_lpf_horizontal_16(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, + aom_lpf_horizontal_16(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); } } else if (mask_8x8 & 1) { @@ -518,28 +518,28 @@ static void filter_selectively_horiz( // Next block's thresholds. const loop_filter_thresh *lfin = lfi_n->lfthr + *(lfl + 1); - vpx_lpf_horizontal_8_dual(s, pitch, lfi->mblim, lfi->lim, + aom_lpf_horizontal_8_dual(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, lfin->mblim, lfin->lim, lfin->hev_thr); if ((mask_4x4_int & 3) == 3) { - vpx_lpf_horizontal_4_dual(s + 4 * pitch, pitch, lfi->mblim, + aom_lpf_horizontal_4_dual(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, lfin->mblim, lfin->lim, lfin->hev_thr); } else { if (mask_4x4_int & 1) - vpx_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, + aom_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); else if (mask_4x4_int & 2) - vpx_lpf_horizontal_4(s + 8 + 4 * pitch, pitch, lfin->mblim, + aom_lpf_horizontal_4(s + 8 + 4 * pitch, pitch, lfin->mblim, lfin->lim, lfin->hev_thr, 1); } count = 2; } else { - vpx_lpf_horizontal_8(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); + aom_lpf_horizontal_8(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); if (mask_4x4_int & 1) - vpx_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, + aom_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); } } else if (mask_4x4 & 1) { @@ -547,31 +547,31 @@ static void filter_selectively_horiz( // Next block's thresholds. const loop_filter_thresh *lfin = lfi_n->lfthr + *(lfl + 1); - vpx_lpf_horizontal_4_dual(s, pitch, lfi->mblim, lfi->lim, + aom_lpf_horizontal_4_dual(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, lfin->mblim, lfin->lim, lfin->hev_thr); if ((mask_4x4_int & 3) == 3) { - vpx_lpf_horizontal_4_dual(s + 4 * pitch, pitch, lfi->mblim, + aom_lpf_horizontal_4_dual(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, lfin->mblim, lfin->lim, lfin->hev_thr); } else { if (mask_4x4_int & 1) - vpx_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, + aom_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); else if (mask_4x4_int & 2) - vpx_lpf_horizontal_4(s + 8 + 4 * pitch, pitch, lfin->mblim, + aom_lpf_horizontal_4(s + 8 + 4 * pitch, pitch, lfin->mblim, lfin->lim, lfin->hev_thr, 1); } count = 2; } else { - vpx_lpf_horizontal_4(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); + aom_lpf_horizontal_4(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); if (mask_4x4_int & 1) - vpx_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, + aom_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); } } else if (mask_4x4_int & 1) { - vpx_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, + aom_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); } } @@ -600,11 +600,11 @@ static void highbd_filter_selectively_horiz( if (mask & 1) { if (mask_16x16 & 1) { if ((mask_16x16 & 3) == 3) { - vpx_highbd_lpf_horizontal_16(s, pitch, lfi->mblim, lfi->lim, + aom_highbd_lpf_horizontal_16(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 2, bd); count = 2; } else { - vpx_highbd_lpf_horizontal_16(s, pitch, lfi->mblim, lfi->lim, + aom_highbd_lpf_horizontal_16(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); } } else if (mask_8x8 & 1) { @@ -612,30 +612,30 @@ static void highbd_filter_selectively_horiz( // Next block's thresholds. const loop_filter_thresh *lfin = lfi_n->lfthr + *(lfl + 1); - vpx_highbd_lpf_horizontal_8_dual(s, pitch, lfi->mblim, lfi->lim, + aom_highbd_lpf_horizontal_8_dual(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, lfin->mblim, lfin->lim, lfin->hev_thr, bd); if ((mask_4x4_int & 3) == 3) { - vpx_highbd_lpf_horizontal_4_dual( + aom_highbd_lpf_horizontal_4_dual( s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, lfin->mblim, lfin->lim, lfin->hev_thr, bd); } else { if (mask_4x4_int & 1) { - vpx_highbd_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, + aom_highbd_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); } else if (mask_4x4_int & 2) { - vpx_highbd_lpf_horizontal_4(s + 8 + 4 * pitch, pitch, lfin->mblim, + aom_highbd_lpf_horizontal_4(s + 8 + 4 * pitch, pitch, lfin->mblim, lfin->lim, lfin->hev_thr, 1, bd); } } count = 2; } else { - vpx_highbd_lpf_horizontal_8(s, pitch, lfi->mblim, lfi->lim, + aom_highbd_lpf_horizontal_8(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); if (mask_4x4_int & 1) { - vpx_highbd_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, + aom_highbd_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); } } @@ -644,34 +644,34 @@ static void highbd_filter_selectively_horiz( // Next block's thresholds. const loop_filter_thresh *lfin = lfi_n->lfthr + *(lfl + 1); - vpx_highbd_lpf_horizontal_4_dual(s, pitch, lfi->mblim, lfi->lim, + aom_highbd_lpf_horizontal_4_dual(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, lfin->mblim, lfin->lim, lfin->hev_thr, bd); if ((mask_4x4_int & 3) == 3) { - vpx_highbd_lpf_horizontal_4_dual( + aom_highbd_lpf_horizontal_4_dual( s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, lfin->mblim, lfin->lim, lfin->hev_thr, bd); } else { if (mask_4x4_int & 1) { - vpx_highbd_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, + aom_highbd_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); } else if (mask_4x4_int & 2) { - vpx_highbd_lpf_horizontal_4(s + 8 + 4 * pitch, pitch, lfin->mblim, + aom_highbd_lpf_horizontal_4(s + 8 + 4 * pitch, pitch, lfin->mblim, lfin->lim, lfin->hev_thr, 1, bd); } } count = 2; } else { - vpx_highbd_lpf_horizontal_4(s, pitch, lfi->mblim, lfi->lim, + aom_highbd_lpf_horizontal_4(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); if (mask_4x4_int & 1) { - vpx_highbd_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, + aom_highbd_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); } } } else if (mask_4x4_int & 1) { - vpx_highbd_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, + aom_highbd_lpf_horizontal_4(s + 4 * pitch, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); } } @@ -1097,15 +1097,15 @@ static void filter_selectively_vert( if (mask & 1) { if (mask_16x16 & 1) { - vpx_lpf_vertical_16(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr); + aom_lpf_vertical_16(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr); } else if (mask_8x8 & 1) { - vpx_lpf_vertical_8(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); + aom_lpf_vertical_8(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); } else if (mask_4x4 & 1) { - vpx_lpf_vertical_4(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); + aom_lpf_vertical_4(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); } } if (mask_4x4_int & 1) - vpx_lpf_vertical_4(s + 4, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); + aom_lpf_vertical_4(s + 4, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1); s += 8; lfl += 1; mask_16x16 >>= 1; @@ -1128,18 +1128,18 @@ static void highbd_filter_selectively_vert( if (mask & 1) { if (mask_16x16 & 1) { - vpx_highbd_lpf_vertical_16(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, + aom_highbd_lpf_vertical_16(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, bd); } else if (mask_8x8 & 1) { - vpx_highbd_lpf_vertical_8(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, + aom_highbd_lpf_vertical_8(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); } else if (mask_4x4 & 1) { - vpx_highbd_lpf_vertical_4(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, + aom_highbd_lpf_vertical_4(s, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); } } if (mask_4x4_int & 1) - vpx_highbd_lpf_vertical_4(s + 4, pitch, lfi->mblim, lfi->lim, + aom_highbd_lpf_vertical_4(s + 4, pitch, lfi->mblim, lfi->lim, lfi->hev_thr, 1, bd); s += 8; lfl += 1; diff --git a/av1/common/loopfilter.h b/av1/common/loopfilter.h index 5b57c806e6d6d73e334102e43607ed4aa25ef6d6..73273e453f3a54cea4cd8b60fd05ecafe341b949 100644 --- a/av1/common/loopfilter.h +++ b/av1/common/loopfilter.h @@ -13,7 +13,7 @@ #define VP10_COMMON_LOOPFILTER_H_ #include "aom_ports/mem.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "av1/common/blockd.h" #include "av1/common/seg_common.h" diff --git a/av1/common/mips/dspr2/itrans16_dspr2.c b/av1/common/mips/dspr2/itrans16_dspr2.c index 83524dca57762f7d028344668c0e74d1b1ec79b2..e9db822e36d9175c170cad83082dbe97052e2bb2 100644 --- a/av1/common/mips/dspr2/itrans16_dspr2.c +++ b/av1/common/mips/dspr2/itrans16_dspr2.c @@ -12,7 +12,7 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "./av1_rtcd.h" #include "av1/common/common.h" #include "av1/common/blockd.h" diff --git a/av1/common/mips/dspr2/itrans4_dspr2.c b/av1/common/mips/dspr2/itrans4_dspr2.c index 6dec7af5b161bba2b9042ce898c17ab31b0b4eb4..ee8f566464a8864122876e297994f7d222c26d7e 100644 --- a/av1/common/mips/dspr2/itrans4_dspr2.c +++ b/av1/common/mips/dspr2/itrans4_dspr2.c @@ -12,7 +12,7 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "./av1_rtcd.h" #include "av1/common/common.h" #include "av1/common/blockd.h" @@ -37,11 +37,11 @@ void vp10_iht4x4_16_add_dspr2(const int16_t *input, uint8_t *dest, switch (tx_type) { case DCT_DCT: // DCT in both horizontal and vertical - vpx_idct4_rows_dspr2(input, outptr); - vpx_idct4_columns_add_blk_dspr2(&out[0], dest, dest_stride); + aom_idct4_rows_dspr2(input, outptr); + aom_idct4_columns_add_blk_dspr2(&out[0], dest, dest_stride); break; case ADST_DCT: // ADST in vertical, DCT in horizontal - vpx_idct4_rows_dspr2(input, outptr); + aom_idct4_rows_dspr2(input, outptr); outptr = out; @@ -67,7 +67,7 @@ void vp10_iht4x4_16_add_dspr2(const int16_t *input, uint8_t *dest, temp_in[i * 4 + j] = out[j * 4 + i]; } } - vpx_idct4_columns_add_blk_dspr2(&temp_in[0], dest, dest_stride); + aom_idct4_columns_add_blk_dspr2(&temp_in[0], dest, dest_stride); break; case ADST_ADST: // ADST in both directions for (i = 0; i < 4; ++i) { diff --git a/av1/common/mips/dspr2/itrans8_dspr2.c b/av1/common/mips/dspr2/itrans8_dspr2.c index c1fa6463f997df611017ea41be9beb449608f2d6..0c5a708a662aaaf5a6734de23c13a0153eb22607 100644 --- a/av1/common/mips/dspr2/itrans8_dspr2.c +++ b/av1/common/mips/dspr2/itrans8_dspr2.c @@ -12,7 +12,7 @@ #include <assert.h> #include <stdio.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "./av1_rtcd.h" #include "av1/common/common.h" #include "av1/common/blockd.h" diff --git a/av1/common/mips/msa/idct16x16_msa.c b/av1/common/mips/msa/idct16x16_msa.c index c38f4e0d79b0f36a9bcdc95781effc8b8dc96f42..9b75b310b6e4d31a0bbc83d8b6ea6d012d9484a7 100644 --- a/av1/common/mips/msa/idct16x16_msa.c +++ b/av1/common/mips/msa/idct16x16_msa.c @@ -25,13 +25,13 @@ void vp10_iht16x16_256_add_msa(const int16_t *input, uint8_t *dst, /* transform rows */ for (i = 0; i < 2; ++i) { /* process 16 * 8 block */ - vpx_idct16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); + aom_idct16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); } /* transform columns */ for (i = 0; i < 2; ++i) { /* process 8 * 16 block */ - vpx_idct16_1d_columns_addblk_msa((out_ptr + (i << 3)), (dst + (i << 3)), + aom_idct16_1d_columns_addblk_msa((out_ptr + (i << 3)), (dst + (i << 3)), dst_stride); } break; @@ -39,12 +39,12 @@ void vp10_iht16x16_256_add_msa(const int16_t *input, uint8_t *dst, /* transform rows */ for (i = 0; i < 2; ++i) { /* process 16 * 8 block */ - vpx_idct16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); + aom_idct16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); } /* transform columns */ for (i = 0; i < 2; ++i) { - vpx_iadst16_1d_columns_addblk_msa((out_ptr + (i << 3)), + aom_iadst16_1d_columns_addblk_msa((out_ptr + (i << 3)), (dst + (i << 3)), dst_stride); } break; @@ -52,13 +52,13 @@ void vp10_iht16x16_256_add_msa(const int16_t *input, uint8_t *dst, /* transform rows */ for (i = 0; i < 2; ++i) { /* process 16 * 8 block */ - vpx_iadst16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); + aom_iadst16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); } /* transform columns */ for (i = 0; i < 2; ++i) { /* process 8 * 16 block */ - vpx_idct16_1d_columns_addblk_msa((out_ptr + (i << 3)), (dst + (i << 3)), + aom_idct16_1d_columns_addblk_msa((out_ptr + (i << 3)), (dst + (i << 3)), dst_stride); } break; @@ -66,12 +66,12 @@ void vp10_iht16x16_256_add_msa(const int16_t *input, uint8_t *dst, /* transform rows */ for (i = 0; i < 2; ++i) { /* process 16 * 8 block */ - vpx_iadst16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); + aom_iadst16_1d_rows_msa((input + (i << 7)), (out_ptr + (i << 7))); } /* transform columns */ for (i = 0; i < 2; ++i) { - vpx_iadst16_1d_columns_addblk_msa((out_ptr + (i << 3)), + aom_iadst16_1d_columns_addblk_msa((out_ptr + (i << 3)), (dst + (i << 3)), dst_stride); } break; diff --git a/av1/common/mv.h b/av1/common/mv.h index a87783e7a4d78ec120b468b9683a9e1b392928e9..06261afdb4ed07e557fe2d54dc26970a0d38e9e8 100644 --- a/av1/common/mv.h +++ b/av1/common/mv.h @@ -12,7 +12,7 @@ #ifndef VP10_COMMON_MV_H_ #define VP10_COMMON_MV_H_ -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "av1/common/common.h" diff --git a/av1/common/odintrin.h b/av1/common/odintrin.h index dc2ecc22199d8fc35680e330c53f5b1bda97e9d9..c3a4033fed3abbdb801f5bb786ec63b8e9cc4737 100644 --- a/av1/common/odintrin.h +++ b/av1/common/odintrin.h @@ -12,8 +12,8 @@ #define VP10_COMMON_ODINTRIN_H_ #include "av1/common/enums.h" -#include "aom/vpx_integer.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom/aom_integer.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/bitops.h" #ifdef __cplusplus diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h index 33813f213e292725dadd31bd3bb58ac6f010331e..0b26d1605301ed2d0e18b34117ae5d8feae78444 100644 --- a/av1/common/onyxc_int.h +++ b/av1/common/onyxc_int.h @@ -12,9 +12,9 @@ #ifndef VP10_COMMON_ONYXC_INT_H_ #define VP10_COMMON_ONYXC_INT_H_ -#include "./vpx_config.h" -#include "aom/internal/vpx_codec_internal.h" -#include "aom_util/vpx_thread.h" +#include "./aom_config.h" +#include "aom/internal/aom_codec_internal.h" +#include "aom_util/aom_thread.h" #include "./av1_rtcd.h" #include "av1/common/alloccommon.h" #include "av1/common/loopfilter.h" @@ -86,7 +86,7 @@ typedef struct { MV_REF *mvs; int mi_rows; int mi_cols; - vpx_codec_frame_buffer_t raw_frame_buffer; + aom_codec_frame_buffer_t raw_frame_buffer; YV12_BUFFER_CONFIG buf; // The Following variables will only be used in frame parallel decode. @@ -113,8 +113,8 @@ typedef struct BufferPool { // Private data associated with the frame buffer callbacks. void *cb_priv; - vpx_get_frame_buffer_cb_fn_t get_fb_cb; - vpx_release_frame_buffer_cb_fn_t release_fb_cb; + aom_get_frame_buffer_cb_fn_t get_fb_cb; + aom_release_frame_buffer_cb_fn_t release_fb_cb; RefCntBuffer frame_bufs[FRAME_BUFFERS]; @@ -123,8 +123,8 @@ typedef struct BufferPool { } BufferPool; typedef struct VP10Common { - struct vpx_internal_error_info error; - vpx_color_space_t color_space; + struct aom_internal_error_info error; + aom_color_space_t color_space; int color_range; int width; int height; @@ -284,8 +284,8 @@ typedef struct VP10Common { BITSTREAM_PROFILE profile; // VPX_BITS_8 in profile 0 or 1, VPX_BITS_10 or VPX_BITS_12 in profile 2 or 3. - vpx_bit_depth_t bit_depth; - vpx_bit_depth_t dequant_bit_depth; // bit_depth of current dequantizer + aom_bit_depth_t bit_depth; + aom_bit_depth_t dequant_bit_depth; // bit_depth of current dequantizer int error_resilient_mode; @@ -296,8 +296,8 @@ typedef struct VP10Common { // Private data associated with the frame buffer callbacks. void *cb_priv; - vpx_get_frame_buffer_cb_fn_t get_fb_cb; - vpx_release_frame_buffer_cb_fn_t release_fb_cb; + aom_get_frame_buffer_cb_fn_t get_fb_cb; + aom_release_frame_buffer_cb_fn_t release_fb_cb; // Handles memory for the codec. InternalFrameBufferList int_frame_buffers; @@ -312,7 +312,7 @@ typedef struct VP10Common { // scratch memory for intraonly/keyframe forward updates from default tables // - this is intentionally not placed in FRAME_CONTEXT since it's reset upon // each keyframe and not used afterwards - vpx_prob kf_y_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1]; + aom_prob kf_y_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1]; #if CONFIG_DERING int dering_level; #endif @@ -461,7 +461,7 @@ static INLINE void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile, } } -static INLINE const vpx_prob *get_y_mode_probs(const VP10_COMMON *cm, +static INLINE const aom_prob *get_y_mode_probs(const VP10_COMMON *cm, const MODE_INFO *mi, const MODE_INFO *above_mi, const MODE_INFO *left_mi, diff --git a/av1/common/pred_common.h b/av1/common/pred_common.h index f045d77fb081bc0c3be9441e3917db3a5b937cb4..56691ee65614781910614e4ad8aeebfc522d1b16 100644 --- a/av1/common/pred_common.h +++ b/av1/common/pred_common.h @@ -14,7 +14,7 @@ #include "av1/common/blockd.h" #include "av1/common/onyxc_int.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" #ifdef __cplusplus extern "C" { @@ -49,7 +49,7 @@ static INLINE int vp10_get_pred_context_seg_id(const MACROBLOCKD *xd) { return above_sip + left_sip; } -static INLINE vpx_prob vp10_get_pred_prob_seg_id( +static INLINE aom_prob vp10_get_pred_prob_seg_id( const struct segmentation_probs *segp, const MACROBLOCKD *xd) { return segp->pred_probs[vp10_get_pred_context_seg_id(xd)]; } @@ -62,7 +62,7 @@ static INLINE int vp10_get_skip_context(const MACROBLOCKD *xd) { return above_skip + left_skip; } -static INLINE vpx_prob vp10_get_skip_prob(const VP10_COMMON *cm, +static INLINE aom_prob vp10_get_skip_prob(const VP10_COMMON *cm, const MACROBLOCKD *xd) { return cm->fc->skip_probs[vp10_get_skip_context(xd)]; } @@ -71,7 +71,7 @@ int vp10_get_pred_context_switchable_interp(const MACROBLOCKD *xd); int vp10_get_intra_inter_context(const MACROBLOCKD *xd); -static INLINE vpx_prob vp10_get_intra_inter_prob(const VP10_COMMON *cm, +static INLINE aom_prob vp10_get_intra_inter_prob(const VP10_COMMON *cm, const MACROBLOCKD *xd) { return cm->fc->intra_inter_prob[vp10_get_intra_inter_context(xd)]; } @@ -79,7 +79,7 @@ static INLINE vpx_prob vp10_get_intra_inter_prob(const VP10_COMMON *cm, int vp10_get_reference_mode_context(const VP10_COMMON *cm, const MACROBLOCKD *xd); -static INLINE vpx_prob vp10_get_reference_mode_prob(const VP10_COMMON *cm, +static INLINE aom_prob vp10_get_reference_mode_prob(const VP10_COMMON *cm, const MACROBLOCKD *xd) { return cm->fc->comp_inter_prob[vp10_get_reference_mode_context(cm, xd)]; } @@ -87,7 +87,7 @@ static INLINE vpx_prob vp10_get_reference_mode_prob(const VP10_COMMON *cm, int vp10_get_pred_context_comp_ref_p(const VP10_COMMON *cm, const MACROBLOCKD *xd); -static INLINE vpx_prob vp10_get_pred_prob_comp_ref_p(const VP10_COMMON *cm, +static INLINE aom_prob vp10_get_pred_prob_comp_ref_p(const VP10_COMMON *cm, const MACROBLOCKD *xd) { const int pred_context = vp10_get_pred_context_comp_ref_p(cm, xd); return cm->fc->comp_ref_prob[pred_context]; @@ -95,14 +95,14 @@ static INLINE vpx_prob vp10_get_pred_prob_comp_ref_p(const VP10_COMMON *cm, int vp10_get_pred_context_single_ref_p1(const MACROBLOCKD *xd); -static INLINE vpx_prob vp10_get_pred_prob_single_ref_p1(const VP10_COMMON *cm, +static INLINE aom_prob vp10_get_pred_prob_single_ref_p1(const VP10_COMMON *cm, const MACROBLOCKD *xd) { return cm->fc->single_ref_prob[vp10_get_pred_context_single_ref_p1(xd)][0]; } int vp10_get_pred_context_single_ref_p2(const MACROBLOCKD *xd); -static INLINE vpx_prob vp10_get_pred_prob_single_ref_p2(const VP10_COMMON *cm, +static INLINE aom_prob vp10_get_pred_prob_single_ref_p2(const VP10_COMMON *cm, const MACROBLOCKD *xd) { return cm->fc->single_ref_prob[vp10_get_pred_context_single_ref_p2(xd)][1]; } @@ -128,7 +128,7 @@ static INLINE int get_tx_size_context(const MACROBLOCKD *xd) { return (above_ctx + left_ctx) > max_tx_size; } -static INLINE const vpx_prob *get_tx_probs(TX_SIZE max_tx_size, int ctx, +static INLINE const aom_prob *get_tx_probs(TX_SIZE max_tx_size, int ctx, const struct tx_probs *tx_probs) { switch (max_tx_size) { case TX_8X8: return tx_probs->p8x8[ctx]; @@ -138,7 +138,7 @@ static INLINE const vpx_prob *get_tx_probs(TX_SIZE max_tx_size, int ctx, } } -static INLINE const vpx_prob *get_tx_probs2(TX_SIZE max_tx_size, +static INLINE const aom_prob *get_tx_probs2(TX_SIZE max_tx_size, const MACROBLOCKD *xd, const struct tx_probs *tx_probs) { return get_tx_probs(max_tx_size, get_tx_size_context(xd), tx_probs); diff --git a/av1/common/quant_common.c b/av1/common/quant_common.c index 7033e9bcea68e5f9459bc327577b9f81ba1b5ff6..7859052cc5f07c64928a7902fdce0b4df4fe69ab 100644 --- a/av1/common/quant_common.c +++ b/av1/common/quant_common.c @@ -168,7 +168,7 @@ static const int16_t ac_qlookup_12[QINDEX_RANGE] = { }; #endif -int16_t vp10_dc_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) { +int16_t vp10_dc_quant(int qindex, int delta, aom_bit_depth_t bit_depth) { #if CONFIG_VPX_HIGHBITDEPTH switch (bit_depth) { case VPX_BITS_8: return dc_qlookup[clamp(qindex + delta, 0, MAXQ)]; @@ -184,7 +184,7 @@ int16_t vp10_dc_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) { #endif } -int16_t vp10_ac_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) { +int16_t vp10_ac_quant(int qindex, int delta, aom_bit_depth_t bit_depth) { #if CONFIG_VPX_HIGHBITDEPTH switch (bit_depth) { case VPX_BITS_8: return ac_qlookup[clamp(qindex + delta, 0, MAXQ)]; diff --git a/av1/common/quant_common.h b/av1/common/quant_common.h index fafd7f032333f36867394a69fbcd4b632dc2a0f5..c806c7aa07e631f06e5826cf4135fdaba4d6eb34 100644 --- a/av1/common/quant_common.h +++ b/av1/common/quant_common.h @@ -12,7 +12,7 @@ #ifndef VP10_COMMON_QUANT_COMMON_H_ #define VP10_COMMON_QUANT_COMMON_H_ -#include "aom/vpx_codec.h" +#include "aom/aom_codec.h" #include "av1/common/seg_common.h" #include "av1/common/enums.h" @@ -37,8 +37,8 @@ extern "C" { struct VP10Common; -int16_t vp10_dc_quant(int qindex, int delta, vpx_bit_depth_t bit_depth); -int16_t vp10_ac_quant(int qindex, int delta, vpx_bit_depth_t bit_depth); +int16_t vp10_dc_quant(int qindex, int delta, aom_bit_depth_t bit_depth); +int16_t vp10_ac_quant(int qindex, int delta, aom_bit_depth_t bit_depth); int vp10_get_qindex(const struct segmentation *seg, int segment_id, int base_qindex); diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c index 40e30cea2b729a5b382bc7607e201918c6236169..ee43ffe69ab421b5a6820ad1f530bc268502c784 100644 --- a/av1/common/reconinter.c +++ b/av1/common/reconinter.c @@ -11,10 +11,10 @@ #include <assert.h> -#include "./vpx_scale_rtcd.h" -#include "./vpx_config.h" +#include "./aom_scale_rtcd.h" +#include "./aom_config.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "av1/common/blockd.h" #include "av1/common/reconinter.h" diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h index 46828ed83d59d8e1052f49ef644cda913a342b3a..6996ea74436a42be1dac9cc3b5486965c36c4ad3 100644 --- a/av1/common/reconinter.h +++ b/av1/common/reconinter.h @@ -14,8 +14,8 @@ #include "av1/common/filter.h" #include "av1/common/onyxc_int.h" -#include "aom/vpx_integer.h" -#include "aom_dsp/vpx_filter.h" +#include "aom/aom_integer.h" +#include "aom_dsp/aom_filter.h" #ifdef __cplusplus extern "C" { diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c index f7623be37f21a698d9e9bb01b398dc7fb722f42d..bebfb79902cf157f5def7fe372ce5ee24d48d247 100644 --- a/av1/common/reconintra.c +++ b/av1/common/reconintra.c @@ -9,15 +9,15 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #if CONFIG_VPX_HIGHBITDEPTH -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" #endif // CONFIG_VPX_HIGHBITDEPTH -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" -#include "aom_ports/vpx_once.h" +#include "aom_ports/aom_once.h" #include "av1/common/reconintra.h" #include "av1/common/onyxc_int.h" @@ -181,12 +181,12 @@ static intra_high_pred_fn dc_pred_high[2][2][4]; static void vp10_init_intra_predictors_internal(void) { #define INIT_NO_4X4(p, type) \ - p[TX_8X8] = vpx_##type##_predictor_8x8; \ - p[TX_16X16] = vpx_##type##_predictor_16x16; \ - p[TX_32X32] = vpx_##type##_predictor_32x32 + p[TX_8X8] = aom_##type##_predictor_8x8; \ + p[TX_16X16] = aom_##type##_predictor_16x16; \ + p[TX_32X32] = aom_##type##_predictor_32x32 #define INIT_ALL_SIZES(p, type) \ - p[TX_4X4] = vpx_##type##_predictor_4x4; \ + p[TX_4X4] = aom_##type##_predictor_4x4; \ INIT_NO_4X4(p, type) INIT_ALL_SIZES(pred[V_PRED], v); @@ -366,7 +366,7 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd, } } else { // TODO(Peter): this value should probably change for high bitdepth - vpx_memset16(left_col, base + 1, bs); + aom_memset16(left_col, base + 1, bs); } } @@ -381,7 +381,7 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd, } else if (x0 <= frame_width) { const int r = frame_width - x0; memcpy(above_row, above_ref, r * sizeof(above_row[0])); - vpx_memset16(above_row + r, above_row[r - 1], x0 + bs - frame_width); + aom_memset16(above_row + r, above_row[r - 1], x0 + bs - frame_width); } } else { /* faster path if the block does not need extension */ @@ -393,7 +393,7 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd, } above_row[-1] = left_available ? above_ref[-1] : (base + 1); } else { - vpx_memset16(above_row, base - 1, bs); + aom_memset16(above_row, base - 1, bs); above_row[-1] = base - 1; } } @@ -409,22 +409,22 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd, memcpy(above_row, above_ref, 2 * bs * sizeof(above_row[0])); } else { memcpy(above_row, above_ref, bs * sizeof(above_row[0])); - vpx_memset16(above_row + bs, above_row[bs - 1], bs); + aom_memset16(above_row + bs, above_row[bs - 1], bs); } } else if (x0 + bs <= frame_width) { const int r = frame_width - x0; if (right_available && bs == 4) { memcpy(above_row, above_ref, r * sizeof(above_row[0])); - vpx_memset16(above_row + r, above_row[r - 1], + aom_memset16(above_row + r, above_row[r - 1], x0 + 2 * bs - frame_width); } else { memcpy(above_row, above_ref, bs * sizeof(above_row[0])); - vpx_memset16(above_row + bs, above_row[bs - 1], bs); + aom_memset16(above_row + bs, above_row[bs - 1], bs); } } else if (x0 <= frame_width) { const int r = frame_width - x0; memcpy(above_row, above_ref, r * sizeof(above_row[0])); - vpx_memset16(above_row + r, above_row[r - 1], + aom_memset16(above_row + r, above_row[r - 1], x0 + 2 * bs - frame_width); } // TODO(Peter) this value should probably change for high bitdepth @@ -438,13 +438,13 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd, if (bs == 4 && right_available) memcpy(above_row + bs, above_ref + bs, bs * sizeof(above_row[0])); else - vpx_memset16(above_row + bs, above_row[bs - 1], bs); + aom_memset16(above_row + bs, above_row[bs - 1], bs); // TODO(Peter): this value should probably change for high bitdepth above_row[-1] = left_available ? above_ref[-1] : (base + 1); } } } else { - vpx_memset16(above_row, base - 1, bs * 2); + aom_memset16(above_row, base - 1, bs * 2); // TODO(Peter): this value should probably change for high bitdepth above_row[-1] = base - 1; } diff --git a/av1/common/reconintra.h b/av1/common/reconintra.h index d7d88a268ebbd5a303ac02320167a3d53e70bb6e..09d1d4b0097cc18cbb628240b38137f2f499e1a0 100644 --- a/av1/common/reconintra.h +++ b/av1/common/reconintra.h @@ -12,7 +12,7 @@ #ifndef VP10_COMMON_RECONINTRA_H_ #define VP10_COMMON_RECONINTRA_H_ -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "av1/common/blockd.h" #ifdef __cplusplus diff --git a/av1/common/scale.c b/av1/common/scale.c index 6a19c39b89ba5cf3454b433f83c6180ced609be7..75ae029255202cbc741a1ea7972e4c086a1e0564 100644 --- a/av1/common/scale.c +++ b/av1/common/scale.c @@ -9,10 +9,10 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "av1/common/filter.h" #include "av1/common/scale.h" -#include "aom_dsp/vpx_filter.h" +#include "aom_dsp/aom_filter.h" static INLINE int scaled_x(int val, const struct scale_factors *sf) { return (int)((int64_t)val * sf->x_scale_fp >> REF_SCALE_SHIFT); @@ -79,85 +79,85 @@ void vp10_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w, if (sf->x_step_q4 == 16) { if (sf->y_step_q4 == 16) { // No scaling in either direction. - sf->predict[0][0][0] = vpx_convolve_copy; - sf->predict[0][0][1] = vpx_convolve_avg; - sf->predict[0][1][0] = vpx_convolve8_vert; - sf->predict[0][1][1] = vpx_convolve8_avg_vert; - sf->predict[1][0][0] = vpx_convolve8_horiz; - sf->predict[1][0][1] = vpx_convolve8_avg_horiz; + sf->predict[0][0][0] = aom_convolve_copy; + sf->predict[0][0][1] = aom_convolve_avg; + sf->predict[0][1][0] = aom_convolve8_vert; + sf->predict[0][1][1] = aom_convolve8_avg_vert; + sf->predict[1][0][0] = aom_convolve8_horiz; + sf->predict[1][0][1] = aom_convolve8_avg_horiz; } else { // No scaling in x direction. Must always scale in the y direction. - sf->predict[0][0][0] = vpx_convolve8_vert; - sf->predict[0][0][1] = vpx_convolve8_avg_vert; - sf->predict[0][1][0] = vpx_convolve8_vert; - sf->predict[0][1][1] = vpx_convolve8_avg_vert; - sf->predict[1][0][0] = vpx_convolve8; - sf->predict[1][0][1] = vpx_convolve8_avg; + sf->predict[0][0][0] = aom_convolve8_vert; + sf->predict[0][0][1] = aom_convolve8_avg_vert; + sf->predict[0][1][0] = aom_convolve8_vert; + sf->predict[0][1][1] = aom_convolve8_avg_vert; + sf->predict[1][0][0] = aom_convolve8; + sf->predict[1][0][1] = aom_convolve8_avg; } } else { if (sf->y_step_q4 == 16) { // No scaling in the y direction. Must always scale in the x direction. - sf->predict[0][0][0] = vpx_convolve8_horiz; - sf->predict[0][0][1] = vpx_convolve8_avg_horiz; - sf->predict[0][1][0] = vpx_convolve8; - sf->predict[0][1][1] = vpx_convolve8_avg; - sf->predict[1][0][0] = vpx_convolve8_horiz; - sf->predict[1][0][1] = vpx_convolve8_avg_horiz; + sf->predict[0][0][0] = aom_convolve8_horiz; + sf->predict[0][0][1] = aom_convolve8_avg_horiz; + sf->predict[0][1][0] = aom_convolve8; + sf->predict[0][1][1] = aom_convolve8_avg; + sf->predict[1][0][0] = aom_convolve8_horiz; + sf->predict[1][0][1] = aom_convolve8_avg_horiz; } else { // Must always scale in both directions. - sf->predict[0][0][0] = vpx_convolve8; - sf->predict[0][0][1] = vpx_convolve8_avg; - sf->predict[0][1][0] = vpx_convolve8; - sf->predict[0][1][1] = vpx_convolve8_avg; - sf->predict[1][0][0] = vpx_convolve8; - sf->predict[1][0][1] = vpx_convolve8_avg; + sf->predict[0][0][0] = aom_convolve8; + sf->predict[0][0][1] = aom_convolve8_avg; + sf->predict[0][1][0] = aom_convolve8; + sf->predict[0][1][1] = aom_convolve8_avg; + sf->predict[1][0][0] = aom_convolve8; + sf->predict[1][0][1] = aom_convolve8_avg; } } // 2D subpel motion always gets filtered in both directions - sf->predict[1][1][0] = vpx_convolve8; - sf->predict[1][1][1] = vpx_convolve8_avg; + sf->predict[1][1][0] = aom_convolve8; + sf->predict[1][1][1] = aom_convolve8_avg; #if CONFIG_VPX_HIGHBITDEPTH if (use_highbd) { if (sf->x_step_q4 == 16) { if (sf->y_step_q4 == 16) { // No scaling in either direction. - sf->highbd_predict[0][0][0] = vpx_highbd_convolve_copy; - sf->highbd_predict[0][0][1] = vpx_highbd_convolve_avg; - sf->highbd_predict[0][1][0] = vpx_highbd_convolve8_vert; - sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg_vert; - sf->highbd_predict[1][0][0] = vpx_highbd_convolve8_horiz; - sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg_horiz; + sf->highbd_predict[0][0][0] = aom_highbd_convolve_copy; + sf->highbd_predict[0][0][1] = aom_highbd_convolve_avg; + sf->highbd_predict[0][1][0] = aom_highbd_convolve8_vert; + sf->highbd_predict[0][1][1] = aom_highbd_convolve8_avg_vert; + sf->highbd_predict[1][0][0] = aom_highbd_convolve8_horiz; + sf->highbd_predict[1][0][1] = aom_highbd_convolve8_avg_horiz; } else { // No scaling in x direction. Must always scale in the y direction. - sf->highbd_predict[0][0][0] = vpx_highbd_convolve8_vert; - sf->highbd_predict[0][0][1] = vpx_highbd_convolve8_avg_vert; - sf->highbd_predict[0][1][0] = vpx_highbd_convolve8_vert; - sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg_vert; - sf->highbd_predict[1][0][0] = vpx_highbd_convolve8; - sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg; + sf->highbd_predict[0][0][0] = aom_highbd_convolve8_vert; + sf->highbd_predict[0][0][1] = aom_highbd_convolve8_avg_vert; + sf->highbd_predict[0][1][0] = aom_highbd_convolve8_vert; + sf->highbd_predict[0][1][1] = aom_highbd_convolve8_avg_vert; + sf->highbd_predict[1][0][0] = aom_highbd_convolve8; + sf->highbd_predict[1][0][1] = aom_highbd_convolve8_avg; } } else { if (sf->y_step_q4 == 16) { // No scaling in the y direction. Must always scale in the x direction. - sf->highbd_predict[0][0][0] = vpx_highbd_convolve8_horiz; - sf->highbd_predict[0][0][1] = vpx_highbd_convolve8_avg_horiz; - sf->highbd_predict[0][1][0] = vpx_highbd_convolve8; - sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg; - sf->highbd_predict[1][0][0] = vpx_highbd_convolve8_horiz; - sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg_horiz; + sf->highbd_predict[0][0][0] = aom_highbd_convolve8_horiz; + sf->highbd_predict[0][0][1] = aom_highbd_convolve8_avg_horiz; + sf->highbd_predict[0][1][0] = aom_highbd_convolve8; + sf->highbd_predict[0][1][1] = aom_highbd_convolve8_avg; + sf->highbd_predict[1][0][0] = aom_highbd_convolve8_horiz; + sf->highbd_predict[1][0][1] = aom_highbd_convolve8_avg_horiz; } else { // Must always scale in both directions. - sf->highbd_predict[0][0][0] = vpx_highbd_convolve8; - sf->highbd_predict[0][0][1] = vpx_highbd_convolve8_avg; - sf->highbd_predict[0][1][0] = vpx_highbd_convolve8; - sf->highbd_predict[0][1][1] = vpx_highbd_convolve8_avg; - sf->highbd_predict[1][0][0] = vpx_highbd_convolve8; - sf->highbd_predict[1][0][1] = vpx_highbd_convolve8_avg; + sf->highbd_predict[0][0][0] = aom_highbd_convolve8; + sf->highbd_predict[0][0][1] = aom_highbd_convolve8_avg; + sf->highbd_predict[0][1][0] = aom_highbd_convolve8; + sf->highbd_predict[0][1][1] = aom_highbd_convolve8_avg; + sf->highbd_predict[1][0][0] = aom_highbd_convolve8; + sf->highbd_predict[1][0][1] = aom_highbd_convolve8_avg; } } // 2D subpel motion always gets filtered in both directions. - sf->highbd_predict[1][1][0] = vpx_highbd_convolve8; - sf->highbd_predict[1][1][1] = vpx_highbd_convolve8_avg; + sf->highbd_predict[1][1][0] = aom_highbd_convolve8; + sf->highbd_predict[1][1][1] = aom_highbd_convolve8_avg; } #endif } diff --git a/av1/common/scale.h b/av1/common/scale.h index 8c8aa12e2ea2678bbdfc2b936a111aa2f3c4f04a..e69d3381d1164bcbdd3ff3a561f3b86d3a9fecc9 100644 --- a/av1/common/scale.h +++ b/av1/common/scale.h @@ -13,7 +13,7 @@ #define VP10_COMMON_SCALE_H_ #include "av1/common/mv.h" -#include "aom_dsp/vpx_convolve.h" +#include "aom_dsp/aom_convolve.h" #ifdef __cplusplus extern "C" { diff --git a/av1/common/scan.h b/av1/common/scan.h index 1ff92530ae706b609b63e4c39f800ba97d3a1524..22d21b192142d5b2379566a158b8e323a9309a63 100644 --- a/av1/common/scan.h +++ b/av1/common/scan.h @@ -12,7 +12,7 @@ #ifndef VP10_COMMON_SCAN_H_ #define VP10_COMMON_SCAN_H_ -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" #include "av1/common/enums.h" diff --git a/av1/common/seg_common.c b/av1/common/seg_common.c index 0cc6044769f6de18ad039ebfb79d738c067b2d57..c7f428b12bada9d9da05b4053b3d17c9832d6353 100644 --- a/av1/common/seg_common.c +++ b/av1/common/seg_common.c @@ -55,7 +55,7 @@ void vp10_set_segdata(struct segmentation *seg, int segment_id, seg->feature_data[segment_id][feature_id] = seg_data; } -const vpx_tree_index vp10_segment_tree[TREE_SIZE(MAX_SEGMENTS)] = { +const aom_tree_index vp10_segment_tree[TREE_SIZE(MAX_SEGMENTS)] = { 2, 4, 6, 8, 10, 12, 0, -1, -2, -3, -4, -5, -6, -7 }; diff --git a/av1/common/seg_common.h b/av1/common/seg_common.h index dc3b56709f913a13528d65e81892586eb2fe1791..9a0f2c2486bc6b6fc53693b0ff19039afb5ad914 100644 --- a/av1/common/seg_common.h +++ b/av1/common/seg_common.h @@ -47,8 +47,8 @@ struct segmentation { }; struct segmentation_probs { - vpx_prob tree_probs[SEG_TREE_PROBS]; - vpx_prob pred_probs[PREDICTION_PROBS]; + aom_prob tree_probs[SEG_TREE_PROBS]; + aom_prob pred_probs[PREDICTION_PROBS]; }; static INLINE int segfeature_active(const struct segmentation *seg, @@ -74,7 +74,7 @@ static INLINE int get_segdata(const struct segmentation *seg, int segment_id, return seg->feature_data[segment_id][feature_id]; } -extern const vpx_tree_index vp10_segment_tree[TREE_SIZE(MAX_SEGMENTS)]; +extern const aom_tree_index vp10_segment_tree[TREE_SIZE(MAX_SEGMENTS)]; #ifdef __cplusplus } // extern "C" diff --git a/av1/common/thread_common.c b/av1/common/thread_common.c index 03ee93f65defa36ca27140c600bd24d38554689a..502ba50a6d6fa508ab4831f5a029b1aa9f05794e 100644 --- a/av1/common/thread_common.c +++ b/av1/common/thread_common.c @@ -9,9 +9,9 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "./aom_config.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "av1/common/entropymode.h" #include "av1/common/thread_common.h" #include "av1/common/reconinter.h" @@ -155,7 +155,7 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame, VP10_COMMON *cm, int start, int stop, int y_only, VPxWorker *workers, int nworkers, VP10LfSync *lf_sync) { - const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); + const VPxWorkerInterface *const winterface = aom_get_worker_interface(); // Number of superblock rows and cols const int sb_rows = mi_cols_aligned_to_sb(cm->mi_rows) >> MI_BLOCK_SIZE_LOG2; // Decoder may allocate more threads than number of tiles based on user's @@ -255,7 +255,7 @@ void vp10_loop_filter_alloc(VP10LfSync *lf_sync, VP10_COMMON *cm, int rows, int i; CHECK_MEM_ERROR(cm, lf_sync->mutex_, - vpx_malloc(sizeof(*lf_sync->mutex_) * rows)); + aom_malloc(sizeof(*lf_sync->mutex_) * rows)); if (lf_sync->mutex_) { for (i = 0; i < rows; ++i) { pthread_mutex_init(&lf_sync->mutex_[i], NULL); @@ -263,7 +263,7 @@ void vp10_loop_filter_alloc(VP10LfSync *lf_sync, VP10_COMMON *cm, int rows, } CHECK_MEM_ERROR(cm, lf_sync->cond_, - vpx_malloc(sizeof(*lf_sync->cond_) * rows)); + aom_malloc(sizeof(*lf_sync->cond_) * rows)); if (lf_sync->cond_) { for (i = 0; i < rows; ++i) { pthread_cond_init(&lf_sync->cond_[i], NULL); @@ -273,11 +273,11 @@ void vp10_loop_filter_alloc(VP10LfSync *lf_sync, VP10_COMMON *cm, int rows, #endif // CONFIG_MULTITHREAD CHECK_MEM_ERROR(cm, lf_sync->lfdata, - vpx_malloc(num_workers * sizeof(*lf_sync->lfdata))); + aom_malloc(num_workers * sizeof(*lf_sync->lfdata))); lf_sync->num_workers = num_workers; CHECK_MEM_ERROR(cm, lf_sync->cur_sb_col, - vpx_malloc(sizeof(*lf_sync->cur_sb_col) * rows)); + aom_malloc(sizeof(*lf_sync->cur_sb_col) * rows)); // Set up nsync. lf_sync->sync_range = get_sync_range(width); @@ -293,17 +293,17 @@ void vp10_loop_filter_dealloc(VP10LfSync *lf_sync) { for (i = 0; i < lf_sync->rows; ++i) { pthread_mutex_destroy(&lf_sync->mutex_[i]); } - vpx_free(lf_sync->mutex_); + aom_free(lf_sync->mutex_); } if (lf_sync->cond_ != NULL) { for (i = 0; i < lf_sync->rows; ++i) { pthread_cond_destroy(&lf_sync->cond_[i]); } - vpx_free(lf_sync->cond_); + aom_free(lf_sync->cond_); } #endif // CONFIG_MULTITHREAD - vpx_free(lf_sync->lfdata); - vpx_free(lf_sync->cur_sb_col); + aom_free(lf_sync->lfdata); + aom_free(lf_sync->cur_sb_col); // clear the structure as the source of this call may be a resize in which // case this call will be followed by an _alloc() which may fail. vp10_zero(*lf_sync); diff --git a/av1/common/thread_common.h b/av1/common/thread_common.h index fbbf5ab7077112e670a5de08b4dca7482d6e1d7f..c514865c46169db7e61359eaa68b288c0c525143 100644 --- a/av1/common/thread_common.h +++ b/av1/common/thread_common.h @@ -11,9 +11,9 @@ #ifndef VP10_COMMON_LOOPFILTER_THREAD_H_ #define VP10_COMMON_LOOPFILTER_THREAD_H_ -#include "./vpx_config.h" +#include "./aom_config.h" #include "av1/common/loopfilter.h" -#include "aom_util/vpx_thread.h" +#include "aom_util/aom_thread.h" #ifdef __cplusplus extern "C" { diff --git a/av1/common/tile_common.c b/av1/common/tile_common.c index 4e3722936ee2f152cb95e4ef8839517abee6633e..e0a0572825b906ff6e34f8d67d57cbdcf12a2f0f 100644 --- a/av1/common/tile_common.c +++ b/av1/common/tile_common.c @@ -11,7 +11,7 @@ #include "av1/common/tile_common.h" #include "av1/common/onyxc_int.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" #define MIN_TILE_WIDTH_B64 4 #define MAX_TILE_WIDTH_B64 64 diff --git a/av1/common/x86/av1_fwd_txfm_impl_sse2.h b/av1/common/x86/av1_fwd_txfm_impl_sse2.h index 227228f694c29dcc8ae819de4d7a6b1593e7cf5f..0e341ac87bb52106c0affcd1cf4927511731e734 100644 --- a/av1/common/x86/av1_fwd_txfm_impl_sse2.h +++ b/av1/common/x86/av1_fwd_txfm_impl_sse2.h @@ -11,7 +11,7 @@ #include <emmintrin.h> // SSE2 -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/txfm_common.h" #include "aom_dsp/x86/fwd_txfm_sse2.h" #include "aom_dsp/x86/txfm_common_sse2.h" @@ -99,7 +99,7 @@ void FDCT4x4_2D(const int16_t *input, tran_low_t *output, int stride) { _mm_cmplt_epi16(in1, _mm_set1_epi16(0xfc00))); test = _mm_movemask_epi8(_mm_or_si128(cmp0, cmp1)); if (test) { - vpx_highbd_fdct4x4_c(input, output, stride); + aom_highbd_fdct4x4_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -170,7 +170,7 @@ void FDCT4x4_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x2(&x0, &x1); if (overflow) { - vpx_highbd_fdct4x4_c(input, output, stride); + aom_highbd_fdct4x4_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -192,7 +192,7 @@ void FDCT4x4_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x2(&t0, &t1); if (overflow) { - vpx_highbd_fdct4x4_c(input, output, stride); + aom_highbd_fdct4x4_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -231,7 +231,7 @@ void FDCT4x4_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x2(&x0, &x1); if (overflow) { - vpx_highbd_fdct4x4_c(input, output, stride); + aom_highbd_fdct4x4_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -314,7 +314,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x8(&q0, &q1, &q2, &q3, &q4, &q5, &q6, &q7); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } } @@ -329,7 +329,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&r0, &r1, &r2, &r3); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -372,7 +372,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&res0, &res4, &res2, &res6); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -402,7 +402,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x2(&r0, &r1); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -415,7 +415,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&x0, &x1, &x2, &x3); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -458,7 +458,7 @@ void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&res1, &res7, &res5, &res3); if (overflow) { - vpx_highbd_fdct8x8_c(input, output, stride); + aom_highbd_fdct8x8_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -721,7 +721,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x8(&input0, &input1, &input2, &input3, &input4, &input5, &input6, &input7); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -741,7 +741,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { check_epi16_overflow_x8(&step1_0, &step1_1, &step1_2, &step1_3, &step1_4, &step1_5, &step1_6, &step1_7); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -761,7 +761,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x8(&q0, &q1, &q2, &q3, &q4, &q5, &q6, &q7); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -775,7 +775,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&r0, &r1, &r2, &r3); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -797,7 +797,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&res00, &res08, &res04, &res12); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -818,7 +818,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x2(&r0, &r1); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -831,7 +831,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&x0, &x1, &x2, &x3); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -854,7 +854,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x4(&res02, &res14, &res10, &res06); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -882,7 +882,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x4(&step2_2, &step2_3, &step2_5, &step2_4); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -902,7 +902,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { check_epi16_overflow_x8(&step3_0, &step3_1, &step3_2, &step3_3, &step3_4, &step3_5, &step3_6, &step3_7); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -925,7 +925,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { overflow = check_epi16_overflow_x4(&step2_1, &step2_2, &step2_6, &step2_5); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -945,7 +945,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { check_epi16_overflow_x8(&step1_0, &step1_1, &step1_2, &step1_3, &step1_4, &step1_5, &step1_6, &step1_7); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -967,7 +967,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&res01, &res09, &res15, &res07); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH @@ -988,7 +988,7 @@ void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) { #if DCT_HIGH_BIT_DEPTH overflow = check_epi16_overflow_x4(&res05, &res13, &res11, &res03); if (overflow) { - vpx_highbd_fdct16x16_c(input, output, stride); + aom_highbd_fdct16x16_c(input, output, stride); return; } #endif // DCT_HIGH_BIT_DEPTH diff --git a/av1/common/x86/av1_fwd_txfm_sse2.c b/av1/common/x86/av1_fwd_txfm_sse2.c index 30fd72024f892f01f609f5727b8c48cc6a40e18f..ee78f898a08d8212db7e30d79ac263a3f79787a0 100644 --- a/av1/common/x86/av1_fwd_txfm_sse2.c +++ b/av1/common/x86/av1_fwd_txfm_sse2.c @@ -11,8 +11,8 @@ #include <emmintrin.h> // SSE2 -#include "./vpx_config.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "./aom_config.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_dsp/x86/fwd_txfm_sse2.h" void vp10_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride) { diff --git a/av1/common/x86/av1_inv_txfm_sse2.h b/av1/common/x86/av1_inv_txfm_sse2.h index f24fc6883684b2575c849f4d24829861829ac06f..31f5f2a2d802b241ca98824a337c8e62aa0a2659 100644 --- a/av1/common/x86/av1_inv_txfm_sse2.h +++ b/av1/common/x86/av1_inv_txfm_sse2.h @@ -13,8 +13,8 @@ #define VPX_DSP_X86_INV_TXFM_SSE2_H_ #include <emmintrin.h> // SSE2 -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" #include "av1/common/av1_inv_txfm.h" // perform 8x8 transpose diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index 063242eabcb23395b79dd92cc58fe877b915b121..555032a6e29a156294d3400d44892d99a3bc809e 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c @@ -13,18 +13,18 @@ #include <stdlib.h> // qsort() #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" -#include "./vpx_scale_rtcd.h" -#include "./vpx_config.h" +#include "./aom_dsp_rtcd.h" +#include "./aom_scale_rtcd.h" +#include "./aom_config.h" #include "aom_dsp/bitreader_buffer.h" #include "aom_dsp/bitreader.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "aom_ports/mem_ops.h" -#include "aom_scale/vpx_scale.h" -#include "aom_util/vpx_thread.h" +#include "aom_scale/aom_scale.h" +#include "aom_util/aom_thread.h" #include "av1/common/alloccommon.h" #if CONFIG_CLPF @@ -84,24 +84,24 @@ static int read_is_valid(const uint8_t *start, size_t len, const uint8_t *end) { return len != 0 && len <= (size_t)(end - start); } -static int decode_unsigned_max(struct vpx_read_bit_buffer *rb, int max) { - const int data = vpx_rb_read_literal(rb, get_unsigned_bits(max)); +static int decode_unsigned_max(struct aom_read_bit_buffer *rb, int max) { + const int data = aom_rb_read_literal(rb, get_unsigned_bits(max)); return data > max ? max : data; } #if CONFIG_MISC_FIXES -static TX_MODE read_tx_mode(struct vpx_read_bit_buffer *rb) { - return vpx_rb_read_bit(rb) ? TX_MODE_SELECT : vpx_rb_read_literal(rb, 2); +static TX_MODE read_tx_mode(struct aom_read_bit_buffer *rb) { + return aom_rb_read_bit(rb) ? TX_MODE_SELECT : aom_rb_read_literal(rb, 2); } #else -static TX_MODE read_tx_mode(vpx_reader *r) { - TX_MODE tx_mode = vpx_read_literal(r, 2); - if (tx_mode == ALLOW_32X32) tx_mode += vpx_read_bit(r); +static TX_MODE read_tx_mode(aom_reader *r) { + TX_MODE tx_mode = aom_read_literal(r, 2); + if (tx_mode == ALLOW_32X32) tx_mode += aom_read_bit(r); return tx_mode; } #endif -static void read_tx_mode_probs(struct tx_probs *tx_probs, vpx_reader *r) { +static void read_tx_mode_probs(struct tx_probs *tx_probs, aom_reader *r) { int i, j; for (i = 0; i < TX_SIZE_CONTEXTS; ++i) @@ -117,14 +117,14 @@ static void read_tx_mode_probs(struct tx_probs *tx_probs, vpx_reader *r) { vp10_diff_update_prob(r, &tx_probs->p32x32[i][j]); } -static void read_switchable_interp_probs(FRAME_CONTEXT *fc, vpx_reader *r) { +static void read_switchable_interp_probs(FRAME_CONTEXT *fc, aom_reader *r) { int i, j; for (j = 0; j < SWITCHABLE_FILTER_CONTEXTS; ++j) for (i = 0; i < SWITCHABLE_FILTERS - 1; ++i) vp10_diff_update_prob(r, &fc->switchable_interp_prob[j][i]); } -static void read_inter_mode_probs(FRAME_CONTEXT *fc, vpx_reader *r) { +static void read_inter_mode_probs(FRAME_CONTEXT *fc, aom_reader *r) { int i, j; for (i = 0; i < INTER_MODE_CONTEXTS; ++i) for (j = 0; j < INTER_MODES - 1; ++j) @@ -133,21 +133,21 @@ static void read_inter_mode_probs(FRAME_CONTEXT *fc, vpx_reader *r) { #if CONFIG_MISC_FIXES static REFERENCE_MODE read_frame_reference_mode( - const VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) { + const VP10_COMMON *cm, struct aom_read_bit_buffer *rb) { if (is_compound_reference_allowed(cm)) { - return vpx_rb_read_bit(rb) + return aom_rb_read_bit(rb) ? REFERENCE_MODE_SELECT - : (vpx_rb_read_bit(rb) ? COMPOUND_REFERENCE : SINGLE_REFERENCE); + : (aom_rb_read_bit(rb) ? COMPOUND_REFERENCE : SINGLE_REFERENCE); } else { return SINGLE_REFERENCE; } } #else static REFERENCE_MODE read_frame_reference_mode(const VP10_COMMON *cm, - vpx_reader *r) { + aom_reader *r) { if (is_compound_reference_allowed(cm)) { - return vpx_read_bit(r) - ? (vpx_read_bit(r) ? REFERENCE_MODE_SELECT : COMPOUND_REFERENCE) + return aom_read_bit(r) + ? (aom_read_bit(r) ? REFERENCE_MODE_SELECT : COMPOUND_REFERENCE) : SINGLE_REFERENCE; } else { return SINGLE_REFERENCE; @@ -155,7 +155,7 @@ static REFERENCE_MODE read_frame_reference_mode(const VP10_COMMON *cm, } #endif -static void read_frame_reference_mode_probs(VP10_COMMON *cm, vpx_reader *r) { +static void read_frame_reference_mode_probs(VP10_COMMON *cm, aom_reader *r) { FRAME_CONTEXT *const fc = cm->fc; int i; @@ -174,17 +174,17 @@ static void read_frame_reference_mode_probs(VP10_COMMON *cm, vpx_reader *r) { vp10_diff_update_prob(r, &fc->comp_ref_prob[i]); } -static void update_mv_probs(vpx_prob *p, int n, vpx_reader *r) { +static void update_mv_probs(aom_prob *p, int n, aom_reader *r) { int i; for (i = 0; i < n; ++i) #if CONFIG_MISC_FIXES vp10_diff_update_prob(r, &p[i]); #else - if (vpx_read(r, MV_UPDATE_PROB)) p[i] = (vpx_read_literal(r, 7) << 1) | 1; + if (aom_read(r, MV_UPDATE_PROB)) p[i] = (aom_read_literal(r, 7) << 1) | 1; #endif } -static void read_mv_probs(nmv_context *ctx, int allow_hp, vpx_reader *r) { +static void read_mv_probs(nmv_context *ctx, int allow_hp, aom_reader *r) { int i, j; update_mv_probs(ctx->joints, MV_JOINTS - 1, r); @@ -342,7 +342,7 @@ static void inverse_transform_block_intra(MACROBLOCKD *xd, int plane, } static void predict_and_reconstruct_intra_block(MACROBLOCKD *const xd, - vpx_reader *r, + aom_reader *r, MB_MODE_INFO *const mbmi, int plane, int row, int col, TX_SIZE tx_size) { @@ -370,7 +370,7 @@ static void predict_and_reconstruct_intra_block(MACROBLOCKD *const xd, } } -static int reconstruct_inter_block(MACROBLOCKD *const xd, vpx_reader *r, +static int reconstruct_inter_block(MACROBLOCKD *const xd, aom_reader *r, MB_MODE_INFO *const mbmi, int plane, int row, int col, TX_SIZE tx_size) { struct macroblockd_plane *const pd = &xd->plane[plane]; @@ -448,11 +448,11 @@ static void high_build_mc_border(const uint8_t *src8, int src_stride, copy = b_w - left - right; - if (left) vpx_memset16(dst, ref_row[0], left); + if (left) aom_memset16(dst, ref_row[0], left); if (copy) memcpy(dst + left, ref_row + x + left, copy * sizeof(uint16_t)); - if (right) vpx_memset16(dst + left + copy, ref_row[w - 1], right); + if (right) aom_memset16(dst + left + copy, ref_row[w - 1], right); dst += dst_stride; ++y; @@ -775,7 +775,7 @@ static MB_MODE_INFO *set_offsets(VP10_COMMON *const cm, MACROBLOCKD *const xd, } static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd, - int mi_row, int mi_col, vpx_reader *r, + int mi_row, int mi_col, aom_reader *r, BLOCK_SIZE bsize, int bwl, int bhl) { VP10_COMMON *const cm = &pbi->common; const int less8x8 = bsize < BLOCK_8X8; @@ -791,7 +791,7 @@ static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd, const BLOCK_SIZE uv_subsize = ss_size_lookup[bsize][cm->subsampling_x][cm->subsampling_y]; if (uv_subsize == BLOCK_INVALID) - vpx_internal_error(xd->error_info, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(xd->error_info, VPX_CODEC_CORRUPT_FRAME, "Invalid block size."); } @@ -868,7 +868,7 @@ static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd, } } - xd->corrupted |= vpx_reader_has_error(r); + xd->corrupted |= aom_reader_has_error(r); } static INLINE int dec_partition_plane_context(const MACROBLOCKD *xd, int mi_row, @@ -896,19 +896,19 @@ static INLINE void dec_update_partition_context(MACROBLOCKD *xd, int mi_row, } static PARTITION_TYPE read_partition(VP10_COMMON *cm, MACROBLOCKD *xd, - int mi_row, int mi_col, vpx_reader *r, + int mi_row, int mi_col, aom_reader *r, int has_rows, int has_cols, int bsl) { const int ctx = dec_partition_plane_context(xd, mi_row, mi_col, bsl); - const vpx_prob *const probs = cm->fc->partition_prob[ctx]; + const aom_prob *const probs = cm->fc->partition_prob[ctx]; FRAME_COUNTS *counts = xd->counts; PARTITION_TYPE p; if (has_rows && has_cols) - p = (PARTITION_TYPE)vpx_read_tree(r, vp10_partition_tree, probs); + p = (PARTITION_TYPE)aom_read_tree(r, vp10_partition_tree, probs); else if (!has_rows && has_cols) - p = vpx_read(r, probs[1]) ? PARTITION_SPLIT : PARTITION_HORZ; + p = aom_read(r, probs[1]) ? PARTITION_SPLIT : PARTITION_HORZ; else if (has_rows && !has_cols) - p = vpx_read(r, probs[2]) ? PARTITION_SPLIT : PARTITION_VERT; + p = aom_read(r, probs[2]) ? PARTITION_SPLIT : PARTITION_VERT; else p = PARTITION_SPLIT; @@ -919,7 +919,7 @@ static PARTITION_TYPE read_partition(VP10_COMMON *cm, MACROBLOCKD *xd, // TODO(slavarnway): eliminate bsize and subsize in future commits static void decode_partition(VP10Decoder *const pbi, MACROBLOCKD *const xd, - int mi_row, int mi_col, vpx_reader *r, + int mi_row, int mi_col, aom_reader *r, BLOCK_SIZE bsize, int n4x4_l2) { VP10_COMMON *const cm = &pbi->common; const int n8x8_l2 = n4x4_l2 - 1; @@ -977,7 +977,7 @@ static void decode_partition(VP10Decoder *const pbi, MACROBLOCKD *const xd, if (bsize == BLOCK_64X64) { if (cm->dering_level != 0 && !sb_all_skip(cm, mi_row, mi_col)) { cm->mi_grid_visible[mi_row*cm->mi_stride + mi_col]->mbmi.dering_gain = - vpx_read_literal(r, DERING_REFINEMENT_BITS); + aom_read_literal(r, DERING_REFINEMENT_BITS); } else { cm->mi_grid_visible[mi_row*cm->mi_stride + mi_col]->mbmi.dering_gain = 0; } @@ -987,26 +987,26 @@ static void decode_partition(VP10Decoder *const pbi, MACROBLOCKD *const xd, static void setup_token_decoder(const uint8_t *data, const uint8_t *data_end, size_t read_size, - struct vpx_internal_error_info *error_info, - vpx_reader *r, vpx_decrypt_cb decrypt_cb, + struct aom_internal_error_info *error_info, + aom_reader *r, aom_decrypt_cb decrypt_cb, void *decrypt_state) { // Validate the calculated partition length. If the buffer // described by the partition can't be fully read, then restrict // it to the portion that can be (for EC mode) or throw an error. if (!read_is_valid(data, read_size, data_end)) - vpx_internal_error(error_info, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(error_info, VPX_CODEC_CORRUPT_FRAME, "Truncated packet or corrupt tile length"); - if (vpx_reader_init(r, data, read_size, decrypt_cb, decrypt_state)) - vpx_internal_error(error_info, VPX_CODEC_MEM_ERROR, + if (aom_reader_init(r, data, read_size, decrypt_cb, decrypt_state)) + aom_internal_error(error_info, VPX_CODEC_MEM_ERROR, "Failed to allocate bool decoder %d", 1); } static void read_coef_probs_common(vp10_coeff_probs_model *coef_probs, - vpx_reader *r) { + aom_reader *r) { int i, j, k, l, m; - if (vpx_read_bit(r)) + if (aom_read_bit(r)) for (i = 0; i < PLANE_TYPES; ++i) for (j = 0; j < REF_TYPES; ++j) for (k = 0; k < COEF_BANDS; ++k) @@ -1015,7 +1015,7 @@ static void read_coef_probs_common(vp10_coeff_probs_model *coef_probs, vp10_diff_update_prob(r, &coef_probs[i][j][k][l][m]); } -static void read_coef_probs(FRAME_CONTEXT *fc, TX_MODE tx_mode, vpx_reader *r) { +static void read_coef_probs(FRAME_CONTEXT *fc, TX_MODE tx_mode, aom_reader *r) { const TX_SIZE max_tx_size = tx_mode_to_biggest_tx_size[tx_mode]; TX_SIZE tx_size; for (tx_size = TX_4X4; tx_size <= max_tx_size; ++tx_size) @@ -1023,7 +1023,7 @@ static void read_coef_probs(FRAME_CONTEXT *fc, TX_MODE tx_mode, vpx_reader *r) { } static void setup_segmentation(VP10_COMMON *const cm, - struct vpx_read_bit_buffer *rb) { + struct aom_read_bit_buffer *rb) { struct segmentation *const seg = &cm->seg; #if !CONFIG_MISC_FIXES struct segmentation_probs *const segp = &cm->segp; @@ -1033,31 +1033,31 @@ static void setup_segmentation(VP10_COMMON *const cm, seg->update_map = 0; seg->update_data = 0; - seg->enabled = vpx_rb_read_bit(rb); + seg->enabled = aom_rb_read_bit(rb); if (!seg->enabled) return; // Segmentation map update if (frame_is_intra_only(cm) || cm->error_resilient_mode) { seg->update_map = 1; } else { - seg->update_map = vpx_rb_read_bit(rb); + seg->update_map = aom_rb_read_bit(rb); } if (seg->update_map) { #if !CONFIG_MISC_FIXES for (i = 0; i < SEG_TREE_PROBS; i++) segp->tree_probs[i] = - vpx_rb_read_bit(rb) ? vpx_rb_read_literal(rb, 8) : MAX_PROB; + aom_rb_read_bit(rb) ? aom_rb_read_literal(rb, 8) : MAX_PROB; #endif if (frame_is_intra_only(cm) || cm->error_resilient_mode) { seg->temporal_update = 0; } else { - seg->temporal_update = vpx_rb_read_bit(rb); + seg->temporal_update = aom_rb_read_bit(rb); } #if !CONFIG_MISC_FIXES if (seg->temporal_update) { for (i = 0; i < PREDICTION_PROBS; i++) segp->pred_probs[i] = - vpx_rb_read_bit(rb) ? vpx_rb_read_literal(rb, 8) : MAX_PROB; + aom_rb_read_bit(rb) ? aom_rb_read_literal(rb, 8) : MAX_PROB; } else { for (i = 0; i < PREDICTION_PROBS; i++) segp->pred_probs[i] = MAX_PROB; } @@ -1065,21 +1065,21 @@ static void setup_segmentation(VP10_COMMON *const cm, } // Segmentation data update - seg->update_data = vpx_rb_read_bit(rb); + seg->update_data = aom_rb_read_bit(rb); if (seg->update_data) { - seg->abs_delta = vpx_rb_read_bit(rb); + seg->abs_delta = aom_rb_read_bit(rb); vp10_clearall_segfeatures(seg); for (i = 0; i < MAX_SEGMENTS; i++) { for (j = 0; j < SEG_LVL_MAX; j++) { int data = 0; - const int feature_enabled = vpx_rb_read_bit(rb); + const int feature_enabled = aom_rb_read_bit(rb); if (feature_enabled) { vp10_enable_segfeature(seg, i, j); data = decode_unsigned_max(rb, vp10_seg_feature_data_max(j)); if (vp10_is_segfeature_signed(j)) - data = vpx_rb_read_bit(rb) ? -data : data; + data = aom_rb_read_bit(rb) ? -data : data; } vp10_set_segdata(seg, i, j, data); } @@ -1088,61 +1088,61 @@ static void setup_segmentation(VP10_COMMON *const cm, } static void setup_loopfilter(struct loopfilter *lf, - struct vpx_read_bit_buffer *rb) { - lf->filter_level = vpx_rb_read_literal(rb, 6); - lf->sharpness_level = vpx_rb_read_literal(rb, 3); + struct aom_read_bit_buffer *rb) { + lf->filter_level = aom_rb_read_literal(rb, 6); + lf->sharpness_level = aom_rb_read_literal(rb, 3); // Read in loop filter deltas applied at the MB level based on mode or ref // frame. lf->mode_ref_delta_update = 0; - lf->mode_ref_delta_enabled = vpx_rb_read_bit(rb); + lf->mode_ref_delta_enabled = aom_rb_read_bit(rb); if (lf->mode_ref_delta_enabled) { - lf->mode_ref_delta_update = vpx_rb_read_bit(rb); + lf->mode_ref_delta_update = aom_rb_read_bit(rb); if (lf->mode_ref_delta_update) { int i; for (i = 0; i < MAX_REF_FRAMES; i++) - if (vpx_rb_read_bit(rb)) - lf->ref_deltas[i] = vpx_rb_read_inv_signed_literal(rb, 6); + if (aom_rb_read_bit(rb)) + lf->ref_deltas[i] = aom_rb_read_inv_signed_literal(rb, 6); for (i = 0; i < MAX_MODE_LF_DELTAS; i++) - if (vpx_rb_read_bit(rb)) - lf->mode_deltas[i] = vpx_rb_read_inv_signed_literal(rb, 6); + if (aom_rb_read_bit(rb)) + lf->mode_deltas[i] = aom_rb_read_inv_signed_literal(rb, 6); } } } #if CONFIG_CLPF -static void setup_clpf(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) { - cm->clpf = vpx_rb_read_literal(rb, 1); +static void setup_clpf(VP10_COMMON *cm, struct aom_read_bit_buffer *rb) { + cm->clpf = aom_rb_read_literal(rb, 1); } #endif #if CONFIG_DERING -static void setup_dering(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) { - cm->dering_level = vpx_rb_read_literal(rb, DERING_LEVEL_BITS); +static void setup_dering(VP10_COMMON *cm, struct aom_read_bit_buffer *rb) { + cm->dering_level = aom_rb_read_literal(rb, DERING_LEVEL_BITS); } #endif // CONFIG_DERING -static INLINE int read_delta_q(struct vpx_read_bit_buffer *rb) { - return vpx_rb_read_bit(rb) - ? vpx_rb_read_inv_signed_literal(rb, CONFIG_MISC_FIXES ? 6 : 4) +static INLINE int read_delta_q(struct aom_read_bit_buffer *rb) { + return aom_rb_read_bit(rb) + ? aom_rb_read_inv_signed_literal(rb, CONFIG_MISC_FIXES ? 6 : 4) : 0; } static void setup_quantization(VP10_COMMON *const cm, - struct vpx_read_bit_buffer *rb) { - cm->base_qindex = vpx_rb_read_literal(rb, QINDEX_BITS); + struct aom_read_bit_buffer *rb) { + cm->base_qindex = aom_rb_read_literal(rb, QINDEX_BITS); cm->y_dc_delta_q = read_delta_q(rb); cm->uv_dc_delta_q = read_delta_q(rb); cm->uv_ac_delta_q = read_delta_q(rb); cm->dequant_bit_depth = cm->bit_depth; #if CONFIG_AOM_QM - cm->using_qmatrix = vpx_rb_read_bit(rb); + cm->using_qmatrix = aom_rb_read_bit(rb); if (cm->using_qmatrix) { - cm->min_qmlevel = vpx_rb_read_literal(rb, QM_LEVEL_BITS); - cm->max_qmlevel = vpx_rb_read_literal(rb, QM_LEVEL_BITS); + cm->min_qmlevel = aom_rb_read_literal(rb, QM_LEVEL_BITS); + cm->max_qmlevel = aom_rb_read_literal(rb, QM_LEVEL_BITS); } else { cm->min_qmlevel = 0; cm->max_qmlevel = 0; @@ -1215,29 +1215,29 @@ static void setup_segmentation_dequant(VP10_COMMON *const cm) { } } -static INTERP_FILTER read_interp_filter(struct vpx_read_bit_buffer *rb) { - return vpx_rb_read_bit(rb) ? SWITCHABLE : vpx_rb_read_literal(rb, 2); +static INTERP_FILTER read_interp_filter(struct aom_read_bit_buffer *rb) { + return aom_rb_read_bit(rb) ? SWITCHABLE : aom_rb_read_literal(rb, 2); } -static void setup_render_size(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) { +static void setup_render_size(VP10_COMMON *cm, struct aom_read_bit_buffer *rb) { cm->render_width = cm->width; cm->render_height = cm->height; - if (vpx_rb_read_bit(rb)) + if (aom_rb_read_bit(rb)) vp10_read_frame_size(rb, &cm->render_width, &cm->render_height); } static void resize_mv_buffer(VP10_COMMON *cm) { - vpx_free(cm->cur_frame->mvs); + aom_free(cm->cur_frame->mvs); cm->cur_frame->mi_rows = cm->mi_rows; cm->cur_frame->mi_cols = cm->mi_cols; - cm->cur_frame->mvs = (MV_REF *)vpx_calloc(cm->mi_rows * cm->mi_cols, + cm->cur_frame->mvs = (MV_REF *)aom_calloc(cm->mi_rows * cm->mi_cols, sizeof(*cm->cur_frame->mvs)); } static void resize_context_buffers(VP10_COMMON *cm, int width, int height) { #if CONFIG_SIZE_LIMIT if (width > DECODE_WIDTH_LIMIT || height > DECODE_HEIGHT_LIMIT) - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Dimensions of %dx%d beyond allowed size of %dx%d.", width, height, DECODE_WIDTH_LIMIT, DECODE_HEIGHT_LIMIT); #endif @@ -1251,7 +1251,7 @@ static void resize_context_buffers(VP10_COMMON *cm, int width, int height) { // dimensions as well as the overall size. if (new_mi_cols > cm->mi_cols || new_mi_rows > cm->mi_rows) { if (vp10_alloc_context_buffers(cm, width, height)) - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate context buffers"); } else { vp10_set_mb_mi(cm, width, height); @@ -1266,7 +1266,7 @@ static void resize_context_buffers(VP10_COMMON *cm, int width, int height) { } } -static void setup_frame_size(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) { +static void setup_frame_size(VP10_COMMON *cm, struct aom_read_bit_buffer *rb) { int width, height; BufferPool *const pool = cm->buffer_pool; vp10_read_frame_size(rb, &width, &height); @@ -1274,7 +1274,7 @@ static void setup_frame_size(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) { setup_render_size(cm, rb); lock_buffer_pool(pool); - if (vpx_realloc_frame_buffer( + if (aom_realloc_frame_buffer( get_frame_new_buffer(cm), cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, #if CONFIG_VPX_HIGHBITDEPTH @@ -1284,7 +1284,7 @@ static void setup_frame_size(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) { &pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb, pool->cb_priv)) { unlock_buffer_pool(pool); - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate frame buffer"); } unlock_buffer_pool(pool); @@ -1298,22 +1298,22 @@ static void setup_frame_size(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) { pool->frame_bufs[cm->new_fb_idx].buf.render_height = cm->render_height; } -static INLINE int valid_ref_frame_img_fmt(vpx_bit_depth_t ref_bit_depth, +static INLINE int valid_ref_frame_img_fmt(aom_bit_depth_t ref_bit_depth, int ref_xss, int ref_yss, - vpx_bit_depth_t this_bit_depth, + aom_bit_depth_t this_bit_depth, int this_xss, int this_yss) { return ref_bit_depth == this_bit_depth && ref_xss == this_xss && ref_yss == this_yss; } static void setup_frame_size_with_refs(VP10_COMMON *cm, - struct vpx_read_bit_buffer *rb) { + struct aom_read_bit_buffer *rb) { int width, height; int found = 0, i; int has_valid_ref_frame = 0; BufferPool *const pool = cm->buffer_pool; for (i = 0; i < REFS_PER_FRAME; ++i) { - if (vpx_rb_read_bit(rb)) { + if (aom_rb_read_bit(rb)) { YV12_BUFFER_CONFIG *const buf = cm->frame_refs[i].buf; width = buf->y_crop_width; height = buf->y_crop_height; @@ -1334,7 +1334,7 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm, } if (width <= 0 || height <= 0) - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Invalid frame size"); // Check to make sure at least one of frames that this frame references @@ -1346,7 +1346,7 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm, ref_frame->buf->y_crop_height, width, height); } if (!has_valid_ref_frame) - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Referenced frame has invalid size"); for (i = 0; i < REFS_PER_FRAME; ++i) { RefBuffer *const ref_frame = &cm->frame_refs[i]; @@ -1354,7 +1354,7 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm, ref_frame->buf->subsampling_x, ref_frame->buf->subsampling_y, cm->bit_depth, cm->subsampling_x, cm->subsampling_y)) - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Referenced frame has incompatible color format"); } @@ -1364,7 +1364,7 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm, #endif lock_buffer_pool(pool); - if (vpx_realloc_frame_buffer( + if (aom_realloc_frame_buffer( get_frame_new_buffer(cm), cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, #if CONFIG_VPX_HIGHBITDEPTH @@ -1374,7 +1374,7 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm, &pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb, pool->cb_priv)) { unlock_buffer_pool(pool); - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate frame buffer"); } unlock_buffer_pool(pool); @@ -1388,27 +1388,27 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm, pool->frame_bufs[cm->new_fb_idx].buf.render_height = cm->render_height; } -static void setup_tile_info(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) { +static void setup_tile_info(VP10_COMMON *cm, struct aom_read_bit_buffer *rb) { int min_log2_tile_cols, max_log2_tile_cols, max_ones; vp10_get_tile_n_bits(cm->mi_cols, &min_log2_tile_cols, &max_log2_tile_cols); // columns max_ones = max_log2_tile_cols - min_log2_tile_cols; cm->log2_tile_cols = min_log2_tile_cols; - while (max_ones-- && vpx_rb_read_bit(rb)) cm->log2_tile_cols++; + while (max_ones-- && aom_rb_read_bit(rb)) cm->log2_tile_cols++; if (cm->log2_tile_cols > 6) - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Invalid number of tile columns"); // rows - cm->log2_tile_rows = vpx_rb_read_bit(rb); - if (cm->log2_tile_rows) cm->log2_tile_rows += vpx_rb_read_bit(rb); + cm->log2_tile_rows = aom_rb_read_bit(rb); + if (cm->log2_tile_rows) cm->log2_tile_rows += aom_rb_read_bit(rb); #if CONFIG_MISC_FIXES // tile size magnitude if (cm->log2_tile_rows > 0 || cm->log2_tile_cols > 0) { - cm->tile_sz_mag = vpx_rb_read_literal(rb, 2); + cm->tile_sz_mag = aom_rb_read_literal(rb, 2); } #else cm->tile_sz_mag = 3; @@ -1438,14 +1438,14 @@ static int mem_get_varsize(const uint8_t *data, const int mag) { // based on 'is_last'. static void get_tile_buffer(const uint8_t *const data_end, const int tile_sz_mag, int is_last, - struct vpx_internal_error_info *error_info, - const uint8_t **data, vpx_decrypt_cb decrypt_cb, + struct aom_internal_error_info *error_info, + const uint8_t **data, aom_decrypt_cb decrypt_cb, void *decrypt_state, TileBuffer *buf) { size_t size; if (!is_last) { if (!read_is_valid(*data, 4, data_end)) - vpx_internal_error(error_info, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(error_info, VPX_CODEC_CORRUPT_FRAME, "Truncated packet or corrupt tile length"); if (decrypt_cb) { @@ -1458,7 +1458,7 @@ static void get_tile_buffer(const uint8_t *const data_end, *data += tile_sz_mag + 1; if (size > (size_t)(data_end - *data)) - vpx_internal_error(error_info, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(error_info, VPX_CODEC_CORRUPT_FRAME, "Truncated packet or corrupt tile size"); } else { size = data_end - *data; @@ -1491,7 +1491,7 @@ static void get_tile_buffers(VP10Decoder *pbi, const uint8_t *data, static const uint8_t *decode_tiles(VP10Decoder *pbi, const uint8_t *data, const uint8_t *data_end) { VP10_COMMON *const cm = &pbi->common; - const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); + const VPxWorkerInterface *const winterface = aom_get_worker_interface(); const int aligned_cols = mi_cols_aligned_to_sb(cm->mi_cols); const int tile_cols = 1 << cm->log2_tile_cols; const int tile_rows = 1 << cm->log2_tile_rows; @@ -1503,10 +1503,10 @@ static const uint8_t *decode_tiles(VP10Decoder *pbi, const uint8_t *data, if (cm->lf.filter_level && !cm->skip_loop_filter && pbi->lf_worker.data1 == NULL) { CHECK_MEM_ERROR(cm, pbi->lf_worker.data1, - vpx_memalign(32, sizeof(LFWorkerData))); + aom_memalign(32, sizeof(LFWorkerData))); pbi->lf_worker.hook = (VPxWorkerHook)vp10_loop_filter_worker; if (pbi->max_threads > 1 && !winterface->reset(&pbi->lf_worker)) { - vpx_internal_error(&cm->error, VPX_CODEC_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_ERROR, "Loop filter thread creation failed"); } } @@ -1533,10 +1533,10 @@ static const uint8_t *decode_tiles(VP10Decoder *pbi, const uint8_t *data, get_tile_buffers(pbi, data, data_end, tile_cols, tile_rows, tile_buffers); if (pbi->tile_data == NULL || (tile_cols * tile_rows) != pbi->total_tiles) { - vpx_free(pbi->tile_data); + aom_free(pbi->tile_data); CHECK_MEM_ERROR( cm, pbi->tile_data, - vpx_memalign(32, tile_cols * tile_rows * (sizeof(*pbi->tile_data)))); + aom_memalign(32, tile_cols * tile_rows * (sizeof(*pbi->tile_data)))); pbi->total_tiles = tile_rows * tile_cols; } @@ -1582,7 +1582,7 @@ static const uint8_t *decode_tiles(VP10Decoder *pbi, const uint8_t *data, } pbi->mb.corrupted |= tile_data->xd.corrupted; if (pbi->mb.corrupted) - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Failed to decode tile data"); } // Loopfilter one row. @@ -1636,7 +1636,7 @@ static const uint8_t *decode_tiles(VP10Decoder *pbi, const uint8_t *data, if (cm->frame_parallel_decode) vp10_frameworker_broadcast(pbi->cur_buf, INT_MAX); - return vpx_reader_find_end(&tile_data->bit_reader); + return aom_reader_find_end(&tile_data->bit_reader); } static int tile_worker_hook(TileWorkerData *const tile_data, @@ -1675,7 +1675,7 @@ static int compare_tile_buffers(const void *a, const void *b) { static const uint8_t *decode_tiles_mt(VP10Decoder *pbi, const uint8_t *data, const uint8_t *data_end) { VP10_COMMON *const cm = &pbi->common; - const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); + const VPxWorkerInterface *const winterface = aom_get_worker_interface(); const uint8_t *bit_reader_end = NULL; const int aligned_mi_cols = mi_cols_aligned_to_sb(cm->mi_cols); const int tile_cols = 1 << cm->log2_tile_cols; @@ -1695,22 +1695,22 @@ static const uint8_t *decode_tiles_mt(VP10Decoder *pbi, const uint8_t *data, const int num_threads = pbi->max_threads & ~1; int i; CHECK_MEM_ERROR(cm, pbi->tile_workers, - vpx_malloc(num_threads * sizeof(*pbi->tile_workers))); + aom_malloc(num_threads * sizeof(*pbi->tile_workers))); // Ensure tile data offsets will be properly aligned. This may fail on // platforms without DECLARE_ALIGNED(). assert((sizeof(*pbi->tile_worker_data) % 16) == 0); CHECK_MEM_ERROR( cm, pbi->tile_worker_data, - vpx_memalign(32, num_threads * sizeof(*pbi->tile_worker_data))); + aom_memalign(32, num_threads * sizeof(*pbi->tile_worker_data))); CHECK_MEM_ERROR(cm, pbi->tile_worker_info, - vpx_malloc(num_threads * sizeof(*pbi->tile_worker_info))); + aom_malloc(num_threads * sizeof(*pbi->tile_worker_info))); for (i = 0; i < num_threads; ++i) { VPxWorker *const worker = &pbi->tile_workers[i]; ++pbi->num_tile_workers; winterface->init(worker); if (i < num_threads - 1 && !winterface->reset(worker)) { - vpx_internal_error(&cm->error, VPX_CODEC_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_ERROR, "Tile decoder thread creation failed"); } } @@ -1809,7 +1809,7 @@ static const uint8_t *decode_tiles_mt(VP10Decoder *pbi, const uint8_t *data, for (; i > 0; --i) { VPxWorker *const worker = &pbi->tile_workers[i - 1]; // TODO(jzern): The tile may have specific error data associated with - // its vpx_internal_error_info which could be propagated to the main info + // its aom_internal_error_info which could be propagated to the main info // in cm. Additionally once the threads have been synced and an error is // detected, there's no point in continuing to decode tiles. pbi->mb.corrupted |= !winterface->sync(worker); @@ -1817,7 +1817,7 @@ static const uint8_t *decode_tiles_mt(VP10Decoder *pbi, const uint8_t *data, if (final_worker > -1) { TileWorkerData *const tile_data = (TileWorkerData *)pbi->tile_workers[final_worker].data1; - bit_reader_end = vpx_reader_find_end(&tile_data->bit_reader); + bit_reader_end = aom_reader_find_end(&tile_data->bit_reader); final_worker = -1; } @@ -1837,13 +1837,13 @@ static const uint8_t *decode_tiles_mt(VP10Decoder *pbi, const uint8_t *data, static void error_handler(void *data) { VP10_COMMON *const cm = (VP10_COMMON *)data; - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Truncated packet"); + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Truncated packet"); } static void read_bitdepth_colorspace_sampling(VP10_COMMON *cm, - struct vpx_read_bit_buffer *rb) { + struct aom_read_bit_buffer *rb) { if (cm->profile >= PROFILE_2) { - cm->bit_depth = vpx_rb_read_bit(rb) ? VPX_BITS_12 : VPX_BITS_10; + cm->bit_depth = aom_rb_read_bit(rb) ? VPX_BITS_12 : VPX_BITS_10; #if CONFIG_VPX_HIGHBITDEPTH cm->use_highbitdepth = 1; #endif @@ -1853,18 +1853,18 @@ static void read_bitdepth_colorspace_sampling(VP10_COMMON *cm, cm->use_highbitdepth = 0; #endif } - cm->color_space = vpx_rb_read_literal(rb, 3); + cm->color_space = aom_rb_read_literal(rb, 3); if (cm->color_space != VPX_CS_SRGB) { // [16,235] (including xvycc) vs [0,255] range - cm->color_range = vpx_rb_read_bit(rb); + cm->color_range = aom_rb_read_bit(rb); if (cm->profile == PROFILE_1 || cm->profile == PROFILE_3) { - cm->subsampling_x = vpx_rb_read_bit(rb); - cm->subsampling_y = vpx_rb_read_bit(rb); + cm->subsampling_x = aom_rb_read_bit(rb); + cm->subsampling_y = aom_rb_read_bit(rb); if (cm->subsampling_x == 1 && cm->subsampling_y == 1) - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, + aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "4:2:0 color not supported in profile 1 or 3"); - if (vpx_rb_read_bit(rb)) - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, + if (aom_rb_read_bit(rb)) + aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Reserved bit set"); } else { cm->subsampling_y = cm->subsampling_x = 1; @@ -1874,18 +1874,18 @@ static void read_bitdepth_colorspace_sampling(VP10_COMMON *cm, // Note if colorspace is SRGB then 4:4:4 chroma sampling is assumed. // 4:2:2 or 4:4:0 chroma sampling is not allowed. cm->subsampling_y = cm->subsampling_x = 0; - if (vpx_rb_read_bit(rb)) - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, + if (aom_rb_read_bit(rb)) + aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Reserved bit set"); } else { - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, + aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "4:4:4 color not supported in profile 0 or 2"); } } } static size_t read_uncompressed_header(VP10Decoder *pbi, - struct vpx_read_bit_buffer *rb) { + struct aom_read_bit_buffer *rb) { VP10_COMMON *const cm = &pbi->common; MACROBLOCKD *const xd = &pbi->mb; BufferPool *const pool = cm->buffer_pool; @@ -1896,29 +1896,29 @@ static size_t read_uncompressed_header(VP10Decoder *pbi, cm->last_frame_type = cm->frame_type; cm->last_intra_only = cm->intra_only; - if (vpx_rb_read_literal(rb, 2) != VPX_FRAME_MARKER) - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, + if (aom_rb_read_literal(rb, 2) != VPX_FRAME_MARKER) + aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Invalid frame marker"); cm->profile = vp10_read_profile(rb); #if CONFIG_VPX_HIGHBITDEPTH if (cm->profile >= MAX_PROFILES) - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, + aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Unsupported bitstream profile"); #else if (cm->profile >= PROFILE_2) - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, + aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Unsupported bitstream profile"); #endif - cm->show_existing_frame = vpx_rb_read_bit(rb); + cm->show_existing_frame = aom_rb_read_bit(rb); if (cm->show_existing_frame) { // Show an existing frame directly. - const int frame_to_show = cm->ref_frame_map[vpx_rb_read_literal(rb, 3)]; + const int frame_to_show = cm->ref_frame_map[aom_rb_read_literal(rb, 3)]; lock_buffer_pool(pool); if (frame_to_show < 0 || frame_bufs[frame_to_show].ref_count < 1) { unlock_buffer_pool(pool); - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, + aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Buffer %d does not contain a decoded frame", frame_to_show); } @@ -1936,13 +1936,13 @@ static size_t read_uncompressed_header(VP10Decoder *pbi, return 0; } - cm->frame_type = (FRAME_TYPE)vpx_rb_read_bit(rb); - cm->show_frame = vpx_rb_read_bit(rb); - cm->error_resilient_mode = vpx_rb_read_bit(rb); + cm->frame_type = (FRAME_TYPE)aom_rb_read_bit(rb); + cm->show_frame = aom_rb_read_bit(rb); + cm->error_resilient_mode = aom_rb_read_bit(rb); if (cm->frame_type == KEY_FRAME) { if (!vp10_read_sync_code(rb)) - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, + aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Invalid frame sync code"); read_bitdepth_colorspace_sampling(cm, rb); @@ -1959,22 +1959,22 @@ static size_t read_uncompressed_header(VP10Decoder *pbi, pbi->need_resync = 0; } } else { - cm->intra_only = cm->show_frame ? 0 : vpx_rb_read_bit(rb); + cm->intra_only = cm->show_frame ? 0 : aom_rb_read_bit(rb); if (cm->error_resilient_mode) { cm->reset_frame_context = RESET_FRAME_CONTEXT_ALL; } else { #if CONFIG_MISC_FIXES if (cm->intra_only) { - cm->reset_frame_context = vpx_rb_read_bit(rb) + cm->reset_frame_context = aom_rb_read_bit(rb) ? RESET_FRAME_CONTEXT_ALL : RESET_FRAME_CONTEXT_CURRENT; } else { - cm->reset_frame_context = vpx_rb_read_bit(rb) + cm->reset_frame_context = aom_rb_read_bit(rb) ? RESET_FRAME_CONTEXT_CURRENT : RESET_FRAME_CONTEXT_NONE; if (cm->reset_frame_context == RESET_FRAME_CONTEXT_CURRENT) - cm->reset_frame_context = vpx_rb_read_bit(rb) + cm->reset_frame_context = aom_rb_read_bit(rb) ? RESET_FRAME_CONTEXT_ALL : RESET_FRAME_CONTEXT_CURRENT; } @@ -1985,13 +1985,13 @@ static size_t read_uncompressed_header(VP10Decoder *pbi, }; cm->reset_frame_context = - reset_frame_context_conv_tbl[vpx_rb_read_literal(rb, 2)]; + reset_frame_context_conv_tbl[aom_rb_read_literal(rb, 2)]; #endif } if (cm->intra_only) { if (!vp10_read_sync_code(rb)) - vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, + aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM, "Invalid frame sync code"); #if CONFIG_MISC_FIXES read_bitdepth_colorspace_sampling(cm, rb); @@ -2013,26 +2013,26 @@ static size_t read_uncompressed_header(VP10Decoder *pbi, } #endif - pbi->refresh_frame_flags = vpx_rb_read_literal(rb, REF_FRAMES); + pbi->refresh_frame_flags = aom_rb_read_literal(rb, REF_FRAMES); setup_frame_size(cm, rb); if (pbi->need_resync) { memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map)); pbi->need_resync = 0; } } else if (pbi->need_resync != 1) { /* Skip if need resync */ - pbi->refresh_frame_flags = vpx_rb_read_literal(rb, REF_FRAMES); + pbi->refresh_frame_flags = aom_rb_read_literal(rb, REF_FRAMES); for (i = 0; i < REFS_PER_FRAME; ++i) { - const int ref = vpx_rb_read_literal(rb, REF_FRAMES_LOG2); + const int ref = aom_rb_read_literal(rb, REF_FRAMES_LOG2); const int idx = cm->ref_frame_map[ref]; RefBuffer *const ref_frame = &cm->frame_refs[i]; ref_frame->idx = idx; ref_frame->buf = &frame_bufs[idx].buf; - cm->ref_frame_sign_bias[LAST_FRAME + i] = vpx_rb_read_bit(rb); + cm->ref_frame_sign_bias[LAST_FRAME + i] = aom_rb_read_bit(rb); } setup_frame_size_with_refs(cm, rb); - cm->allow_high_precision_mv = vpx_rb_read_bit(rb); + cm->allow_high_precision_mv = aom_rb_read_bit(rb); cm->interp_filter = read_interp_filter(rb); for (i = 0; i < REFS_PER_FRAME; ++i) { @@ -2059,22 +2059,22 @@ static size_t read_uncompressed_header(VP10Decoder *pbi, get_frame_new_buffer(cm)->render_height = cm->render_height; if (pbi->need_resync) { - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Keyframe / intra-only frame required to reset decoder" " state"); } if (!cm->error_resilient_mode) { - cm->refresh_frame_context = vpx_rb_read_bit(rb) + cm->refresh_frame_context = aom_rb_read_bit(rb) ? REFRESH_FRAME_CONTEXT_FORWARD : REFRESH_FRAME_CONTEXT_OFF; if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_FORWARD) { - cm->refresh_frame_context = vpx_rb_read_bit(rb) + cm->refresh_frame_context = aom_rb_read_bit(rb) ? REFRESH_FRAME_CONTEXT_FORWARD : REFRESH_FRAME_CONTEXT_BACKWARD; #if !CONFIG_MISC_FIXES } else { - vpx_rb_read_bit(rb); // parallel decoding mode flag + aom_rb_read_bit(rb); // parallel decoding mode flag #endif } } else { @@ -2083,7 +2083,7 @@ static size_t read_uncompressed_header(VP10Decoder *pbi, // This flag will be overridden by the call to vp10_setup_past_independence // below, forcing the use of context 0 for those frame types. - cm->frame_context_idx = vpx_rb_read_literal(rb, FRAME_CONTEXTS_LOG2); + cm->frame_context_idx = aom_rb_read_literal(rb, FRAME_CONTEXTS_LOG2); // Generate next_ref_frame_map. lock_buffer_pool(pool); @@ -2145,25 +2145,25 @@ static size_t read_uncompressed_header(VP10Decoder *pbi, #endif setup_tile_info(cm, rb); - sz = vpx_rb_read_literal(rb, 16); + sz = aom_rb_read_literal(rb, 16); if (sz == 0) - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Invalid header size"); return sz; } -static void read_ext_tx_probs(FRAME_CONTEXT *fc, vpx_reader *r) { +static void read_ext_tx_probs(FRAME_CONTEXT *fc, aom_reader *r) { int i, j, k; - if (vpx_read(r, GROUP_DIFF_UPDATE_PROB)) { + if (aom_read(r, GROUP_DIFF_UPDATE_PROB)) { for (i = TX_4X4; i < EXT_TX_SIZES; ++i) { for (j = 0; j < TX_TYPES; ++j) for (k = 0; k < TX_TYPES - 1; ++k) vp10_diff_update_prob(r, &fc->intra_ext_tx_prob[i][j][k]); } } - if (vpx_read(r, GROUP_DIFF_UPDATE_PROB)) { + if (aom_read(r, GROUP_DIFF_UPDATE_PROB)) { for (i = TX_4X4; i < EXT_TX_SIZES; ++i) { for (k = 0; k < TX_TYPES - 1; ++k) vp10_diff_update_prob(r, &fc->inter_ext_tx_prob[i][k]); @@ -2178,12 +2178,12 @@ static int read_compressed_header(VP10Decoder *pbi, const uint8_t *data, MACROBLOCKD *const xd = &pbi->mb; #endif FRAME_CONTEXT *const fc = cm->fc; - vpx_reader r; + aom_reader r; int k, i, j; - if (vpx_reader_init(&r, data, partition_size, pbi->decrypt_cb, + if (aom_reader_init(&r, data, partition_size, pbi->decrypt_cb, pbi->decrypt_state)) - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate bool decoder 0"); #if !CONFIG_MISC_FIXES @@ -2253,7 +2253,7 @@ static int read_compressed_header(VP10Decoder *pbi, const uint8_t *data, read_ext_tx_probs(fc, &r); } - return vpx_reader_has_error(&r); + return aom_reader_has_error(&r); } #ifdef NDEBUG @@ -2297,8 +2297,8 @@ static void debug_check_frame_counts(const VP10_COMMON *const cm) { } #endif // NDEBUG -static struct vpx_read_bit_buffer *init_read_bit_buffer( - VP10Decoder *pbi, struct vpx_read_bit_buffer *rb, const uint8_t *data, +static struct aom_read_bit_buffer *init_read_bit_buffer( + VP10Decoder *pbi, struct aom_read_bit_buffer *rb, const uint8_t *data, const uint8_t *data_end, uint8_t clear_data[MAX_VP10_HEADER_SIZE]) { rb->bit_offset = 0; rb->error_handler = error_handler; @@ -2317,22 +2317,22 @@ static struct vpx_read_bit_buffer *init_read_bit_buffer( //------------------------------------------------------------------------------ -int vp10_read_sync_code(struct vpx_read_bit_buffer *const rb) { - return vpx_rb_read_literal(rb, 8) == VP10_SYNC_CODE_0 && - vpx_rb_read_literal(rb, 8) == VP10_SYNC_CODE_1 && - vpx_rb_read_literal(rb, 8) == VP10_SYNC_CODE_2; +int vp10_read_sync_code(struct aom_read_bit_buffer *const rb) { + return aom_rb_read_literal(rb, 8) == VP10_SYNC_CODE_0 && + aom_rb_read_literal(rb, 8) == VP10_SYNC_CODE_1 && + aom_rb_read_literal(rb, 8) == VP10_SYNC_CODE_2; } -void vp10_read_frame_size(struct vpx_read_bit_buffer *rb, int *width, +void vp10_read_frame_size(struct aom_read_bit_buffer *rb, int *width, int *height) { - *width = vpx_rb_read_literal(rb, 16) + 1; - *height = vpx_rb_read_literal(rb, 16) + 1; + *width = aom_rb_read_literal(rb, 16) + 1; + *height = aom_rb_read_literal(rb, 16) + 1; } -BITSTREAM_PROFILE vp10_read_profile(struct vpx_read_bit_buffer *rb) { - int profile = vpx_rb_read_bit(rb); - profile |= vpx_rb_read_bit(rb) << 1; - if (profile > 2) profile += vpx_rb_read_bit(rb); +BITSTREAM_PROFILE vp10_read_profile(struct aom_read_bit_buffer *rb) { + int profile = aom_rb_read_bit(rb); + profile |= aom_rb_read_bit(rb) << 1; + if (profile > 2) profile += aom_rb_read_bit(rb); return (BITSTREAM_PROFILE)profile; } @@ -2340,7 +2340,7 @@ void vp10_decode_frame(VP10Decoder *pbi, const uint8_t *data, const uint8_t *data_end, const uint8_t **p_data_end) { VP10_COMMON *const cm = &pbi->common; MACROBLOCKD *const xd = &pbi->mb; - struct vpx_read_bit_buffer rb; + struct aom_read_bit_buffer rb; int context_updated = 0; uint8_t clear_data[MAX_VP10_HEADER_SIZE]; const size_t first_partition_size = read_uncompressed_header( @@ -2356,9 +2356,9 @@ void vp10_decode_frame(VP10Decoder *pbi, const uint8_t *data, return; } - data += vpx_rb_bytes_read(&rb); + data += aom_rb_bytes_read(&rb); if (!read_is_valid(data, first_partition_size, data_end)) - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Truncated packet or corrupt header length"); cm->use_prev_frame_mvs = @@ -2370,7 +2370,7 @@ void vp10_decode_frame(VP10Decoder *pbi, const uint8_t *data, *cm->fc = cm->frame_contexts[cm->frame_context_idx]; if (!cm->fc->initialized) - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Uninitialized entropy context."); vp10_zero(cm->counts); @@ -2378,7 +2378,7 @@ void vp10_decode_frame(VP10Decoder *pbi, const uint8_t *data, xd->corrupted = 0; new_fb->corrupted = read_compressed_header(pbi, data, first_partition_size); if (new_fb->corrupted) - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Decode failed. Frame data header is corrupted."); if (cm->lf.filter_level && !cm->skip_loop_filter) { @@ -2416,7 +2416,7 @@ void vp10_decode_frame(VP10Decoder *pbi, const uint8_t *data, pbi->num_tile_workers, &pbi->lf_row_sync); } } else { - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Decode failed. Frame data is corrupted."); } } else { @@ -2441,7 +2441,7 @@ void vp10_decode_frame(VP10Decoder *pbi, const uint8_t *data, debug_check_frame_counts(cm); } } else { - vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, + aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Decode failed. Frame data is corrupted."); } diff --git a/av1/decoder/decodeframe.h b/av1/decoder/decodeframe.h index 63be695e6694a6c461906463b6891e77148be583..a3908a134a7bf81cd87e05ec2a527eb8522880a0 100644 --- a/av1/decoder/decodeframe.h +++ b/av1/decoder/decodeframe.h @@ -17,12 +17,12 @@ extern "C" { #endif struct VP10Decoder; -struct vpx_read_bit_buffer; +struct aom_read_bit_buffer; -int vp10_read_sync_code(struct vpx_read_bit_buffer *const rb); -void vp10_read_frame_size(struct vpx_read_bit_buffer *rb, int *width, +int vp10_read_sync_code(struct aom_read_bit_buffer *const rb); +void vp10_read_frame_size(struct aom_read_bit_buffer *rb, int *width, int *height); -BITSTREAM_PROFILE vp10_read_profile(struct vpx_read_bit_buffer *rb); +BITSTREAM_PROFILE vp10_read_profile(struct aom_read_bit_buffer *rb); void vp10_decode_frame(struct VP10Decoder *pbi, const uint8_t *data, const uint8_t *data_end, const uint8_t **p_data_end); diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c index ad8210678c8b2ca59dc5e95265eda9cefa2cc914..c4c550b4a7382bdf2a4660e27d823e1d9b3f37cc 100644 --- a/av1/decoder/decodemv.c +++ b/av1/decoder/decodemv.c @@ -23,14 +23,14 @@ #include "av1/decoder/decodemv.h" #include "av1/decoder/decodeframe.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" -static PREDICTION_MODE read_intra_mode(vpx_reader *r, const vpx_prob *p) { - return (PREDICTION_MODE)vpx_read_tree(r, vp10_intra_mode_tree, p); +static PREDICTION_MODE read_intra_mode(aom_reader *r, const aom_prob *p) { + return (PREDICTION_MODE)aom_read_tree(r, vp10_intra_mode_tree, p); } static PREDICTION_MODE read_intra_mode_y(VP10_COMMON *cm, MACROBLOCKD *xd, - vpx_reader *r, int size_group) { + aom_reader *r, int size_group) { const PREDICTION_MODE y_mode = read_intra_mode(r, cm->fc->y_mode_prob[size_group]); FRAME_COUNTS *counts = xd->counts; @@ -39,7 +39,7 @@ static PREDICTION_MODE read_intra_mode_y(VP10_COMMON *cm, MACROBLOCKD *xd, } static PREDICTION_MODE read_intra_mode_uv(VP10_COMMON *cm, MACROBLOCKD *xd, - vpx_reader *r, + aom_reader *r, PREDICTION_MODE y_mode) { const PREDICTION_MODE uv_mode = read_intra_mode(r, cm->fc->uv_mode_prob[y_mode]); @@ -49,30 +49,30 @@ static PREDICTION_MODE read_intra_mode_uv(VP10_COMMON *cm, MACROBLOCKD *xd, } static PREDICTION_MODE read_inter_mode(VP10_COMMON *cm, MACROBLOCKD *xd, - vpx_reader *r, int ctx) { + aom_reader *r, int ctx) { const int mode = - vpx_read_tree(r, vp10_inter_mode_tree, cm->fc->inter_mode_probs[ctx]); + aom_read_tree(r, vp10_inter_mode_tree, cm->fc->inter_mode_probs[ctx]); FRAME_COUNTS *counts = xd->counts; if (counts) ++counts->inter_mode[ctx][mode]; return NEARESTMV + mode; } -static int read_segment_id(vpx_reader *r, +static int read_segment_id(aom_reader *r, const struct segmentation_probs *segp) { - return vpx_read_tree(r, vp10_segment_tree, segp->tree_probs); + return aom_read_tree(r, vp10_segment_tree, segp->tree_probs); } static TX_SIZE read_selected_tx_size(VP10_COMMON *cm, MACROBLOCKD *xd, - TX_SIZE max_tx_size, vpx_reader *r) { + TX_SIZE max_tx_size, aom_reader *r) { FRAME_COUNTS *counts = xd->counts; const int ctx = get_tx_size_context(xd); - const vpx_prob *tx_probs = get_tx_probs(max_tx_size, ctx, &cm->fc->tx_probs); - int tx_size = vpx_read(r, tx_probs[0]); + const aom_prob *tx_probs = get_tx_probs(max_tx_size, ctx, &cm->fc->tx_probs); + int tx_size = aom_read(r, tx_probs[0]); if (tx_size != TX_4X4 && max_tx_size >= TX_16X16) { - tx_size += vpx_read(r, tx_probs[1]); + tx_size += aom_read(r, tx_probs[1]); if (tx_size != TX_8X8 && max_tx_size >= TX_32X32) - tx_size += vpx_read(r, tx_probs[2]); + tx_size += aom_read(r, tx_probs[2]); } if (counts) ++get_tx_counts(max_tx_size, ctx, &counts->tx)[tx_size]; @@ -80,7 +80,7 @@ static TX_SIZE read_selected_tx_size(VP10_COMMON *cm, MACROBLOCKD *xd, } static TX_SIZE read_tx_size(VP10_COMMON *cm, MACROBLOCKD *xd, int allow_select, - vpx_reader *r) { + aom_reader *r) { TX_MODE tx_mode = cm->tx_mode; BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type; const TX_SIZE max_tx_size = max_txsize_lookup[bsize]; @@ -117,7 +117,7 @@ static void set_segment_id(VP10_COMMON *cm, int mi_offset, int x_mis, int y_mis, static int read_intra_segment_id(VP10_COMMON *const cm, MACROBLOCKD *const xd, int mi_offset, int x_mis, int y_mis, - vpx_reader *r) { + aom_reader *r) { struct segmentation *const seg = &cm->seg; #if CONFIG_MISC_FIXES FRAME_COUNTS *counts = xd->counts; @@ -157,7 +157,7 @@ static void copy_segment_id(const VP10_COMMON *cm, } static int read_inter_segment_id(VP10_COMMON *const cm, MACROBLOCKD *const xd, - int mi_row, int mi_col, vpx_reader *r) { + int mi_row, int mi_col, aom_reader *r) { struct segmentation *const seg = &cm->seg; #if CONFIG_MISC_FIXES FRAME_COUNTS *counts = xd->counts; @@ -190,8 +190,8 @@ static int read_inter_segment_id(VP10_COMMON *const cm, MACROBLOCKD *const xd, if (seg->temporal_update) { const int ctx = vp10_get_pred_context_seg_id(xd); - const vpx_prob pred_prob = segp->pred_probs[ctx]; - mbmi->seg_id_predicted = vpx_read(r, pred_prob); + const aom_prob pred_prob = segp->pred_probs[ctx]; + mbmi->seg_id_predicted = aom_read(r, pred_prob); #if CONFIG_MISC_FIXES if (counts) ++counts->seg.pred[ctx][mbmi->seg_id_predicted]; #endif @@ -214,12 +214,12 @@ static int read_inter_segment_id(VP10_COMMON *const cm, MACROBLOCKD *const xd, } static int read_skip(VP10_COMMON *cm, const MACROBLOCKD *xd, int segment_id, - vpx_reader *r) { + aom_reader *r) { if (segfeature_active(&cm->seg, segment_id, SEG_LVL_SKIP)) { return 1; } else { const int ctx = vp10_get_skip_context(xd); - const int skip = vpx_read(r, cm->fc->skip_probs[ctx]); + const int skip = aom_read(r, cm->fc->skip_probs[ctx]); FRAME_COUNTS *counts = xd->counts; if (counts) ++counts->skip[ctx][skip]; return skip; @@ -228,7 +228,7 @@ static int read_skip(VP10_COMMON *cm, const MACROBLOCKD *xd, int segment_id, static void read_intra_frame_mode_info(VP10_COMMON *const cm, MACROBLOCKD *const xd, int mi_row, - int mi_col, vpx_reader *r) { + int mi_col, aom_reader *r) { MODE_INFO *const mi = xd->mi[0]; MB_MODE_INFO *const mbmi = &mi->mbmi; const MODE_INFO *above_mi = xd->above_mi; @@ -280,7 +280,7 @@ static void read_intra_frame_mode_info(VP10_COMMON *const cm, FRAME_COUNTS *counts = xd->counts; TX_TYPE tx_type_nom = intra_mode_to_tx_type_context[mbmi->mode]; mbmi->tx_type = - vpx_read_tree(r, vp10_ext_tx_tree, + aom_read_tree(r, vp10_ext_tx_tree, cm->fc->intra_ext_tx_prob[mbmi->tx_size][tx_type_nom]); if (counts) ++counts->intra_ext_tx[mbmi->tx_size][tx_type_nom][mbmi->tx_type]; @@ -289,43 +289,43 @@ static void read_intra_frame_mode_info(VP10_COMMON *const cm, } } -static int read_mv_component(vpx_reader *r, const nmv_component *mvcomp, +static int read_mv_component(aom_reader *r, const nmv_component *mvcomp, int usehp) { int mag, d, fr, hp; - const int sign = vpx_read(r, mvcomp->sign); - const int mv_class = vpx_read_tree(r, vp10_mv_class_tree, mvcomp->classes); + const int sign = aom_read(r, mvcomp->sign); + const int mv_class = aom_read_tree(r, vp10_mv_class_tree, mvcomp->classes); const int class0 = mv_class == MV_CLASS_0; // Integer part if (class0) { - d = vpx_read_tree(r, vp10_mv_class0_tree, mvcomp->class0); + d = aom_read_tree(r, vp10_mv_class0_tree, mvcomp->class0); mag = 0; } else { int i; const int n = mv_class + CLASS0_BITS - 1; // number of bits d = 0; - for (i = 0; i < n; ++i) d |= vpx_read(r, mvcomp->bits[i]) << i; + for (i = 0; i < n; ++i) d |= aom_read(r, mvcomp->bits[i]) << i; mag = CLASS0_SIZE << (mv_class + 2); } // Fractional part - fr = vpx_read_tree(r, vp10_mv_fp_tree, + fr = aom_read_tree(r, vp10_mv_fp_tree, class0 ? mvcomp->class0_fp[d] : mvcomp->fp); // High precision part (if hp is not used, the default value of the hp is 1) - hp = usehp ? vpx_read(r, class0 ? mvcomp->class0_hp : mvcomp->hp) : 1; + hp = usehp ? aom_read(r, class0 ? mvcomp->class0_hp : mvcomp->hp) : 1; // Result mag += ((d << 3) | (fr << 1) | hp) + 1; return sign ? -mag : mag; } -static INLINE void read_mv(vpx_reader *r, MV *mv, const MV *ref, +static INLINE void read_mv(aom_reader *r, MV *mv, const MV *ref, const nmv_context *ctx, nmv_context_counts *counts, int allow_hp) { const MV_JOINT_TYPE joint_type = - (MV_JOINT_TYPE)vpx_read_tree(r, vp10_mv_joint_tree, ctx->joints); + (MV_JOINT_TYPE)aom_read_tree(r, vp10_mv_joint_tree, ctx->joints); const int use_hp = allow_hp && vp10_use_mv_hp(ref); MV diff = { 0, 0 }; @@ -343,11 +343,11 @@ static INLINE void read_mv(vpx_reader *r, MV *mv, const MV *ref, static REFERENCE_MODE read_block_reference_mode(VP10_COMMON *cm, const MACROBLOCKD *xd, - vpx_reader *r) { + aom_reader *r) { if (cm->reference_mode == REFERENCE_MODE_SELECT) { const int ctx = vp10_get_reference_mode_context(cm, xd); const REFERENCE_MODE mode = - (REFERENCE_MODE)vpx_read(r, cm->fc->comp_inter_prob[ctx]); + (REFERENCE_MODE)aom_read(r, cm->fc->comp_inter_prob[ctx]); FRAME_COUNTS *counts = xd->counts; if (counts) ++counts->comp_inter[ctx][mode]; return mode; // SINGLE_REFERENCE or COMPOUND_REFERENCE @@ -358,7 +358,7 @@ static REFERENCE_MODE read_block_reference_mode(VP10_COMMON *cm, // Read the referncence frame static void read_ref_frames(VP10_COMMON *const cm, MACROBLOCKD *const xd, - vpx_reader *r, int segment_id, + aom_reader *r, int segment_id, MV_REFERENCE_FRAME ref_frame[2]) { FRAME_CONTEXT *const fc = cm->fc; FRAME_COUNTS *counts = xd->counts; @@ -373,17 +373,17 @@ static void read_ref_frames(VP10_COMMON *const cm, MACROBLOCKD *const xd, if (mode == COMPOUND_REFERENCE) { const int idx = cm->ref_frame_sign_bias[cm->comp_fixed_ref]; const int ctx = vp10_get_pred_context_comp_ref_p(cm, xd); - const int bit = vpx_read(r, fc->comp_ref_prob[ctx]); + const int bit = aom_read(r, fc->comp_ref_prob[ctx]); if (counts) ++counts->comp_ref[ctx][bit]; ref_frame[idx] = cm->comp_fixed_ref; ref_frame[!idx] = cm->comp_var_ref[bit]; } else if (mode == SINGLE_REFERENCE) { const int ctx0 = vp10_get_pred_context_single_ref_p1(xd); - const int bit0 = vpx_read(r, fc->single_ref_prob[ctx0][0]); + const int bit0 = aom_read(r, fc->single_ref_prob[ctx0][0]); if (counts) ++counts->single_ref[ctx0][0][bit0]; if (bit0) { const int ctx1 = vp10_get_pred_context_single_ref_p2(xd); - const int bit1 = vpx_read(r, fc->single_ref_prob[ctx1][1]); + const int bit1 = aom_read(r, fc->single_ref_prob[ctx1][1]); if (counts) ++counts->single_ref[ctx1][1][bit1]; ref_frame[0] = bit1 ? ALTREF_FRAME : GOLDEN_FRAME; } else { @@ -399,9 +399,9 @@ static void read_ref_frames(VP10_COMMON *const cm, MACROBLOCKD *const xd, static INLINE INTERP_FILTER read_switchable_interp_filter(VP10_COMMON *const cm, MACROBLOCKD *const xd, - vpx_reader *r) { + aom_reader *r) { const int ctx = vp10_get_pred_context_switchable_interp(xd); - const INTERP_FILTER type = (INTERP_FILTER)vpx_read_tree( + const INTERP_FILTER type = (INTERP_FILTER)aom_read_tree( r, vp10_switchable_interp_tree, cm->fc->switchable_interp_prob[ctx]); FRAME_COUNTS *counts = xd->counts; if (counts) ++counts->switchable_interp[ctx][type]; @@ -410,7 +410,7 @@ static INLINE INTERP_FILTER read_switchable_interp_filter(VP10_COMMON *const cm, static void read_intra_block_mode_info(VP10_COMMON *const cm, MACROBLOCKD *const xd, MODE_INFO *mi, - vpx_reader *r) { + aom_reader *r) { MB_MODE_INFO *const mbmi = &mi->mbmi; const BLOCK_SIZE bsize = mi->mbmi.sb_type; int i; @@ -450,7 +450,7 @@ static INLINE int assign_mv(VP10_COMMON *cm, MACROBLOCKD *xd, PREDICTION_MODE mode, int_mv mv[2], int_mv ref_mv[2], int_mv nearest_mv[2], int_mv near_mv[2], int is_compound, int allow_hp, - vpx_reader *r) { + aom_reader *r) { int i; int ret = 1; @@ -486,12 +486,12 @@ static INLINE int assign_mv(VP10_COMMON *cm, MACROBLOCKD *xd, } static int read_is_inter_block(VP10_COMMON *const cm, MACROBLOCKD *const xd, - int segment_id, vpx_reader *r) { + int segment_id, aom_reader *r) { if (segfeature_active(&cm->seg, segment_id, SEG_LVL_REF_FRAME)) { return get_segdata(&cm->seg, segment_id, SEG_LVL_REF_FRAME) != INTRA_FRAME; } else { const int ctx = vp10_get_intra_inter_context(xd); - const int is_inter = vpx_read(r, cm->fc->intra_inter_prob[ctx]); + const int is_inter = aom_read(r, cm->fc->intra_inter_prob[ctx]); FRAME_COUNTS *counts = xd->counts; if (counts) ++counts->intra_inter[ctx][is_inter]; return is_inter; @@ -507,7 +507,7 @@ static void fpm_sync(void *const data, int mi_row) { static void read_inter_block_mode_info(VP10Decoder *const pbi, MACROBLOCKD *const xd, MODE_INFO *const mi, int mi_row, - int mi_col, vpx_reader *r) { + int mi_col, aom_reader *r) { VP10_COMMON *const cm = &pbi->common; MB_MODE_INFO *const mbmi = &mi->mbmi; const BLOCK_SIZE bsize = mbmi->sb_type; @@ -526,7 +526,7 @@ static void read_inter_block_mode_info(VP10Decoder *const pbi, xd->block_refs[ref] = ref_buf; if ((!vp10_is_valid_scale(&ref_buf->sf))) - vpx_internal_error(xd->error_info, VPX_CODEC_UNSUP_BITSTREAM, + aom_internal_error(xd->error_info, VPX_CODEC_UNSUP_BITSTREAM, "Reference frame has invalid dimensions"); vp10_setup_pre_planes(xd, ref, ref_buf->buf, mi_row, mi_col, &ref_buf->sf); vp10_find_mv_refs(cm, xd, mi, frame, ref_mvs[frame], mi_row, mi_col, @@ -536,7 +536,7 @@ static void read_inter_block_mode_info(VP10Decoder *const pbi, if (segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) { mbmi->mode = ZEROMV; if (bsize < BLOCK_8X8) { - vpx_internal_error(xd->error_info, VPX_CODEC_UNSUP_BITSTREAM, + aom_internal_error(xd->error_info, VPX_CODEC_UNSUP_BITSTREAM, "Invalid usage of segement feature on small blocks"); return; } @@ -603,7 +603,7 @@ static void read_inter_block_mode_info(VP10Decoder *const pbi, static void read_inter_frame_mode_info(VP10Decoder *const pbi, MACROBLOCKD *const xd, int mi_row, - int mi_col, vpx_reader *r) { + int mi_col, aom_reader *r) { VP10_COMMON *const cm = &pbi->common; MODE_INFO *const mi = xd->mi[0]; MB_MODE_INFO *const mbmi = &mi->mbmi; @@ -625,13 +625,13 @@ static void read_inter_frame_mode_info(VP10Decoder *const pbi, !segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) { FRAME_COUNTS *counts = xd->counts; if (inter_block) { - mbmi->tx_type = vpx_read_tree(r, vp10_ext_tx_tree, + mbmi->tx_type = aom_read_tree(r, vp10_ext_tx_tree, cm->fc->inter_ext_tx_prob[mbmi->tx_size]); if (counts) ++counts->inter_ext_tx[mbmi->tx_size][mbmi->tx_type]; } else { const TX_TYPE tx_type_nom = intra_mode_to_tx_type_context[mbmi->mode]; mbmi->tx_type = - vpx_read_tree(r, vp10_ext_tx_tree, + aom_read_tree(r, vp10_ext_tx_tree, cm->fc->intra_ext_tx_prob[mbmi->tx_size][tx_type_nom]); if (counts) ++counts->intra_ext_tx[mbmi->tx_size][tx_type_nom][mbmi->tx_type]; @@ -642,7 +642,7 @@ static void read_inter_frame_mode_info(VP10Decoder *const pbi, } void vp10_read_mode_info(VP10Decoder *const pbi, MACROBLOCKD *xd, int mi_row, - int mi_col, vpx_reader *r, int x_mis, int y_mis) { + int mi_col, aom_reader *r, int x_mis, int y_mis) { VP10_COMMON *const cm = &pbi->common; MODE_INFO *const mi = xd->mi[0]; MV_REF *frame_mvs = cm->cur_frame->mvs + mi_row * cm->mi_cols + mi_col; diff --git a/av1/decoder/decodemv.h b/av1/decoder/decodemv.h index 24abeba239a82821f401d94e501325f8483496e4..22b8eeae0bd230d0dc6f161e056bd6fb6641ad57 100644 --- a/av1/decoder/decodemv.h +++ b/av1/decoder/decodemv.h @@ -21,7 +21,7 @@ extern "C" { #endif void vp10_read_mode_info(VP10Decoder *const pbi, MACROBLOCKD *xd, int mi_row, - int mi_col, vpx_reader *r, int x_mis, int y_mis); + int mi_col, aom_reader *r, int x_mis, int y_mis); #ifdef __cplusplus } // extern "C" diff --git a/av1/decoder/decoder.c b/av1/decoder/decoder.c index ac0fa58a4bcbc2f3da4c9b314dddadf32d52fb5d..97b96e065d9d249f21efe6a66a0bc55c206921dd 100644 --- a/av1/decoder/decoder.c +++ b/av1/decoder/decoder.c @@ -14,15 +14,15 @@ #include <stdio.h> #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" -#include "./vpx_scale_rtcd.h" +#include "./aom_dsp_rtcd.h" +#include "./aom_scale_rtcd.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/system_state.h" -#include "aom_ports/vpx_once.h" -#include "aom_ports/vpx_timer.h" -#include "aom_scale/vpx_scale.h" -#include "aom_util/vpx_thread.h" +#include "aom_ports/aom_once.h" +#include "aom_ports/aom_timer.h" +#include "aom_scale/aom_scale.h" +#include "aom_util/aom_thread.h" #include "av1/common/alloccommon.h" #include "av1/common/loopfilter.h" @@ -39,8 +39,8 @@ static void initialize_dec(void) { if (!init_done) { av1_rtcd(); - vpx_dsp_rtcd(); - vpx_scale_rtcd(); + aom_dsp_rtcd(); + aom_scale_rtcd(); vp10_init_intra_predictors(); init_done = 1; } @@ -54,23 +54,23 @@ static void vp10_dec_setup_mi(VP10_COMMON *cm) { } static int vp10_dec_alloc_mi(VP10_COMMON *cm, int mi_size) { - cm->mip = vpx_calloc(mi_size, sizeof(*cm->mip)); + cm->mip = aom_calloc(mi_size, sizeof(*cm->mip)); if (!cm->mip) return 1; cm->mi_alloc_size = mi_size; - cm->mi_grid_base = (MODE_INFO **)vpx_calloc(mi_size, sizeof(MODE_INFO *)); + cm->mi_grid_base = (MODE_INFO **)aom_calloc(mi_size, sizeof(MODE_INFO *)); if (!cm->mi_grid_base) return 1; return 0; } static void vp10_dec_free_mi(VP10_COMMON *cm) { - vpx_free(cm->mip); + aom_free(cm->mip); cm->mip = NULL; - vpx_free(cm->mi_grid_base); + aom_free(cm->mi_grid_base); cm->mi_grid_base = NULL; } VP10Decoder *vp10_decoder_create(BufferPool *const pool) { - VP10Decoder *volatile const pbi = vpx_memalign(32, sizeof(*pbi)); + VP10Decoder *volatile const pbi = aom_memalign(32, sizeof(*pbi)); VP10_COMMON *volatile const cm = pbi ? &pbi->common : NULL; if (!cm) return NULL; @@ -85,10 +85,10 @@ VP10Decoder *vp10_decoder_create(BufferPool *const pool) { cm->error.setjmp = 1; - CHECK_MEM_ERROR(cm, cm->fc, (FRAME_CONTEXT *)vpx_calloc(1, sizeof(*cm->fc))); + CHECK_MEM_ERROR(cm, cm->fc, (FRAME_CONTEXT *)aom_calloc(1, sizeof(*cm->fc))); CHECK_MEM_ERROR( cm, cm->frame_contexts, - (FRAME_CONTEXT *)vpx_calloc(FRAME_CONTEXTS, sizeof(*cm->frame_contexts))); + (FRAME_CONTEXT *)aom_calloc(FRAME_CONTEXTS, sizeof(*cm->frame_contexts))); pbi->need_resync = 1; once(initialize_dec); @@ -116,7 +116,7 @@ VP10Decoder *vp10_decoder_create(BufferPool *const pool) { cm->error.setjmp = 0; - vpx_get_worker_interface()->init(&pbi->lf_worker); + aom_get_worker_interface()->init(&pbi->lf_worker); return pbi; } @@ -126,22 +126,22 @@ void vp10_decoder_remove(VP10Decoder *pbi) { if (!pbi) return; - vpx_get_worker_interface()->end(&pbi->lf_worker); - vpx_free(pbi->lf_worker.data1); - vpx_free(pbi->tile_data); + aom_get_worker_interface()->end(&pbi->lf_worker); + aom_free(pbi->lf_worker.data1); + aom_free(pbi->tile_data); for (i = 0; i < pbi->num_tile_workers; ++i) { VPxWorker *const worker = &pbi->tile_workers[i]; - vpx_get_worker_interface()->end(worker); + aom_get_worker_interface()->end(worker); } - vpx_free(pbi->tile_worker_data); - vpx_free(pbi->tile_worker_info); - vpx_free(pbi->tile_workers); + aom_free(pbi->tile_worker_data); + aom_free(pbi->tile_worker_info); + aom_free(pbi->tile_workers); if (pbi->num_tile_workers > 0) { vp10_loop_filter_dealloc(&pbi->lf_row_sync); } - vpx_free(pbi); + aom_free(pbi); } static int equal_dimensions(const YV12_BUFFER_CONFIG *a, @@ -150,36 +150,36 @@ static int equal_dimensions(const YV12_BUFFER_CONFIG *a, a->uv_height == b->uv_height && a->uv_width == b->uv_width; } -vpx_codec_err_t vp10_copy_reference_dec(VP10Decoder *pbi, +aom_codec_err_t vp10_copy_reference_dec(VP10Decoder *pbi, VPX_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) { VP10_COMMON *cm = &pbi->common; /* TODO(jkoleszar): The decoder doesn't have any real knowledge of what the * encoder is using the frame buffers for. This is just a stub to keep the - * vpxenc --test-decode functionality working, and will be replaced in a + * aomenc --test-decode functionality working, and will be replaced in a * later commit that adds VP10-specific controls for this functionality. */ if (ref_frame_flag == VPX_LAST_FLAG) { const YV12_BUFFER_CONFIG *const cfg = get_ref_frame(cm, 0); if (cfg == NULL) { - vpx_internal_error(&cm->error, VPX_CODEC_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_ERROR, "No 'last' reference frame"); return VPX_CODEC_ERROR; } if (!equal_dimensions(cfg, sd)) - vpx_internal_error(&cm->error, VPX_CODEC_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_ERROR, "Incorrect buffer dimensions"); else - vpx_yv12_copy_frame(cfg, sd); + aom_yv12_copy_frame(cfg, sd); } else { - vpx_internal_error(&cm->error, VPX_CODEC_ERROR, "Invalid reference frame"); + aom_internal_error(&cm->error, VPX_CODEC_ERROR, "Invalid reference frame"); } return cm->error.error_code; } -vpx_codec_err_t vp10_set_reference_dec(VP10_COMMON *cm, +aom_codec_err_t vp10_set_reference_dec(VP10_COMMON *cm, VPX_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) { RefBuffer *ref_buf = NULL; @@ -187,7 +187,7 @@ vpx_codec_err_t vp10_set_reference_dec(VP10_COMMON *cm, // TODO(jkoleszar): The decoder doesn't have any real knowledge of what the // encoder is using the frame buffers for. This is just a stub to keep the - // vpxenc --test-decode functionality working, and will be replaced in a + // aomenc --test-decode functionality working, and will be replaced in a // later commit that adds VP10-specific controls for this functionality. if (ref_frame_flag == VPX_LAST_FLAG) { ref_buf = &cm->frame_refs[0]; @@ -196,12 +196,12 @@ vpx_codec_err_t vp10_set_reference_dec(VP10_COMMON *cm, } else if (ref_frame_flag == VPX_ALT_FLAG) { ref_buf = &cm->frame_refs[2]; } else { - vpx_internal_error(&cm->error, VPX_CODEC_ERROR, "Invalid reference frame"); + aom_internal_error(&cm->error, VPX_CODEC_ERROR, "Invalid reference frame"); return cm->error.error_code; } if (!equal_dimensions(ref_buf->buf, sd)) { - vpx_internal_error(&cm->error, VPX_CODEC_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_ERROR, "Incorrect buffer dimensions"); } else { int *ref_fb_ptr = &ref_buf->idx; @@ -217,7 +217,7 @@ vpx_codec_err_t vp10_set_reference_dec(VP10_COMMON *cm, // Manage the reference counters and copy image. ref_cnt_fb(frame_bufs, ref_fb_ptr, free_fb); ref_buf->buf = &frame_bufs[*ref_fb_ptr].buf; - vpx_yv12_copy_frame(sd, ref_buf->buf); + aom_yv12_copy_frame(sd, ref_buf->buf); } return cm->error.error_code; @@ -319,7 +319,7 @@ int vp10_receive_compressed_data(VP10Decoder *pbi, size_t size, } if (setjmp(cm->error.jmp)) { - const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); + const VPxWorkerInterface *const winterface = aom_get_worker_interface(); int i; cm->error.setjmp = 0; @@ -359,7 +359,7 @@ int vp10_receive_compressed_data(VP10Decoder *pbi, size_t size, decrease_ref_count(cm->new_fb_idx, frame_bufs, pool); unlock_buffer_pool(pool); - vpx_clear_system_state(); + aom_clear_system_state(); return -1; } @@ -368,7 +368,7 @@ int vp10_receive_compressed_data(VP10Decoder *pbi, size_t size, swap_frame_buffers(pbi); - vpx_clear_system_state(); + aom_clear_system_state(); if (!cm->show_existing_frame) { cm->last_show_frame = cm->show_frame; @@ -419,13 +419,13 @@ int vp10_get_raw_frame(VP10Decoder *pbi, YV12_BUFFER_CONFIG *sd) { *sd = *cm->frame_to_show; ret = 0; - vpx_clear_system_state(); + aom_clear_system_state(); return ret; } -vpx_codec_err_t vp10_parse_superframe_index(const uint8_t *data, size_t data_sz, +aom_codec_err_t vp10_parse_superframe_index(const uint8_t *data, size_t data_sz, uint32_t sizes[8], int *count, - vpx_decrypt_cb decrypt_cb, + aom_decrypt_cb decrypt_cb, void *decrypt_state) { // A chunk ending with a byte matching 0xc0 is an invalid chunk unless // it is a super frame index. If the last byte of real video compression diff --git a/av1/decoder/decoder.h b/av1/decoder/decoder.h index b8f8b05348c89187b5d6652471e904a340ff9ece..e2b97386cf6db0aff600481a44764b7982dbc12a 100644 --- a/av1/decoder/decoder.h +++ b/av1/decoder/decoder.h @@ -12,12 +12,12 @@ #ifndef VP10_DECODER_DECODER_H_ #define VP10_DECODER_DECODER_H_ -#include "./vpx_config.h" +#include "./aom_config.h" -#include "aom/vpx_codec.h" +#include "aom/aom_codec.h" #include "aom_dsp/bitreader.h" #include "aom_scale/yv12config.h" -#include "aom_util/vpx_thread.h" +#include "aom_util/aom_thread.h" #include "av1/common/thread_common.h" #include "av1/common/onyxc_int.h" @@ -30,7 +30,7 @@ extern "C" { // TODO(hkuang): combine this with TileWorkerData. typedef struct TileData { VP10_COMMON *cm; - vpx_reader bit_reader; + aom_reader bit_reader; DECLARE_ALIGNED(16, MACROBLOCKD, xd); /* dqcoeff are shared by all the planes. So planes must be decoded serially */ DECLARE_ALIGNED(16, tran_low_t, dqcoeff[32 * 32]); @@ -39,13 +39,13 @@ typedef struct TileData { typedef struct TileWorkerData { struct VP10Decoder *pbi; - vpx_reader bit_reader; + aom_reader bit_reader; FRAME_COUNTS counts; DECLARE_ALIGNED(16, MACROBLOCKD, xd); /* dqcoeff are shared by all the planes. So planes must be decoded serially */ DECLARE_ALIGNED(16, tran_low_t, dqcoeff[32 * 32]); DECLARE_ALIGNED(16, uint8_t, color_index_map[2][64 * 64]); - struct vpx_internal_error_info error_info; + struct aom_internal_error_info error_info; } TileWorkerData; typedef struct VP10Decoder { @@ -73,7 +73,7 @@ typedef struct VP10Decoder { VP10LfSync lf_row_sync; - vpx_decrypt_cb decrypt_cb; + aom_decrypt_cb decrypt_cb; void *decrypt_state; int max_threads; @@ -87,15 +87,15 @@ int vp10_receive_compressed_data(struct VP10Decoder *pbi, size_t size, int vp10_get_raw_frame(struct VP10Decoder *pbi, YV12_BUFFER_CONFIG *sd); -vpx_codec_err_t vp10_copy_reference_dec(struct VP10Decoder *pbi, +aom_codec_err_t vp10_copy_reference_dec(struct VP10Decoder *pbi, VPX_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd); -vpx_codec_err_t vp10_set_reference_dec(VP10_COMMON *cm, +aom_codec_err_t vp10_set_reference_dec(VP10_COMMON *cm, VPX_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd); -static INLINE uint8_t read_marker(vpx_decrypt_cb decrypt_cb, +static INLINE uint8_t read_marker(aom_decrypt_cb decrypt_cb, void *decrypt_state, const uint8_t *data) { if (decrypt_cb) { uint8_t marker; @@ -107,9 +107,9 @@ static INLINE uint8_t read_marker(vpx_decrypt_cb decrypt_cb, // This function is exposed for use in tests, as well as the inlined function // "read_marker". -vpx_codec_err_t vp10_parse_superframe_index(const uint8_t *data, size_t data_sz, +aom_codec_err_t vp10_parse_superframe_index(const uint8_t *data, size_t data_sz, uint32_t sizes[8], int *count, - vpx_decrypt_cb decrypt_cb, + aom_decrypt_cb decrypt_cb, void *decrypt_state); struct VP10Decoder *vp10_decoder_create(BufferPool *const pool); diff --git a/av1/decoder/detokenize.c b/av1/decoder/detokenize.c index 2c2eeff24228ec3ca48c4009464de6fd50f592b0..b0e083e151efea1a1bd6057e89dd06cc89afdfc2 100644 --- a/av1/decoder/detokenize.c +++ b/av1/decoder/detokenize.c @@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "av1/common/blockd.h" @@ -38,9 +38,9 @@ if (counts) ++coef_counts[band][ctx][token]; \ } while (0) -static INLINE int read_coeff(const vpx_prob *probs, int n, vpx_reader *r) { +static INLINE int read_coeff(const aom_prob *probs, int n, aom_reader *r) { int i, val = 0; - for (i = 0; i < n; ++i) val = (val << 1) | vpx_read(r, probs[i]); + for (i = 0; i < n; ++i) val = (val << 1) | aom_read(r, probs[i]); return val; } @@ -48,12 +48,12 @@ static INLINE int read_coeff(const vpx_prob *probs, int n, vpx_reader *r) { static int decode_coefs(const MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff, TX_SIZE tx_size, const int16_t *dq, int ctx, const int16_t *scan, const int16_t *nb, - vpx_reader *r, const qm_val_t *iqm[2][TX_SIZES]) + aom_reader *r, const qm_val_t *iqm[2][TX_SIZES]) #else static int decode_coefs(const MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff, TX_SIZE tx_size, const int16_t *dq, int ctx, const int16_t *scan, const int16_t *nb, - vpx_reader *r) + aom_reader *r) #endif { FRAME_COUNTS *counts = xd->counts; @@ -64,9 +64,9 @@ static int decode_coefs(const MACROBLOCKD *xd, PLANE_TYPE type, const qm_val_t *iqmatrix = iqm[!ref][tx_size]; #endif int band, c = 0; - const vpx_prob(*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = + const aom_prob(*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = fc->coef_probs[tx_size][type][ref]; - const vpx_prob *prob; + const aom_prob *prob; unsigned int(*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1]; unsigned int(*eob_branch_count)[COEFF_CONTEXTS]; uint8_t token_cache[32 * 32]; @@ -125,12 +125,12 @@ static int decode_coefs(const MACROBLOCKD *xd, PLANE_TYPE type, band = *band_translate++; prob = coef_probs[band][ctx]; if (counts) ++eob_branch_count[band][ctx]; - if (!vpx_read(r, prob[EOB_CONTEXT_NODE])) { + if (!aom_read(r, prob[EOB_CONTEXT_NODE])) { INCREMENT_COUNT(EOB_MODEL_TOKEN); break; } - while (!vpx_read(r, prob[ZERO_CONTEXT_NODE])) { + while (!aom_read(r, prob[ZERO_CONTEXT_NODE])) { INCREMENT_COUNT(ZERO_TOKEN); dqv = dq[1]; token_cache[scan[c]] = 0; @@ -141,13 +141,13 @@ static int decode_coefs(const MACROBLOCKD *xd, PLANE_TYPE type, prob = coef_probs[band][ctx]; } - if (!vpx_read(r, prob[ONE_CONTEXT_NODE])) { + if (!aom_read(r, prob[ONE_CONTEXT_NODE])) { INCREMENT_COUNT(ONE_TOKEN); token = ONE_TOKEN; val = 1; } else { INCREMENT_COUNT(TWO_TOKEN); - token = vpx_read_tree(r, vp10_coef_con_tree, + token = aom_read_tree(r, vp10_coef_con_tree, vp10_pareto8_full[prob[PIVOT_NODE] - 1]); switch (token) { case TWO_TOKEN: @@ -202,12 +202,12 @@ static int decode_coefs(const MACROBLOCKD *xd, PLANE_TYPE type, v = (val * dqv) >> dq_shift; #if CONFIG_COEFFICIENT_RANGE_CHECKING #if CONFIG_VPX_HIGHBITDEPTH - dqcoeff[scan[c]] = highbd_check_range((vpx_read_bit(r) ? -v : v), xd->bd); + dqcoeff[scan[c]] = highbd_check_range((aom_read_bit(r) ? -v : v), xd->bd); #else - dqcoeff[scan[c]] = check_range(vpx_read_bit(r) ? -v : v); + dqcoeff[scan[c]] = check_range(aom_read_bit(r) ? -v : v); #endif // CONFIG_VPX_HIGHBITDEPTH #else - dqcoeff[scan[c]] = vpx_read_bit(r) ? -v : v; + dqcoeff[scan[c]] = aom_read_bit(r) ? -v : v; #endif // CONFIG_COEFFICIENT_RANGE_CHECKING token_cache[scan[c]] = vp10_pt_energy_class[token]; ++c; @@ -259,7 +259,7 @@ static void dec_set_contexts(const MACROBLOCKD *xd, } int vp10_decode_block_tokens(MACROBLOCKD *xd, int plane, const scan_order *sc, - int x, int y, TX_SIZE tx_size, vpx_reader *r, + int x, int y, TX_SIZE tx_size, aom_reader *r, int seg_id) { struct macroblockd_plane *const pd = &xd->plane[plane]; const int16_t *const dequant = pd->seg_dequant[seg_id]; diff --git a/av1/decoder/detokenize.h b/av1/decoder/detokenize.h index 6415f3d1a1a342be1eebe5ff08fd9dd891ee5b74..1abb5d5af43ca709fbfe9098bb34d7be919e5fdd 100644 --- a/av1/decoder/detokenize.h +++ b/av1/decoder/detokenize.h @@ -21,7 +21,7 @@ extern "C" { #endif int vp10_decode_block_tokens(MACROBLOCKD *xd, int plane, const scan_order *sc, - int x, int y, TX_SIZE tx_size, vpx_reader *r, + int x, int y, TX_SIZE tx_size, aom_reader *r, int seg_id); #ifdef __cplusplus diff --git a/av1/decoder/dsubexp.c b/av1/decoder/dsubexp.c index 23acae303aa0c7ff411d2ff6f39dad29294f8ae3..ac7aed5b981442fe5b243c5bbaeec5121e6e2477 100644 --- a/av1/decoder/dsubexp.c +++ b/av1/decoder/dsubexp.c @@ -21,11 +21,11 @@ static int inv_recenter_nonneg(int v, int m) { return (v & 1) ? m - ((v + 1) >> 1) : m + (v >> 1); } -static int decode_uniform(vpx_reader *r) { +static int decode_uniform(aom_reader *r) { const int l = 8; const int m = (1 << l) - 191 + CONFIG_MISC_FIXES; - const int v = vpx_read_literal(r, l - 1); - return v < m ? v : (v << 1) - m + vpx_read_bit(r); + const int v = aom_read_literal(r, l - 1); + return v < m ? v : (v << 1) - m + aom_read_bit(r); } static int inv_remap_prob(int v, int m) { @@ -62,16 +62,16 @@ static int inv_remap_prob(int v, int m) { } } -static int decode_term_subexp(vpx_reader *r) { - if (!vpx_read_bit(r)) return vpx_read_literal(r, 4); - if (!vpx_read_bit(r)) return vpx_read_literal(r, 4) + 16; - if (!vpx_read_bit(r)) return vpx_read_literal(r, 5) + 32; +static int decode_term_subexp(aom_reader *r) { + if (!aom_read_bit(r)) return aom_read_literal(r, 4); + if (!aom_read_bit(r)) return aom_read_literal(r, 4) + 16; + if (!aom_read_bit(r)) return aom_read_literal(r, 5) + 32; return decode_uniform(r) + 64; } -void vp10_diff_update_prob(vpx_reader *r, vpx_prob *p) { - if (vpx_read(r, DIFF_UPDATE_PROB)) { +void vp10_diff_update_prob(aom_reader *r, aom_prob *p) { + if (aom_read(r, DIFF_UPDATE_PROB)) { const int delp = decode_term_subexp(r); - *p = (vpx_prob)inv_remap_prob(delp, *p); + *p = (aom_prob)inv_remap_prob(delp, *p); } } diff --git a/av1/decoder/dsubexp.h b/av1/decoder/dsubexp.h index 3a35fc2948586fc31347441435b8e51b68aa1b54..779f345672409d46bc75230437384a7000841439 100644 --- a/av1/decoder/dsubexp.h +++ b/av1/decoder/dsubexp.h @@ -18,7 +18,7 @@ extern "C" { #endif -void vp10_diff_update_prob(vpx_reader *r, vpx_prob *p); +void vp10_diff_update_prob(aom_reader *r, aom_prob *p); #ifdef __cplusplus } // extern "C" diff --git a/av1/decoder/dthread.c b/av1/decoder/dthread.c index 0d9e8dcf2ee87b9f7d7408227a4cbe013a929ebe..6ef92a420a6ef740588be30e061c3be4108d5c81 100644 --- a/av1/decoder/dthread.c +++ b/av1/decoder/dthread.c @@ -9,8 +9,8 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "./vpx_config.h" -#include "aom_mem/vpx_mem.h" +#include "./aom_config.h" +#include "aom_mem/aom_mem.h" #include "av1/common/reconinter.h" #include "av1/decoder/dthread.h" #include "av1/decoder/decoder.h" @@ -98,7 +98,7 @@ void vp10_frameworker_wait(VPxWorker *const worker, RefCntBuffer *const ref_buf, if (ref_buf->buf.corrupted == 1) { FrameWorkerData *const worker_data = (FrameWorkerData *)worker->data1; vp10_frameworker_unlock_stats(ref_worker); - vpx_internal_error(&worker_data->pbi->common.error, + aom_internal_error(&worker_data->pbi->common.error, VPX_CODEC_CORRUPT_FRAME, "Worker %p failed to decode frame", worker); } diff --git a/av1/decoder/dthread.h b/av1/decoder/dthread.h index 264e29cbdf3111bc585d9d8af4b218757fae7807..a40c0df9afded5f03236e67b56c486f400072dfe 100644 --- a/av1/decoder/dthread.h +++ b/av1/decoder/dthread.h @@ -12,9 +12,9 @@ #ifndef VP10_DECODER_DTHREAD_H_ #define VP10_DECODER_DTHREAD_H_ -#include "./vpx_config.h" -#include "aom_util/vpx_thread.h" -#include "aom/internal/vpx_codec_internal.h" +#include "./aom_config.h" +#include "aom_util/aom_thread.h" +#include "aom/internal/aom_codec_internal.h" #ifdef __cplusplus extern "C" { diff --git a/av1/encoder/aq_complexity.c b/av1/encoder/aq_complexity.c index f812aec84c71eea9382df19277d08af04d6f269f..0f632b87ba5cf5185013cddc02adfaebbfd3f0de 100644 --- a/av1/encoder/aq_complexity.c +++ b/av1/encoder/aq_complexity.c @@ -17,7 +17,7 @@ #include "av1/encoder/encodeframe.h" #include "av1/common/seg_common.h" #include "av1/encoder/segmentation.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/system_state.h" #define AQ_C_SEGMENTS 5 @@ -41,7 +41,7 @@ static const double aq_c_var_thresholds[AQ_C_STRENGTHS][AQ_C_SEGMENTS] = { #define DEFAULT_COMPLEXITY 64 -static int get_aq_c_strength(int q_index, vpx_bit_depth_t bit_depth) { +static int get_aq_c_strength(int q_index, aom_bit_depth_t bit_depth) { // Approximate base quatizer (truncated to int) const int base_quant = vp10_ac_quant(q_index, 0, bit_depth) / 4; return (base_quant > 10) + (base_quant > 25); @@ -52,7 +52,7 @@ void vp10_setup_in_frame_q_adj(VP10_COMP *cpi) { struct segmentation *const seg = &cm->seg; // Make SURE use of floating point in this function is safe. - vpx_clear_system_state(); + aom_clear_system_state(); if (frame_is_intra_only(cm) || cm->error_resilient_mode || cpi->refresh_alt_ref_frame || @@ -135,7 +135,7 @@ void vp10_caq_select_segment(VP10_COMP *cpi, MACROBLOCK *mb, BLOCK_SIZE bs, double low_var_thresh; const int aq_strength = get_aq_c_strength(cm->base_qindex, cm->bit_depth); - vpx_clear_system_state(); + aom_clear_system_state(); low_var_thresh = (cpi->oxcf.pass == 2) ? VPXMAX(cpi->twopass.mb_av_energy, MIN_DEFAULT_LV_THRESH) : DEFAULT_LV_THRESH; diff --git a/av1/encoder/aq_cyclicrefresh.c b/av1/encoder/aq_cyclicrefresh.c index d7ee3d81d9fd112796f428a1ee1b2eaafb79dab2..3d48c148802f3096c47b62fff7a7d9fc78d08101 100644 --- a/av1/encoder/aq_cyclicrefresh.c +++ b/av1/encoder/aq_cyclicrefresh.c @@ -16,7 +16,7 @@ #include "av1/encoder/aq_cyclicrefresh.h" #include "av1/encoder/ratectrl.h" #include "av1/encoder/segmentation.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/system_state.h" struct CYCLIC_REFRESH { @@ -59,18 +59,18 @@ struct CYCLIC_REFRESH { CYCLIC_REFRESH *vp10_cyclic_refresh_alloc(int mi_rows, int mi_cols) { size_t last_coded_q_map_size; - CYCLIC_REFRESH *const cr = vpx_calloc(1, sizeof(*cr)); + CYCLIC_REFRESH *const cr = aom_calloc(1, sizeof(*cr)); if (cr == NULL) return NULL; - cr->map = vpx_calloc(mi_rows * mi_cols, sizeof(*cr->map)); + cr->map = aom_calloc(mi_rows * mi_cols, sizeof(*cr->map)); if (cr->map == NULL) { - vpx_free(cr); + aom_free(cr); return NULL; } last_coded_q_map_size = mi_rows * mi_cols * sizeof(*cr->last_coded_q_map); - cr->last_coded_q_map = vpx_malloc(last_coded_q_map_size); + cr->last_coded_q_map = aom_malloc(last_coded_q_map_size); if (cr->last_coded_q_map == NULL) { - vpx_free(cr); + aom_free(cr); return NULL; } assert(MAXQ <= 255); @@ -80,9 +80,9 @@ CYCLIC_REFRESH *vp10_cyclic_refresh_alloc(int mi_rows, int mi_cols) { } void vp10_cyclic_refresh_free(CYCLIC_REFRESH *cr) { - vpx_free(cr->map); - vpx_free(cr->last_coded_q_map); - vpx_free(cr); + aom_free(cr->map); + aom_free(cr->last_coded_q_map); + aom_free(cr); } // Check if we should turn off cyclic refresh based on bitrate condition. @@ -500,7 +500,7 @@ void vp10_cyclic_refresh_setup(VP10_COMP *const cpi) { int qindex_delta = 0; int qindex2; const double q = vp10_convert_qindex_to_q(cm->base_qindex, cm->bit_depth); - vpx_clear_system_state(); + aom_clear_system_state(); // Set rate threshold to some multiple (set to 2 for now) of the target // rate (target is given by sb64_target_rate and scaled by 256). cr->thresh_rate_sb = ((int64_t)(rc->sb64_target_rate) << 8) << 2; diff --git a/av1/encoder/aq_variance.c b/av1/encoder/aq_variance.c index 3976476030025963dc328de2d45d9692eded2b89..37e53f63d9a09df360ff734eae12ae2d641112d3 100644 --- a/av1/encoder/aq_variance.c +++ b/av1/encoder/aq_variance.c @@ -56,7 +56,7 @@ void vp10_vaq_frame_setup(VP10_COMP *cpi) { seg->abs_delta = SEGMENT_DELTADATA; - vpx_clear_system_state(); + aom_clear_system_state(); for (i = 0; i < MAX_SEGMENTS; ++i) { int qindex_delta = @@ -188,7 +188,7 @@ static unsigned int block_variance(VP10_COMP *cpi, MACROBLOCK *x, double vp10_log_block_var(VP10_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs) { unsigned int var = block_variance(cpi, x, bs); - vpx_clear_system_state(); + aom_clear_system_state(); return log(var + 1.0); } @@ -196,7 +196,7 @@ double vp10_log_block_var(VP10_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs) { int vp10_block_energy(VP10_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs) { double energy; double energy_midpoint; - vpx_clear_system_state(); + aom_clear_system_state(); energy_midpoint = (cpi->oxcf.pass == 2) ? cpi->twopass.mb_av_energy : DEFAULT_E_MIDPOINT; energy = vp10_log_block_var(cpi, x, bs) - energy_midpoint; diff --git a/av1/encoder/arm/neon/dct_neon.c b/av1/encoder/arm/neon/dct_neon.c index 9424c5ba43a5a4800fbdce2a0e70f57b95cbc0fd..947b41a52a19251046fb39fb115d0dc981c6567c 100644 --- a/av1/encoder/arm/neon/dct_neon.c +++ b/av1/encoder/arm/neon/dct_neon.c @@ -12,8 +12,8 @@ #include <arm_neon.h> #include "./av1_rtcd.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "av1/common/blockd.h" #include "aom_dsp/txfm_common.h" @@ -27,7 +27,7 @@ void vp10_fdct8x8_quant_neon( int16_t temp_buffer[64]; (void)coeff_ptr; - vpx_fdct8x8_neon(input, temp_buffer, stride); + aom_fdct8x8_neon(input, temp_buffer, stride); vp10_quantize_fp_neon(temp_buffer, n_coeffs, skip_block, zbin_ptr, round_ptr, quant_ptr, quant_shift_ptr, qcoeff_ptr, dqcoeff_ptr, dequant_ptr, eob_ptr, scan_ptr, iscan_ptr); diff --git a/av1/encoder/arm/neon/quantize_neon.c b/av1/encoder/arm/neon/quantize_neon.c index 09c5132f252b1045af62eba142402001e38b9a82..ded962d1b55c0212e345ee6fb364173e540cab92 100644 --- a/av1/encoder/arm/neon/quantize_neon.c +++ b/av1/encoder/arm/neon/quantize_neon.c @@ -13,7 +13,7 @@ #include <math.h> -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "av1/common/quant_common.h" #include "av1/common/seg_common.h" diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c index 57626d8239d784c688a6c3478412fe1381783d61..3f1ccc6825a3e4a8b65a399875ab5400ee6d4d21 100644 --- a/av1/encoder/bitstream.c +++ b/av1/encoder/bitstream.c @@ -13,10 +13,10 @@ #include <stdio.h> #include <limits.h> -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #include "aom_dsp/bitwriter_buffer.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem_ops.h" #include "aom_ports/system_state.h" @@ -61,27 +61,27 @@ void vp10_encode_token_init() { vp10_tokens_from_tree(ext_tx_encodings, vp10_ext_tx_tree); } -static void write_intra_mode(vpx_writer *w, PREDICTION_MODE mode, - const vpx_prob *probs) { +static void write_intra_mode(aom_writer *w, PREDICTION_MODE mode, + const aom_prob *probs) { vp10_write_token(w, vp10_intra_mode_tree, probs, &intra_mode_encodings[mode]); } -static void write_inter_mode(vpx_writer *w, PREDICTION_MODE mode, - const vpx_prob *probs) { +static void write_inter_mode(aom_writer *w, PREDICTION_MODE mode, + const aom_prob *probs) { assert(is_inter_mode(mode)); vp10_write_token(w, vp10_inter_mode_tree, probs, &inter_mode_encodings[INTER_OFFSET(mode)]); } -static void encode_unsigned_max(struct vpx_write_bit_buffer *wb, int data, +static void encode_unsigned_max(struct aom_write_bit_buffer *wb, int data, int max) { - vpx_wb_write_literal(wb, data, get_unsigned_bits(max)); + aom_wb_write_literal(wb, data, get_unsigned_bits(max)); } -static void prob_diff_update(const vpx_tree_index *tree, - vpx_prob probs[/*n - 1*/], +static void prob_diff_update(const aom_tree_index *tree, + aom_prob probs[/*n - 1*/], const unsigned int counts[/*n - 1*/], int n, - vpx_writer *w) { + aom_writer *w) { int i; unsigned int branch_ct[32][2]; @@ -93,8 +93,8 @@ static void prob_diff_update(const vpx_tree_index *tree, vp10_cond_prob_diff_update(w, &probs[i], branch_ct[i]); } -static int prob_diff_update_savings(const vpx_tree_index *tree, - vpx_prob probs[/*n - 1*/], +static int prob_diff_update_savings(const aom_tree_index *tree, + aom_prob probs[/*n - 1*/], const unsigned int counts[/*n - 1*/], int n) { int i; @@ -111,32 +111,32 @@ static int prob_diff_update_savings(const vpx_tree_index *tree, } static void write_selected_tx_size(const VP10_COMMON *cm, const MACROBLOCKD *xd, - vpx_writer *w) { + aom_writer *w) { TX_SIZE tx_size = xd->mi[0]->mbmi.tx_size; BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type; const TX_SIZE max_tx_size = max_txsize_lookup[bsize]; - const vpx_prob *const tx_probs = + const aom_prob *const tx_probs = get_tx_probs2(max_tx_size, xd, &cm->fc->tx_probs); - vpx_write(w, tx_size != TX_4X4, tx_probs[0]); + aom_write(w, tx_size != TX_4X4, tx_probs[0]); if (tx_size != TX_4X4 && max_tx_size >= TX_16X16) { - vpx_write(w, tx_size != TX_8X8, tx_probs[1]); + aom_write(w, tx_size != TX_8X8, tx_probs[1]); if (tx_size != TX_8X8 && max_tx_size >= TX_32X32) - vpx_write(w, tx_size != TX_16X16, tx_probs[2]); + aom_write(w, tx_size != TX_16X16, tx_probs[2]); } } static int write_skip(const VP10_COMMON *cm, const MACROBLOCKD *xd, - int segment_id, const MODE_INFO *mi, vpx_writer *w) { + int segment_id, const MODE_INFO *mi, aom_writer *w) { if (segfeature_active(&cm->seg, segment_id, SEG_LVL_SKIP)) { return 1; } else { const int skip = mi->mbmi.skip; - vpx_write(w, skip, vp10_get_skip_prob(cm, xd)); + aom_write(w, skip, vp10_get_skip_prob(cm, xd)); return skip; } } -static void update_skip_probs(VP10_COMMON *cm, vpx_writer *w, +static void update_skip_probs(VP10_COMMON *cm, aom_writer *w, FRAME_COUNTS *counts) { int k; @@ -144,7 +144,7 @@ static void update_skip_probs(VP10_COMMON *cm, vpx_writer *w, vp10_cond_prob_diff_update(w, &cm->fc->skip_probs[k], counts->skip[k]); } -static void update_switchable_interp_probs(VP10_COMMON *cm, vpx_writer *w, +static void update_switchable_interp_probs(VP10_COMMON *cm, aom_writer *w, FRAME_COUNTS *counts) { int j; for (j = 0; j < SWITCHABLE_FILTER_CONTEXTS; ++j) @@ -153,7 +153,7 @@ static void update_switchable_interp_probs(VP10_COMMON *cm, vpx_writer *w, counts->switchable_interp[j], SWITCHABLE_FILTERS, w); } -static void update_ext_tx_probs(VP10_COMMON *cm, vpx_writer *w) { +static void update_ext_tx_probs(VP10_COMMON *cm, aom_writer *w) { const int savings_thresh = vp10_cost_one(GROUP_DIFF_UPDATE_PROB) - vp10_cost_zero(GROUP_DIFF_UPDATE_PROB); int i, j; @@ -167,7 +167,7 @@ static void update_ext_tx_probs(VP10_COMMON *cm, vpx_writer *w) { cm->counts.intra_ext_tx[i][j], TX_TYPES); } do_update = savings > savings_thresh; - vpx_write(w, do_update, GROUP_DIFF_UPDATE_PROB); + aom_write(w, do_update, GROUP_DIFF_UPDATE_PROB); if (do_update) { for (i = TX_4X4; i < EXT_TX_SIZES; ++i) { for (j = 0; j < TX_TYPES; ++j) @@ -182,7 +182,7 @@ static void update_ext_tx_probs(VP10_COMMON *cm, vpx_writer *w) { cm->counts.inter_ext_tx[i], TX_TYPES); } do_update = savings > savings_thresh; - vpx_write(w, do_update, GROUP_DIFF_UPDATE_PROB); + aom_write(w, do_update, GROUP_DIFF_UPDATE_PROB); if (do_update) { for (i = TX_4X4; i < EXT_TX_SIZES; ++i) { prob_diff_update(vp10_ext_tx_tree, cm->fc->inter_ext_tx_prob[i], @@ -191,9 +191,9 @@ static void update_ext_tx_probs(VP10_COMMON *cm, vpx_writer *w) { } } -static void pack_mb_tokens(vpx_writer *w, TOKENEXTRA **tp, +static void pack_mb_tokens(aom_writer *w, TOKENEXTRA **tp, const TOKENEXTRA *const stop, - vpx_bit_depth_t bit_depth, const TX_SIZE tx) { + aom_bit_depth_t bit_depth, const TX_SIZE tx) { TOKENEXTRA *p = *tp; #if !CONFIG_MISC_FIXES (void)tx; @@ -263,13 +263,13 @@ static void pack_mb_tokens(vpx_writer *w, TOKENEXTRA **tp, skip_bits--; assert(!bb); } else { - vpx_write(w, bb, pb[i >> 1]); + aom_write(w, bb, pb[i >> 1]); } i = b->tree[i + bb]; } while (n); } - vpx_write_bit(w, e & 1); + aom_write_bit(w, e & 1); } ++p; } @@ -277,7 +277,7 @@ static void pack_mb_tokens(vpx_writer *w, TOKENEXTRA **tp, *tp = p; } -static void write_segment_id(vpx_writer *w, const struct segmentation *seg, +static void write_segment_id(aom_writer *w, const struct segmentation *seg, const struct segmentation_probs *segp, int segment_id) { if (seg->enabled && seg->update_map) @@ -286,7 +286,7 @@ static void write_segment_id(vpx_writer *w, const struct segmentation *seg, // This function encodes the reference frame static void write_ref_frames(const VP10_COMMON *cm, const MACROBLOCKD *xd, - vpx_writer *w) { + aom_writer *w) { const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi; const int is_compound = has_second_ref(mbmi); const int segment_id = mbmi->segment_id; @@ -301,27 +301,27 @@ static void write_ref_frames(const VP10_COMMON *cm, const MACROBLOCKD *xd, // does the feature use compound prediction or not // (if not specified at the frame/segment level) if (cm->reference_mode == REFERENCE_MODE_SELECT) { - vpx_write(w, is_compound, vp10_get_reference_mode_prob(cm, xd)); + aom_write(w, is_compound, vp10_get_reference_mode_prob(cm, xd)); } else { assert((!is_compound) == (cm->reference_mode == SINGLE_REFERENCE)); } if (is_compound) { - vpx_write(w, mbmi->ref_frame[0] == GOLDEN_FRAME, + aom_write(w, mbmi->ref_frame[0] == GOLDEN_FRAME, vp10_get_pred_prob_comp_ref_p(cm, xd)); } else { const int bit0 = mbmi->ref_frame[0] != LAST_FRAME; - vpx_write(w, bit0, vp10_get_pred_prob_single_ref_p1(cm, xd)); + aom_write(w, bit0, vp10_get_pred_prob_single_ref_p1(cm, xd)); if (bit0) { const int bit1 = mbmi->ref_frame[0] != GOLDEN_FRAME; - vpx_write(w, bit1, vp10_get_pred_prob_single_ref_p2(cm, xd)); + aom_write(w, bit1, vp10_get_pred_prob_single_ref_p2(cm, xd)); } } } } static void pack_inter_mode_mvs(VP10_COMP *cpi, const MODE_INFO *mi, - vpx_writer *w) { + aom_writer *w) { VP10_COMMON *const cm = &cpi->common; const nmv_context *nmvc = &cm->fc->nmvc; const MACROBLOCK *const x = &cpi->td.mb; @@ -345,8 +345,8 @@ static void pack_inter_mode_mvs(VP10_COMP *cpi, const MODE_INFO *mi, if (seg->update_map) { if (seg->temporal_update) { const int pred_flag = mbmi->seg_id_predicted; - vpx_prob pred_prob = vp10_get_pred_prob_seg_id(segp, xd); - vpx_write(w, pred_flag, pred_prob); + aom_prob pred_prob = vp10_get_pred_prob_seg_id(segp, xd); + aom_write(w, pred_flag, pred_prob); if (!pred_flag) write_segment_id(w, seg, segp, segment_id); } else { write_segment_id(w, seg, segp, segment_id); @@ -356,7 +356,7 @@ static void pack_inter_mode_mvs(VP10_COMP *cpi, const MODE_INFO *mi, skip = write_skip(cm, xd, segment_id, mi, w); if (!segfeature_active(seg, segment_id, SEG_LVL_REF_FRAME)) - vpx_write(w, is_inter, vp10_get_intra_inter_prob(cm, xd)); + aom_write(w, is_inter, vp10_get_intra_inter_prob(cm, xd)); if (bsize >= BLOCK_8X8 && cm->tx_mode == TX_MODE_SELECT && !(is_inter && skip) && !xd->lossless[segment_id]) { @@ -380,7 +380,7 @@ static void pack_inter_mode_mvs(VP10_COMP *cpi, const MODE_INFO *mi, write_intra_mode(w, mbmi->uv_mode, cm->fc->uv_mode_prob[mode]); } else { const int mode_ctx = mbmi_ext->mode_context[mbmi->ref_frame[0]]; - const vpx_prob *const inter_probs = cm->fc->inter_mode_probs[mode_ctx]; + const aom_prob *const inter_probs = cm->fc->inter_mode_probs[mode_ctx]; write_ref_frames(cm, xd, w); // If segment skip is not enabled code the mode. @@ -445,7 +445,7 @@ static void pack_inter_mode_mvs(VP10_COMP *cpi, const MODE_INFO *mi, } static void write_mb_modes_kf(const VP10_COMMON *cm, const MACROBLOCKD *xd, - MODE_INFO **mi_8x8, vpx_writer *w) { + MODE_INFO **mi_8x8, aom_writer *w) { const struct segmentation *const seg = &cm->seg; #if CONFIG_MISC_FIXES const struct segmentation_probs *const segp = &cm->fc->seg; @@ -496,7 +496,7 @@ static void write_mb_modes_kf(const VP10_COMMON *cm, const MACROBLOCKD *xd, } static void write_modes_b(VP10_COMP *cpi, const TileInfo *const tile, - vpx_writer *w, TOKENEXTRA **tok, + aom_writer *w, TOKENEXTRA **tok, const TOKENEXTRA *const tok_end, int mi_row, int mi_col) { const VP10_COMMON *const cm = &cpi->common; @@ -533,9 +533,9 @@ static void write_modes_b(VP10_COMP *cpi, const TileInfo *const tile, static void write_partition(const VP10_COMMON *const cm, const MACROBLOCKD *const xd, int hbs, int mi_row, int mi_col, PARTITION_TYPE p, BLOCK_SIZE bsize, - vpx_writer *w) { + aom_writer *w) { const int ctx = partition_plane_context(xd, mi_row, mi_col, bsize); - const vpx_prob *const probs = cm->fc->partition_prob[ctx]; + const aom_prob *const probs = cm->fc->partition_prob[ctx]; const int has_rows = (mi_row + hbs) < cm->mi_rows; const int has_cols = (mi_col + hbs) < cm->mi_cols; @@ -543,17 +543,17 @@ static void write_partition(const VP10_COMMON *const cm, vp10_write_token(w, vp10_partition_tree, probs, &partition_encodings[p]); } else if (!has_rows && has_cols) { assert(p == PARTITION_SPLIT || p == PARTITION_HORZ); - vpx_write(w, p == PARTITION_SPLIT, probs[1]); + aom_write(w, p == PARTITION_SPLIT, probs[1]); } else if (has_rows && !has_cols) { assert(p == PARTITION_SPLIT || p == PARTITION_VERT); - vpx_write(w, p == PARTITION_SPLIT, probs[2]); + aom_write(w, p == PARTITION_SPLIT, probs[2]); } else { assert(p == PARTITION_SPLIT); } } static void write_modes_sb(VP10_COMP *cpi, const TileInfo *const tile, - vpx_writer *w, TOKENEXTRA **tok, + aom_writer *w, TOKENEXTRA **tok, const TOKENEXTRA *const tok_end, int mi_row, int mi_col, BLOCK_SIZE bsize) { const VP10_COMMON *const cm = &cpi->common; @@ -610,7 +610,7 @@ static void write_modes_sb(VP10_COMP *cpi, const TileInfo *const tile, #if DERING_REFINEMENT if (bsize == BLOCK_64X64 && cm->dering_level != 0 && !sb_all_skip(cm, mi_row, mi_col)) { - vpx_write_literal( + aom_write_literal( w, cm->mi_grid_visible[mi_row*cm->mi_stride + mi_col]->mbmi.dering_gain, DERING_REFINEMENT_BITS); } @@ -618,7 +618,7 @@ static void write_modes_sb(VP10_COMP *cpi, const TileInfo *const tile, } static void write_modes(VP10_COMP *cpi, const TileInfo *const tile, - vpx_writer *w, TOKENEXTRA **tok, + aom_writer *w, TOKENEXTRA **tok, const TOKENEXTRA *const tok_end) { MACROBLOCKD *const xd = &cpi->td.mb.e_mbd; int mi_row, mi_col; @@ -659,12 +659,12 @@ static void build_tree_distribution(VP10_COMP *cpi, TX_SIZE tx_size, } } -static void update_coef_probs_common(vpx_writer *const bc, VP10_COMP *cpi, +static void update_coef_probs_common(aom_writer *const bc, VP10_COMP *cpi, TX_SIZE tx_size, vp10_coeff_stats *frame_branch_ct, vp10_coeff_probs_model *new_coef_probs) { vp10_coeff_probs_model *old_coef_probs = cpi->common.fc->coef_probs[tx_size]; - const vpx_prob upd = DIFF_UPDATE_PROB; + const aom_prob upd = DIFF_UPDATE_PROB; const int entropy_nodes_update = UNCONSTRAINED_NODES; int i, j, k, l, t; int stepsize = cpi->sf.coeff_prob_appx_step; @@ -679,8 +679,8 @@ static void update_coef_probs_common(vpx_writer *const bc, VP10_COMP *cpi, for (k = 0; k < COEF_BANDS; ++k) { for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) { for (t = 0; t < entropy_nodes_update; ++t) { - vpx_prob newp = new_coef_probs[i][j][k][l][t]; - const vpx_prob oldp = old_coef_probs[i][j][k][l][t]; + aom_prob newp = new_coef_probs[i][j][k][l][t]; + const aom_prob oldp = old_coef_probs[i][j][k][l][t]; int s; int u = 0; if (t == PIVOT_NODE) @@ -705,19 +705,19 @@ static void update_coef_probs_common(vpx_writer *const bc, VP10_COMP *cpi, // printf("Update %d %d, savings %d\n", update[0], update[1], savings); /* Is coef updated at all */ if (update[1] == 0 || savings < 0) { - vpx_write_bit(bc, 0); + aom_write_bit(bc, 0); return; } - vpx_write_bit(bc, 1); + aom_write_bit(bc, 1); for (i = 0; i < PLANE_TYPES; ++i) { for (j = 0; j < REF_TYPES; ++j) { for (k = 0; k < COEF_BANDS; ++k) { for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) { // calc probs and branch cts for this frame only for (t = 0; t < entropy_nodes_update; ++t) { - vpx_prob newp = new_coef_probs[i][j][k][l][t]; - vpx_prob *oldp = old_coef_probs[i][j][k][l] + t; - const vpx_prob upd = DIFF_UPDATE_PROB; + aom_prob newp = new_coef_probs[i][j][k][l][t]; + aom_prob *oldp = old_coef_probs[i][j][k][l] + t; + const aom_prob upd = DIFF_UPDATE_PROB; int s; int u = 0; if (t == PIVOT_NODE) @@ -728,7 +728,7 @@ static void update_coef_probs_common(vpx_writer *const bc, VP10_COMP *cpi, s = vp10_prob_diff_update_savings_search( frame_branch_ct[i][j][k][l][t], *oldp, &newp, upd); if (s > 0 && newp != *oldp) u = 1; - vpx_write(bc, u, upd); + aom_write(bc, u, upd); if (u) { /* send/use new probability */ vp10_write_prob_diff_update(bc, newp, *oldp); @@ -751,8 +751,8 @@ static void update_coef_probs_common(vpx_writer *const bc, VP10_COMP *cpi, for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) { // calc probs and branch cts for this frame only for (t = 0; t < entropy_nodes_update; ++t) { - vpx_prob newp = new_coef_probs[i][j][k][l][t]; - vpx_prob *oldp = old_coef_probs[i][j][k][l] + t; + aom_prob newp = new_coef_probs[i][j][k][l][t]; + aom_prob *oldp = old_coef_probs[i][j][k][l] + t; int s; int u = 0; @@ -774,11 +774,11 @@ static void update_coef_probs_common(vpx_writer *const bc, VP10_COMP *cpi, if (u == 1 && updates == 1) { int v; // first update - vpx_write_bit(bc, 1); + aom_write_bit(bc, 1); for (v = 0; v < noupdates_before_first; ++v) - vpx_write(bc, 0, upd); + aom_write(bc, 0, upd); } - vpx_write(bc, u, upd); + aom_write(bc, u, upd); if (u) { /* send/use new probability */ vp10_write_prob_diff_update(bc, newp, *oldp); @@ -790,7 +790,7 @@ static void update_coef_probs_common(vpx_writer *const bc, VP10_COMP *cpi, } } if (updates == 0) { - vpx_write_bit(bc, 0); // no updates + aom_write_bit(bc, 0); // no updates } return; } @@ -798,7 +798,7 @@ static void update_coef_probs_common(vpx_writer *const bc, VP10_COMP *cpi, } } -static void update_coef_probs(VP10_COMP *cpi, vpx_writer *w) { +static void update_coef_probs(VP10_COMP *cpi, aom_writer *w) { const TX_MODE tx_mode = cpi->common.tx_mode; const TX_SIZE max_tx_size = tx_mode_to_biggest_tx_size[tx_mode]; TX_SIZE tx_size; @@ -807,7 +807,7 @@ static void update_coef_probs(VP10_COMP *cpi, vpx_writer *w) { vp10_coeff_probs_model frame_coef_probs[PLANE_TYPES]; if (cpi->td.counts->tx.tx_totals[tx_size] <= 20 || (tx_size >= TX_16X16 && cpi->sf.tx_size_search_method == USE_TX_8X8)) { - vpx_write_bit(w, 0); + aom_write_bit(w, 0); } else { build_tree_distribution(cpi, tx_size, frame_branch_ct, frame_coef_probs); update_coef_probs_common(w, cpi, tx_size, frame_branch_ct, @@ -817,37 +817,37 @@ static void update_coef_probs(VP10_COMP *cpi, vpx_writer *w) { } static void encode_loopfilter(struct loopfilter *lf, - struct vpx_write_bit_buffer *wb) { + struct aom_write_bit_buffer *wb) { int i; // Encode the loop filter level and type - vpx_wb_write_literal(wb, lf->filter_level, 6); - vpx_wb_write_literal(wb, lf->sharpness_level, 3); + aom_wb_write_literal(wb, lf->filter_level, 6); + aom_wb_write_literal(wb, lf->sharpness_level, 3); // Write out loop filter deltas applied at the MB level based on mode or // ref frame (if they are enabled). - vpx_wb_write_bit(wb, lf->mode_ref_delta_enabled); + aom_wb_write_bit(wb, lf->mode_ref_delta_enabled); if (lf->mode_ref_delta_enabled) { - vpx_wb_write_bit(wb, lf->mode_ref_delta_update); + aom_wb_write_bit(wb, lf->mode_ref_delta_update); if (lf->mode_ref_delta_update) { for (i = 0; i < MAX_REF_FRAMES; i++) { const int delta = lf->ref_deltas[i]; const int changed = delta != lf->last_ref_deltas[i]; - vpx_wb_write_bit(wb, changed); + aom_wb_write_bit(wb, changed); if (changed) { lf->last_ref_deltas[i] = delta; - vpx_wb_write_inv_signed_literal(wb, delta, 6); + aom_wb_write_inv_signed_literal(wb, delta, 6); } } for (i = 0; i < MAX_MODE_LF_DELTAS; i++) { const int delta = lf->mode_deltas[i]; const int changed = delta != lf->last_mode_deltas[i]; - vpx_wb_write_bit(wb, changed); + aom_wb_write_bit(wb, changed); if (changed) { lf->last_mode_deltas[i] = delta; - vpx_wb_write_inv_signed_literal(wb, delta, 6); + aom_wb_write_inv_signed_literal(wb, delta, 6); } } } @@ -856,43 +856,43 @@ static void encode_loopfilter(struct loopfilter *lf, #if CONFIG_CLPF static void encode_clpf(const VP10_COMMON *cm, - struct vpx_write_bit_buffer *wb) { - vpx_wb_write_literal(wb, cm->clpf, 1); + struct aom_write_bit_buffer *wb) { + aom_wb_write_literal(wb, cm->clpf, 1); } #endif #if CONFIG_DERING -static void encode_dering(int level, struct vpx_write_bit_buffer *wb) { - vpx_wb_write_literal(wb, level, DERING_LEVEL_BITS); +static void encode_dering(int level, struct aom_write_bit_buffer *wb) { + aom_wb_write_literal(wb, level, DERING_LEVEL_BITS); } #endif // CONFIG_DERING -static void write_delta_q(struct vpx_write_bit_buffer *wb, int delta_q) { +static void write_delta_q(struct aom_write_bit_buffer *wb, int delta_q) { if (delta_q != 0) { - vpx_wb_write_bit(wb, 1); - vpx_wb_write_inv_signed_literal(wb, delta_q, CONFIG_MISC_FIXES ? 6 : 4); + aom_wb_write_bit(wb, 1); + aom_wb_write_inv_signed_literal(wb, delta_q, CONFIG_MISC_FIXES ? 6 : 4); } else { - vpx_wb_write_bit(wb, 0); + aom_wb_write_bit(wb, 0); } } static void encode_quantization(const VP10_COMMON *const cm, - struct vpx_write_bit_buffer *wb) { - vpx_wb_write_literal(wb, cm->base_qindex, QINDEX_BITS); + struct aom_write_bit_buffer *wb) { + aom_wb_write_literal(wb, cm->base_qindex, QINDEX_BITS); write_delta_q(wb, cm->y_dc_delta_q); write_delta_q(wb, cm->uv_dc_delta_q); write_delta_q(wb, cm->uv_ac_delta_q); #if CONFIG_AOM_QM - vpx_wb_write_bit(wb, cm->using_qmatrix); + aom_wb_write_bit(wb, cm->using_qmatrix); if (cm->using_qmatrix) { - vpx_wb_write_literal(wb, cm->min_qmlevel, QM_LEVEL_BITS); - vpx_wb_write_literal(wb, cm->max_qmlevel, QM_LEVEL_BITS); + aom_wb_write_literal(wb, cm->min_qmlevel, QM_LEVEL_BITS); + aom_wb_write_literal(wb, cm->max_qmlevel, QM_LEVEL_BITS); } #endif } static void encode_segmentation(VP10_COMMON *cm, MACROBLOCKD *xd, - struct vpx_write_bit_buffer *wb) { + struct aom_write_bit_buffer *wb) { int i, j; const struct segmentation *seg = &cm->seg; @@ -900,12 +900,12 @@ static void encode_segmentation(VP10_COMMON *cm, MACROBLOCKD *xd, const struct segmentation_probs *segp = &cm->segp; #endif - vpx_wb_write_bit(wb, seg->enabled); + aom_wb_write_bit(wb, seg->enabled); if (!seg->enabled) return; // Segmentation map if (!frame_is_intra_only(cm) && !cm->error_resilient_mode) { - vpx_wb_write_bit(wb, seg->update_map); + aom_wb_write_bit(wb, seg->update_map); } else { assert(seg->update_map == 1); } @@ -917,14 +917,14 @@ static void encode_segmentation(VP10_COMMON *cm, MACROBLOCKD *xd, for (i = 0; i < SEG_TREE_PROBS; i++) { const int prob = segp->tree_probs[i]; const int update = prob != MAX_PROB; - vpx_wb_write_bit(wb, update); - if (update) vpx_wb_write_literal(wb, prob, 8); + aom_wb_write_bit(wb, update); + if (update) aom_wb_write_literal(wb, prob, 8); } #endif // Write out the chosen coding method. if (!frame_is_intra_only(cm) && !cm->error_resilient_mode) { - vpx_wb_write_bit(wb, seg->temporal_update); + aom_wb_write_bit(wb, seg->temporal_update); } else { assert(seg->temporal_update == 0); } @@ -934,29 +934,29 @@ static void encode_segmentation(VP10_COMMON *cm, MACROBLOCKD *xd, for (i = 0; i < PREDICTION_PROBS; i++) { const int prob = segp->pred_probs[i]; const int update = prob != MAX_PROB; - vpx_wb_write_bit(wb, update); - if (update) vpx_wb_write_literal(wb, prob, 8); + aom_wb_write_bit(wb, update); + if (update) aom_wb_write_literal(wb, prob, 8); } } #endif } // Segmentation data - vpx_wb_write_bit(wb, seg->update_data); + aom_wb_write_bit(wb, seg->update_data); if (seg->update_data) { - vpx_wb_write_bit(wb, seg->abs_delta); + aom_wb_write_bit(wb, seg->abs_delta); for (i = 0; i < MAX_SEGMENTS; i++) { for (j = 0; j < SEG_LVL_MAX; j++) { const int active = segfeature_active(seg, i, j); - vpx_wb_write_bit(wb, active); + aom_wb_write_bit(wb, active); if (active) { const int data = get_segdata(seg, i, j); const int data_max = vp10_seg_feature_data_max(j); if (vp10_is_segfeature_signed(j)) { encode_unsigned_max(wb, abs(data), data_max); - vpx_wb_write_bit(wb, data < 0); + aom_wb_write_bit(wb, data < 0); } else { encode_unsigned_max(wb, data, data_max); } @@ -967,7 +967,7 @@ static void encode_segmentation(VP10_COMMON *cm, MACROBLOCKD *xd, } #if CONFIG_MISC_FIXES -static void update_seg_probs(VP10_COMP *cpi, vpx_writer *w) { +static void update_seg_probs(VP10_COMP *cpi, aom_writer *w) { VP10_COMMON *cm = &cpi->common; if (!cpi->common.seg.enabled) return; @@ -987,18 +987,18 @@ static void update_seg_probs(VP10_COMP *cpi, vpx_writer *w) { } } -static void write_txfm_mode(TX_MODE mode, struct vpx_write_bit_buffer *wb) { - vpx_wb_write_bit(wb, mode == TX_MODE_SELECT); - if (mode != TX_MODE_SELECT) vpx_wb_write_literal(wb, mode, 2); +static void write_txfm_mode(TX_MODE mode, struct aom_write_bit_buffer *wb) { + aom_wb_write_bit(wb, mode == TX_MODE_SELECT); + if (mode != TX_MODE_SELECT) aom_wb_write_literal(wb, mode, 2); } #else -static void write_txfm_mode(TX_MODE mode, struct vpx_writer *wb) { - vpx_write_literal(wb, VPXMIN(mode, ALLOW_32X32), 2); - if (mode >= ALLOW_32X32) vpx_write_bit(wb, mode == TX_MODE_SELECT); +static void write_txfm_mode(TX_MODE mode, struct aom_writer *wb) { + aom_write_literal(wb, VPXMIN(mode, ALLOW_32X32), 2); + if (mode >= ALLOW_32X32) aom_write_bit(wb, mode == TX_MODE_SELECT); } #endif -static void update_txfm_probs(VP10_COMMON *cm, vpx_writer *w, +static void update_txfm_probs(VP10_COMMON *cm, aom_writer *w, FRAME_COUNTS *counts) { if (cm->tx_mode == TX_MODE_SELECT) { int i, j; @@ -1029,9 +1029,9 @@ static void update_txfm_probs(VP10_COMMON *cm, vpx_writer *w, } static void write_interp_filter(INTERP_FILTER filter, - struct vpx_write_bit_buffer *wb) { - vpx_wb_write_bit(wb, filter == SWITCHABLE); - if (filter != SWITCHABLE) vpx_wb_write_literal(wb, filter, 2); + struct aom_write_bit_buffer *wb) { + aom_wb_write_bit(wb, filter == SWITCHABLE); + if (filter != SWITCHABLE) aom_wb_write_literal(wb, filter, 2); } static void fix_interp_filter(VP10_COMMON *cm, FRAME_COUNTS *counts) { @@ -1058,19 +1058,19 @@ static void fix_interp_filter(VP10_COMMON *cm, FRAME_COUNTS *counts) { } static void write_tile_info(const VP10_COMMON *const cm, - struct vpx_write_bit_buffer *wb) { + struct aom_write_bit_buffer *wb) { int min_log2_tile_cols, max_log2_tile_cols, ones; vp10_get_tile_n_bits(cm->mi_cols, &min_log2_tile_cols, &max_log2_tile_cols); // columns ones = cm->log2_tile_cols - min_log2_tile_cols; - while (ones--) vpx_wb_write_bit(wb, 1); + while (ones--) aom_wb_write_bit(wb, 1); - if (cm->log2_tile_cols < max_log2_tile_cols) vpx_wb_write_bit(wb, 0); + if (cm->log2_tile_cols < max_log2_tile_cols) aom_wb_write_bit(wb, 0); // rows - vpx_wb_write_bit(wb, cm->log2_tile_rows != 0); - if (cm->log2_tile_rows != 0) vpx_wb_write_bit(wb, cm->log2_tile_rows != 1); + aom_wb_write_bit(wb, cm->log2_tile_rows != 0); + if (cm->log2_tile_rows != 0) aom_wb_write_bit(wb, cm->log2_tile_rows != 1); } static int get_refresh_mask(VP10_COMP *cpi) { @@ -1102,7 +1102,7 @@ static int get_refresh_mask(VP10_COMP *cpi) { static size_t encode_tiles(VP10_COMP *cpi, uint8_t *data_ptr, unsigned int *max_tile_sz) { VP10_COMMON *const cm = &cpi->common; - vpx_writer residual_bc; + aom_writer residual_bc; int tile_row, tile_col; TOKENEXTRA *tok_end; size_t total_size = 0; @@ -1122,14 +1122,14 @@ static size_t encode_tiles(VP10_COMP *cpi, uint8_t *data_ptr, cpi->tok_count[tile_row][tile_col]; if (tile_col < tile_cols - 1 || tile_row < tile_rows - 1) - vpx_start_encode(&residual_bc, data_ptr + total_size + 4); + aom_start_encode(&residual_bc, data_ptr + total_size + 4); else - vpx_start_encode(&residual_bc, data_ptr + total_size); + aom_start_encode(&residual_bc, data_ptr + total_size); write_modes(cpi, &cpi->tile_data[tile_idx].tile_info, &residual_bc, &tok, tok_end); assert(tok == tok_end); - vpx_stop_encode(&residual_bc); + aom_stop_encode(&residual_bc); if (tile_col < tile_cols - 1 || tile_row < tile_rows - 1) { unsigned int tile_sz; @@ -1150,26 +1150,26 @@ static size_t encode_tiles(VP10_COMP *cpi, uint8_t *data_ptr, } static void write_render_size(const VP10_COMMON *cm, - struct vpx_write_bit_buffer *wb) { + struct aom_write_bit_buffer *wb) { const int scaling_active = cm->width != cm->render_width || cm->height != cm->render_height; - vpx_wb_write_bit(wb, scaling_active); + aom_wb_write_bit(wb, scaling_active); if (scaling_active) { - vpx_wb_write_literal(wb, cm->render_width - 1, 16); - vpx_wb_write_literal(wb, cm->render_height - 1, 16); + aom_wb_write_literal(wb, cm->render_width - 1, 16); + aom_wb_write_literal(wb, cm->render_height - 1, 16); } } static void write_frame_size(const VP10_COMMON *cm, - struct vpx_write_bit_buffer *wb) { - vpx_wb_write_literal(wb, cm->width - 1, 16); - vpx_wb_write_literal(wb, cm->height - 1, 16); + struct aom_write_bit_buffer *wb) { + aom_wb_write_literal(wb, cm->width - 1, 16); + aom_wb_write_literal(wb, cm->height - 1, 16); write_render_size(cm, wb); } static void write_frame_size_with_refs(VP10_COMP *cpi, - struct vpx_write_bit_buffer *wb) { + struct aom_write_bit_buffer *wb) { VP10_COMMON *const cm = &cpi->common; int found = 0; @@ -1185,15 +1185,15 @@ static void write_frame_size_with_refs(VP10_COMP *cpi, cm->render_height == cfg->render_height; #endif } - vpx_wb_write_bit(wb, found); + aom_wb_write_bit(wb, found); if (found) { break; } } if (!found) { - vpx_wb_write_literal(wb, cm->width - 1, 16); - vpx_wb_write_literal(wb, cm->height - 1, 16); + aom_wb_write_literal(wb, cm->width - 1, 16); + aom_wb_write_literal(wb, cm->height - 1, 16); #if CONFIG_MISC_FIXES write_render_size(cm, wb); @@ -1205,84 +1205,84 @@ static void write_frame_size_with_refs(VP10_COMP *cpi, #endif } -static void write_sync_code(struct vpx_write_bit_buffer *wb) { - vpx_wb_write_literal(wb, VP10_SYNC_CODE_0, 8); - vpx_wb_write_literal(wb, VP10_SYNC_CODE_1, 8); - vpx_wb_write_literal(wb, VP10_SYNC_CODE_2, 8); +static void write_sync_code(struct aom_write_bit_buffer *wb) { + aom_wb_write_literal(wb, VP10_SYNC_CODE_0, 8); + aom_wb_write_literal(wb, VP10_SYNC_CODE_1, 8); + aom_wb_write_literal(wb, VP10_SYNC_CODE_2, 8); } static void write_profile(BITSTREAM_PROFILE profile, - struct vpx_write_bit_buffer *wb) { + struct aom_write_bit_buffer *wb) { switch (profile) { - case PROFILE_0: vpx_wb_write_literal(wb, 0, 2); break; - case PROFILE_1: vpx_wb_write_literal(wb, 2, 2); break; - case PROFILE_2: vpx_wb_write_literal(wb, 1, 2); break; - case PROFILE_3: vpx_wb_write_literal(wb, 6, 3); break; + case PROFILE_0: aom_wb_write_literal(wb, 0, 2); break; + case PROFILE_1: aom_wb_write_literal(wb, 2, 2); break; + case PROFILE_2: aom_wb_write_literal(wb, 1, 2); break; + case PROFILE_3: aom_wb_write_literal(wb, 6, 3); break; default: assert(0); } } static void write_bitdepth_colorspace_sampling( - VP10_COMMON *const cm, struct vpx_write_bit_buffer *wb) { + VP10_COMMON *const cm, struct aom_write_bit_buffer *wb) { if (cm->profile >= PROFILE_2) { assert(cm->bit_depth > VPX_BITS_8); - vpx_wb_write_bit(wb, cm->bit_depth == VPX_BITS_10 ? 0 : 1); + aom_wb_write_bit(wb, cm->bit_depth == VPX_BITS_10 ? 0 : 1); } - vpx_wb_write_literal(wb, cm->color_space, 3); + aom_wb_write_literal(wb, cm->color_space, 3); if (cm->color_space != VPX_CS_SRGB) { // 0: [16, 235] (i.e. xvYCC), 1: [0, 255] - vpx_wb_write_bit(wb, cm->color_range); + aom_wb_write_bit(wb, cm->color_range); if (cm->profile == PROFILE_1 || cm->profile == PROFILE_3) { assert(cm->subsampling_x != 1 || cm->subsampling_y != 1); - vpx_wb_write_bit(wb, cm->subsampling_x); - vpx_wb_write_bit(wb, cm->subsampling_y); - vpx_wb_write_bit(wb, 0); // unused + aom_wb_write_bit(wb, cm->subsampling_x); + aom_wb_write_bit(wb, cm->subsampling_y); + aom_wb_write_bit(wb, 0); // unused } else { assert(cm->subsampling_x == 1 && cm->subsampling_y == 1); } } else { assert(cm->profile == PROFILE_1 || cm->profile == PROFILE_3); - vpx_wb_write_bit(wb, 0); // unused + aom_wb_write_bit(wb, 0); // unused } } static void write_uncompressed_header(VP10_COMP *cpi, - struct vpx_write_bit_buffer *wb) { + struct aom_write_bit_buffer *wb) { VP10_COMMON *const cm = &cpi->common; MACROBLOCKD *const xd = &cpi->td.mb.e_mbd; - vpx_wb_write_literal(wb, VPX_FRAME_MARKER, 2); + aom_wb_write_literal(wb, VPX_FRAME_MARKER, 2); write_profile(cm->profile, wb); - vpx_wb_write_bit(wb, 0); // show_existing_frame - vpx_wb_write_bit(wb, cm->frame_type); - vpx_wb_write_bit(wb, cm->show_frame); - vpx_wb_write_bit(wb, cm->error_resilient_mode); + aom_wb_write_bit(wb, 0); // show_existing_frame + aom_wb_write_bit(wb, cm->frame_type); + aom_wb_write_bit(wb, cm->show_frame); + aom_wb_write_bit(wb, cm->error_resilient_mode); if (cm->frame_type == KEY_FRAME) { write_sync_code(wb); write_bitdepth_colorspace_sampling(cm, wb); write_frame_size(cm, wb); } else { - if (!cm->show_frame) vpx_wb_write_bit(wb, cm->intra_only); + if (!cm->show_frame) aom_wb_write_bit(wb, cm->intra_only); if (!cm->error_resilient_mode) { #if CONFIG_MISC_FIXES if (cm->intra_only) { - vpx_wb_write_bit(wb, + aom_wb_write_bit(wb, cm->reset_frame_context == RESET_FRAME_CONTEXT_ALL); } else { - vpx_wb_write_bit(wb, + aom_wb_write_bit(wb, cm->reset_frame_context != RESET_FRAME_CONTEXT_NONE); if (cm->reset_frame_context != RESET_FRAME_CONTEXT_NONE) - vpx_wb_write_bit(wb, + aom_wb_write_bit(wb, cm->reset_frame_context == RESET_FRAME_CONTEXT_ALL); } #else static const int reset_frame_context_conv_tbl[3] = { 0, 2, 3 }; - vpx_wb_write_literal( + aom_wb_write_literal( wb, reset_frame_context_conv_tbl[cm->reset_frame_context], 2); #endif } @@ -1299,21 +1299,21 @@ static void write_uncompressed_header(VP10_COMP *cpi, } #endif - vpx_wb_write_literal(wb, get_refresh_mask(cpi), REF_FRAMES); + aom_wb_write_literal(wb, get_refresh_mask(cpi), REF_FRAMES); write_frame_size(cm, wb); } else { MV_REFERENCE_FRAME ref_frame; - vpx_wb_write_literal(wb, get_refresh_mask(cpi), REF_FRAMES); + aom_wb_write_literal(wb, get_refresh_mask(cpi), REF_FRAMES); for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) { assert(get_ref_frame_map_idx(cpi, ref_frame) != INVALID_IDX); - vpx_wb_write_literal(wb, get_ref_frame_map_idx(cpi, ref_frame), + aom_wb_write_literal(wb, get_ref_frame_map_idx(cpi, ref_frame), REF_FRAMES_LOG2); - vpx_wb_write_bit(wb, cm->ref_frame_sign_bias[ref_frame]); + aom_wb_write_bit(wb, cm->ref_frame_sign_bias[ref_frame]); } write_frame_size_with_refs(cpi, wb); - vpx_wb_write_bit(wb, cm->allow_high_precision_mv); + aom_wb_write_bit(wb, cm->allow_high_precision_mv); fix_interp_filter(cm, cpi->td.counts); write_interp_filter(cm->interp_filter, wb); @@ -1321,16 +1321,16 @@ static void write_uncompressed_header(VP10_COMP *cpi, } if (!cm->error_resilient_mode) { - vpx_wb_write_bit(wb, + aom_wb_write_bit(wb, cm->refresh_frame_context != REFRESH_FRAME_CONTEXT_OFF); #if CONFIG_MISC_FIXES if (cm->refresh_frame_context != REFRESH_FRAME_CONTEXT_OFF) #endif - vpx_wb_write_bit( + aom_wb_write_bit( wb, cm->refresh_frame_context != REFRESH_FRAME_CONTEXT_BACKWARD); } - vpx_wb_write_literal(wb, cm->frame_context_idx, FRAME_CONTEXTS_LOG2); + aom_wb_write_literal(wb, cm->frame_context_idx, FRAME_CONTEXTS_LOG2); encode_loopfilter(&cm->lf, wb); #if CONFIG_CLPF @@ -1350,8 +1350,8 @@ static void write_uncompressed_header(VP10_COMP *cpi, const int use_hybrid_pred = cm->reference_mode == REFERENCE_MODE_SELECT; const int use_compound_pred = cm->reference_mode != SINGLE_REFERENCE; - vpx_wb_write_bit(wb, use_hybrid_pred); - if (!use_hybrid_pred) vpx_wb_write_bit(wb, use_compound_pred); + aom_wb_write_bit(wb, use_hybrid_pred); + if (!use_hybrid_pred) aom_wb_write_bit(wb, use_compound_pred); } #endif @@ -1362,13 +1362,13 @@ static size_t write_compressed_header(VP10_COMP *cpi, uint8_t *data) { VP10_COMMON *const cm = &cpi->common; FRAME_CONTEXT *const fc = cm->fc; FRAME_COUNTS *counts = cpi->td.counts; - vpx_writer header_bc; + aom_writer header_bc; int i; #if CONFIG_MISC_FIXES int j; #endif - vpx_start_encode(&header_bc, data); + aom_start_encode(&header_bc, data); #if !CONFIG_MISC_FIXES if (cpi->td.mb.e_mbd.lossless[0]) { @@ -1419,9 +1419,9 @@ static size_t write_compressed_header(VP10_COMP *cpi, uint8_t *data) { #if !CONFIG_MISC_FIXES const int use_compound_pred = cm->reference_mode != SINGLE_REFERENCE; - vpx_write_bit(&header_bc, use_compound_pred); + aom_write_bit(&header_bc, use_compound_pred); if (use_compound_pred) { - vpx_write_bit(&header_bc, use_hybrid_pred); + aom_write_bit(&header_bc, use_hybrid_pred); if (use_hybrid_pred) for (i = 0; i < COMP_INTER_CONTEXTS; i++) vp10_cond_prob_diff_update(&header_bc, &fc->comp_inter_prob[i], @@ -1464,7 +1464,7 @@ static size_t write_compressed_header(VP10_COMP *cpi, uint8_t *data) { update_ext_tx_probs(cm, &header_bc); } - vpx_stop_encode(&header_bc); + aom_stop_encode(&header_bc); assert(header_bc.pos <= 0xffff); return header_bc.pos; @@ -1508,8 +1508,8 @@ static int remux_tiles(uint8_t *dest, const int sz, const int n_tiles, void vp10_pack_bitstream(VP10_COMP *const cpi, uint8_t *dest, size_t *size) { uint8_t *data = dest; size_t first_part_size, uncompressed_hdr_size, data_sz; - struct vpx_write_bit_buffer wb = { data, 0 }; - struct vpx_write_bit_buffer saved_wb; + struct aom_write_bit_buffer wb = { data, 0 }; + struct aom_write_bit_buffer saved_wb; unsigned int max_tile; #if CONFIG_MISC_FIXES VP10_COMMON *const cm = &cpi->common; @@ -1523,12 +1523,12 @@ void vp10_pack_bitstream(VP10_COMP *const cpi, uint8_t *dest, size_t *size) { write_uncompressed_header(cpi, &wb); saved_wb = wb; // don't know in advance first part. size - vpx_wb_write_literal(&wb, 0, 16 + have_tiles * 2); + aom_wb_write_literal(&wb, 0, 16 + have_tiles * 2); - uncompressed_hdr_size = vpx_wb_bytes_written(&wb); + uncompressed_hdr_size = aom_wb_bytes_written(&wb); data += uncompressed_hdr_size; - vpx_clear_system_state(); + aom_clear_system_state(); first_part_size = write_compressed_header(cpi, data); data += first_part_size; @@ -1546,7 +1546,7 @@ void vp10_pack_bitstream(VP10_COMP *const cpi, uint8_t *dest, size_t *size) { mask |= 0xff; } assert(n_log2_tiles > 0); - vpx_wb_write_literal(&saved_wb, mag, 2); + aom_wb_write_literal(&saved_wb, mag, 2); if (mag < 3) data_sz = remux_tiles(data, (int)data_sz, 1 << n_log2_tiles, mag); } else { @@ -1556,7 +1556,7 @@ void vp10_pack_bitstream(VP10_COMP *const cpi, uint8_t *dest, size_t *size) { data += data_sz; // TODO(jbb): Figure out what to do if first_part_size > 16 bits. - vpx_wb_write_literal(&saved_wb, (int)first_part_size, 16); + aom_wb_write_literal(&saved_wb, (int)first_part_size, 16); *size = data - dest; } diff --git a/av1/encoder/blockiness.c b/av1/encoder/blockiness.c index e36dc977aa3d2218ab3f027e92c0f91ab633d534..36d44109173d00ec13346ae6c21d3e1bcb71327b 100644 --- a/av1/encoder/blockiness.c +++ b/av1/encoder/blockiness.c @@ -10,13 +10,13 @@ */ #include "./av1_rtcd.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "av1/common/common.h" #include "av1/common/filter.h" -#include "aom/vpx_integer.h" -#include "aom_dsp/vpx_convolve.h" -#include "aom_dsp/vpx_filter.h" +#include "aom/aom_integer.h" +#include "aom_dsp/aom_convolve.h" +#include "aom_dsp/aom_filter.h" #include "aom_ports/mem.h" #include "aom_ports/system_state.h" @@ -125,7 +125,7 @@ double vp10_get_blockiness(const unsigned char *img1, int img1_pitch, int height) { double blockiness = 0; int i, j; - vpx_clear_system_state(); + aom_clear_system_state(); for (i = 0; i < height; i += 4, img1 += img1_pitch * 4, img2 += img2_pitch * 4) { for (j = 0; j < width; j += 4) { diff --git a/av1/encoder/context_tree.c b/av1/encoder/context_tree.c index 00a289e0647e8e42870c495cd55436ffecdf26d4..d89022ecff284a84292150cced7fb6ced2a14f8b 100644 --- a/av1/encoder/context_tree.c +++ b/av1/encoder/context_tree.c @@ -23,17 +23,17 @@ static void alloc_mode_context(VP10_COMMON *cm, int num_4x4_blk, int i, k; ctx->num_4x4_blk = num_blk; - CHECK_MEM_ERROR(cm, ctx->zcoeff_blk, vpx_calloc(num_blk, sizeof(uint8_t))); + CHECK_MEM_ERROR(cm, ctx->zcoeff_blk, aom_calloc(num_blk, sizeof(uint8_t))); for (i = 0; i < MAX_MB_PLANE; ++i) { for (k = 0; k < 3; ++k) { CHECK_MEM_ERROR(cm, ctx->coeff[i][k], - vpx_memalign(32, num_pix * sizeof(*ctx->coeff[i][k]))); + aom_memalign(32, num_pix * sizeof(*ctx->coeff[i][k]))); CHECK_MEM_ERROR(cm, ctx->qcoeff[i][k], - vpx_memalign(32, num_pix * sizeof(*ctx->qcoeff[i][k]))); + aom_memalign(32, num_pix * sizeof(*ctx->qcoeff[i][k]))); CHECK_MEM_ERROR(cm, ctx->dqcoeff[i][k], - vpx_memalign(32, num_pix * sizeof(*ctx->dqcoeff[i][k]))); + aom_memalign(32, num_pix * sizeof(*ctx->dqcoeff[i][k]))); CHECK_MEM_ERROR(cm, ctx->eobs[i][k], - vpx_memalign(32, num_blk * sizeof(*ctx->eobs[i][k]))); + aom_memalign(32, num_blk * sizeof(*ctx->eobs[i][k]))); ctx->coeff_pbuf[i][k] = ctx->coeff[i][k]; ctx->qcoeff_pbuf[i][k] = ctx->qcoeff[i][k]; ctx->dqcoeff_pbuf[i][k] = ctx->dqcoeff[i][k]; @@ -44,23 +44,23 @@ static void alloc_mode_context(VP10_COMMON *cm, int num_4x4_blk, static void free_mode_context(PICK_MODE_CONTEXT *ctx) { int i, k; - vpx_free(ctx->zcoeff_blk); + aom_free(ctx->zcoeff_blk); ctx->zcoeff_blk = 0; for (i = 0; i < MAX_MB_PLANE; ++i) { for (k = 0; k < 3; ++k) { - vpx_free(ctx->coeff[i][k]); + aom_free(ctx->coeff[i][k]); ctx->coeff[i][k] = 0; - vpx_free(ctx->qcoeff[i][k]); + aom_free(ctx->qcoeff[i][k]); ctx->qcoeff[i][k] = 0; - vpx_free(ctx->dqcoeff[i][k]); + aom_free(ctx->dqcoeff[i][k]); ctx->dqcoeff[i][k] = 0; - vpx_free(ctx->eobs[i][k]); + aom_free(ctx->eobs[i][k]); ctx->eobs[i][k] = 0; } } for (i = 0; i < 2; ++i) { - vpx_free(ctx->color_index_map[i]); + aom_free(ctx->color_index_map[i]); ctx->color_index_map[i] = 0; } } @@ -102,12 +102,12 @@ void vp10_setup_pc_tree(VP10_COMMON *cm, ThreadData *td) { int square_index = 1; int nodes; - vpx_free(td->leaf_tree); + aom_free(td->leaf_tree); CHECK_MEM_ERROR(cm, td->leaf_tree, - vpx_calloc(leaf_nodes, sizeof(*td->leaf_tree))); - vpx_free(td->pc_tree); + aom_calloc(leaf_nodes, sizeof(*td->leaf_tree))); + aom_free(td->pc_tree); CHECK_MEM_ERROR(cm, td->pc_tree, - vpx_calloc(tree_nodes, sizeof(*td->pc_tree))); + aom_calloc(tree_nodes, sizeof(*td->pc_tree))); this_pc = &td->pc_tree[0]; this_leaf = &td->leaf_tree[0]; @@ -151,8 +151,8 @@ void vp10_free_pc_tree(ThreadData *td) { // Sets up all the leaf nodes in the tree. for (i = 0; i < tree_nodes; ++i) free_tree_contexts(&td->pc_tree[i]); - vpx_free(td->pc_tree); + aom_free(td->pc_tree); td->pc_tree = NULL; - vpx_free(td->leaf_tree); + aom_free(td->leaf_tree); td->leaf_tree = NULL; } diff --git a/av1/encoder/cost.c b/av1/encoder/cost.c index c1300ae3d2b8152016f32376b7117e6fa70568d9..acf4a4722f7d0b5a426dc782c3ba8b04fa626a47 100644 --- a/av1/encoder/cost.c +++ b/av1/encoder/cost.c @@ -38,14 +38,14 @@ const uint16_t vp10_prob_cost[257] = { 26, 23, 20, 18, 15, 12, 9, 6, 3, 3 }; -static void cost(int *costs, vpx_tree tree, const vpx_prob *probs, int i, +static void cost(int *costs, aom_tree tree, const aom_prob *probs, int i, int c) { - const vpx_prob prob = probs[i / 2]; + const aom_prob prob = probs[i / 2]; int b; for (b = 0; b <= 1; ++b) { const int cc = c + vp10_cost_bit(prob, b); - const vpx_tree_index ii = tree[i + b]; + const aom_tree_index ii = tree[i + b]; if (ii <= 0) costs[-ii] = cc; @@ -54,11 +54,11 @@ static void cost(int *costs, vpx_tree tree, const vpx_prob *probs, int i, } } -void vp10_cost_tokens(int *costs, const vpx_prob *probs, vpx_tree tree) { +void vp10_cost_tokens(int *costs, const aom_prob *probs, aom_tree tree) { cost(costs, tree, probs, 0, 0); } -void vp10_cost_tokens_skip(int *costs, const vpx_prob *probs, vpx_tree tree) { +void vp10_cost_tokens_skip(int *costs, const aom_prob *probs, aom_tree tree) { assert(tree[0] <= 0 && tree[1] > 0); costs[-tree[0]] = vp10_cost_bit(probs[0], 0); diff --git a/av1/encoder/cost.h b/av1/encoder/cost.h index 83b7a29527513a7a628d13a54cdeee610473527b..be12464a0b4c5e84c4e1cdeec1daca3accc23d2e 100644 --- a/av1/encoder/cost.h +++ b/av1/encoder/cost.h @@ -13,7 +13,7 @@ #define VP10_ENCODER_COST_H_ #include "aom_dsp/prob.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { @@ -31,14 +31,14 @@ extern const uint16_t vp10_prob_cost[257]; #define vp10_cost_bit(prob, bit) vp10_cost_zero((bit) ? 256 - (prob) : (prob)) static INLINE unsigned int cost_branch256(const unsigned int ct[2], - vpx_prob p) { + aom_prob p) { return ct[0] * vp10_cost_zero(p) + ct[1] * vp10_cost_one(p); } -static INLINE int treed_cost(vpx_tree tree, const vpx_prob *probs, int bits, +static INLINE int treed_cost(aom_tree tree, const aom_prob *probs, int bits, int len) { int cost = 0; - vpx_tree_index i = 0; + aom_tree_index i = 0; do { const int bit = (bits >> --len) & 1; @@ -49,8 +49,8 @@ static INLINE int treed_cost(vpx_tree tree, const vpx_prob *probs, int bits, return cost; } -void vp10_cost_tokens(int *costs, const vpx_prob *probs, vpx_tree tree); -void vp10_cost_tokens_skip(int *costs, const vpx_prob *probs, vpx_tree tree); +void vp10_cost_tokens(int *costs, const aom_prob *probs, aom_tree tree); +void vp10_cost_tokens_skip(int *costs, const aom_prob *probs, aom_tree tree); #ifdef __cplusplus } // extern "C" diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c index 3fcc634270407278c6b6d16695cce4f67f5c7cca..30456f805e4d1b0c0e23a0916098206d314429ec 100644 --- a/av1/encoder/dct.c +++ b/av1/encoder/dct.c @@ -13,8 +13,8 @@ #include <math.h> #include "./av1_rtcd.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "av1/common/blockd.h" #include "av1/common/idct.h" @@ -991,7 +991,7 @@ static const transform_2d FHT_16[] = { void vp10_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, int tx_type) { if (tx_type == DCT_DCT) { - vpx_fdct4x4_c(input, output, stride); + aom_fdct4x4_c(input, output, stride); } else { tran_low_t out[4 * 4]; int i, j; @@ -1144,7 +1144,7 @@ void vp10_fdct8x8_quant_c(const int16_t *input, int stride, void vp10_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, int tx_type) { if (tx_type == DCT_DCT) { - vpx_fdct8x8_c(input, output, stride); + aom_fdct8x8_c(input, output, stride); } else { tran_low_t out[64]; int i, j; @@ -1227,7 +1227,7 @@ void vp10_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride) { void vp10_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, int tx_type) { if (tx_type == DCT_DCT) { - vpx_fdct16x16_c(input, output, stride); + aom_fdct16x16_c(input, output, stride); } else { tran_low_t out[256]; int i, j; diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c index d2c01ceeefb94e6d271cbb302a0a3104db6f80f5..3495262aff020999a43989c01f955ccb84ce5079 100644 --- a/av1/encoder/encodeframe.c +++ b/av1/encoder/encodeframe.c @@ -14,12 +14,12 @@ #include <stdio.h> #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" -#include "./vpx_config.h" +#include "./aom_dsp_rtcd.h" +#include "./aom_config.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" -#include "aom_ports/vpx_timer.h" +#include "aom_ports/aom_timer.h" #include "aom_ports/system_state.h" #include "av1/common/common.h" @@ -523,14 +523,14 @@ static int compute_minmax_8x8(const uint8_t *s, int sp, const uint8_t *d, if (x8_idx < pixels_wide && y8_idx < pixels_high) { #if CONFIG_VPX_HIGHBITDEPTH if (highbd_flag & YV12_FLAG_HIGHBITDEPTH) { - vpx_highbd_minmax_8x8(s + y8_idx * sp + x8_idx, sp, + aom_highbd_minmax_8x8(s + y8_idx * sp + x8_idx, sp, d + y8_idx * dp + x8_idx, dp, &min, &max); } else { - vpx_minmax_8x8(s + y8_idx * sp + x8_idx, sp, d + y8_idx * dp + x8_idx, + aom_minmax_8x8(s + y8_idx * sp + x8_idx, sp, d + y8_idx * dp + x8_idx, dp, &min, &max); } #else - vpx_minmax_8x8(s + y8_idx * sp + x8_idx, sp, d + y8_idx * dp + x8_idx, dp, + aom_minmax_8x8(s + y8_idx * sp + x8_idx, sp, d + y8_idx * dp + x8_idx, dp, &min, &max); #endif if ((max - min) > minmax_max) minmax_max = (max - min); @@ -558,16 +558,16 @@ static void fill_variance_4x4avg(const uint8_t *s, int sp, const uint8_t *d, int d_avg = 128; #if CONFIG_VPX_HIGHBITDEPTH if (highbd_flag & YV12_FLAG_HIGHBITDEPTH) { - s_avg = vpx_highbd_avg_4x4(s + y4_idx * sp + x4_idx, sp); + s_avg = aom_highbd_avg_4x4(s + y4_idx * sp + x4_idx, sp); if (!is_key_frame) - d_avg = vpx_highbd_avg_4x4(d + y4_idx * dp + x4_idx, dp); + d_avg = aom_highbd_avg_4x4(d + y4_idx * dp + x4_idx, dp); } else { - s_avg = vpx_avg_4x4(s + y4_idx * sp + x4_idx, sp); - if (!is_key_frame) d_avg = vpx_avg_4x4(d + y4_idx * dp + x4_idx, dp); + s_avg = aom_avg_4x4(s + y4_idx * sp + x4_idx, sp); + if (!is_key_frame) d_avg = aom_avg_4x4(d + y4_idx * dp + x4_idx, dp); } #else - s_avg = vpx_avg_4x4(s + y4_idx * sp + x4_idx, sp); - if (!is_key_frame) d_avg = vpx_avg_4x4(d + y4_idx * dp + x4_idx, dp); + s_avg = aom_avg_4x4(s + y4_idx * sp + x4_idx, sp); + if (!is_key_frame) d_avg = aom_avg_4x4(d + y4_idx * dp + x4_idx, dp); #endif sum = s_avg - d_avg; sse = sum * sum; @@ -594,16 +594,16 @@ static void fill_variance_8x8avg(const uint8_t *s, int sp, const uint8_t *d, int d_avg = 128; #if CONFIG_VPX_HIGHBITDEPTH if (highbd_flag & YV12_FLAG_HIGHBITDEPTH) { - s_avg = vpx_highbd_avg_8x8(s + y8_idx * sp + x8_idx, sp); + s_avg = aom_highbd_avg_8x8(s + y8_idx * sp + x8_idx, sp); if (!is_key_frame) - d_avg = vpx_highbd_avg_8x8(d + y8_idx * dp + x8_idx, dp); + d_avg = aom_highbd_avg_8x8(d + y8_idx * dp + x8_idx, dp); } else { - s_avg = vpx_avg_8x8(s + y8_idx * sp + x8_idx, sp); - if (!is_key_frame) d_avg = vpx_avg_8x8(d + y8_idx * dp + x8_idx, dp); + s_avg = aom_avg_8x8(s + y8_idx * sp + x8_idx, sp); + if (!is_key_frame) d_avg = aom_avg_8x8(d + y8_idx * dp + x8_idx, dp); } #else - s_avg = vpx_avg_8x8(s + y8_idx * sp + x8_idx, sp); - if (!is_key_frame) d_avg = vpx_avg_8x8(d + y8_idx * dp + x8_idx, dp); + s_avg = aom_avg_8x8(s + y8_idx * sp + x8_idx, sp); + if (!is_key_frame) d_avg = aom_avg_8x8(d + y8_idx * dp + x8_idx, dp); #endif sum = s_avg - d_avg; sse = sum * sum; @@ -1042,7 +1042,7 @@ static int set_segment_rdmult(VP10_COMP *const cpi, MACROBLOCK *const x, int segment_qindex; VP10_COMMON *const cm = &cpi->common; vp10_init_plane_quantizers(cpi, x); - vpx_clear_system_state(); + aom_clear_system_state(); segment_qindex = vp10_get_qindex(&cm->seg, segment_id, cm->base_qindex); return vp10_compute_rd_mult(cpi, segment_qindex + cm->y_dc_delta_q); } @@ -1060,7 +1060,7 @@ static void rd_pick_sb_modes(VP10_COMP *cpi, TileDataEnc *tile_data, const AQ_MODE aq_mode = cpi->oxcf.aq_mode; int i, orig_rdmult; - vpx_clear_system_state(); + aom_clear_system_state(); // Use the lower precision, but faster, 32x32 fdct for mode selection. x->use_lp32x32fdct = 1; @@ -2480,8 +2480,8 @@ void vp10_init_tile_data(VP10_COMP *cpi) { int tile_tok = 0; if (cpi->tile_data == NULL || cpi->allocated_tiles < tile_cols * tile_rows) { - if (cpi->tile_data != NULL) vpx_free(cpi->tile_data); - CHECK_MEM_ERROR(cm, cpi->tile_data, vpx_malloc(tile_cols * tile_rows * + if (cpi->tile_data != NULL) aom_free(cpi->tile_data); + CHECK_MEM_ERROR(cm, cpi->tile_data, aom_malloc(tile_cols * tile_rows * sizeof(*cpi->tile_data))); cpi->allocated_tiles = tile_cols * tile_rows; @@ -2609,8 +2609,8 @@ static void encode_frame_internal(VP10_COMP *cpi) { vp10_zero(x->skip_txfm); { - struct vpx_usec_timer emr_timer; - vpx_usec_timer_start(&emr_timer); + struct aom_usec_timer emr_timer; + aom_usec_timer_start(&emr_timer); #if CONFIG_FP_MB_STATS if (cpi->use_fp_mb_stats) { @@ -2625,8 +2625,8 @@ static void encode_frame_internal(VP10_COMP *cpi) { else encode_tiles(cpi); - vpx_usec_timer_mark(&emr_timer); - cpi->time_encode_sb_row += vpx_usec_timer_elapsed(&emr_timer); + aom_usec_timer_mark(&emr_timer); + cpi->time_encode_sb_row += aom_usec_timer_elapsed(&emr_timer); } #if 0 diff --git a/av1/encoder/encodeframe.h b/av1/encoder/encodeframe.h index 915e9f25d7e1497b8da02bc0531ebc10156da5a6..2b70d730692be4b22fdb2b140627107758bc8fcb 100644 --- a/av1/encoder/encodeframe.h +++ b/av1/encoder/encodeframe.h @@ -12,7 +12,7 @@ #ifndef VP10_ENCODER_ENCODEFRAME_H_ #define VP10_ENCODER_ENCODEFRAME_H_ -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c index 22c590804cb3bfe33f34a5f5ce199bc7dcd1f087..a7d5f50dd40a7f51a312af0efb13b17dd8f3b170 100644 --- a/av1/encoder/encodemb.c +++ b/av1/encoder/encodemb.c @@ -10,11 +10,11 @@ */ #include "./av1_rtcd.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/quantize.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "av1/common/idct.h" @@ -40,13 +40,13 @@ void vp10_subtract_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { #if CONFIG_VPX_HIGHBITDEPTH if (x->e_mbd.cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { - vpx_highbd_subtract_block(bh, bw, p->src_diff, bw, p->src.buf, + aom_highbd_subtract_block(bh, bw, p->src_diff, bw, p->src.buf, p->src.stride, pd->dst.buf, pd->dst.stride, x->e_mbd.bd); return; } #endif // CONFIG_VPX_HIGHBITDEPTH - vpx_subtract_block(bh, bw, p->src_diff, bw, p->src.buf, p->src.stride, + aom_subtract_block(bh, bw, p->src_diff, bw, p->src.buf, p->src.stride, pd->dst.buf, pd->dst.stride); } @@ -336,18 +336,18 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block, TX_SIZE tx_size, static INLINE void fdct32x32(int rd_transform, const int16_t *src, tran_low_t *dst, int src_stride) { if (rd_transform) - vpx_fdct32x32_rd(src, dst, src_stride); + aom_fdct32x32_rd(src, dst, src_stride); else - vpx_fdct32x32(src, dst, src_stride); + aom_fdct32x32(src, dst, src_stride); } #if CONFIG_VPX_HIGHBITDEPTH static INLINE void highbd_fdct32x32(int rd_transform, const int16_t *src, tran_low_t *dst, int src_stride) { if (rd_transform) - vpx_highbd_fdct32x32_rd(src, dst, src_stride); + aom_highbd_fdct32x32_rd(src, dst, src_stride); else - vpx_highbd_fdct32x32(src, dst, src_stride); + aom_highbd_fdct32x32(src, dst, src_stride); } #endif // CONFIG_VPX_HIGHBITDEPTH @@ -358,7 +358,7 @@ void vp10_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff, } else { switch (tx_type) { case DCT_DCT: - vpx_fdct4x4(src_diff, coeff, diff_stride); + aom_fdct4x4(src_diff, coeff, diff_stride); break; case ADST_DCT: case DCT_ADST: @@ -429,7 +429,7 @@ void vp10_highbd_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff, } else { switch (tx_type) { case DCT_DCT: - vpx_highbd_fdct4x4(src_diff, coeff, diff_stride); + aom_highbd_fdct4x4(src_diff, coeff, diff_stride); break; case ADST_DCT: case DCT_ADST: @@ -447,7 +447,7 @@ static void highbd_fwd_txfm_8x8(const int16_t *src_diff, tran_low_t *coeff, int diff_stride, TX_TYPE tx_type) { switch (tx_type) { case DCT_DCT: - vpx_highbd_fdct8x8(src_diff, coeff, diff_stride); + aom_highbd_fdct8x8(src_diff, coeff, diff_stride); break; case ADST_DCT: case DCT_ADST: @@ -464,7 +464,7 @@ static void highbd_fwd_txfm_16x16(const int16_t *src_diff, tran_low_t *coeff, int diff_stride, TX_TYPE tx_type) { switch (tx_type) { case DCT_DCT: - vpx_highbd_fdct16x16(src_diff, coeff, diff_stride); + aom_highbd_fdct16x16(src_diff, coeff, diff_stride); break; case ADST_DCT: case DCT_ADST: @@ -534,7 +534,7 @@ void vp10_xform_quant_fp(MACROBLOCK *x, int plane, int block, int blk_row, #endif break; case TX_16X16: - vpx_highbd_fdct16x16(src_diff, coeff, diff_stride); + aom_highbd_fdct16x16(src_diff, coeff, diff_stride); vp10_highbd_quantize_fp(coeff, 256, x->skip_block, p->zbin, p->round_fp, p->quant_fp, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, @@ -545,7 +545,7 @@ void vp10_xform_quant_fp(MACROBLOCK *x, int plane, int block, int blk_row, #endif break; case TX_8X8: - vpx_highbd_fdct8x8(src_diff, coeff, diff_stride); + aom_highbd_fdct8x8(src_diff, coeff, diff_stride); vp10_highbd_quantize_fp(coeff, 64, x->skip_block, p->zbin, p->round_fp, p->quant_fp, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, @@ -559,7 +559,7 @@ void vp10_xform_quant_fp(MACROBLOCK *x, int plane, int block, int blk_row, if (xd->lossless[xd->mi[0]->mbmi.segment_id]) { vp10_highbd_fwht4x4(src_diff, coeff, diff_stride); } else { - vpx_highbd_fdct4x4(src_diff, coeff, diff_stride); + aom_highbd_fdct4x4(src_diff, coeff, diff_stride); } vp10_highbd_quantize_fp(coeff, 16, x->skip_block, p->zbin, p->round_fp, p->quant_fp, p->quant_shift, qcoeff, dqcoeff, @@ -590,7 +590,7 @@ void vp10_xform_quant_fp(MACROBLOCK *x, int plane, int block, int blk_row, #endif break; case TX_16X16: - vpx_fdct16x16(src_diff, coeff, diff_stride); + aom_fdct16x16(src_diff, coeff, diff_stride); vp10_quantize_fp(coeff, 256, x->skip_block, p->zbin, p->round_fp, p->quant_fp, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, @@ -614,7 +614,7 @@ void vp10_xform_quant_fp(MACROBLOCK *x, int plane, int block, int blk_row, if (xd->lossless[xd->mi[0]->mbmi.segment_id]) { vp10_fwht4x4(src_diff, coeff, diff_stride); } else { - vpx_fdct4x4(src_diff, coeff, diff_stride); + aom_fdct4x4(src_diff, coeff, diff_stride); } vp10_quantize_fp(coeff, 16, x->skip_block, p->zbin, p->round_fp, p->quant_fp, p->quant_shift, qcoeff, dqcoeff, @@ -654,8 +654,8 @@ void vp10_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { switch (tx_size) { case TX_32X32: - vpx_highbd_fdct32x32_1(src_diff, coeff, diff_stride); - vpx_highbd_quantize_dc_32x32(coeff, x->skip_block, p->round, + aom_highbd_fdct32x32_1(src_diff, coeff, diff_stride); + aom_highbd_quantize_dc_32x32(coeff, x->skip_block, p->round, p->quant_fp[0], qcoeff, dqcoeff, pd->dequant[0], #if !CONFIG_AOM_QM @@ -665,8 +665,8 @@ void vp10_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, #endif break; case TX_16X16: - vpx_highbd_fdct16x16_1(src_diff, coeff, diff_stride); - vpx_highbd_quantize_dc(coeff, 256, x->skip_block, p->round, + aom_highbd_fdct16x16_1(src_diff, coeff, diff_stride); + aom_highbd_quantize_dc(coeff, 256, x->skip_block, p->round, p->quant_fp[0], qcoeff, dqcoeff, pd->dequant[0], #if !CONFIG_AOM_QM eob); @@ -675,8 +675,8 @@ void vp10_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, #endif break; case TX_8X8: - vpx_highbd_fdct8x8_1(src_diff, coeff, diff_stride); - vpx_highbd_quantize_dc(coeff, 64, x->skip_block, p->round, + aom_highbd_fdct8x8_1(src_diff, coeff, diff_stride); + aom_highbd_quantize_dc(coeff, 64, x->skip_block, p->round, p->quant_fp[0], qcoeff, dqcoeff, pd->dequant[0], #if !CONFIG_AOM_QM eob); @@ -688,9 +688,9 @@ void vp10_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, if (xd->lossless[seg_id]) { vp10_highbd_fwht4x4(src_diff, coeff, diff_stride); } else { - vpx_highbd_fdct4x4(src_diff, coeff, diff_stride); + aom_highbd_fdct4x4(src_diff, coeff, diff_stride); } - vpx_highbd_quantize_dc(coeff, 16, x->skip_block, p->round, + aom_highbd_quantize_dc(coeff, 16, x->skip_block, p->round, p->quant_fp[0], qcoeff, dqcoeff, pd->dequant[0], #if !CONFIG_AOM_QM eob); @@ -707,8 +707,8 @@ void vp10_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, switch (tx_size) { case TX_32X32: - vpx_fdct32x32_1(src_diff, coeff, diff_stride); - vpx_quantize_dc_32x32(coeff, x->skip_block, p->round, p->quant_fp[0], + aom_fdct32x32_1(src_diff, coeff, diff_stride); + aom_quantize_dc_32x32(coeff, x->skip_block, p->round, p->quant_fp[0], qcoeff, dqcoeff, pd->dequant[0], #if !CONFIG_AOM_QM eob); @@ -717,8 +717,8 @@ void vp10_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, #endif break; case TX_16X16: - vpx_fdct16x16_1(src_diff, coeff, diff_stride); - vpx_quantize_dc(coeff, 256, x->skip_block, p->round, p->quant_fp[0], + aom_fdct16x16_1(src_diff, coeff, diff_stride); + aom_quantize_dc(coeff, 256, x->skip_block, p->round, p->quant_fp[0], qcoeff, dqcoeff, pd->dequant[0], #if !CONFIG_AOM_QM eob); @@ -727,8 +727,8 @@ void vp10_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, #endif break; case TX_8X8: - vpx_fdct8x8_1(src_diff, coeff, diff_stride); - vpx_quantize_dc(coeff, 64, x->skip_block, p->round, p->quant_fp[0], + aom_fdct8x8_1(src_diff, coeff, diff_stride); + aom_quantize_dc(coeff, 64, x->skip_block, p->round, p->quant_fp[0], qcoeff, dqcoeff, pd->dequant[0], #if !CONFIG_AOM_QM eob); @@ -740,9 +740,9 @@ void vp10_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, if (xd->lossless[seg_id]) { vp10_fwht4x4(src_diff, coeff, diff_stride); } else { - vpx_fdct4x4(src_diff, coeff, diff_stride); + aom_fdct4x4(src_diff, coeff, diff_stride); } - vpx_quantize_dc(coeff, 16, x->skip_block, p->round, p->quant_fp[0], + aom_quantize_dc(coeff, 16, x->skip_block, p->round, p->quant_fp[0], qcoeff, dqcoeff, pd->dequant[0], #if !CONFIG_AOM_QM eob); @@ -784,7 +784,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, case TX_32X32: highbd_fwd_txfm_32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride, tx_type); - vpx_highbd_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, + aom_highbd_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -795,7 +795,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, break; case TX_16X16: highbd_fwd_txfm_16x16(src_diff, coeff, diff_stride, tx_type); - vpx_highbd_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round, + aom_highbd_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -806,7 +806,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, break; case TX_8X8: highbd_fwd_txfm_8x8(src_diff, coeff, diff_stride, tx_type); - vpx_highbd_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, + aom_highbd_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -818,7 +818,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, case TX_4X4: vp10_highbd_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type, xd->lossless[seg_id]); - vpx_highbd_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, + aom_highbd_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -837,7 +837,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, switch (tx_size) { case TX_32X32: fwd_txfm_32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride, tx_type); - vpx_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round, + aom_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -848,7 +848,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, break; case TX_16X16: fwd_txfm_16x16(src_diff, coeff, diff_stride, tx_type); - vpx_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round, p->quant, + aom_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -859,7 +859,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, break; case TX_8X8: fwd_txfm_8x8(src_diff, coeff, diff_stride, tx_type); - vpx_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, p->quant, + aom_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -871,7 +871,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, case TX_4X4: vp10_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type, xd->lossless[seg_id]); - vpx_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant, + aom_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -1123,11 +1123,11 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col, switch (tx_size) { case TX_32X32: if (!x->skip_recode) { - vpx_highbd_subtract_block(32, 32, src_diff, diff_stride, src, + aom_highbd_subtract_block(32, 32, src_diff, diff_stride, src, src_stride, dst, dst_stride, xd->bd); highbd_fwd_txfm_32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride, tx_type); - vpx_highbd_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, + aom_highbd_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, @@ -1143,10 +1143,10 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col, break; case TX_16X16: if (!x->skip_recode) { - vpx_highbd_subtract_block(16, 16, src_diff, diff_stride, src, + aom_highbd_subtract_block(16, 16, src_diff, diff_stride, src, src_stride, dst, dst_stride, xd->bd); highbd_fwd_txfm_16x16(src_diff, coeff, diff_stride, tx_type); - vpx_highbd_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round, + aom_highbd_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -1161,10 +1161,10 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col, break; case TX_8X8: if (!x->skip_recode) { - vpx_highbd_subtract_block(8, 8, src_diff, diff_stride, src, + aom_highbd_subtract_block(8, 8, src_diff, diff_stride, src, src_stride, dst, dst_stride, xd->bd); highbd_fwd_txfm_8x8(src_diff, coeff, diff_stride, tx_type); - vpx_highbd_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, + aom_highbd_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -1179,11 +1179,11 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col, break; case TX_4X4: if (!x->skip_recode) { - vpx_highbd_subtract_block(4, 4, src_diff, diff_stride, src, + aom_highbd_subtract_block(4, 4, src_diff, diff_stride, src, src_stride, dst, dst_stride, xd->bd); vp10_highbd_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type, xd->lossless[seg_id]); - vpx_highbd_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, + aom_highbd_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -1212,11 +1212,11 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col, switch (tx_size) { case TX_32X32: if (!x->skip_recode) { - vpx_subtract_block(32, 32, src_diff, diff_stride, src, src_stride, dst, + aom_subtract_block(32, 32, src_diff, diff_stride, src, src_stride, dst, dst_stride); fwd_txfm_32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride, tx_type); - vpx_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round, + aom_quantize_b_32x32(coeff, 1024, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -1230,10 +1230,10 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col, break; case TX_16X16: if (!x->skip_recode) { - vpx_subtract_block(16, 16, src_diff, diff_stride, src, src_stride, dst, + aom_subtract_block(16, 16, src_diff, diff_stride, src, src_stride, dst, dst_stride); fwd_txfm_16x16(src_diff, coeff, diff_stride, tx_type); - vpx_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round, p->quant, + aom_quantize_b(coeff, 256, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -1247,10 +1247,10 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col, break; case TX_8X8: if (!x->skip_recode) { - vpx_subtract_block(8, 8, src_diff, diff_stride, src, src_stride, dst, + aom_subtract_block(8, 8, src_diff, diff_stride, src, src_stride, dst, dst_stride); fwd_txfm_8x8(src_diff, coeff, diff_stride, tx_type); - vpx_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, p->quant, + aom_quantize_b(coeff, 64, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM @@ -1263,11 +1263,11 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col, break; case TX_4X4: if (!x->skip_recode) { - vpx_subtract_block(4, 4, src_diff, diff_stride, src, src_stride, dst, + aom_subtract_block(4, 4, src_diff, diff_stride, src, src_stride, dst, dst_stride); vp10_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type, xd->lossless[seg_id]); - vpx_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant, + aom_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM diff --git a/av1/encoder/encodemb.h b/av1/encoder/encodemb.h index 3a5311918769f421232941b171e6753fa649ce97..cd3b6772ed04bffe1ca3c6dd5fad7a7838505da9 100644 --- a/av1/encoder/encodemb.h +++ b/av1/encoder/encodemb.h @@ -12,7 +12,7 @@ #ifndef VP10_ENCODER_ENCODEMB_H_ #define VP10_ENCODER_ENCODEMB_H_ -#include "./vpx_config.h" +#include "./aom_config.h" #include "av1/encoder/block.h" #ifdef __cplusplus diff --git a/av1/encoder/encodemv.c b/av1/encoder/encodemv.c index 52ca39fa0d655b4738400fc4569429005294a0cc..5cf3ad851a312e361b00566a440f66a72c0dd5dc 100644 --- a/av1/encoder/encodemv.c +++ b/av1/encoder/encodemv.c @@ -18,7 +18,7 @@ #include "av1/encoder/encodemv.h" #include "av1/encoder/subexp.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" static struct vp10_token mv_joint_encodings[MV_JOINTS]; static struct vp10_token mv_class_encodings[MV_CLASSES]; @@ -32,7 +32,7 @@ void vp10_entropy_mv_init(void) { vp10_tokens_from_tree(mv_fp_encodings, vp10_mv_fp_tree); } -static void encode_mv_component(vpx_writer *w, int comp, +static void encode_mv_component(aom_writer *w, int comp, const nmv_component *mvcomp, int usehp) { int offset; const int sign = comp < 0; @@ -45,7 +45,7 @@ static void encode_mv_component(vpx_writer *w, int comp, assert(comp != 0); // Sign - vpx_write(w, sign, mvcomp->sign); + aom_write(w, sign, mvcomp->sign); // Class vp10_write_token(w, vp10_mv_class_tree, mvcomp->classes, @@ -58,7 +58,7 @@ static void encode_mv_component(vpx_writer *w, int comp, } else { int i; const int n = mv_class + CLASS0_BITS - 1; // number of bits - for (i = 0; i < n; ++i) vpx_write(w, (d >> i) & 1, mvcomp->bits[i]); + for (i = 0; i < n; ++i) aom_write(w, (d >> i) & 1, mvcomp->bits[i]); } // Fractional bits @@ -68,7 +68,7 @@ static void encode_mv_component(vpx_writer *w, int comp, // High precision bit if (usehp) - vpx_write(w, hp, mv_class == MV_CLASS_0 ? mvcomp->class0_hp : mvcomp->hp); + aom_write(w, hp, mv_class == MV_CLASS_0 ? mvcomp->class0_hp : mvcomp->hp); } static void build_nmv_component_cost_table(int *mvcost, @@ -132,27 +132,27 @@ static void build_nmv_component_cost_table(int *mvcost, } } -static void update_mv(vpx_writer *w, const unsigned int ct[2], vpx_prob *cur_p, - vpx_prob upd_p) { +static void update_mv(aom_writer *w, const unsigned int ct[2], aom_prob *cur_p, + aom_prob upd_p) { #if CONFIG_MISC_FIXES (void)upd_p; vp10_cond_prob_diff_update(w, cur_p, ct); #else - const vpx_prob new_p = get_binary_prob(ct[0], ct[1]) | 1; + const aom_prob new_p = get_binary_prob(ct[0], ct[1]) | 1; const int update = cost_branch256(ct, *cur_p) + vp10_cost_zero(upd_p) > cost_branch256(ct, new_p) + vp10_cost_one(upd_p) + 7 * 256; - vpx_write(w, update, upd_p); + aom_write(w, update, upd_p); if (update) { *cur_p = new_p; - vpx_write_literal(w, new_p >> 1, 7); + aom_write_literal(w, new_p >> 1, 7); } #endif } -static void write_mv_update(const vpx_tree_index *tree, - vpx_prob probs[/*n - 1*/], +static void write_mv_update(const aom_tree_index *tree, + aom_prob probs[/*n - 1*/], const unsigned int counts[/*n - 1*/], int n, - vpx_writer *w) { + aom_writer *w) { int i; unsigned int branch_ct[32][2]; @@ -164,7 +164,7 @@ static void write_mv_update(const vpx_tree_index *tree, update_mv(w, branch_ct[i], &probs[i], MV_UPDATE_PROB); } -void vp10_write_nmv_probs(VP10_COMMON *cm, int usehp, vpx_writer *w, +void vp10_write_nmv_probs(VP10_COMMON *cm, int usehp, aom_writer *w, nmv_context_counts *const counts) { int i, j; nmv_context *const mvc = &cm->fc->nmvc; @@ -203,7 +203,7 @@ void vp10_write_nmv_probs(VP10_COMMON *cm, int usehp, vpx_writer *w, } } -void vp10_encode_mv(VP10_COMP *cpi, vpx_writer *w, const MV *mv, const MV *ref, +void vp10_encode_mv(VP10_COMP *cpi, aom_writer *w, const MV *mv, const MV *ref, const nmv_context *mvctx, int usehp) { const MV diff = { mv->row - ref->row, mv->col - ref->col }; const MV_JOINT_TYPE j = vp10_get_mv_joint(&diff); diff --git a/av1/encoder/encodemv.h b/av1/encoder/encodemv.h index 8295b749761803d910c03667b35330820a580bb6..5b4bf5a115b97603ce5cb37dd15328966ab820f5 100644 --- a/av1/encoder/encodemv.h +++ b/av1/encoder/encodemv.h @@ -20,10 +20,10 @@ extern "C" { void vp10_entropy_mv_init(void); -void vp10_write_nmv_probs(VP10_COMMON *cm, int usehp, vpx_writer *w, +void vp10_write_nmv_probs(VP10_COMMON *cm, int usehp, aom_writer *w, nmv_context_counts *const counts); -void vp10_encode_mv(VP10_COMP *cpi, vpx_writer *w, const MV *mv, const MV *ref, +void vp10_encode_mv(VP10_COMP *cpi, aom_writer *w, const MV *mv, const MV *ref, const nmv_context *mvctx, int usehp); void vp10_build_nmv_cost_table(int *mvjoint, int *mvcost[2], diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c index 72af6cd222483d9f2171b051df94e10686eaf561..8afb342c6f46c8ff7a8f46c0c0852060005ff356 100644 --- a/av1/encoder/encoder.c +++ b/av1/encoder/encoder.c @@ -13,7 +13,7 @@ #include <stdio.h> #include <limits.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "av1/common/alloccommon.h" #if CONFIG_CLPF @@ -49,18 +49,18 @@ #include "av1/encoder/temporal_filter.h" #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" -#include "./vpx_scale_rtcd.h" -#include "aom/internal/vpx_psnr.h" +#include "./aom_dsp_rtcd.h" +#include "./aom_scale_rtcd.h" +#include "aom/internal/aom_psnr.h" #if CONFIG_INTERNAL_STATS #include "aom_dsp/ssim.h" #endif -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_dsp/vpx_filter.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_dsp/aom_filter.h" #include "aom_ports/mem.h" #include "aom_ports/system_state.h" -#include "aom_ports/vpx_timer.h" -#include "aom_scale/vpx_scale.h" +#include "aom_ports/aom_timer.h" +#include "aom_scale/aom_scale.h" #define AM_SEGMENT_ID_INACTIVE 7 #define AM_SEGMENT_ID_ACTIVE 0 @@ -270,29 +270,29 @@ static void vp10_enc_setup_mi(VP10_COMMON *cm) { } static int vp10_enc_alloc_mi(VP10_COMMON *cm, int mi_size) { - cm->mip = vpx_calloc(mi_size, sizeof(*cm->mip)); + cm->mip = aom_calloc(mi_size, sizeof(*cm->mip)); if (!cm->mip) return 1; - cm->prev_mip = vpx_calloc(mi_size, sizeof(*cm->prev_mip)); + cm->prev_mip = aom_calloc(mi_size, sizeof(*cm->prev_mip)); if (!cm->prev_mip) return 1; cm->mi_alloc_size = mi_size; - cm->mi_grid_base = (MODE_INFO **)vpx_calloc(mi_size, sizeof(MODE_INFO *)); + cm->mi_grid_base = (MODE_INFO **)aom_calloc(mi_size, sizeof(MODE_INFO *)); if (!cm->mi_grid_base) return 1; cm->prev_mi_grid_base = - (MODE_INFO **)vpx_calloc(mi_size, sizeof(MODE_INFO *)); + (MODE_INFO **)aom_calloc(mi_size, sizeof(MODE_INFO *)); if (!cm->prev_mi_grid_base) return 1; return 0; } static void vp10_enc_free_mi(VP10_COMMON *cm) { - vpx_free(cm->mip); + aom_free(cm->mip); cm->mip = NULL; - vpx_free(cm->prev_mip); + aom_free(cm->prev_mip); cm->prev_mip = NULL; - vpx_free(cm->mi_grid_base); + aom_free(cm->mi_grid_base); cm->mi_grid_base = NULL; - vpx_free(cm->prev_mi_grid_base); + aom_free(cm->prev_mi_grid_base); cm->prev_mi_grid_base = NULL; } @@ -318,8 +318,8 @@ void vp10_initialize_enc(void) { if (!init_done) { av1_rtcd(); - vpx_dsp_rtcd(); - vpx_scale_rtcd(); + aom_dsp_rtcd(); + aom_scale_rtcd(); vp10_init_intra_predictors(); vp10_init_me_luts(); vp10_rc_init_minq_luts(); @@ -332,60 +332,60 @@ void vp10_initialize_enc(void) { static void dealloc_compressor_data(VP10_COMP *cpi) { VP10_COMMON *const cm = &cpi->common; - vpx_free(cpi->mbmi_ext_base); + aom_free(cpi->mbmi_ext_base); cpi->mbmi_ext_base = NULL; - vpx_free(cpi->tile_data); + aom_free(cpi->tile_data); cpi->tile_data = NULL; // Delete sementation map - vpx_free(cpi->segmentation_map); + aom_free(cpi->segmentation_map); cpi->segmentation_map = NULL; - vpx_free(cpi->coding_context.last_frame_seg_map_copy); + aom_free(cpi->coding_context.last_frame_seg_map_copy); cpi->coding_context.last_frame_seg_map_copy = NULL; - vpx_free(cpi->nmvcosts[0]); - vpx_free(cpi->nmvcosts[1]); + aom_free(cpi->nmvcosts[0]); + aom_free(cpi->nmvcosts[1]); cpi->nmvcosts[0] = NULL; cpi->nmvcosts[1] = NULL; - vpx_free(cpi->nmvcosts_hp[0]); - vpx_free(cpi->nmvcosts_hp[1]); + aom_free(cpi->nmvcosts_hp[0]); + aom_free(cpi->nmvcosts_hp[1]); cpi->nmvcosts_hp[0] = NULL; cpi->nmvcosts_hp[1] = NULL; - vpx_free(cpi->nmvsadcosts[0]); - vpx_free(cpi->nmvsadcosts[1]); + aom_free(cpi->nmvsadcosts[0]); + aom_free(cpi->nmvsadcosts[1]); cpi->nmvsadcosts[0] = NULL; cpi->nmvsadcosts[1] = NULL; - vpx_free(cpi->nmvsadcosts_hp[0]); - vpx_free(cpi->nmvsadcosts_hp[1]); + aom_free(cpi->nmvsadcosts_hp[0]); + aom_free(cpi->nmvsadcosts_hp[1]); cpi->nmvsadcosts_hp[0] = NULL; cpi->nmvsadcosts_hp[1] = NULL; vp10_cyclic_refresh_free(cpi->cyclic_refresh); cpi->cyclic_refresh = NULL; - vpx_free(cpi->active_map.map); + aom_free(cpi->active_map.map); cpi->active_map.map = NULL; vp10_free_ref_frame_buffers(cm->buffer_pool); vp10_free_context_buffers(cm); - vpx_free_frame_buffer(&cpi->last_frame_uf); - vpx_free_frame_buffer(&cpi->scaled_source); - vpx_free_frame_buffer(&cpi->scaled_last_source); - vpx_free_frame_buffer(&cpi->alt_ref_buffer); + aom_free_frame_buffer(&cpi->last_frame_uf); + aom_free_frame_buffer(&cpi->scaled_source); + aom_free_frame_buffer(&cpi->scaled_last_source); + aom_free_frame_buffer(&cpi->alt_ref_buffer); vp10_lookahead_destroy(cpi->lookahead); - vpx_free(cpi->tile_tok[0][0]); + aom_free(cpi->tile_tok[0][0]); cpi->tile_tok[0][0] = 0; vp10_free_pc_tree(&cpi->td); if (cpi->source_diff_var != NULL) { - vpx_free(cpi->source_diff_var); + aom_free(cpi->source_diff_var); cpi->source_diff_var = NULL; } } @@ -602,51 +602,51 @@ static void alloc_raw_frame_buffers(VP10_COMP *cpi) { #endif oxcf->lag_in_frames); if (!cpi->lookahead) - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate lag buffers"); // TODO(agrange) Check if ARF is enabled and skip allocation if not. - if (vpx_realloc_frame_buffer(&cpi->alt_ref_buffer, oxcf->width, oxcf->height, + if (aom_realloc_frame_buffer(&cpi->alt_ref_buffer, oxcf->width, oxcf->height, cm->subsampling_x, cm->subsampling_y, #if CONFIG_VPX_HIGHBITDEPTH cm->use_highbitdepth, #endif VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate altref buffer"); } static void alloc_util_frame_buffers(VP10_COMP *cpi) { VP10_COMMON *const cm = &cpi->common; - if (vpx_realloc_frame_buffer(&cpi->last_frame_uf, cm->width, cm->height, + if (aom_realloc_frame_buffer(&cpi->last_frame_uf, cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, #if CONFIG_VPX_HIGHBITDEPTH cm->use_highbitdepth, #endif VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate last frame buffer"); - if (vpx_realloc_frame_buffer(&cpi->scaled_source, cm->width, cm->height, + if (aom_realloc_frame_buffer(&cpi->scaled_source, cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, #if CONFIG_VPX_HIGHBITDEPTH cm->use_highbitdepth, #endif VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate scaled source buffer"); - if (vpx_realloc_frame_buffer(&cpi->scaled_last_source, cm->width, cm->height, + if (aom_realloc_frame_buffer(&cpi->scaled_last_source, cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, #if CONFIG_VPX_HIGHBITDEPTH cm->use_highbitdepth, #endif VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL)) - vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, "Failed to allocate scaled last source buffer"); } @@ -654,7 +654,7 @@ static int alloc_context_buffers_ext(VP10_COMP *cpi) { VP10_COMMON *cm = &cpi->common; int mi_size = cm->mi_cols * cm->mi_rows; - cpi->mbmi_ext_base = vpx_calloc(mi_size, sizeof(*cpi->mbmi_ext_base)); + cpi->mbmi_ext_base = aom_calloc(mi_size, sizeof(*cpi->mbmi_ext_base)); if (!cpi->mbmi_ext_base) return 1; return 0; @@ -667,12 +667,12 @@ void vp10_alloc_compressor_data(VP10_COMP *cpi) { alloc_context_buffers_ext(cpi); - vpx_free(cpi->tile_tok[0][0]); + aom_free(cpi->tile_tok[0][0]); { unsigned int tokens = get_token_alloc(cm->mb_rows, cm->mb_cols); CHECK_MEM_ERROR(cm, cpi->tile_tok[0][0], - vpx_calloc(tokens, sizeof(*cpi->tile_tok[0][0]))); + aom_calloc(tokens, sizeof(*cpi->tile_tok[0][0]))); } vp10_setup_pc_tree(&cpi->common, &cpi->td); @@ -867,61 +867,61 @@ static void set_rc_buffer_sizes(RATE_CONTROL *rc, } /* clang-format off */ -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad32x16) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad32x16_avg) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad32x16x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad16x32) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad16x32_avg) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad16x32x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad64x32) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad64x32_avg) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad64x32x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad32x64) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad32x64_avg) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad32x64x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad32x32) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad32x32_avg) -MAKE_BFP_SAD3_WRAPPER(vpx_highbd_sad32x32x3) -MAKE_BFP_SAD8_WRAPPER(vpx_highbd_sad32x32x8) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad32x32x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad64x64) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad64x64_avg) -MAKE_BFP_SAD3_WRAPPER(vpx_highbd_sad64x64x3) -MAKE_BFP_SAD8_WRAPPER(vpx_highbd_sad64x64x8) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad64x64x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad16x16) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad16x16_avg) -MAKE_BFP_SAD3_WRAPPER(vpx_highbd_sad16x16x3) -MAKE_BFP_SAD8_WRAPPER(vpx_highbd_sad16x16x8) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad16x16x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad16x8) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad16x8_avg) -MAKE_BFP_SAD3_WRAPPER(vpx_highbd_sad16x8x3) -MAKE_BFP_SAD8_WRAPPER(vpx_highbd_sad16x8x8) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad16x8x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad8x16) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad8x16_avg) -MAKE_BFP_SAD3_WRAPPER(vpx_highbd_sad8x16x3) -MAKE_BFP_SAD8_WRAPPER(vpx_highbd_sad8x16x8) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad8x16x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad8x8) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad8x8_avg) -MAKE_BFP_SAD3_WRAPPER(vpx_highbd_sad8x8x3) -MAKE_BFP_SAD8_WRAPPER(vpx_highbd_sad8x8x8) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad8x8x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad8x4) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad8x4_avg) -MAKE_BFP_SAD8_WRAPPER(vpx_highbd_sad8x4x8) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad8x4x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad4x8) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad4x8_avg) -MAKE_BFP_SAD8_WRAPPER(vpx_highbd_sad4x8x8) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad4x8x4d) -MAKE_BFP_SAD_WRAPPER(vpx_highbd_sad4x4) -MAKE_BFP_SADAVG_WRAPPER(vpx_highbd_sad4x4_avg) -MAKE_BFP_SAD3_WRAPPER(vpx_highbd_sad4x4x3) -MAKE_BFP_SAD8_WRAPPER(vpx_highbd_sad4x4x8) -MAKE_BFP_SAD4D_WRAPPER(vpx_highbd_sad4x4x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad32x16) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad32x16_avg) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad32x16x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad16x32) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad16x32_avg) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad16x32x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad64x32) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad64x32_avg) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad64x32x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad32x64) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad32x64_avg) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad32x64x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad32x32) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad32x32_avg) +MAKE_BFP_SAD3_WRAPPER(aom_highbd_sad32x32x3) +MAKE_BFP_SAD8_WRAPPER(aom_highbd_sad32x32x8) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad32x32x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad64x64) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad64x64_avg) +MAKE_BFP_SAD3_WRAPPER(aom_highbd_sad64x64x3) +MAKE_BFP_SAD8_WRAPPER(aom_highbd_sad64x64x8) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad64x64x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad16x16) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad16x16_avg) +MAKE_BFP_SAD3_WRAPPER(aom_highbd_sad16x16x3) +MAKE_BFP_SAD8_WRAPPER(aom_highbd_sad16x16x8) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad16x16x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad16x8) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad16x8_avg) +MAKE_BFP_SAD3_WRAPPER(aom_highbd_sad16x8x3) +MAKE_BFP_SAD8_WRAPPER(aom_highbd_sad16x8x8) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad16x8x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad8x16) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad8x16_avg) +MAKE_BFP_SAD3_WRAPPER(aom_highbd_sad8x16x3) +MAKE_BFP_SAD8_WRAPPER(aom_highbd_sad8x16x8) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad8x16x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad8x8) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad8x8_avg) +MAKE_BFP_SAD3_WRAPPER(aom_highbd_sad8x8x3) +MAKE_BFP_SAD8_WRAPPER(aom_highbd_sad8x8x8) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad8x8x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad8x4) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad8x4_avg) +MAKE_BFP_SAD8_WRAPPER(aom_highbd_sad8x4x8) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad8x4x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad4x8) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad4x8_avg) +MAKE_BFP_SAD8_WRAPPER(aom_highbd_sad4x8x8) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad4x8x4d) +MAKE_BFP_SAD_WRAPPER(aom_highbd_sad4x4) +MAKE_BFP_SADAVG_WRAPPER(aom_highbd_sad4x4_avg) +MAKE_BFP_SAD3_WRAPPER(aom_highbd_sad4x4x3) +MAKE_BFP_SAD8_WRAPPER(aom_highbd_sad4x4x8) +MAKE_BFP_SAD4D_WRAPPER(aom_highbd_sad4x4x4d) /* clang-format on */ static void highbd_set_var_fns(VP10_COMP *const cpi) { @@ -929,256 +929,256 @@ static void highbd_set_var_fns(VP10_COMP *const cpi) { if (cm->use_highbitdepth) { switch (cm->bit_depth) { case VPX_BITS_8: - HIGHBD_BFP(BLOCK_32X16, vpx_highbd_sad32x16_bits8, - vpx_highbd_sad32x16_avg_bits8, vpx_highbd_8_variance32x16, - vpx_highbd_8_sub_pixel_variance32x16, - vpx_highbd_8_sub_pixel_avg_variance32x16, NULL, NULL, - vpx_highbd_sad32x16x4d_bits8) - - HIGHBD_BFP(BLOCK_16X32, vpx_highbd_sad16x32_bits8, - vpx_highbd_sad16x32_avg_bits8, vpx_highbd_8_variance16x32, - vpx_highbd_8_sub_pixel_variance16x32, - vpx_highbd_8_sub_pixel_avg_variance16x32, NULL, NULL, - vpx_highbd_sad16x32x4d_bits8) - - HIGHBD_BFP(BLOCK_64X32, vpx_highbd_sad64x32_bits8, - vpx_highbd_sad64x32_avg_bits8, vpx_highbd_8_variance64x32, - vpx_highbd_8_sub_pixel_variance64x32, - vpx_highbd_8_sub_pixel_avg_variance64x32, NULL, NULL, - vpx_highbd_sad64x32x4d_bits8) - - HIGHBD_BFP(BLOCK_32X64, vpx_highbd_sad32x64_bits8, - vpx_highbd_sad32x64_avg_bits8, vpx_highbd_8_variance32x64, - vpx_highbd_8_sub_pixel_variance32x64, - vpx_highbd_8_sub_pixel_avg_variance32x64, NULL, NULL, - vpx_highbd_sad32x64x4d_bits8) - - HIGHBD_BFP(BLOCK_32X32, vpx_highbd_sad32x32_bits8, - vpx_highbd_sad32x32_avg_bits8, vpx_highbd_8_variance32x32, - vpx_highbd_8_sub_pixel_variance32x32, - vpx_highbd_8_sub_pixel_avg_variance32x32, - vpx_highbd_sad32x32x3_bits8, vpx_highbd_sad32x32x8_bits8, - vpx_highbd_sad32x32x4d_bits8) - - HIGHBD_BFP(BLOCK_64X64, vpx_highbd_sad64x64_bits8, - vpx_highbd_sad64x64_avg_bits8, vpx_highbd_8_variance64x64, - vpx_highbd_8_sub_pixel_variance64x64, - vpx_highbd_8_sub_pixel_avg_variance64x64, - vpx_highbd_sad64x64x3_bits8, vpx_highbd_sad64x64x8_bits8, - vpx_highbd_sad64x64x4d_bits8) - - HIGHBD_BFP(BLOCK_16X16, vpx_highbd_sad16x16_bits8, - vpx_highbd_sad16x16_avg_bits8, vpx_highbd_8_variance16x16, - vpx_highbd_8_sub_pixel_variance16x16, - vpx_highbd_8_sub_pixel_avg_variance16x16, - vpx_highbd_sad16x16x3_bits8, vpx_highbd_sad16x16x8_bits8, - vpx_highbd_sad16x16x4d_bits8) + HIGHBD_BFP(BLOCK_32X16, aom_highbd_sad32x16_bits8, + aom_highbd_sad32x16_avg_bits8, aom_highbd_8_variance32x16, + aom_highbd_8_sub_pixel_variance32x16, + aom_highbd_8_sub_pixel_avg_variance32x16, NULL, NULL, + aom_highbd_sad32x16x4d_bits8) + + HIGHBD_BFP(BLOCK_16X32, aom_highbd_sad16x32_bits8, + aom_highbd_sad16x32_avg_bits8, aom_highbd_8_variance16x32, + aom_highbd_8_sub_pixel_variance16x32, + aom_highbd_8_sub_pixel_avg_variance16x32, NULL, NULL, + aom_highbd_sad16x32x4d_bits8) + + HIGHBD_BFP(BLOCK_64X32, aom_highbd_sad64x32_bits8, + aom_highbd_sad64x32_avg_bits8, aom_highbd_8_variance64x32, + aom_highbd_8_sub_pixel_variance64x32, + aom_highbd_8_sub_pixel_avg_variance64x32, NULL, NULL, + aom_highbd_sad64x32x4d_bits8) + + HIGHBD_BFP(BLOCK_32X64, aom_highbd_sad32x64_bits8, + aom_highbd_sad32x64_avg_bits8, aom_highbd_8_variance32x64, + aom_highbd_8_sub_pixel_variance32x64, + aom_highbd_8_sub_pixel_avg_variance32x64, NULL, NULL, + aom_highbd_sad32x64x4d_bits8) + + HIGHBD_BFP(BLOCK_32X32, aom_highbd_sad32x32_bits8, + aom_highbd_sad32x32_avg_bits8, aom_highbd_8_variance32x32, + aom_highbd_8_sub_pixel_variance32x32, + aom_highbd_8_sub_pixel_avg_variance32x32, + aom_highbd_sad32x32x3_bits8, aom_highbd_sad32x32x8_bits8, + aom_highbd_sad32x32x4d_bits8) + + HIGHBD_BFP(BLOCK_64X64, aom_highbd_sad64x64_bits8, + aom_highbd_sad64x64_avg_bits8, aom_highbd_8_variance64x64, + aom_highbd_8_sub_pixel_variance64x64, + aom_highbd_8_sub_pixel_avg_variance64x64, + aom_highbd_sad64x64x3_bits8, aom_highbd_sad64x64x8_bits8, + aom_highbd_sad64x64x4d_bits8) + + HIGHBD_BFP(BLOCK_16X16, aom_highbd_sad16x16_bits8, + aom_highbd_sad16x16_avg_bits8, aom_highbd_8_variance16x16, + aom_highbd_8_sub_pixel_variance16x16, + aom_highbd_8_sub_pixel_avg_variance16x16, + aom_highbd_sad16x16x3_bits8, aom_highbd_sad16x16x8_bits8, + aom_highbd_sad16x16x4d_bits8) HIGHBD_BFP( - BLOCK_16X8, vpx_highbd_sad16x8_bits8, vpx_highbd_sad16x8_avg_bits8, - vpx_highbd_8_variance16x8, vpx_highbd_8_sub_pixel_variance16x8, - vpx_highbd_8_sub_pixel_avg_variance16x8, vpx_highbd_sad16x8x3_bits8, - vpx_highbd_sad16x8x8_bits8, vpx_highbd_sad16x8x4d_bits8) + BLOCK_16X8, aom_highbd_sad16x8_bits8, aom_highbd_sad16x8_avg_bits8, + aom_highbd_8_variance16x8, aom_highbd_8_sub_pixel_variance16x8, + aom_highbd_8_sub_pixel_avg_variance16x8, aom_highbd_sad16x8x3_bits8, + aom_highbd_sad16x8x8_bits8, aom_highbd_sad16x8x4d_bits8) HIGHBD_BFP( - BLOCK_8X16, vpx_highbd_sad8x16_bits8, vpx_highbd_sad8x16_avg_bits8, - vpx_highbd_8_variance8x16, vpx_highbd_8_sub_pixel_variance8x16, - vpx_highbd_8_sub_pixel_avg_variance8x16, vpx_highbd_sad8x16x3_bits8, - vpx_highbd_sad8x16x8_bits8, vpx_highbd_sad8x16x4d_bits8) + BLOCK_8X16, aom_highbd_sad8x16_bits8, aom_highbd_sad8x16_avg_bits8, + aom_highbd_8_variance8x16, aom_highbd_8_sub_pixel_variance8x16, + aom_highbd_8_sub_pixel_avg_variance8x16, aom_highbd_sad8x16x3_bits8, + aom_highbd_sad8x16x8_bits8, aom_highbd_sad8x16x4d_bits8) HIGHBD_BFP( - BLOCK_8X8, vpx_highbd_sad8x8_bits8, vpx_highbd_sad8x8_avg_bits8, - vpx_highbd_8_variance8x8, vpx_highbd_8_sub_pixel_variance8x8, - vpx_highbd_8_sub_pixel_avg_variance8x8, vpx_highbd_sad8x8x3_bits8, - vpx_highbd_sad8x8x8_bits8, vpx_highbd_sad8x8x4d_bits8) - - HIGHBD_BFP(BLOCK_8X4, vpx_highbd_sad8x4_bits8, - vpx_highbd_sad8x4_avg_bits8, vpx_highbd_8_variance8x4, - vpx_highbd_8_sub_pixel_variance8x4, - vpx_highbd_8_sub_pixel_avg_variance8x4, NULL, - vpx_highbd_sad8x4x8_bits8, vpx_highbd_sad8x4x4d_bits8) - - HIGHBD_BFP(BLOCK_4X8, vpx_highbd_sad4x8_bits8, - vpx_highbd_sad4x8_avg_bits8, vpx_highbd_8_variance4x8, - vpx_highbd_8_sub_pixel_variance4x8, - vpx_highbd_8_sub_pixel_avg_variance4x8, NULL, - vpx_highbd_sad4x8x8_bits8, vpx_highbd_sad4x8x4d_bits8) + BLOCK_8X8, aom_highbd_sad8x8_bits8, aom_highbd_sad8x8_avg_bits8, + aom_highbd_8_variance8x8, aom_highbd_8_sub_pixel_variance8x8, + aom_highbd_8_sub_pixel_avg_variance8x8, aom_highbd_sad8x8x3_bits8, + aom_highbd_sad8x8x8_bits8, aom_highbd_sad8x8x4d_bits8) + + HIGHBD_BFP(BLOCK_8X4, aom_highbd_sad8x4_bits8, + aom_highbd_sad8x4_avg_bits8, aom_highbd_8_variance8x4, + aom_highbd_8_sub_pixel_variance8x4, + aom_highbd_8_sub_pixel_avg_variance8x4, NULL, + aom_highbd_sad8x4x8_bits8, aom_highbd_sad8x4x4d_bits8) + + HIGHBD_BFP(BLOCK_4X8, aom_highbd_sad4x8_bits8, + aom_highbd_sad4x8_avg_bits8, aom_highbd_8_variance4x8, + aom_highbd_8_sub_pixel_variance4x8, + aom_highbd_8_sub_pixel_avg_variance4x8, NULL, + aom_highbd_sad4x8x8_bits8, aom_highbd_sad4x8x4d_bits8) HIGHBD_BFP( - BLOCK_4X4, vpx_highbd_sad4x4_bits8, vpx_highbd_sad4x4_avg_bits8, - vpx_highbd_8_variance4x4, vpx_highbd_8_sub_pixel_variance4x4, - vpx_highbd_8_sub_pixel_avg_variance4x4, vpx_highbd_sad4x4x3_bits8, - vpx_highbd_sad4x4x8_bits8, vpx_highbd_sad4x4x4d_bits8) + BLOCK_4X4, aom_highbd_sad4x4_bits8, aom_highbd_sad4x4_avg_bits8, + aom_highbd_8_variance4x4, aom_highbd_8_sub_pixel_variance4x4, + aom_highbd_8_sub_pixel_avg_variance4x4, aom_highbd_sad4x4x3_bits8, + aom_highbd_sad4x4x8_bits8, aom_highbd_sad4x4x4d_bits8) break; case VPX_BITS_10: - HIGHBD_BFP(BLOCK_32X16, vpx_highbd_sad32x16_bits10, - vpx_highbd_sad32x16_avg_bits10, vpx_highbd_10_variance32x16, - vpx_highbd_10_sub_pixel_variance32x16, - vpx_highbd_10_sub_pixel_avg_variance32x16, NULL, NULL, - vpx_highbd_sad32x16x4d_bits10) - - HIGHBD_BFP(BLOCK_16X32, vpx_highbd_sad16x32_bits10, - vpx_highbd_sad16x32_avg_bits10, vpx_highbd_10_variance16x32, - vpx_highbd_10_sub_pixel_variance16x32, - vpx_highbd_10_sub_pixel_avg_variance16x32, NULL, NULL, - vpx_highbd_sad16x32x4d_bits10) - - HIGHBD_BFP(BLOCK_64X32, vpx_highbd_sad64x32_bits10, - vpx_highbd_sad64x32_avg_bits10, vpx_highbd_10_variance64x32, - vpx_highbd_10_sub_pixel_variance64x32, - vpx_highbd_10_sub_pixel_avg_variance64x32, NULL, NULL, - vpx_highbd_sad64x32x4d_bits10) - - HIGHBD_BFP(BLOCK_32X64, vpx_highbd_sad32x64_bits10, - vpx_highbd_sad32x64_avg_bits10, vpx_highbd_10_variance32x64, - vpx_highbd_10_sub_pixel_variance32x64, - vpx_highbd_10_sub_pixel_avg_variance32x64, NULL, NULL, - vpx_highbd_sad32x64x4d_bits10) - - HIGHBD_BFP(BLOCK_32X32, vpx_highbd_sad32x32_bits10, - vpx_highbd_sad32x32_avg_bits10, vpx_highbd_10_variance32x32, - vpx_highbd_10_sub_pixel_variance32x32, - vpx_highbd_10_sub_pixel_avg_variance32x32, - vpx_highbd_sad32x32x3_bits10, vpx_highbd_sad32x32x8_bits10, - vpx_highbd_sad32x32x4d_bits10) - - HIGHBD_BFP(BLOCK_64X64, vpx_highbd_sad64x64_bits10, - vpx_highbd_sad64x64_avg_bits10, vpx_highbd_10_variance64x64, - vpx_highbd_10_sub_pixel_variance64x64, - vpx_highbd_10_sub_pixel_avg_variance64x64, - vpx_highbd_sad64x64x3_bits10, vpx_highbd_sad64x64x8_bits10, - vpx_highbd_sad64x64x4d_bits10) - - HIGHBD_BFP(BLOCK_16X16, vpx_highbd_sad16x16_bits10, - vpx_highbd_sad16x16_avg_bits10, vpx_highbd_10_variance16x16, - vpx_highbd_10_sub_pixel_variance16x16, - vpx_highbd_10_sub_pixel_avg_variance16x16, - vpx_highbd_sad16x16x3_bits10, vpx_highbd_sad16x16x8_bits10, - vpx_highbd_sad16x16x4d_bits10) - - HIGHBD_BFP(BLOCK_16X8, vpx_highbd_sad16x8_bits10, - vpx_highbd_sad16x8_avg_bits10, vpx_highbd_10_variance16x8, - vpx_highbd_10_sub_pixel_variance16x8, - vpx_highbd_10_sub_pixel_avg_variance16x8, - vpx_highbd_sad16x8x3_bits10, vpx_highbd_sad16x8x8_bits10, - vpx_highbd_sad16x8x4d_bits10) - - HIGHBD_BFP(BLOCK_8X16, vpx_highbd_sad8x16_bits10, - vpx_highbd_sad8x16_avg_bits10, vpx_highbd_10_variance8x16, - vpx_highbd_10_sub_pixel_variance8x16, - vpx_highbd_10_sub_pixel_avg_variance8x16, - vpx_highbd_sad8x16x3_bits10, vpx_highbd_sad8x16x8_bits10, - vpx_highbd_sad8x16x4d_bits10) + HIGHBD_BFP(BLOCK_32X16, aom_highbd_sad32x16_bits10, + aom_highbd_sad32x16_avg_bits10, aom_highbd_10_variance32x16, + aom_highbd_10_sub_pixel_variance32x16, + aom_highbd_10_sub_pixel_avg_variance32x16, NULL, NULL, + aom_highbd_sad32x16x4d_bits10) + + HIGHBD_BFP(BLOCK_16X32, aom_highbd_sad16x32_bits10, + aom_highbd_sad16x32_avg_bits10, aom_highbd_10_variance16x32, + aom_highbd_10_sub_pixel_variance16x32, + aom_highbd_10_sub_pixel_avg_variance16x32, NULL, NULL, + aom_highbd_sad16x32x4d_bits10) + + HIGHBD_BFP(BLOCK_64X32, aom_highbd_sad64x32_bits10, + aom_highbd_sad64x32_avg_bits10, aom_highbd_10_variance64x32, + aom_highbd_10_sub_pixel_variance64x32, + aom_highbd_10_sub_pixel_avg_variance64x32, NULL, NULL, + aom_highbd_sad64x32x4d_bits10) + + HIGHBD_BFP(BLOCK_32X64, aom_highbd_sad32x64_bits10, + aom_highbd_sad32x64_avg_bits10, aom_highbd_10_variance32x64, + aom_highbd_10_sub_pixel_variance32x64, + aom_highbd_10_sub_pixel_avg_variance32x64, NULL, NULL, + aom_highbd_sad32x64x4d_bits10) + + HIGHBD_BFP(BLOCK_32X32, aom_highbd_sad32x32_bits10, + aom_highbd_sad32x32_avg_bits10, aom_highbd_10_variance32x32, + aom_highbd_10_sub_pixel_variance32x32, + aom_highbd_10_sub_pixel_avg_variance32x32, + aom_highbd_sad32x32x3_bits10, aom_highbd_sad32x32x8_bits10, + aom_highbd_sad32x32x4d_bits10) + + HIGHBD_BFP(BLOCK_64X64, aom_highbd_sad64x64_bits10, + aom_highbd_sad64x64_avg_bits10, aom_highbd_10_variance64x64, + aom_highbd_10_sub_pixel_variance64x64, + aom_highbd_10_sub_pixel_avg_variance64x64, + aom_highbd_sad64x64x3_bits10, aom_highbd_sad64x64x8_bits10, + aom_highbd_sad64x64x4d_bits10) + + HIGHBD_BFP(BLOCK_16X16, aom_highbd_sad16x16_bits10, + aom_highbd_sad16x16_avg_bits10, aom_highbd_10_variance16x16, + aom_highbd_10_sub_pixel_variance16x16, + aom_highbd_10_sub_pixel_avg_variance16x16, + aom_highbd_sad16x16x3_bits10, aom_highbd_sad16x16x8_bits10, + aom_highbd_sad16x16x4d_bits10) + + HIGHBD_BFP(BLOCK_16X8, aom_highbd_sad16x8_bits10, + aom_highbd_sad16x8_avg_bits10, aom_highbd_10_variance16x8, + aom_highbd_10_sub_pixel_variance16x8, + aom_highbd_10_sub_pixel_avg_variance16x8, + aom_highbd_sad16x8x3_bits10, aom_highbd_sad16x8x8_bits10, + aom_highbd_sad16x8x4d_bits10) + + HIGHBD_BFP(BLOCK_8X16, aom_highbd_sad8x16_bits10, + aom_highbd_sad8x16_avg_bits10, aom_highbd_10_variance8x16, + aom_highbd_10_sub_pixel_variance8x16, + aom_highbd_10_sub_pixel_avg_variance8x16, + aom_highbd_sad8x16x3_bits10, aom_highbd_sad8x16x8_bits10, + aom_highbd_sad8x16x4d_bits10) HIGHBD_BFP( - BLOCK_8X8, vpx_highbd_sad8x8_bits10, vpx_highbd_sad8x8_avg_bits10, - vpx_highbd_10_variance8x8, vpx_highbd_10_sub_pixel_variance8x8, - vpx_highbd_10_sub_pixel_avg_variance8x8, vpx_highbd_sad8x8x3_bits10, - vpx_highbd_sad8x8x8_bits10, vpx_highbd_sad8x8x4d_bits10) - - HIGHBD_BFP(BLOCK_8X4, vpx_highbd_sad8x4_bits10, - vpx_highbd_sad8x4_avg_bits10, vpx_highbd_10_variance8x4, - vpx_highbd_10_sub_pixel_variance8x4, - vpx_highbd_10_sub_pixel_avg_variance8x4, NULL, - vpx_highbd_sad8x4x8_bits10, vpx_highbd_sad8x4x4d_bits10) - - HIGHBD_BFP(BLOCK_4X8, vpx_highbd_sad4x8_bits10, - vpx_highbd_sad4x8_avg_bits10, vpx_highbd_10_variance4x8, - vpx_highbd_10_sub_pixel_variance4x8, - vpx_highbd_10_sub_pixel_avg_variance4x8, NULL, - vpx_highbd_sad4x8x8_bits10, vpx_highbd_sad4x8x4d_bits10) + BLOCK_8X8, aom_highbd_sad8x8_bits10, aom_highbd_sad8x8_avg_bits10, + aom_highbd_10_variance8x8, aom_highbd_10_sub_pixel_variance8x8, + aom_highbd_10_sub_pixel_avg_variance8x8, aom_highbd_sad8x8x3_bits10, + aom_highbd_sad8x8x8_bits10, aom_highbd_sad8x8x4d_bits10) + + HIGHBD_BFP(BLOCK_8X4, aom_highbd_sad8x4_bits10, + aom_highbd_sad8x4_avg_bits10, aom_highbd_10_variance8x4, + aom_highbd_10_sub_pixel_variance8x4, + aom_highbd_10_sub_pixel_avg_variance8x4, NULL, + aom_highbd_sad8x4x8_bits10, aom_highbd_sad8x4x4d_bits10) + + HIGHBD_BFP(BLOCK_4X8, aom_highbd_sad4x8_bits10, + aom_highbd_sad4x8_avg_bits10, aom_highbd_10_variance4x8, + aom_highbd_10_sub_pixel_variance4x8, + aom_highbd_10_sub_pixel_avg_variance4x8, NULL, + aom_highbd_sad4x8x8_bits10, aom_highbd_sad4x8x4d_bits10) HIGHBD_BFP( - BLOCK_4X4, vpx_highbd_sad4x4_bits10, vpx_highbd_sad4x4_avg_bits10, - vpx_highbd_10_variance4x4, vpx_highbd_10_sub_pixel_variance4x4, - vpx_highbd_10_sub_pixel_avg_variance4x4, vpx_highbd_sad4x4x3_bits10, - vpx_highbd_sad4x4x8_bits10, vpx_highbd_sad4x4x4d_bits10) + BLOCK_4X4, aom_highbd_sad4x4_bits10, aom_highbd_sad4x4_avg_bits10, + aom_highbd_10_variance4x4, aom_highbd_10_sub_pixel_variance4x4, + aom_highbd_10_sub_pixel_avg_variance4x4, aom_highbd_sad4x4x3_bits10, + aom_highbd_sad4x4x8_bits10, aom_highbd_sad4x4x4d_bits10) break; case VPX_BITS_12: - HIGHBD_BFP(BLOCK_32X16, vpx_highbd_sad32x16_bits12, - vpx_highbd_sad32x16_avg_bits12, vpx_highbd_12_variance32x16, - vpx_highbd_12_sub_pixel_variance32x16, - vpx_highbd_12_sub_pixel_avg_variance32x16, NULL, NULL, - vpx_highbd_sad32x16x4d_bits12) - - HIGHBD_BFP(BLOCK_16X32, vpx_highbd_sad16x32_bits12, - vpx_highbd_sad16x32_avg_bits12, vpx_highbd_12_variance16x32, - vpx_highbd_12_sub_pixel_variance16x32, - vpx_highbd_12_sub_pixel_avg_variance16x32, NULL, NULL, - vpx_highbd_sad16x32x4d_bits12) - - HIGHBD_BFP(BLOCK_64X32, vpx_highbd_sad64x32_bits12, - vpx_highbd_sad64x32_avg_bits12, vpx_highbd_12_variance64x32, - vpx_highbd_12_sub_pixel_variance64x32, - vpx_highbd_12_sub_pixel_avg_variance64x32, NULL, NULL, - vpx_highbd_sad64x32x4d_bits12) - - HIGHBD_BFP(BLOCK_32X64, vpx_highbd_sad32x64_bits12, - vpx_highbd_sad32x64_avg_bits12, vpx_highbd_12_variance32x64, - vpx_highbd_12_sub_pixel_variance32x64, - vpx_highbd_12_sub_pixel_avg_variance32x64, NULL, NULL, - vpx_highbd_sad32x64x4d_bits12) - - HIGHBD_BFP(BLOCK_32X32, vpx_highbd_sad32x32_bits12, - vpx_highbd_sad32x32_avg_bits12, vpx_highbd_12_variance32x32, - vpx_highbd_12_sub_pixel_variance32x32, - vpx_highbd_12_sub_pixel_avg_variance32x32, - vpx_highbd_sad32x32x3_bits12, vpx_highbd_sad32x32x8_bits12, - vpx_highbd_sad32x32x4d_bits12) - - HIGHBD_BFP(BLOCK_64X64, vpx_highbd_sad64x64_bits12, - vpx_highbd_sad64x64_avg_bits12, vpx_highbd_12_variance64x64, - vpx_highbd_12_sub_pixel_variance64x64, - vpx_highbd_12_sub_pixel_avg_variance64x64, - vpx_highbd_sad64x64x3_bits12, vpx_highbd_sad64x64x8_bits12, - vpx_highbd_sad64x64x4d_bits12) - - HIGHBD_BFP(BLOCK_16X16, vpx_highbd_sad16x16_bits12, - vpx_highbd_sad16x16_avg_bits12, vpx_highbd_12_variance16x16, - vpx_highbd_12_sub_pixel_variance16x16, - vpx_highbd_12_sub_pixel_avg_variance16x16, - vpx_highbd_sad16x16x3_bits12, vpx_highbd_sad16x16x8_bits12, - vpx_highbd_sad16x16x4d_bits12) - - HIGHBD_BFP(BLOCK_16X8, vpx_highbd_sad16x8_bits12, - vpx_highbd_sad16x8_avg_bits12, vpx_highbd_12_variance16x8, - vpx_highbd_12_sub_pixel_variance16x8, - vpx_highbd_12_sub_pixel_avg_variance16x8, - vpx_highbd_sad16x8x3_bits12, vpx_highbd_sad16x8x8_bits12, - vpx_highbd_sad16x8x4d_bits12) - - HIGHBD_BFP(BLOCK_8X16, vpx_highbd_sad8x16_bits12, - vpx_highbd_sad8x16_avg_bits12, vpx_highbd_12_variance8x16, - vpx_highbd_12_sub_pixel_variance8x16, - vpx_highbd_12_sub_pixel_avg_variance8x16, - vpx_highbd_sad8x16x3_bits12, vpx_highbd_sad8x16x8_bits12, - vpx_highbd_sad8x16x4d_bits12) + HIGHBD_BFP(BLOCK_32X16, aom_highbd_sad32x16_bits12, + aom_highbd_sad32x16_avg_bits12, aom_highbd_12_variance32x16, + aom_highbd_12_sub_pixel_variance32x16, + aom_highbd_12_sub_pixel_avg_variance32x16, NULL, NULL, + aom_highbd_sad32x16x4d_bits12) + + HIGHBD_BFP(BLOCK_16X32, aom_highbd_sad16x32_bits12, + aom_highbd_sad16x32_avg_bits12, aom_highbd_12_variance16x32, + aom_highbd_12_sub_pixel_variance16x32, + aom_highbd_12_sub_pixel_avg_variance16x32, NULL, NULL, + aom_highbd_sad16x32x4d_bits12) + + HIGHBD_BFP(BLOCK_64X32, aom_highbd_sad64x32_bits12, + aom_highbd_sad64x32_avg_bits12, aom_highbd_12_variance64x32, + aom_highbd_12_sub_pixel_variance64x32, + aom_highbd_12_sub_pixel_avg_variance64x32, NULL, NULL, + aom_highbd_sad64x32x4d_bits12) + + HIGHBD_BFP(BLOCK_32X64, aom_highbd_sad32x64_bits12, + aom_highbd_sad32x64_avg_bits12, aom_highbd_12_variance32x64, + aom_highbd_12_sub_pixel_variance32x64, + aom_highbd_12_sub_pixel_avg_variance32x64, NULL, NULL, + aom_highbd_sad32x64x4d_bits12) + + HIGHBD_BFP(BLOCK_32X32, aom_highbd_sad32x32_bits12, + aom_highbd_sad32x32_avg_bits12, aom_highbd_12_variance32x32, + aom_highbd_12_sub_pixel_variance32x32, + aom_highbd_12_sub_pixel_avg_variance32x32, + aom_highbd_sad32x32x3_bits12, aom_highbd_sad32x32x8_bits12, + aom_highbd_sad32x32x4d_bits12) + + HIGHBD_BFP(BLOCK_64X64, aom_highbd_sad64x64_bits12, + aom_highbd_sad64x64_avg_bits12, aom_highbd_12_variance64x64, + aom_highbd_12_sub_pixel_variance64x64, + aom_highbd_12_sub_pixel_avg_variance64x64, + aom_highbd_sad64x64x3_bits12, aom_highbd_sad64x64x8_bits12, + aom_highbd_sad64x64x4d_bits12) + + HIGHBD_BFP(BLOCK_16X16, aom_highbd_sad16x16_bits12, + aom_highbd_sad16x16_avg_bits12, aom_highbd_12_variance16x16, + aom_highbd_12_sub_pixel_variance16x16, + aom_highbd_12_sub_pixel_avg_variance16x16, + aom_highbd_sad16x16x3_bits12, aom_highbd_sad16x16x8_bits12, + aom_highbd_sad16x16x4d_bits12) + + HIGHBD_BFP(BLOCK_16X8, aom_highbd_sad16x8_bits12, + aom_highbd_sad16x8_avg_bits12, aom_highbd_12_variance16x8, + aom_highbd_12_sub_pixel_variance16x8, + aom_highbd_12_sub_pixel_avg_variance16x8, + aom_highbd_sad16x8x3_bits12, aom_highbd_sad16x8x8_bits12, + aom_highbd_sad16x8x4d_bits12) + + HIGHBD_BFP(BLOCK_8X16, aom_highbd_sad8x16_bits12, + aom_highbd_sad8x16_avg_bits12, aom_highbd_12_variance8x16, + aom_highbd_12_sub_pixel_variance8x16, + aom_highbd_12_sub_pixel_avg_variance8x16, + aom_highbd_sad8x16x3_bits12, aom_highbd_sad8x16x8_bits12, + aom_highbd_sad8x16x4d_bits12) HIGHBD_BFP( - BLOCK_8X8, vpx_highbd_sad8x8_bits12, vpx_highbd_sad8x8_avg_bits12, - vpx_highbd_12_variance8x8, vpx_highbd_12_sub_pixel_variance8x8, - vpx_highbd_12_sub_pixel_avg_variance8x8, vpx_highbd_sad8x8x3_bits12, - vpx_highbd_sad8x8x8_bits12, vpx_highbd_sad8x8x4d_bits12) - - HIGHBD_BFP(BLOCK_8X4, vpx_highbd_sad8x4_bits12, - vpx_highbd_sad8x4_avg_bits12, vpx_highbd_12_variance8x4, - vpx_highbd_12_sub_pixel_variance8x4, - vpx_highbd_12_sub_pixel_avg_variance8x4, NULL, - vpx_highbd_sad8x4x8_bits12, vpx_highbd_sad8x4x4d_bits12) - - HIGHBD_BFP(BLOCK_4X8, vpx_highbd_sad4x8_bits12, - vpx_highbd_sad4x8_avg_bits12, vpx_highbd_12_variance4x8, - vpx_highbd_12_sub_pixel_variance4x8, - vpx_highbd_12_sub_pixel_avg_variance4x8, NULL, - vpx_highbd_sad4x8x8_bits12, vpx_highbd_sad4x8x4d_bits12) + BLOCK_8X8, aom_highbd_sad8x8_bits12, aom_highbd_sad8x8_avg_bits12, + aom_highbd_12_variance8x8, aom_highbd_12_sub_pixel_variance8x8, + aom_highbd_12_sub_pixel_avg_variance8x8, aom_highbd_sad8x8x3_bits12, + aom_highbd_sad8x8x8_bits12, aom_highbd_sad8x8x4d_bits12) + + HIGHBD_BFP(BLOCK_8X4, aom_highbd_sad8x4_bits12, + aom_highbd_sad8x4_avg_bits12, aom_highbd_12_variance8x4, + aom_highbd_12_sub_pixel_variance8x4, + aom_highbd_12_sub_pixel_avg_variance8x4, NULL, + aom_highbd_sad8x4x8_bits12, aom_highbd_sad8x4x4d_bits12) + + HIGHBD_BFP(BLOCK_4X8, aom_highbd_sad4x8_bits12, + aom_highbd_sad4x8_avg_bits12, aom_highbd_12_variance4x8, + aom_highbd_12_sub_pixel_variance4x8, + aom_highbd_12_sub_pixel_avg_variance4x8, NULL, + aom_highbd_sad4x8x8_bits12, aom_highbd_sad4x8x4d_bits12) HIGHBD_BFP( - BLOCK_4X4, vpx_highbd_sad4x4_bits12, vpx_highbd_sad4x4_avg_bits12, - vpx_highbd_12_variance4x4, vpx_highbd_12_sub_pixel_variance4x4, - vpx_highbd_12_sub_pixel_avg_variance4x4, vpx_highbd_sad4x4x3_bits12, - vpx_highbd_sad4x4x8_bits12, vpx_highbd_sad4x4x4d_bits12) + BLOCK_4X4, aom_highbd_sad4x4_bits12, aom_highbd_sad4x4_avg_bits12, + aom_highbd_12_variance4x4, aom_highbd_12_sub_pixel_variance4x4, + aom_highbd_12_sub_pixel_avg_variance4x4, aom_highbd_sad4x4x3_bits12, + aom_highbd_sad4x4x8_bits12, aom_highbd_sad4x4x4d_bits12) break; default: @@ -1194,9 +1194,9 @@ static void realloc_segmentation_maps(VP10_COMP *cpi) { VP10_COMMON *const cm = &cpi->common; // Create the encoder segmentation map and set all entries to 0 - vpx_free(cpi->segmentation_map); + aom_free(cpi->segmentation_map); CHECK_MEM_ERROR(cm, cpi->segmentation_map, - vpx_calloc(cm->mi_rows * cm->mi_cols, 1)); + aom_calloc(cm->mi_rows * cm->mi_cols, 1)); // Create a map used for cyclic background refresh. if (cpi->cyclic_refresh) vp10_cyclic_refresh_free(cpi->cyclic_refresh); @@ -1204,15 +1204,15 @@ static void realloc_segmentation_maps(VP10_COMP *cpi) { vp10_cyclic_refresh_alloc(cm->mi_rows, cm->mi_cols)); // Create a map used to mark inactive areas. - vpx_free(cpi->active_map.map); + aom_free(cpi->active_map.map); CHECK_MEM_ERROR(cm, cpi->active_map.map, - vpx_calloc(cm->mi_rows * cm->mi_cols, 1)); + aom_calloc(cm->mi_rows * cm->mi_cols, 1)); // And a place holder structure is the coding context // for use if we want to save and restore it - vpx_free(cpi->coding_context.last_frame_seg_map_copy); + aom_free(cpi->coding_context.last_frame_seg_map_copy); CHECK_MEM_ERROR(cm, cpi->coding_context.last_frame_seg_map_copy, - vpx_calloc(cm->mi_rows * cm->mi_cols, 1)); + aom_calloc(cm->mi_rows * cm->mi_cols, 1)); } void vp10_change_config(struct VP10_COMP *cpi, const VP10EncoderConfig *oxcf) { @@ -1360,7 +1360,7 @@ static void cal_nmvsadcosts_hp(int *mvsadcost[2]) { VP10_COMP *vp10_create_compressor(VP10EncoderConfig *oxcf, BufferPool *const pool) { unsigned int i; - VP10_COMP *volatile const cpi = vpx_memalign(32, sizeof(VP10_COMP)); + VP10_COMP *volatile const cpi = aom_memalign(32, sizeof(VP10_COMP)); VP10_COMMON *volatile const cm = cpi != NULL ? &cpi->common : NULL; if (!cm) return NULL; @@ -1378,10 +1378,10 @@ VP10_COMP *vp10_create_compressor(VP10EncoderConfig *oxcf, cm->free_mi = vp10_enc_free_mi; cm->setup_mi = vp10_enc_setup_mi; - CHECK_MEM_ERROR(cm, cm->fc, (FRAME_CONTEXT *)vpx_calloc(1, sizeof(*cm->fc))); + CHECK_MEM_ERROR(cm, cm->fc, (FRAME_CONTEXT *)aom_calloc(1, sizeof(*cm->fc))); CHECK_MEM_ERROR( cm, cm->frame_contexts, - (FRAME_CONTEXT *)vpx_calloc(FRAME_CONTEXTS, sizeof(*cm->frame_contexts))); + (FRAME_CONTEXT *)aom_calloc(FRAME_CONTEXTS, sizeof(*cm->frame_contexts))); cpi->resize_state = 0; cpi->resize_avg_qp = 0; @@ -1398,27 +1398,27 @@ VP10_COMP *vp10_create_compressor(VP10EncoderConfig *oxcf, realloc_segmentation_maps(cpi); CHECK_MEM_ERROR(cm, cpi->nmvcosts[0], - vpx_calloc(MV_VALS, sizeof(*cpi->nmvcosts[0]))); + aom_calloc(MV_VALS, sizeof(*cpi->nmvcosts[0]))); CHECK_MEM_ERROR(cm, cpi->nmvcosts[1], - vpx_calloc(MV_VALS, sizeof(*cpi->nmvcosts[1]))); + aom_calloc(MV_VALS, sizeof(*cpi->nmvcosts[1]))); CHECK_MEM_ERROR(cm, cpi->nmvcosts_hp[0], - vpx_calloc(MV_VALS, sizeof(*cpi->nmvcosts_hp[0]))); + aom_calloc(MV_VALS, sizeof(*cpi->nmvcosts_hp[0]))); CHECK_MEM_ERROR(cm, cpi->nmvcosts_hp[1], - vpx_calloc(MV_VALS, sizeof(*cpi->nmvcosts_hp[1]))); + aom_calloc(MV_VALS, sizeof(*cpi->nmvcosts_hp[1]))); CHECK_MEM_ERROR(cm, cpi->nmvsadcosts[0], - vpx_calloc(MV_VALS, sizeof(*cpi->nmvsadcosts[0]))); + aom_calloc(MV_VALS, sizeof(*cpi->nmvsadcosts[0]))); CHECK_MEM_ERROR(cm, cpi->nmvsadcosts[1], - vpx_calloc(MV_VALS, sizeof(*cpi->nmvsadcosts[1]))); + aom_calloc(MV_VALS, sizeof(*cpi->nmvsadcosts[1]))); CHECK_MEM_ERROR(cm, cpi->nmvsadcosts_hp[0], - vpx_calloc(MV_VALS, sizeof(*cpi->nmvsadcosts_hp[0]))); + aom_calloc(MV_VALS, sizeof(*cpi->nmvsadcosts_hp[0]))); CHECK_MEM_ERROR(cm, cpi->nmvsadcosts_hp[1], - vpx_calloc(MV_VALS, sizeof(*cpi->nmvsadcosts_hp[1]))); + aom_calloc(MV_VALS, sizeof(*cpi->nmvsadcosts_hp[1]))); for (i = 0; i < (sizeof(cpi->mbgraph_stats) / sizeof(cpi->mbgraph_stats[0])); i++) { CHECK_MEM_ERROR( cm, cpi->mbgraph_stats[i].mb_stats, - vpx_calloc(cm->MBs * sizeof(*cpi->mbgraph_stats[i].mb_stats), 1)); + aom_calloc(cm->MBs * sizeof(*cpi->mbgraph_stats[i].mb_stats), 1)); } #if CONFIG_FP_MB_STATS @@ -1426,7 +1426,7 @@ VP10_COMP *vp10_create_compressor(VP10EncoderConfig *oxcf, if (cpi->use_fp_mb_stats) { // a place holder used to store the first pass mb stats in the first pass CHECK_MEM_ERROR(cm, cpi->twopass.frame_mb_stats_buf, - vpx_calloc(cm->MBs * sizeof(uint8_t), 1)); + aom_calloc(cm->MBs * sizeof(uint8_t), 1)); } else { cpi->twopass.frame_mb_stats_buf = NULL; } @@ -1474,7 +1474,7 @@ VP10_COMP *vp10_create_compressor(VP10EncoderConfig *oxcf, } if (cpi->b_calculate_consistency) { - cpi->ssim_vars = vpx_malloc(sizeof(*cpi->ssim_vars) * 4 * + cpi->ssim_vars = aom_malloc(sizeof(*cpi->ssim_vars) * 4 * cpi->common.mi_rows * cpi->common.mi_cols); cpi->worst_consistency = 100.0; } @@ -1540,7 +1540,7 @@ VP10_COMP *vp10_create_compressor(VP10EncoderConfig *oxcf, vp10_set_speed_features_framesize_dependent(cpi); // Allocate memory to store variances for a frame. - CHECK_MEM_ERROR(cm, cpi->source_diff_var, vpx_calloc(cm->MBs, sizeof(diff))); + CHECK_MEM_ERROR(cm, cpi->source_diff_var, aom_calloc(cm->MBs, sizeof(diff))); cpi->source_var_thresh = 0; cpi->frames_till_next_var_check = 0; @@ -1554,57 +1554,57 @@ VP10_COMP *vp10_create_compressor(VP10EncoderConfig *oxcf, cpi->fn_ptr[BT].sdx8f = SDX8F; \ cpi->fn_ptr[BT].sdx4df = SDX4DF; - BFP(BLOCK_32X16, vpx_sad32x16, vpx_sad32x16_avg, vpx_variance32x16, - vpx_sub_pixel_variance32x16, vpx_sub_pixel_avg_variance32x16, NULL, NULL, - vpx_sad32x16x4d) + BFP(BLOCK_32X16, aom_sad32x16, aom_sad32x16_avg, aom_variance32x16, + aom_sub_pixel_variance32x16, aom_sub_pixel_avg_variance32x16, NULL, NULL, + aom_sad32x16x4d) - BFP(BLOCK_16X32, vpx_sad16x32, vpx_sad16x32_avg, vpx_variance16x32, - vpx_sub_pixel_variance16x32, vpx_sub_pixel_avg_variance16x32, NULL, NULL, - vpx_sad16x32x4d) + BFP(BLOCK_16X32, aom_sad16x32, aom_sad16x32_avg, aom_variance16x32, + aom_sub_pixel_variance16x32, aom_sub_pixel_avg_variance16x32, NULL, NULL, + aom_sad16x32x4d) - BFP(BLOCK_64X32, vpx_sad64x32, vpx_sad64x32_avg, vpx_variance64x32, - vpx_sub_pixel_variance64x32, vpx_sub_pixel_avg_variance64x32, NULL, NULL, - vpx_sad64x32x4d) + BFP(BLOCK_64X32, aom_sad64x32, aom_sad64x32_avg, aom_variance64x32, + aom_sub_pixel_variance64x32, aom_sub_pixel_avg_variance64x32, NULL, NULL, + aom_sad64x32x4d) - BFP(BLOCK_32X64, vpx_sad32x64, vpx_sad32x64_avg, vpx_variance32x64, - vpx_sub_pixel_variance32x64, vpx_sub_pixel_avg_variance32x64, NULL, NULL, - vpx_sad32x64x4d) + BFP(BLOCK_32X64, aom_sad32x64, aom_sad32x64_avg, aom_variance32x64, + aom_sub_pixel_variance32x64, aom_sub_pixel_avg_variance32x64, NULL, NULL, + aom_sad32x64x4d) - BFP(BLOCK_32X32, vpx_sad32x32, vpx_sad32x32_avg, vpx_variance32x32, - vpx_sub_pixel_variance32x32, vpx_sub_pixel_avg_variance32x32, - vpx_sad32x32x3, vpx_sad32x32x8, vpx_sad32x32x4d) + BFP(BLOCK_32X32, aom_sad32x32, aom_sad32x32_avg, aom_variance32x32, + aom_sub_pixel_variance32x32, aom_sub_pixel_avg_variance32x32, + aom_sad32x32x3, aom_sad32x32x8, aom_sad32x32x4d) - BFP(BLOCK_64X64, vpx_sad64x64, vpx_sad64x64_avg, vpx_variance64x64, - vpx_sub_pixel_variance64x64, vpx_sub_pixel_avg_variance64x64, - vpx_sad64x64x3, vpx_sad64x64x8, vpx_sad64x64x4d) + BFP(BLOCK_64X64, aom_sad64x64, aom_sad64x64_avg, aom_variance64x64, + aom_sub_pixel_variance64x64, aom_sub_pixel_avg_variance64x64, + aom_sad64x64x3, aom_sad64x64x8, aom_sad64x64x4d) - BFP(BLOCK_16X16, vpx_sad16x16, vpx_sad16x16_avg, vpx_variance16x16, - vpx_sub_pixel_variance16x16, vpx_sub_pixel_avg_variance16x16, - vpx_sad16x16x3, vpx_sad16x16x8, vpx_sad16x16x4d) + BFP(BLOCK_16X16, aom_sad16x16, aom_sad16x16_avg, aom_variance16x16, + aom_sub_pixel_variance16x16, aom_sub_pixel_avg_variance16x16, + aom_sad16x16x3, aom_sad16x16x8, aom_sad16x16x4d) - BFP(BLOCK_16X8, vpx_sad16x8, vpx_sad16x8_avg, vpx_variance16x8, - vpx_sub_pixel_variance16x8, vpx_sub_pixel_avg_variance16x8, vpx_sad16x8x3, - vpx_sad16x8x8, vpx_sad16x8x4d) + BFP(BLOCK_16X8, aom_sad16x8, aom_sad16x8_avg, aom_variance16x8, + aom_sub_pixel_variance16x8, aom_sub_pixel_avg_variance16x8, aom_sad16x8x3, + aom_sad16x8x8, aom_sad16x8x4d) - BFP(BLOCK_8X16, vpx_sad8x16, vpx_sad8x16_avg, vpx_variance8x16, - vpx_sub_pixel_variance8x16, vpx_sub_pixel_avg_variance8x16, vpx_sad8x16x3, - vpx_sad8x16x8, vpx_sad8x16x4d) + BFP(BLOCK_8X16, aom_sad8x16, aom_sad8x16_avg, aom_variance8x16, + aom_sub_pixel_variance8x16, aom_sub_pixel_avg_variance8x16, aom_sad8x16x3, + aom_sad8x16x8, aom_sad8x16x4d) - BFP(BLOCK_8X8, vpx_sad8x8, vpx_sad8x8_avg, vpx_variance8x8, - vpx_sub_pixel_variance8x8, vpx_sub_pixel_avg_variance8x8, vpx_sad8x8x3, - vpx_sad8x8x8, vpx_sad8x8x4d) + BFP(BLOCK_8X8, aom_sad8x8, aom_sad8x8_avg, aom_variance8x8, + aom_sub_pixel_variance8x8, aom_sub_pixel_avg_variance8x8, aom_sad8x8x3, + aom_sad8x8x8, aom_sad8x8x4d) - BFP(BLOCK_8X4, vpx_sad8x4, vpx_sad8x4_avg, vpx_variance8x4, - vpx_sub_pixel_variance8x4, vpx_sub_pixel_avg_variance8x4, NULL, - vpx_sad8x4x8, vpx_sad8x4x4d) + BFP(BLOCK_8X4, aom_sad8x4, aom_sad8x4_avg, aom_variance8x4, + aom_sub_pixel_variance8x4, aom_sub_pixel_avg_variance8x4, NULL, + aom_sad8x4x8, aom_sad8x4x4d) - BFP(BLOCK_4X8, vpx_sad4x8, vpx_sad4x8_avg, vpx_variance4x8, - vpx_sub_pixel_variance4x8, vpx_sub_pixel_avg_variance4x8, NULL, - vpx_sad4x8x8, vpx_sad4x8x4d) + BFP(BLOCK_4X8, aom_sad4x8, aom_sad4x8_avg, aom_variance4x8, + aom_sub_pixel_variance4x8, aom_sub_pixel_avg_variance4x8, NULL, + aom_sad4x8x8, aom_sad4x8x4d) - BFP(BLOCK_4X4, vpx_sad4x4, vpx_sad4x4_avg, vpx_variance4x4, - vpx_sub_pixel_variance4x4, vpx_sub_pixel_avg_variance4x4, vpx_sad4x4x3, - vpx_sad4x4x8, vpx_sad4x4x4d) + BFP(BLOCK_4X4, aom_sad4x4, aom_sad4x4_avg, aom_variance4x4, + aom_sub_pixel_variance4x4, aom_sub_pixel_avg_variance4x4, aom_sad4x4x3, + aom_sad4x4x8, aom_sad4x4x4d) #if CONFIG_VPX_HIGHBITDEPTH highbd_set_var_fns(cpi); @@ -1641,7 +1641,7 @@ void vp10_remove_compressor(VP10_COMP *cpi) { cm = &cpi->common; if (cm->current_video_frame > 0) { #if CONFIG_INTERNAL_STATS - vpx_clear_system_state(); + aom_clear_system_state(); if (cpi->oxcf.pass != 1) { char headings[512] = { 0 }; @@ -1657,9 +1657,9 @@ void vp10_remove_compressor(VP10_COMP *cpi) { const double peak = (double)((1 << cpi->oxcf.input_bit_depth) - 1); if (cpi->b_calculate_psnr) { - const double total_psnr = vpx_sse_to_psnr( + const double total_psnr = aom_sse_to_psnr( (double)cpi->total_samples, peak, (double)cpi->total_sq_error); - const double totalp_psnr = vpx_sse_to_psnr( + const double totalp_psnr = aom_sse_to_psnr( (double)cpi->totalp_samples, peak, (double)cpi->totalp_sq_error); const double total_ssim = 100 * pow(cpi->summed_quality / cpi->summed_weights, 8.0); @@ -1688,7 +1688,7 @@ void vp10_remove_compressor(VP10_COMP *cpi) { if (cpi->b_calculate_consistency) { double consistency = - vpx_sse_to_psnr((double)cpi->totalp_samples, peak, + aom_sse_to_psnr((double)cpi->totalp_samples, peak, (double)cpi->total_inconsistency); SNPRINT(headings, "\tConsist\tWstCons"); @@ -1728,17 +1728,17 @@ void vp10_remove_compressor(VP10_COMP *cpi) { EncWorkerData *const thread_data = &cpi->tile_thr_data[t]; // Deallocate allocated threads. - vpx_get_worker_interface()->end(worker); + aom_get_worker_interface()->end(worker); // Deallocate allocated thread data. if (t < cpi->num_workers - 1) { - vpx_free(thread_data->td->counts); + aom_free(thread_data->td->counts); vp10_free_pc_tree(thread_data->td); - vpx_free(thread_data->td); + aom_free(thread_data->td); } } - vpx_free(cpi->tile_thr_data); - vpx_free(cpi->workers); + aom_free(cpi->tile_thr_data); + aom_free(cpi->workers); if (cpi->num_workers > 1) vp10_loop_filter_dealloc(&cpi->lf_row_sync); @@ -1746,19 +1746,19 @@ void vp10_remove_compressor(VP10_COMP *cpi) { for (i = 0; i < sizeof(cpi->mbgraph_stats) / sizeof(cpi->mbgraph_stats[0]); ++i) { - vpx_free(cpi->mbgraph_stats[i].mb_stats); + aom_free(cpi->mbgraph_stats[i].mb_stats); } #if CONFIG_FP_MB_STATS if (cpi->use_fp_mb_stats) { - vpx_free(cpi->twopass.frame_mb_stats_buf); + aom_free(cpi->twopass.frame_mb_stats_buf); cpi->twopass.frame_mb_stats_buf = NULL; } #endif vp10_remove_common(cm); vp10_free_ref_frame_buffers(cm->buffer_pool); - vpx_free(cpi); + aom_free(cpi); #ifdef OUTPUT_YUV_SKINMAP fclose(yuv_skinmap_file); @@ -1864,7 +1864,7 @@ static int64_t get_sse(const uint8_t *a, int a_stride, const uint8_t *b, const uint8_t *pa = a; const uint8_t *pb = b; for (x = 0; x < width / 16; ++x) { - vpx_mse16x16(pa, a_stride, pb, b_stride, &sse); + aom_mse16x16(pa, a_stride, pb, b_stride, &sse); total_sse += sse; pa += 16; @@ -1921,7 +1921,7 @@ static int64_t highbd_get_sse(const uint8_t *a, int a_stride, const uint8_t *b, const uint8_t *pa = a; const uint8_t *pb = b; for (x = 0; x < width / 16; ++x) { - vpx_highbd_8_mse16x16(pa, a_stride, pb, b_stride, &sse); + aom_highbd_8_mse16x16(pa, a_stride, pb, b_stride, &sse); total_sse += sse; pa += 16; pb += 16; @@ -1975,7 +1975,7 @@ static void calc_highbd_psnr(const YV12_BUFFER_CONFIG *a, } psnr->sse[1 + i] = sse; psnr->samples[1 + i] = samples; - psnr->psnr[1 + i] = vpx_sse_to_psnr(samples, peak, (double)sse); + psnr->psnr[1 + i] = aom_sse_to_psnr(samples, peak, (double)sse); total_sse += sse; total_samples += samples; @@ -1984,7 +1984,7 @@ static void calc_highbd_psnr(const YV12_BUFFER_CONFIG *a, psnr->sse[0] = total_sse; psnr->samples[0] = total_samples; psnr->psnr[0] = - vpx_sse_to_psnr((double)total_samples, peak, (double)total_sse); + aom_sse_to_psnr((double)total_samples, peak, (double)total_sse); } #else // !CONFIG_VPX_HIGHBITDEPTH @@ -2011,7 +2011,7 @@ static void calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, get_sse(a_planes[i], a_strides[i], b_planes[i], b_strides[i], w, h); psnr->sse[1 + i] = sse; psnr->samples[1 + i] = samples; - psnr->psnr[1 + i] = vpx_sse_to_psnr(samples, peak, (double)sse); + psnr->psnr[1 + i] = aom_sse_to_psnr(samples, peak, (double)sse); total_sse += sse; total_samples += samples; @@ -2020,12 +2020,12 @@ static void calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, psnr->sse[0] = total_sse; psnr->samples[0] = total_samples; psnr->psnr[0] = - vpx_sse_to_psnr((double)total_samples, peak, (double)total_sse); + aom_sse_to_psnr((double)total_samples, peak, (double)total_sse); } #endif // CONFIG_VPX_HIGHBITDEPTH static void generate_psnr_packet(VP10_COMP *cpi) { - struct vpx_codec_cx_pkt pkt; + struct aom_codec_cx_pkt pkt; int i; PSNR_STATS psnr; #if CONFIG_VPX_HIGHBITDEPTH @@ -2041,7 +2041,7 @@ static void generate_psnr_packet(VP10_COMP *cpi) { pkt.data.psnr.psnr[i] = psnr.psnr[i]; } pkt.kind = VPX_CODEC_PSNR_PKT; - vpx_codec_pkt_list_add(cpi->output_pkt_list, &pkt); + aom_codec_pkt_list_add(cpi->output_pkt_list, &pkt); } int vp10_use_as_reference(VP10_COMP *cpi, int ref_frame_flags) { @@ -2075,7 +2075,7 @@ int vp10_copy_reference_enc(VP10_COMP *cpi, VPX_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) { YV12_BUFFER_CONFIG *cfg = get_vp10_ref_frame_buffer(cpi, ref_frame_flag); if (cfg) { - vpx_yv12_copy_frame(cfg, sd); + aom_yv12_copy_frame(cfg, sd); return 0; } else { return -1; @@ -2086,7 +2086,7 @@ int vp10_set_reference_enc(VP10_COMP *cpi, VPX_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) { YV12_BUFFER_CONFIG *cfg = get_vp10_ref_frame_buffer(cpi, ref_frame_flag); if (cfg) { - vpx_yv12_copy_frame(sd, cfg); + aom_yv12_copy_frame(sd, cfg); return 0; } else { return -1; @@ -2200,7 +2200,7 @@ static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src, static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst) { #endif // CONFIG_VPX_HIGHBITDEPTH - // TODO(dkovalev): replace YV12_BUFFER_CONFIG with vpx_image_t + // TODO(dkovalev): replace YV12_BUFFER_CONFIG with aom_image_t int i; const uint8_t *const srcs[3] = { src->y_buffer, src->u_buffer, src->v_buffer }; @@ -2231,7 +2231,7 @@ static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src, dsts[i], dst_heights[i], dst_widths[i], dst_strides[i]); #endif // CONFIG_VPX_HIGHBITDEPTH } - vpx_extend_frame_borders(dst); + aom_extend_frame_borders(dst); } #if CONFIG_VPX_HIGHBITDEPTH @@ -2268,18 +2268,18 @@ static void scale_and_extend_frame(const YV12_BUFFER_CONFIG *src, #if CONFIG_VPX_HIGHBITDEPTH if (src->flags & YV12_FLAG_HIGHBITDEPTH) { - vpx_highbd_convolve8(src_ptr, src_stride, dst_ptr, dst_stride, + aom_highbd_convolve8(src_ptr, src_stride, dst_ptr, dst_stride, kernel[x_q4 & 0xf], 16 * src_w / dst_w, kernel[y_q4 & 0xf], 16 * src_h / dst_h, 16 / factor, 16 / factor, bd); } else { - vpx_convolve8(src_ptr, src_stride, dst_ptr, dst_stride, + aom_convolve8(src_ptr, src_stride, dst_ptr, dst_stride, kernel[x_q4 & 0xf], 16 * src_w / dst_w, kernel[y_q4 & 0xf], 16 * src_h / dst_h, 16 / factor, 16 / factor); } #else - vpx_convolve8(src_ptr, src_stride, dst_ptr, dst_stride, + aom_convolve8(src_ptr, src_stride, dst_ptr, dst_stride, kernel[x_q4 & 0xf], 16 * src_w / dst_w, kernel[y_q4 & 0xf], 16 * src_h / dst_h, 16 / factor, 16 / factor); @@ -2288,7 +2288,7 @@ static void scale_and_extend_frame(const YV12_BUFFER_CONFIG *src, } } - vpx_extend_frame_borders(dst); + aom_extend_frame_borders(dst); } static int scale_down(VP10_COMP *cpi, int q) { @@ -2414,16 +2414,16 @@ static void loopfilter_frame(VP10_COMP *cpi, VP10_COMMON *cm) { if (is_lossless_requested(&cpi->oxcf)) { lf->filter_level = 0; } else { - struct vpx_usec_timer timer; + struct aom_usec_timer timer; - vpx_clear_system_state(); + aom_clear_system_state(); - vpx_usec_timer_start(&timer); + aom_usec_timer_start(&timer); vp10_pick_filter_level(cpi->Source, cpi, cpi->sf.lpf_pick); - vpx_usec_timer_mark(&timer); - cpi->time_pick_lpf += vpx_usec_timer_elapsed(&timer); + aom_usec_timer_mark(&timer); + cpi->time_pick_lpf += aom_usec_timer_elapsed(&timer); } if (lf->filter_level > 0) { @@ -2459,7 +2459,7 @@ static void loopfilter_frame(VP10_COMP *cpi, VP10_COMMON *cm) { if (!hq) { // Don't try filter if the entire image is nearly losslessly // encoded #if CLPF_FILTER_ALL_PLANES - vpx_yv12_copy_frame(cm->frame_to_show, &cpi->last_frame_uf); + aom_yv12_copy_frame(cm->frame_to_show, &cpi->last_frame_uf); before = get_sse(cpi->Source->y_buffer, cpi->Source->y_stride, cm->frame_to_show->y_buffer, cm->frame_to_show->y_stride, @@ -2481,7 +2481,7 @@ static void loopfilter_frame(VP10_COMP *cpi, VP10_COMMON *cm) { cm->frame_to_show->v_buffer, cm->frame_to_show->uv_stride, cpi->Source->uv_crop_width, cpi->Source->uv_crop_height); #else - vpx_yv12_copy_y(cm->frame_to_show, &cpi->last_frame_uf); + aom_yv12_copy_y(cm->frame_to_show, &cpi->last_frame_uf); before = get_sse(cpi->Source->y_buffer, cpi->Source->y_stride, cm->frame_to_show->y_buffer, cm->frame_to_show->y_stride, cpi->Source->y_crop_width, cpi->Source->y_crop_height); @@ -2493,9 +2493,9 @@ static void loopfilter_frame(VP10_COMP *cpi, VP10_COMMON *cm) { if (before < after) { // No improvement, restore original #if CLPF_FILTER_ALL_PLANES - vpx_yv12_copy_frame(&cpi->last_frame_uf, cm->frame_to_show); + aom_yv12_copy_frame(&cpi->last_frame_uf, cm->frame_to_show); #else - vpx_yv12_copy_y(&cpi->last_frame_uf, cm->frame_to_show); + aom_yv12_copy_y(&cpi->last_frame_uf, cm->frame_to_show); #endif } else { cm->clpf = 1; @@ -2504,15 +2504,15 @@ static void loopfilter_frame(VP10_COMP *cpi, VP10_COMMON *cm) { } #endif - vpx_extend_frame_inner_borders(cm->frame_to_show); + aom_extend_frame_inner_borders(cm->frame_to_show); } static INLINE void alloc_frame_mvs(const VP10_COMMON *cm, int buffer_idx) { RefCntBuffer *const new_fb_ptr = &cm->buffer_pool->frame_bufs[buffer_idx]; if (new_fb_ptr->mvs == NULL || new_fb_ptr->mi_rows < cm->mi_rows || new_fb_ptr->mi_cols < cm->mi_cols) { - vpx_free(new_fb_ptr->mvs); - new_fb_ptr->mvs = (MV_REF *)vpx_calloc(cm->mi_rows * cm->mi_cols, + aom_free(new_fb_ptr->mvs); + new_fb_ptr->mvs = (MV_REF *)aom_calloc(cm->mi_rows * cm->mi_cols, sizeof(*new_fb_ptr->mvs)); new_fb_ptr->mi_rows = cm->mi_rows; new_fb_ptr->mi_cols = cm->mi_cols; @@ -2550,7 +2550,7 @@ void vp10_scale_references(VP10_COMP *cpi) { new_fb_ptr = &pool->frame_bufs[new_fb]; if (force_scaling || new_fb_ptr->buf.y_crop_width != cm->width || new_fb_ptr->buf.y_crop_height != cm->height) { - vpx_realloc_frame_buffer( + aom_realloc_frame_buffer( &new_fb_ptr->buf, cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, cm->use_highbitdepth, VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL); @@ -2571,7 +2571,7 @@ void vp10_scale_references(VP10_COMP *cpi) { new_fb_ptr = &pool->frame_bufs[new_fb]; if (force_scaling || new_fb_ptr->buf.y_crop_width != cm->width || new_fb_ptr->buf.y_crop_height != cm->height) { - vpx_realloc_frame_buffer(&new_fb_ptr->buf, cm->width, cm->height, + aom_realloc_frame_buffer(&new_fb_ptr->buf, cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL); @@ -2657,7 +2657,7 @@ static void output_frame_level_debug_stats(VP10_COMP *cpi) { FILE *const f = fopen("tmp.stt", cm->current_video_frame ? "a" : "w"); int64_t recon_err; - vpx_clear_system_state(); + aom_clear_system_state(); recon_err = vp10_get_y_sse(cpi->Source, get_frame_new_buffer(cm)); @@ -2833,7 +2833,7 @@ static void set_frame_size(VP10_COMP *cpi) { alloc_frame_mvs(cm, cm->new_fb_idx); // Reset the frame pointers to the current frame size. - vpx_realloc_frame_buffer(get_frame_new_buffer(cm), cm->width, cm->height, + aom_realloc_frame_buffer(get_frame_new_buffer(cm), cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, #if CONFIG_VPX_HIGHBITDEPTH cm->use_highbitdepth, @@ -2862,7 +2862,7 @@ static void set_frame_size(VP10_COMP *cpi) { buf->y_crop_height, cm->width, cm->height); #endif // CONFIG_VPX_HIGHBITDEPTH - if (vp10_is_scaled(&ref_buf->sf)) vpx_extend_frame_borders(buf); + if (vp10_is_scaled(&ref_buf->sf)) aom_extend_frame_borders(buf); } else { ref_buf->buf = NULL; } @@ -2875,7 +2875,7 @@ static void encode_without_recode_loop(VP10_COMP *cpi) { VP10_COMMON *const cm = &cpi->common; int q = 0, bottom_index = 0, top_index = 0; // Dummy variables. - vpx_clear_system_state(); + aom_clear_system_state(); set_frame_size(cpi); @@ -2934,7 +2934,7 @@ static void encode_without_recode_loop(VP10_COMP *cpi) { // Update the skip mb flag probabilities based on the distribution // seen in the last encoder iteration. // update_base_skip_probs(cpi); - vpx_clear_system_state(); + aom_clear_system_state(); } static void encode_with_recode_loop(VP10_COMP *cpi, size_t *size, @@ -2954,7 +2954,7 @@ static void encode_with_recode_loop(VP10_COMP *cpi, size_t *size, set_size_independent_vars(cpi); do { - vpx_clear_system_state(); + aom_clear_system_state(); set_frame_size(cpi); @@ -3017,7 +3017,7 @@ static void encode_with_recode_loop(VP10_COMP *cpi, size_t *size, // seen in the last encoder iteration. // update_base_skip_probs(cpi); - vpx_clear_system_state(); + aom_clear_system_state(); // Dummy pack of the bitstream using up to date stats to get an // accurate estimate of output frame size to determine if we need @@ -3234,8 +3234,8 @@ YV12_BUFFER_CONFIG *vp10_scale_if_required_fast(VP10_COMMON *cm, if (cm->mi_cols * MI_SIZE != unscaled->y_width || cm->mi_rows * MI_SIZE != unscaled->y_height) { // For 2x2 scaling down. - vpx_scale_frame(unscaled, scaled, unscaled->y_buffer, 9, 2, 1, 2, 1, 0); - vpx_extend_frame_borders(scaled); + aom_scale_frame(unscaled, scaled, unscaled->y_buffer, 9, 2, 1, 2, 1, 0); + aom_extend_frame_borders(scaled); return scaled; } else { return unscaled; @@ -3308,7 +3308,7 @@ static void encode_frame_to_data_rate(VP10_COMP *cpi, size_t *size, TX_SIZE t; set_ext_overrides(cpi); - vpx_clear_system_state(); + aom_clear_system_state(); // Set the arf sign bias for this frame. set_arf_sign_bias(cpi); @@ -3356,7 +3356,7 @@ static void encode_frame_to_data_rate(VP10_COMP *cpi, size_t *size, } } - vpx_clear_system_state(); + aom_clear_system_state(); #if CONFIG_INTERNAL_STATS memset(cpi->mode_chosen_counts, 0, @@ -3545,7 +3545,7 @@ int vp10_receive_raw_frame(VP10_COMP *cpi, unsigned int frame_flags, YV12_BUFFER_CONFIG *sd, int64_t time_stamp, int64_t end_time) { VP10_COMMON *cm = &cpi->common; - struct vpx_usec_timer timer; + struct aom_usec_timer timer; int res = 0; const int subsampling_x = sd->subsampling_x; const int subsampling_y = sd->subsampling_y; @@ -3556,7 +3556,7 @@ int vp10_receive_raw_frame(VP10_COMP *cpi, unsigned int frame_flags, check_initial_width(cpi, subsampling_x, subsampling_y); #endif // CONFIG_VPX_HIGHBITDEPTH - vpx_usec_timer_start(&timer); + aom_usec_timer_start(&timer); if (vp10_lookahead_push(cpi->lookahead, sd, time_stamp, end_time, #if CONFIG_VPX_HIGHBITDEPTH @@ -3564,18 +3564,18 @@ int vp10_receive_raw_frame(VP10_COMP *cpi, unsigned int frame_flags, #endif // CONFIG_VPX_HIGHBITDEPTH frame_flags)) res = -1; - vpx_usec_timer_mark(&timer); - cpi->time_receive_data += vpx_usec_timer_elapsed(&timer); + aom_usec_timer_mark(&timer); + cpi->time_receive_data += aom_usec_timer_elapsed(&timer); if ((cm->profile == PROFILE_0 || cm->profile == PROFILE_2) && (subsampling_x != 1 || subsampling_y != 1)) { - vpx_internal_error(&cm->error, VPX_CODEC_INVALID_PARAM, + aom_internal_error(&cm->error, VPX_CODEC_INVALID_PARAM, "Non-4:2:0 color format requires profile 1 or 3"); res = -1; } if ((cm->profile == PROFILE_1 || cm->profile == PROFILE_3) && (subsampling_x == 1 && subsampling_y == 1)) { - vpx_internal_error(&cm->error, VPX_CODEC_INVALID_PARAM, + aom_internal_error(&cm->error, VPX_CODEC_INVALID_PARAM, "4:2:0 color format requires profile 0 or 2"); res = -1; } @@ -3695,14 +3695,14 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags, VP10_COMMON *const cm = &cpi->common; BufferPool *const pool = cm->buffer_pool; RATE_CONTROL *const rc = &cpi->rc; - struct vpx_usec_timer cmptimer; + struct aom_usec_timer cmptimer; YV12_BUFFER_CONFIG *force_src_buffer = NULL; struct lookahead_entry *last_source = NULL; struct lookahead_entry *source = NULL; int arf_src_index; int i; - vpx_usec_timer_start(&cmptimer); + aom_usec_timer_start(&cmptimer); vp10_set_high_precision_mv(cpi, ALTREF_HIGH_PRECISION_MV); @@ -3737,7 +3737,7 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags, if (oxcf->arnr_max_frames > 0) { // Produce the filtered ARF frame. vp10_temporal_filter(cpi, arf_src_index); - vpx_extend_frame_borders(&cpi->alt_ref_buffer); + aom_extend_frame_borders(&cpi->alt_ref_buffer); force_src_buffer = &cpi->alt_ref_buffer; } @@ -3797,7 +3797,7 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags, } // Clear down mmx registers - vpx_clear_system_state(); + aom_clear_system_state(); // adjust frame rates based on timestamps given if (cm->show_frame) { @@ -3867,8 +3867,8 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags, cpi->droppable = !frame_is_reference(cpi); } - vpx_usec_timer_mark(&cmptimer); - cpi->time_compress_data += vpx_usec_timer_elapsed(&cmptimer); + aom_usec_timer_mark(&cmptimer); + cpi->time_compress_data += aom_usec_timer_elapsed(&cmptimer); if (cpi->b_calculate_psnr && oxcf->pass != 1 && cm->show_frame) generate_psnr_packet(cpi); @@ -3901,17 +3901,17 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags, { double frame_ssim2 = 0, weight = 0; - vpx_clear_system_state(); + aom_clear_system_state(); #if CONFIG_VPX_HIGHBITDEPTH if (cm->use_highbitdepth) { frame_ssim2 = - vpx_highbd_calc_ssim(orig, recon, &weight, (int)cm->bit_depth); + aom_highbd_calc_ssim(orig, recon, &weight, (int)cm->bit_depth); } else { - frame_ssim2 = vpx_calc_ssim(orig, recon, &weight); + frame_ssim2 = aom_calc_ssim(orig, recon, &weight); } #else - frame_ssim2 = vpx_calc_ssim(orig, recon, &weight); + frame_ssim2 = aom_calc_ssim(orig, recon, &weight); #endif // CONFIG_VPX_HIGHBITDEPTH cpi->worst_ssim = VPXMIN(cpi->worst_ssim, frame_ssim2); @@ -3951,7 +3951,7 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags, if (!cm->use_highbitdepth) #endif { - double this_inconsistency = vpx_get_ssim_metrics( + double this_inconsistency = aom_get_ssim_metrics( cpi->Source->y_buffer, cpi->Source->y_stride, cm->frame_to_show->y_buffer, cm->frame_to_show->y_stride, cpi->Source->y_width, cpi->Source->y_height, cpi->ssim_vars, @@ -3959,7 +3959,7 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags, const double peak = (double)((1 << cpi->oxcf.input_bit_depth) - 1); double consistency = - vpx_sse_to_psnr(samples, peak, (double)cpi->total_inconsistency); + aom_sse_to_psnr(samples, peak, (double)cpi->total_inconsistency); if (consistency > 0.0) cpi->worst_consistency = VPXMIN(cpi->worst_consistency, consistency); @@ -3971,14 +3971,14 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags, double y, u, v, frame_all; #if CONFIG_VPX_HIGHBITDEPTH if (cm->use_highbitdepth) { - frame_all = vpx_highbd_calc_ssimg(cpi->Source, cm->frame_to_show, &y, + frame_all = aom_highbd_calc_ssimg(cpi->Source, cm->frame_to_show, &y, &u, &v, (int)cm->bit_depth); } else { frame_all = - vpx_calc_ssimg(cpi->Source, cm->frame_to_show, &y, &u, &v); + aom_calc_ssimg(cpi->Source, cm->frame_to_show, &y, &u, &v); } #else - frame_all = vpx_calc_ssimg(cpi->Source, cm->frame_to_show, &y, &u, &v); + frame_all = aom_calc_ssimg(cpi->Source, cm->frame_to_show, &y, &u, &v); #endif // CONFIG_VPX_HIGHBITDEPTH adjust_image_stat(y, u, v, frame_all, &cpi->ssimg); } @@ -3988,7 +3988,7 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags, { double y, u, v, frame_all; frame_all = - vpx_calc_fastssim(cpi->Source, cm->frame_to_show, &y, &u, &v); + aom_calc_fastssim(cpi->Source, cm->frame_to_show, &y, &u, &v); adjust_image_stat(y, u, v, frame_all, &cpi->fastssim); /* TODO(JBB): add 10/12 bit support */ } @@ -3997,14 +3997,14 @@ int vp10_get_compressed_data(VP10_COMP *cpi, unsigned int *frame_flags, #endif { double y, u, v, frame_all; - frame_all = vpx_psnrhvs(cpi->Source, cm->frame_to_show, &y, &u, &v); + frame_all = aom_psnrhvs(cpi->Source, cm->frame_to_show, &y, &u, &v); adjust_image_stat(y, u, v, frame_all, &cpi->psnrhvs); } } } #endif - vpx_clear_system_state(); + aom_clear_system_state(); return 0; } @@ -4025,7 +4025,7 @@ int vp10_get_preview_raw_frame(VP10_COMP *cpi, YV12_BUFFER_CONFIG *dest) { } else { ret = -1; } - vpx_clear_system_state(); + aom_clear_system_state(); return ret; } } @@ -4107,7 +4107,7 @@ int64_t vp10_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a, int vp10_get_quantizer(VP10_COMP *cpi) { return cpi->common.base_qindex; } -void vp10_apply_encoding_flags(VP10_COMP *cpi, vpx_enc_frame_flags_t flags) { +void vp10_apply_encoding_flags(VP10_COMP *cpi, aom_enc_frame_flags_t flags) { if (flags & (VP8_EFLAG_NO_REF_LAST | VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_REF_ARF)) { int ref = 7; diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h index 2246ac4697fdfb4eb8e9d126727c5ee7494c8b60..3af900d9b84fd4b5bde1894b566570b6c37515e8 100644 --- a/av1/encoder/encoder.h +++ b/av1/encoder/encoder.h @@ -14,7 +14,7 @@ #include <stdio.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom/vp8cx.h" #include "av1/common/alloccommon.h" @@ -39,8 +39,8 @@ #include "aom_dsp/ssim.h" #endif #include "aom_dsp/variance.h" -#include "aom/internal/vpx_codec_internal.h" -#include "aom_util/vpx_thread.h" +#include "aom/internal/aom_codec_internal.h" +#include "aom_util/aom_thread.h" #ifdef __cplusplus extern "C" { @@ -52,7 +52,7 @@ typedef struct { int nmvcosts_hp[2][MV_VALS]; #if !CONFIG_MISC_FIXES - vpx_prob segment_pred_probs[PREDICTION_PROBS]; + aom_prob segment_pred_probs[PREDICTION_PROBS]; #endif unsigned char *last_frame_seg_map_copy; @@ -119,7 +119,7 @@ typedef enum { typedef struct VP10EncoderConfig { BITSTREAM_PROFILE profile; - vpx_bit_depth_t bit_depth; // Codec bit-depth. + aom_bit_depth_t bit_depth; // Codec bit-depth. int width; // width of data passed to the compressor int height; // height of data passed to the compressor unsigned int input_bit_depth; // Input bit depth. @@ -149,7 +149,7 @@ typedef struct VP10EncoderConfig { // DATARATE CONTROL OPTIONS // vbr, cbr, constrained quality or constant quality - enum vpx_rc_mode rc_mode; + enum aom_rc_mode rc_mode; // buffer targeting aggressiveness int under_shoot_pct; @@ -217,19 +217,19 @@ typedef struct VP10EncoderConfig { int max_threads; - vpx_fixed_buf_t two_pass_stats_in; - struct vpx_codec_pkt_list *output_pkt_list; + aom_fixed_buf_t two_pass_stats_in; + struct aom_codec_pkt_list *output_pkt_list; #if CONFIG_FP_MB_STATS - vpx_fixed_buf_t firstpass_mb_stats_in; + aom_fixed_buf_t firstpass_mb_stats_in; #endif - vpx_tune_metric tuning; - vpx_tune_content content; + aom_tune_metric tuning; + aom_tune_content content; #if CONFIG_VPX_HIGHBITDEPTH int use_highbitdepth; #endif - vpx_color_space_t color_space; + aom_color_space_t color_space; int color_range; int render_width; int render_height; @@ -346,7 +346,7 @@ typedef struct VP10_COMP { int interp_filter_selected[MAX_REF_FRAMES][SWITCHABLE]; - struct vpx_codec_pkt_list *output_pkt_list; + struct aom_codec_pkt_list *output_pkt_list; MBGRAPH_FRAME_STATS mbgraph_stats[MAX_LAG_BUFFERS]; int mbgraph_n_frames; // number of frames filled in the above @@ -378,7 +378,7 @@ typedef struct VP10_COMP { fractional_mv_step_fp *find_fractional_mv_step; vp10_full_search_fn_t full_search_sad; vp10_diamond_search_fn_t diamond_search_sad; - vpx_variance_fn_ptr_t fn_ptr[BLOCK_SIZES]; + aom_variance_fn_ptr_t fn_ptr[BLOCK_SIZES]; uint64_t time_receive_data; uint64_t time_compress_data; uint64_t time_pick_lpf; @@ -603,7 +603,7 @@ YV12_BUFFER_CONFIG *vp10_scale_if_required(VP10_COMMON *cm, YV12_BUFFER_CONFIG *unscaled, YV12_BUFFER_CONFIG *scaled); -void vp10_apply_encoding_flags(VP10_COMP *cpi, vpx_enc_frame_flags_t flags); +void vp10_apply_encoding_flags(VP10_COMP *cpi, aom_enc_frame_flags_t flags); static INLINE int is_altref_enabled(const VP10_COMP *const cpi) { return cpi->oxcf.mode != REALTIME && cpi->oxcf.lag_in_frames > 0 && diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c index c266c87aa0097b46da066b6223d271379740023a..63956c4c41a37716abc8f23c1cfee87a9f533fda 100644 --- a/av1/encoder/ethread.c +++ b/av1/encoder/ethread.c @@ -12,7 +12,7 @@ #include "av1/encoder/encodeframe.h" #include "av1/encoder/encoder.h" #include "av1/encoder/ethread.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" static void accumulate_rd_opt(ThreadData *td, ThreadData *td_t) { int i, j, k, l, m, n; @@ -60,7 +60,7 @@ static int enc_worker_hook(EncWorkerData *const thread_data, void *unused) { void vp10_encode_tiles_mt(VP10_COMP *cpi) { VP10_COMMON *const cm = &cpi->common; const int tile_cols = 1 << cm->log2_tile_cols; - const VPxWorkerInterface *const winterface = vpx_get_worker_interface(); + const VPxWorkerInterface *const winterface = aom_get_worker_interface(); const int num_workers = VPXMIN(cpi->oxcf.max_threads, tile_cols); int i; @@ -71,10 +71,10 @@ void vp10_encode_tiles_mt(VP10_COMP *cpi) { int allocated_workers = num_workers; CHECK_MEM_ERROR(cm, cpi->workers, - vpx_malloc(allocated_workers * sizeof(*cpi->workers))); + aom_malloc(allocated_workers * sizeof(*cpi->workers))); CHECK_MEM_ERROR(cm, cpi->tile_thr_data, - vpx_calloc(allocated_workers, sizeof(*cpi->tile_thr_data))); + aom_calloc(allocated_workers, sizeof(*cpi->tile_thr_data))); for (i = 0; i < allocated_workers; i++) { VPxWorker *const worker = &cpi->workers[i]; @@ -88,7 +88,7 @@ void vp10_encode_tiles_mt(VP10_COMP *cpi) { // Allocate thread data. CHECK_MEM_ERROR(cm, thread_data->td, - vpx_memalign(32, sizeof(*thread_data->td))); + aom_memalign(32, sizeof(*thread_data->td))); vp10_zero(*thread_data->td); // Set up pc_tree. @@ -98,11 +98,11 @@ void vp10_encode_tiles_mt(VP10_COMP *cpi) { // Allocate frame counters in thread data. CHECK_MEM_ERROR(cm, thread_data->td->counts, - vpx_calloc(1, sizeof(*thread_data->td->counts))); + aom_calloc(1, sizeof(*thread_data->td->counts))); // Create threads if (!winterface->reset(worker)) - vpx_internal_error(&cm->error, VPX_CODEC_ERROR, + aom_internal_error(&cm->error, VPX_CODEC_ERROR, "Tile encoder thread creation failed"); } else { // Main thread acts as a worker and uses the thread data in cpi. diff --git a/av1/encoder/extend.c b/av1/encoder/extend.c index 8a8c5ca1f67476a46d55b392fa4623130ee772c8..efb6515cd3a1915f5385109cd3268fd1906cd147 100644 --- a/av1/encoder/extend.c +++ b/av1/encoder/extend.c @@ -9,8 +9,8 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "av1/common/common.h" @@ -73,9 +73,9 @@ static void highbd_copy_and_extend_plane(const uint8_t *src8, int src_pitch, uint16_t *dst_ptr2 = dst + w; for (i = 0; i < h; i++) { - vpx_memset16(dst_ptr1, src_ptr1[0], extend_left); + aom_memset16(dst_ptr1, src_ptr1[0], extend_left); memcpy(dst_ptr1 + extend_left, src_ptr1, w * sizeof(src_ptr1[0])); - vpx_memset16(dst_ptr2, src_ptr2[0], extend_right); + aom_memset16(dst_ptr2, src_ptr2[0], extend_right); src_ptr1 += src_pitch; src_ptr2 += src_pitch; dst_ptr1 += dst_pitch; diff --git a/av1/encoder/extend.h b/av1/encoder/extend.h index 2dd2b48b8d94598905be0f19711227c6f8dfd1bb..ba94a6df373590874a3b5a926bd525f9abd07f1d 100644 --- a/av1/encoder/extend.h +++ b/av1/encoder/extend.h @@ -13,7 +13,7 @@ #define VP10_ENCODER_EXTEND_H_ #include "aom_scale/yv12config.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c index 1a7856c851eb1cc4d74c83a69e7188babd27edc9..13b888d20937a145c0af938022a798e3febb3f33 100644 --- a/av1/encoder/firstpass.c +++ b/av1/encoder/firstpass.c @@ -13,14 +13,14 @@ #include <math.h> #include <stdio.h> -#include "./vpx_dsp_rtcd.h" -#include "./vpx_scale_rtcd.h" +#include "./aom_dsp_rtcd.h" +#include "./aom_scale_rtcd.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "aom_ports/system_state.h" -#include "aom_scale/vpx_scale.h" +#include "aom_scale/aom_scale.h" #include "aom_scale/yv12config.h" #include "av1/common/entropymv.h" @@ -97,12 +97,12 @@ static int input_stats(TWO_PASS *p, FIRSTPASS_STATS *fps) { } static void output_stats(FIRSTPASS_STATS *stats, - struct vpx_codec_pkt_list *pktlist) { - struct vpx_codec_cx_pkt pkt; + struct aom_codec_pkt_list *pktlist) { + struct aom_codec_cx_pkt pkt; pkt.kind = VPX_CODEC_STATS_PKT; pkt.data.twopass_stats.buf = stats; pkt.data.twopass_stats.sz = sizeof(FIRSTPASS_STATS); - vpx_codec_pkt_list_add(pktlist, &pkt); + aom_codec_pkt_list_add(pktlist, &pkt); // TEMP debug code #if OUTPUT_FPF @@ -128,12 +128,12 @@ static void output_stats(FIRSTPASS_STATS *stats, #if CONFIG_FP_MB_STATS static void output_fpmb_stats(uint8_t *this_frame_mb_stats, VP10_COMMON *cm, - struct vpx_codec_pkt_list *pktlist) { - struct vpx_codec_cx_pkt pkt; + struct aom_codec_pkt_list *pktlist) { + struct aom_codec_cx_pkt pkt; pkt.kind = VPX_CODEC_FPMB_STATS_PKT; pkt.data.firstpass_mb_stats.buf = this_frame_mb_stats; pkt.data.firstpass_mb_stats.sz = cm->initial_mbs * sizeof(uint8_t); - vpx_codec_pkt_list_add(pktlist, &pkt); + aom_codec_pkt_list_add(pktlist, &pkt); } #endif @@ -278,12 +278,12 @@ void vp10_end_first_pass(VP10_COMP *cpi) { output_stats(&cpi->twopass.total_stats, cpi->output_pkt_list); } -static vpx_variance_fn_t get_block_variance_fn(BLOCK_SIZE bsize) { +static aom_variance_fn_t get_block_variance_fn(BLOCK_SIZE bsize) { switch (bsize) { - case BLOCK_8X8: return vpx_mse8x8; - case BLOCK_16X8: return vpx_mse16x8; - case BLOCK_8X16: return vpx_mse8x16; - default: return vpx_mse16x16; + case BLOCK_8X8: return aom_mse8x8; + case BLOCK_16X8: return aom_mse16x8; + case BLOCK_8X16: return aom_mse8x16; + default: return aom_mse16x16; } } @@ -291,37 +291,37 @@ static unsigned int get_prediction_error(BLOCK_SIZE bsize, const struct buf_2d *src, const struct buf_2d *ref) { unsigned int sse; - const vpx_variance_fn_t fn = get_block_variance_fn(bsize); + const aom_variance_fn_t fn = get_block_variance_fn(bsize); fn(src->buf, src->stride, ref->buf, ref->stride, &sse); return sse; } #if CONFIG_VPX_HIGHBITDEPTH -static vpx_variance_fn_t highbd_get_block_variance_fn(BLOCK_SIZE bsize, +static aom_variance_fn_t highbd_get_block_variance_fn(BLOCK_SIZE bsize, int bd) { switch (bd) { default: switch (bsize) { - case BLOCK_8X8: return vpx_highbd_8_mse8x8; - case BLOCK_16X8: return vpx_highbd_8_mse16x8; - case BLOCK_8X16: return vpx_highbd_8_mse8x16; - default: return vpx_highbd_8_mse16x16; + case BLOCK_8X8: return aom_highbd_8_mse8x8; + case BLOCK_16X8: return aom_highbd_8_mse16x8; + case BLOCK_8X16: return aom_highbd_8_mse8x16; + default: return aom_highbd_8_mse16x16; } break; case 10: switch (bsize) { - case BLOCK_8X8: return vpx_highbd_10_mse8x8; - case BLOCK_16X8: return vpx_highbd_10_mse16x8; - case BLOCK_8X16: return vpx_highbd_10_mse8x16; - default: return vpx_highbd_10_mse16x16; + case BLOCK_8X8: return aom_highbd_10_mse8x8; + case BLOCK_16X8: return aom_highbd_10_mse16x8; + case BLOCK_8X16: return aom_highbd_10_mse8x16; + default: return aom_highbd_10_mse16x16; } break; case 12: switch (bsize) { - case BLOCK_8X8: return vpx_highbd_12_mse8x8; - case BLOCK_16X8: return vpx_highbd_12_mse16x8; - case BLOCK_8X16: return vpx_highbd_12_mse8x16; - default: return vpx_highbd_12_mse16x16; + case BLOCK_8X8: return aom_highbd_12_mse8x8; + case BLOCK_16X8: return aom_highbd_12_mse16x8; + case BLOCK_8X16: return aom_highbd_12_mse8x16; + default: return aom_highbd_12_mse16x16; } break; } @@ -332,7 +332,7 @@ static unsigned int highbd_get_prediction_error(BLOCK_SIZE bsize, const struct buf_2d *ref, int bd) { unsigned int sse; - const vpx_variance_fn_t fn = highbd_get_block_variance_fn(bsize, bd); + const aom_variance_fn_t fn = highbd_get_block_variance_fn(bsize, bd); fn(src->buf, src->stride, ref->buf, ref->stride, &sse); return sse; } @@ -356,7 +356,7 @@ static void first_pass_motion_search(VP10_COMP *cpi, MACROBLOCK *x, MV ref_mv_full = { ref_mv->row >> 3, ref_mv->col >> 3 }; int num00, tmp_err, n; const BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type; - vpx_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[bsize]; + aom_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[bsize]; const int new_mv_mode_penalty = NEW_MV_MODE_PENALTY; int step_param = 3; @@ -420,7 +420,7 @@ static BLOCK_SIZE get_bsize(const VP10_COMMON *cm, int mb_row, int mb_col) { } } -static int find_fp_qindex(vpx_bit_depth_t bit_depth) { +static int find_fp_qindex(aom_bit_depth_t bit_depth) { int i; for (i = 0; i < QINDEX_RANGE; ++i) @@ -496,7 +496,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) { } #endif - vpx_clear_system_state(); + aom_clear_system_state(); intra_factor = 0.0; brightness_factor = 0.0; @@ -561,7 +561,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) { const int mb_index = mb_row * cm->mb_cols + mb_col; #endif - vpx_clear_system_state(); + aom_clear_system_state(); xd->plane[0].dst.buf = new_yv12->y_buffer + recon_yoffset; xd->plane[1].dst.buf = new_yv12->u_buffer + recon_uvoffset; @@ -579,7 +579,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) { xd->mi[0]->mbmi.tx_size = use_dc_pred ? (bsize >= BLOCK_16X16 ? TX_16X16 : TX_8X8) : TX_4X4; vp10_encode_intra_block_plane(x, bsize, 0); - this_error = vpx_get_mb_ss(x->plane[0].src_diff); + this_error = aom_get_mb_ss(x->plane[0].src_diff); // Keep a record of blocks that have almost no intra error residual // (i.e. are in effect completely flat and untextured in the intra @@ -607,7 +607,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) { } #endif // CONFIG_VPX_HIGHBITDEPTH - vpx_clear_system_state(); + aom_clear_system_state(); log_intra = log(this_error + 1.0); if (log_intra < 10.0) intra_factor += 1.0 + ((10.0 - log_intra) * 0.05); @@ -774,7 +774,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) { #endif if (motion_error <= this_error) { - vpx_clear_system_state(); + aom_clear_system_state(); // Keep a count of cases where the inter and intra were very close // and very low. This helps with scene cut detection for example in @@ -908,7 +908,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) { x->plane[2].src.buf += uv_mb_height * x->plane[1].src.stride - uv_mb_height * cm->mb_cols; - vpx_clear_system_state(); + aom_clear_system_state(); } // Clamp the image start to rows/2. This number of rows is discarded top @@ -1008,7 +1008,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) { ++twopass->sr_update_lag; } - vpx_extend_frame_borders(new_yv12); + aom_extend_frame_borders(new_yv12); // The frame we just compressed now becomes the last frame. ref_cnt_fb(pool->frame_bufs, &cm->ref_frame_map[cpi->lst_fb_idx], @@ -1042,7 +1042,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) { static double calc_correction_factor(double err_per_mb, double err_divisor, double pt_low, double pt_high, int q, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { const double error_term = err_per_mb / err_divisor; // Adjustment based on actual quantizer to power term. @@ -1720,7 +1720,7 @@ static void define_gf_group(VP10_COMP *cpi, FIRSTPASS_STATS *this_frame) { vp10_zero(twopass->gf_group); } - vpx_clear_system_state(); + aom_clear_system_state(); vp10_zero(next_frame); // Load stats for the current frame. @@ -2381,7 +2381,7 @@ void vp10_rc_get_second_pass_params(VP10_COMP *cpi) { return; } - vpx_clear_system_state(); + aom_clear_system_state(); if (cpi->oxcf.rc_mode == VPX_Q) { twopass->active_worst_quality = cpi->oxcf.cq_level; diff --git a/av1/encoder/lookahead.c b/av1/encoder/lookahead.c index da3d3d52e02746168ba583ea405c00dc7598b01e..8206a5e07f35a5ee3434741032501fe1ca65c047 100644 --- a/av1/encoder/lookahead.c +++ b/av1/encoder/lookahead.c @@ -11,7 +11,7 @@ #include <assert.h> #include <stdlib.h> -#include "./vpx_config.h" +#include "./aom_config.h" #include "av1/common/common.h" @@ -36,7 +36,7 @@ void vp10_lookahead_destroy(struct lookahead_ctx *ctx) { if (ctx->buf) { unsigned int i; - for (i = 0; i < ctx->max_sz; i++) vpx_free_frame_buffer(&ctx->buf[i].img); + for (i = 0; i < ctx->max_sz; i++) aom_free_frame_buffer(&ctx->buf[i].img); free(ctx->buf); } free(ctx); @@ -68,7 +68,7 @@ struct lookahead_ctx *vp10_lookahead_init(unsigned int width, ctx->buf = calloc(depth, sizeof(*ctx->buf)); if (!ctx->buf) goto bail; for (i = 0; i < depth; i++) - if (vpx_alloc_frame_buffer( + if (aom_alloc_frame_buffer( &ctx->buf[i].img, width, height, subsampling_x, subsampling_y, #if CONFIG_VPX_HIGHBITDEPTH use_highbitdepth, @@ -160,14 +160,14 @@ int vp10_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src, if (larger_dimensions) { YV12_BUFFER_CONFIG new_img; memset(&new_img, 0, sizeof(new_img)); - if (vpx_alloc_frame_buffer(&new_img, width, height, subsampling_x, + if (aom_alloc_frame_buffer(&new_img, width, height, subsampling_x, subsampling_y, #if CONFIG_VPX_HIGHBITDEPTH use_highbitdepth, #endif VPX_ENC_BORDER_IN_PIXELS, 0)) return 1; - vpx_free_frame_buffer(&buf->img); + aom_free_frame_buffer(&buf->img); buf->img = new_img; } else if (new_dimensions) { buf->img.y_crop_width = src->y_crop_width; diff --git a/av1/encoder/lookahead.h b/av1/encoder/lookahead.h index bfb389c6f6a77aa1ea51bcc1c4438629be4445c8..148809aeb6bdc0fcd4b8a7008653ae3f55d3b3c2 100644 --- a/av1/encoder/lookahead.h +++ b/av1/encoder/lookahead.h @@ -13,7 +13,7 @@ #define VP10_ENCODER_LOOKAHEAD_H_ #include "aom_scale/yv12config.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { diff --git a/av1/encoder/mbgraph.c b/av1/encoder/mbgraph.c index 16eb19522fad651739cf640a8565547a0f20b3fb..80d2aefd48efb5d096c34dd4ed03963396514ee8 100644 --- a/av1/encoder/mbgraph.c +++ b/av1/encoder/mbgraph.c @@ -12,10 +12,10 @@ #include <limits.h> #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/system_state.h" #include "av1/encoder/segmentation.h" #include "av1/encoder/mcomp.h" @@ -29,7 +29,7 @@ static unsigned int do_16x16_motion_iteration(VP10_COMP *cpi, const MV *ref_mv, MACROBLOCK *const x = &cpi->td.mb; MACROBLOCKD *const xd = &x->e_mbd; const MV_SPEED_FEATURES *const mv_sf = &cpi->sf.mv; - const vpx_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; + const aom_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; const int tmp_col_min = x->mv_col_min; const int tmp_col_max = x->mv_col_max; @@ -74,7 +74,7 @@ static unsigned int do_16x16_motion_iteration(VP10_COMP *cpi, const MV *ref_mv, x->mv_row_min = tmp_row_min; x->mv_row_max = tmp_row_max; - return vpx_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, + return aom_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, xd->plane[0].dst.buf, xd->plane[0].dst.stride); } @@ -87,7 +87,7 @@ static int do_16x16_motion_search(VP10_COMP *cpi, const MV *ref_mv, // Try zero MV first // FIXME should really use something like near/nearest MV and/or MV prediction - err = vpx_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, + err = aom_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, xd->plane[0].pre[0].buf, xd->plane[0].pre[0].stride); dst_mv->as_int = 0; @@ -123,7 +123,7 @@ static int do_16x16_zerozero_search(VP10_COMP *cpi, int_mv *dst_mv) { // Try zero MV first // FIXME should really use something like near/nearest MV and/or MV prediction - err = vpx_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, + err = aom_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, xd->plane[0].pre[0].buf, xd->plane[0].pre[0].stride); dst_mv->as_int = 0; @@ -145,7 +145,7 @@ static int find_best_16x16_intra(VP10_COMP *cpi, PREDICTION_MODE *pbest_mode) { vp10_predict_intra_block(xd, 2, 2, TX_16X16, mode, x->plane[0].src.buf, x->plane[0].src.stride, xd->plane[0].dst.buf, xd->plane[0].dst.stride, 0, 0, 0); - err = vpx_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, + err = aom_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, xd->plane[0].dst.buf, xd->plane[0].dst.stride); // find best @@ -291,7 +291,7 @@ static void separate_arf_mbs(VP10_COMP *cpi) { CHECK_MEM_ERROR( cm, arf_not_zz, - vpx_calloc(cm->mb_rows * cm->mb_cols * sizeof(*arf_not_zz), 1)); + aom_calloc(cm->mb_rows * cm->mb_cols * sizeof(*arf_not_zz), 1)); // We are not interested in results beyond the alt ref itself. if (n_frames > cpi->rc.frames_till_gf_update_due) @@ -354,7 +354,7 @@ static void separate_arf_mbs(VP10_COMP *cpi) { } // Free localy allocated storage - vpx_free(arf_not_zz); + aom_free(arf_not_zz); } void vp10_update_mbgraph_stats(VP10_COMP *cpi) { @@ -391,7 +391,7 @@ void vp10_update_mbgraph_stats(VP10_COMP *cpi) { cpi->Source); } - vpx_clear_system_state(); + aom_clear_system_state(); separate_arf_mbs(cpi); } diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c index b943b9d846697a058fff7d3a7eb7f0eb110c2e66..a82d1519db491b5a01fa184afd8fa8eea82ff90b 100644 --- a/av1/encoder/mcomp.c +++ b/av1/encoder/mcomp.c @@ -13,11 +13,11 @@ #include <math.h> #include <stdio.h> -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "av1/common/common.h" @@ -291,7 +291,7 @@ static INLINE const uint8_t *pre(const uint8_t *buf, int stride, int r, int c) { static unsigned int setup_center_error( const MACROBLOCKD *xd, const MV *bestmv, const MV *ref_mv, - int error_per_bit, const vpx_variance_fn_ptr_t *vfp, + int error_per_bit, const aom_variance_fn_ptr_t *vfp, const uint8_t *const src, const int src_stride, const uint8_t *const y, int y_stride, const uint8_t *second_pred, int w, int h, int offset, int *mvjcost, int *mvcost[2], unsigned int *sse1, int *distortion) { @@ -300,13 +300,13 @@ static unsigned int setup_center_error( if (second_pred != NULL) { if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { DECLARE_ALIGNED(16, uint16_t, comp_pred16[64 * 64]); - vpx_highbd_comp_avg_pred(comp_pred16, second_pred, w, h, y + offset, + aom_highbd_comp_avg_pred(comp_pred16, second_pred, w, h, y + offset, y_stride); besterr = vfp->vf(CONVERT_TO_BYTEPTR(comp_pred16), w, src, src_stride, sse1); } else { DECLARE_ALIGNED(16, uint8_t, comp_pred[64 * 64]); - vpx_comp_avg_pred(comp_pred, second_pred, w, h, y + offset, y_stride); + aom_comp_avg_pred(comp_pred, second_pred, w, h, y + offset, y_stride); besterr = vfp->vf(comp_pred, w, src, src_stride, sse1); } } else { @@ -318,7 +318,7 @@ static unsigned int setup_center_error( (void)xd; if (second_pred != NULL) { DECLARE_ALIGNED(16, uint8_t, comp_pred[64 * 64]); - vpx_comp_avg_pred(comp_pred, second_pred, w, h, y + offset, y_stride); + aom_comp_avg_pred(comp_pred, second_pred, w, h, y + offset, y_stride); besterr = vfp->vf(comp_pred, w, src, src_stride, sse1); } else { besterr = vfp->vf(y + offset, y_stride, src, src_stride, sse1); @@ -355,7 +355,7 @@ static void get_cost_surf_min(int *cost_list, int *ir, int *ic, int bits) { int vp10_find_best_sub_pixel_tree_pruned_evenmore( const MACROBLOCK *x, MV *bestmv, const MV *ref_mv, int allow_hp, - int error_per_bit, const vpx_variance_fn_ptr_t *vfp, int forced_stop, + int error_per_bit, const aom_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *cost_list, int *mvjcost, int *mvcost[2], int *distortion, unsigned int *sse1, const uint8_t *second_pred, int w, int h) { @@ -424,7 +424,7 @@ int vp10_find_best_sub_pixel_tree_pruned_evenmore( int vp10_find_best_sub_pixel_tree_pruned_more( const MACROBLOCK *x, MV *bestmv, const MV *ref_mv, int allow_hp, - int error_per_bit, const vpx_variance_fn_ptr_t *vfp, int forced_stop, + int error_per_bit, const aom_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *cost_list, int *mvjcost, int *mvcost[2], int *distortion, unsigned int *sse1, const uint8_t *second_pred, int w, int h) { @@ -488,7 +488,7 @@ int vp10_find_best_sub_pixel_tree_pruned_more( int vp10_find_best_sub_pixel_tree_pruned( const MACROBLOCK *x, MV *bestmv, const MV *ref_mv, int allow_hp, - int error_per_bit, const vpx_variance_fn_ptr_t *vfp, int forced_stop, + int error_per_bit, const aom_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *cost_list, int *mvjcost, int *mvcost[2], int *distortion, unsigned int *sse1, const uint8_t *second_pred, int w, int h) { @@ -581,7 +581,7 @@ static const MV search_step_table[12] = { int vp10_find_best_sub_pixel_tree(const MACROBLOCK *x, MV *bestmv, const MV *ref_mv, int allow_hp, int error_per_bit, - const vpx_variance_fn_ptr_t *vfp, + const aom_variance_fn_ptr_t *vfp, int forced_stop, int iters_per_step, int *cost_list, int *mvjcost, int *mvcost[2], int *distortion, unsigned int *sse1, @@ -754,7 +754,7 @@ static INLINE int is_mv_in(const MACROBLOCK *x, const MV *mv) { // Calculate and return a sad+mvcost list around an integer best pel. static INLINE void calc_int_cost_list(const MACROBLOCK *x, const MV *ref_mv, int sadpb, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *best_mv, int *cost_list) { static const MV neighbors[4] = { { 0, -1 }, { 1, 0 }, { 0, 1 }, { -1, 0 } }; const struct buf_2d *const what = &x->plane[0].src; @@ -803,7 +803,7 @@ static INLINE void calc_int_cost_list(const MACROBLOCK *x, const MV *ref_mv, // static int vp10_pattern_search( const MACROBLOCK *x, MV *ref_mv, int search_param, int sad_per_bit, - int do_init_search, int *cost_list, const vpx_variance_fn_ptr_t *vfp, + int do_init_search, int *cost_list, const aom_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv, MV *best_mv, const int num_candidates[MAX_PATTERN_SCALES], const MV candidates[MAX_PATTERN_SCALES][MAX_PATTERN_CANDIDATES]) { @@ -972,7 +972,7 @@ static int vp10_pattern_search( // use_mvcost option since it is always 1, to save unnecessary branches. static int vp10_pattern_search_sad( const MACROBLOCK *x, MV *ref_mv, int search_param, int sad_per_bit, - int do_init_search, int *cost_list, const vpx_variance_fn_ptr_t *vfp, + int do_init_search, int *cost_list, const aom_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv, MV *best_mv, const int num_candidates[MAX_PATTERN_SCALES], const MV candidates[MAX_PATTERN_SCALES][MAX_PATTERN_CANDIDATES]) { @@ -1247,7 +1247,7 @@ static int vp10_pattern_search_sad( } int vp10_get_mvpred_var(const MACROBLOCK *x, const MV *best_mv, - const MV *center_mv, const vpx_variance_fn_ptr_t *vfp, + const MV *center_mv, const aom_variance_fn_ptr_t *vfp, int use_mvcost) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; @@ -1264,7 +1264,7 @@ int vp10_get_mvpred_var(const MACROBLOCK *x, const MV *best_mv, int vp10_get_mvpred_av_var(const MACROBLOCK *x, const MV *best_mv, const MV *center_mv, const uint8_t *second_pred, - const vpx_variance_fn_ptr_t *vfp, int use_mvcost) { + const aom_variance_fn_ptr_t *vfp, int use_mvcost) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; const struct buf_2d *const in_what = &xd->plane[0].pre[0]; @@ -1280,7 +1280,7 @@ int vp10_get_mvpred_av_var(const MACROBLOCK *x, const MV *best_mv, int vp10_hex_search(const MACROBLOCK *x, MV *ref_mv, int search_param, int sad_per_bit, int do_init_search, int *cost_list, - const vpx_variance_fn_ptr_t *vfp, int use_mvcost, + const aom_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv, MV *best_mv) { // First scale has 8-closest points, the rest have 6 points in hex shape // at increasing scales @@ -1344,7 +1344,7 @@ int vp10_hex_search(const MACROBLOCK *x, MV *ref_mv, int search_param, int vp10_bigdia_search(const MACROBLOCK *x, MV *ref_mv, int search_param, int sad_per_bit, int do_init_search, int *cost_list, - const vpx_variance_fn_ptr_t *vfp, int use_mvcost, + const aom_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv, MV *best_mv) { // First scale has 4-closest points, the rest have 8 points in diamond // shape at increasing scales @@ -1443,7 +1443,7 @@ int vp10_bigdia_search(const MACROBLOCK *x, MV *ref_mv, int search_param, int vp10_square_search(const MACROBLOCK *x, MV *ref_mv, int search_param, int sad_per_bit, int do_init_search, int *cost_list, - const vpx_variance_fn_ptr_t *vfp, int use_mvcost, + const aom_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv, MV *best_mv) { // All scales have 8 closest points in square shape static const int square_num_candidates[MAX_PATTERN_SCALES] = { @@ -1549,7 +1549,7 @@ int vp10_square_search(const MACROBLOCK *x, MV *ref_mv, int search_param, int vp10_fast_hex_search(const MACROBLOCK *x, MV *ref_mv, int search_param, int sad_per_bit, int do_init_search, // must be zero for fast_hex - int *cost_list, const vpx_variance_fn_ptr_t *vfp, + int *cost_list, const aom_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv, MV *best_mv) { return vp10_hex_search( x, ref_mv, VPXMAX(MAX_MVSEARCH_STEPS - 2, search_param), sad_per_bit, @@ -1558,7 +1558,7 @@ int vp10_fast_hex_search(const MACROBLOCK *x, MV *ref_mv, int search_param, int vp10_fast_dia_search(const MACROBLOCK *x, MV *ref_mv, int search_param, int sad_per_bit, int do_init_search, int *cost_list, - const vpx_variance_fn_ptr_t *vfp, int use_mvcost, + const aom_variance_fn_ptr_t *vfp, int use_mvcost, const MV *center_mv, MV *best_mv) { return vp10_bigdia_search( x, ref_mv, VPXMAX(MAX_MVSEARCH_STEPS - 2, search_param), sad_per_bit, @@ -1571,7 +1571,7 @@ int vp10_fast_dia_search(const MACROBLOCK *x, MV *ref_mv, int search_param, // step size. static int exhuastive_mesh_search(const MACROBLOCK *x, MV *ref_mv, MV *best_mv, int range, int step, int sad_per_bit, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; @@ -1658,7 +1658,7 @@ static int exhuastive_mesh_search(const MACROBLOCK *x, MV *ref_mv, MV *best_mv, int vp10_diamond_search_sad_c(const MACROBLOCK *x, const search_site_config *cfg, MV *ref_mv, MV *best_mv, int search_param, int sad_per_bit, - int *num00, const vpx_variance_fn_ptr_t *fn_ptr, + int *num00, const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv) { int i, j, step; @@ -1803,7 +1803,7 @@ static int vector_match(int16_t *ref, int16_t *src, int bwl) { int center, offset = 0; int bw = 4 << bwl; // redundant variable, to be changed in the experiments. for (d = 0; d <= bw; d += 16) { - this_sad = vpx_vector_var(&ref[d], src, bwl); + this_sad = aom_vector_var(&ref[d], src, bwl); if (this_sad < best_sad) { best_sad = this_sad; offset = d; @@ -1815,7 +1815,7 @@ static int vector_match(int16_t *ref, int16_t *src, int bwl) { int this_pos = offset + d; // check limit if (this_pos < 0 || this_pos > bw) continue; - this_sad = vpx_vector_var(&ref[this_pos], src, bwl); + this_sad = aom_vector_var(&ref[this_pos], src, bwl); if (this_sad < best_sad) { best_sad = this_sad; center = this_pos; @@ -1827,7 +1827,7 @@ static int vector_match(int16_t *ref, int16_t *src, int bwl) { int this_pos = offset + d; // check limit if (this_pos < 0 || this_pos > bw) continue; - this_sad = vpx_vector_var(&ref[this_pos], src, bwl); + this_sad = aom_vector_var(&ref[this_pos], src, bwl); if (this_sad < best_sad) { best_sad = this_sad; center = this_pos; @@ -1839,7 +1839,7 @@ static int vector_match(int16_t *ref, int16_t *src, int bwl) { int this_pos = offset + d; // check limit if (this_pos < 0 || this_pos > bw) continue; - this_sad = vpx_vector_var(&ref[this_pos], src, bwl); + this_sad = aom_vector_var(&ref[this_pos], src, bwl); if (this_sad < best_sad) { best_sad = this_sad; center = this_pos; @@ -1851,7 +1851,7 @@ static int vector_match(int16_t *ref, int16_t *src, int bwl) { int this_pos = offset + d; // check limit if (this_pos < 0 || this_pos > bw) continue; - this_sad = vpx_vector_var(&ref[this_pos], src, bwl); + this_sad = aom_vector_var(&ref[this_pos], src, bwl); if (this_sad < best_sad) { best_sad = this_sad; center = this_pos; @@ -1918,25 +1918,25 @@ unsigned int vp10_int_pro_motion_estimation(const VP10_COMP *cpi, MACROBLOCK *x, // Set up prediction 1-D reference set ref_buf = xd->plane[0].pre[0].buf - (bw >> 1); for (idx = 0; idx < search_width; idx += 16) { - vpx_int_pro_row(&hbuf[idx], ref_buf, ref_stride, bh); + aom_int_pro_row(&hbuf[idx], ref_buf, ref_stride, bh); ref_buf += 16; } ref_buf = xd->plane[0].pre[0].buf - (bh >> 1) * ref_stride; for (idx = 0; idx < search_height; ++idx) { - vbuf[idx] = vpx_int_pro_col(ref_buf, bw) >> norm_factor; + vbuf[idx] = aom_int_pro_col(ref_buf, bw) >> norm_factor; ref_buf += ref_stride; } // Set up src 1-D reference set for (idx = 0; idx < bw; idx += 16) { src_buf = x->plane[0].src.buf + idx; - vpx_int_pro_row(&src_hbuf[idx], src_buf, src_stride, bh); + aom_int_pro_row(&src_hbuf[idx], src_buf, src_stride, bh); } src_buf = x->plane[0].src.buf; for (idx = 0; idx < bh; ++idx) { - src_vbuf[idx] = vpx_int_pro_col(src_buf, bw) >> norm_factor; + src_vbuf[idx] = aom_int_pro_col(src_buf, bw) >> norm_factor; src_buf += src_stride; } @@ -2000,7 +2000,7 @@ unsigned int vp10_int_pro_motion_estimation(const VP10_COMP *cpi, MACROBLOCK *x, int vp10_full_pixel_diamond(const VP10_COMP *cpi, MACROBLOCK *x, MV *mvp_full, int step_param, int sadpb, int further_steps, int do_refine, int *cost_list, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *ref_mv, MV *dst_mv) { MV temp_mv; int thissme, n, num00 = 0; @@ -2064,7 +2064,7 @@ int vp10_full_pixel_diamond(const VP10_COMP *cpi, MACROBLOCK *x, MV *mvp_full, // according to the encode speed profile. static int full_pixel_exhaustive(VP10_COMP *cpi, MACROBLOCK *x, MV *centre_mv_full, int sadpb, int *cost_list, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *ref_mv, MV *dst_mv) { const SPEED_FEATURES *const sf = &cpi->sf; MV temp_mv = { centre_mv_full->row, centre_mv_full->col }; @@ -2121,7 +2121,7 @@ static int full_pixel_exhaustive(VP10_COMP *cpi, MACROBLOCK *x, int vp10_full_search_sad_c(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv, MV *best_mv) { int r, c; const MACROBLOCKD *const xd = &x->e_mbd; @@ -2156,7 +2156,7 @@ int vp10_full_search_sad_c(const MACROBLOCK *x, const MV *ref_mv, int vp10_full_search_sadx3(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv, MV *best_mv) { int r; const MACROBLOCKD *const xd = &x->e_mbd; @@ -2222,7 +2222,7 @@ int vp10_full_search_sadx3(const MACROBLOCK *x, const MV *ref_mv, int vp10_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv, MV *best_mv) { int r; const MACROBLOCKD *const xd = &x->e_mbd; @@ -2312,7 +2312,7 @@ int vp10_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv, int vp10_refining_search_sad(const MACROBLOCK *x, MV *ref_mv, int error_per_bit, int search_range, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv) { const MACROBLOCKD *const xd = &x->e_mbd; const MV neighbors[4] = { { -1, 0 }, { 0, -1 }, { 0, 1 }, { 1, 0 } }; @@ -2387,7 +2387,7 @@ int vp10_refining_search_sad(const MACROBLOCK *x, MV *ref_mv, int error_per_bit, // mode. int vp10_refining_search_8p_c(const MACROBLOCK *x, MV *ref_mv, int error_per_bit, int search_range, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv, const uint8_t *second_pred) { const MV neighbors[8] = { { -1, 0 }, { 0, -1 }, { 0, 1 }, { 1, 0 }, { -1, -1 }, { 1, -1 }, { -1, 1 }, { 1, 1 } }; @@ -2450,7 +2450,7 @@ int vp10_full_pixel_search(VP10_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, int var_max, int rd) { const SPEED_FEATURES *const sf = &cpi->sf; const SEARCH_METHODS method = sf->mv.search_method; - vpx_variance_fn_ptr_t *fn_ptr = &cpi->fn_ptr[bsize]; + aom_variance_fn_ptr_t *fn_ptr = &cpi->fn_ptr[bsize]; int var = 0; if (cost_list) { cost_list[0] = INT_MAX; diff --git a/av1/encoder/mcomp.h b/av1/encoder/mcomp.h index 425fc4ea078d438aad771ea52bad7a033a137826..d6032889ae1a4b34d96e9c1fb19d206e89bae4b8 100644 --- a/av1/encoder/mcomp.h +++ b/av1/encoder/mcomp.h @@ -52,11 +52,11 @@ int vp10_mv_bit_cost(const MV *mv, const MV *ref, const int *mvjcost, // Utility to compute variance + MV rate cost for a given MV int vp10_get_mvpred_var(const MACROBLOCK *x, const MV *best_mv, - const MV *center_mv, const vpx_variance_fn_ptr_t *vfp, + const MV *center_mv, const aom_variance_fn_ptr_t *vfp, int use_mvcost); int vp10_get_mvpred_av_var(const MACROBLOCK *x, const MV *best_mv, const MV *center_mv, const uint8_t *second_pred, - const vpx_variance_fn_ptr_t *vfp, int use_mvcost); + const aom_variance_fn_ptr_t *vfp, int use_mvcost); struct VP10_COMP; struct SPEED_FEATURES; @@ -65,14 +65,14 @@ int vp10_init_search_range(int size); int vp10_refining_search_sad(const struct macroblock *x, struct mv *ref_mv, int sad_per_bit, int distance, - const struct vpx_variance_vtable *fn_ptr, + const struct aom_variance_vtable *fn_ptr, const struct mv *center_mv); // Runs sequence of diamond searches in smaller steps for RD. int vp10_full_pixel_diamond(const struct VP10_COMP *cpi, MACROBLOCK *x, MV *mvp_full, int step_param, int sadpb, int further_steps, int do_refine, int *cost_list, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *ref_mv, MV *dst_mv); // Perform integral projection based motion estimation. @@ -83,7 +83,7 @@ unsigned int vp10_int_pro_motion_estimation(const struct VP10_COMP *cpi, typedef int(integer_mv_pattern_search_fn)(const MACROBLOCK *x, MV *ref_mv, int search_param, int error_per_bit, int do_init_search, int *cost_list, - const vpx_variance_fn_ptr_t *vf, + const aom_variance_fn_ptr_t *vf, int use_mvcost, const MV *center_mv, MV *best_mv); @@ -95,7 +95,7 @@ integer_mv_pattern_search_fn vp10_fast_dia_search; typedef int(fractional_mv_step_fp)( const MACROBLOCK *x, MV *bestmv, const MV *ref_mv, int allow_hp, - int error_per_bit, const vpx_variance_fn_ptr_t *vfp, + int error_per_bit, const aom_variance_fn_ptr_t *vfp, int forced_stop, // 0 - full, 1 - qtr only, 2 - half only int iters_per_step, int *cost_list, int *mvjcost, int *mvcost[2], int *distortion, unsigned int *sse1, const uint8_t *second_pred, int w, @@ -108,22 +108,22 @@ extern fractional_mv_step_fp vp10_find_best_sub_pixel_tree_pruned_evenmore; typedef int (*vp10_full_search_fn_t)(const MACROBLOCK *x, const MV *ref_mv, int sad_per_bit, int distance, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv, MV *best_mv); typedef int (*vp10_refining_search_fn_t)(const MACROBLOCK *x, MV *ref_mv, int sad_per_bit, int distance, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv); typedef int (*vp10_diamond_search_fn_t)( const MACROBLOCK *x, const search_site_config *cfg, MV *ref_mv, MV *best_mv, int search_param, int sad_per_bit, int *num00, - const vpx_variance_fn_ptr_t *fn_ptr, const MV *center_mv); + const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv); int vp10_refining_search_8p_c(const MACROBLOCK *x, MV *ref_mv, int error_per_bit, int search_range, - const vpx_variance_fn_ptr_t *fn_ptr, + const aom_variance_fn_ptr_t *fn_ptr, const MV *center_mv, const uint8_t *second_pred); struct VP10_COMP; diff --git a/av1/encoder/pickdering.c b/av1/encoder/pickdering.c index fe3912ca2c3af3a348f974b4f0e33293d2c419f9..fd9d62de65b1312d6a3960078b23d95cf3f9356f 100644 --- a/av1/encoder/pickdering.c +++ b/av1/encoder/pickdering.c @@ -11,12 +11,12 @@ #include <string.h> -#include "./vpx_scale_rtcd.h" +#include "./aom_scale_rtcd.h" #include "av1/common/dering.h" #include "av1/common/onyxc_int.h" #include "av1/common/reconinter.h" #include "av1/encoder/encoder.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" static double compute_dist(int16_t *x, int xstride, int16_t *y, int ystride, int nhb, int nvb, int coeff_shift) { @@ -55,9 +55,9 @@ int vp10_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, int global_level; double best_tot_mse = 1e15; int coeff_shift = VPXMAX(cm->bit_depth - 8, 0); - src = vpx_malloc(sizeof(*src)*cm->mi_rows*cm->mi_cols*64); - ref_coeff = vpx_malloc(sizeof(*ref_coeff)*cm->mi_rows*cm->mi_cols*64); - bskip = vpx_malloc(sizeof(*bskip)*cm->mi_rows*cm->mi_cols); + src = aom_malloc(sizeof(*src)*cm->mi_rows*cm->mi_cols*64); + ref_coeff = aom_malloc(sizeof(*ref_coeff)*cm->mi_rows*cm->mi_cols*64); + bskip = aom_malloc(sizeof(*bskip)*cm->mi_rows*cm->mi_cols); vp10_setup_dst_planes(xd->plane, frame, 0, 0); for (pli = 0; pli < 3; pli++) { dec[pli] = xd->plane[pli].subsampling_x; @@ -92,7 +92,7 @@ int vp10_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, } nvsb = (cm->mi_rows + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE; nhsb = (cm->mi_cols + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE; - mse = vpx_malloc(nvsb*nhsb*sizeof(*mse)); + mse = aom_malloc(nvsb*nhsb*sizeof(*mse)); for (sbr = 0; sbr < nvsb; sbr++) { for (sbc = 0; sbc < nhsb; sbc++) { int best_mse = 1000000000; @@ -173,9 +173,9 @@ int vp10_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, if (tot_mse[level] < tot_mse[best_level]) best_level = level; } #endif - vpx_free(src); - vpx_free(ref_coeff); - vpx_free(bskip); - vpx_free(mse); + aom_free(src); + aom_free(ref_coeff); + aom_free(bskip); + aom_free(mse); return best_level; } diff --git a/av1/encoder/picklpf.c b/av1/encoder/picklpf.c index ffef764c7d1b336b1b1e7d19053847c9b8236800..cf3a08fa1203da228f2b0a41e75965a8722a352b 100644 --- a/av1/encoder/picklpf.c +++ b/av1/encoder/picklpf.c @@ -12,10 +12,10 @@ #include <assert.h> #include <limits.h> -#include "./vpx_scale_rtcd.h" +#include "./aom_scale_rtcd.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "av1/common/loopfilter.h" @@ -60,7 +60,7 @@ static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd, #endif // CONFIG_VPX_HIGHBITDEPTH // Re-instate the unfiltered frame - vpx_yv12_copy_y(&cpi->last_frame_uf, cm->frame_to_show); + aom_yv12_copy_y(&cpi->last_frame_uf, cm->frame_to_show); return filt_err; } @@ -86,7 +86,7 @@ static int search_filter_level(const YV12_BUFFER_CONFIG *sd, VP10_COMP *cpi, memset(ss_err, 0xFF, sizeof(ss_err)); // Make a copy of the unfiltered / processed recon buffer - vpx_yv12_copy_y(cm->frame_to_show, &cpi->last_frame_uf); + aom_yv12_copy_y(cm->frame_to_show, &cpi->last_frame_uf); best_err = try_filter_frame(sd, cpi, filt_mid, partial_frame); filt_best = filt_mid; diff --git a/av1/encoder/quantize.c b/av1/encoder/quantize.c index 098ad3308a6682aa9931837ae5661a6ea1328002..a0dd2b717ddb3d84429a22f71b7e35a14ca59bed 100644 --- a/av1/encoder/quantize.c +++ b/av1/encoder/quantize.c @@ -10,8 +10,8 @@ */ #include <math.h> -#include "./vpx_dsp_rtcd.h" -#include "aom_mem/vpx_mem.h" +#include "./aom_dsp_rtcd.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "av1/common/quant_common.h" @@ -273,7 +273,7 @@ void vp10_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block, #if CONFIG_VPX_HIGHBITDEPTH if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { - vpx_highbd_quantize_b(BLOCK_OFFSET(p->coeff, block), 16, x->skip_block, + aom_highbd_quantize_b(BLOCK_OFFSET(p->coeff, block), 16, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, BLOCK_OFFSET(p->qcoeff, block), BLOCK_OFFSET(pd->dqcoeff, block), pd->dequant, @@ -286,7 +286,7 @@ void vp10_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block, return; } #endif - vpx_quantize_b(BLOCK_OFFSET(p->coeff, block), 16, x->skip_block, p->zbin, + aom_quantize_b(BLOCK_OFFSET(p->coeff, block), 16, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, BLOCK_OFFSET(p->qcoeff, block), BLOCK_OFFSET(pd->dqcoeff, block), pd->dequant, &p->eobs[block], @@ -308,7 +308,7 @@ static void invert_quant(int16_t *quant, int16_t *shift, int d) { *shift = 1 << (16 - l); } -static int get_qzbin_factor(int q, vpx_bit_depth_t bit_depth) { +static int get_qzbin_factor(int q, aom_bit_depth_t bit_depth) { const int quant = vp10_dc_quant(q, 0, bit_depth); #if CONFIG_VPX_HIGHBITDEPTH switch (bit_depth) { diff --git a/av1/encoder/quantize.h b/av1/encoder/quantize.h index 0630638a494edeaadc97c8616c568817b79cd1c5..a3d252f4e11940b82a2bed16294d66dfc995706a 100644 --- a/av1/encoder/quantize.h +++ b/av1/encoder/quantize.h @@ -12,7 +12,7 @@ #ifndef VP10_ENCODER_QUANTIZE_H_ #define VP10_ENCODER_QUANTIZE_H_ -#include "./vpx_config.h" +#include "./aom_config.h" #include "av1/common/quant_common.h" #include "av1/encoder/block.h" diff --git a/av1/encoder/ratectrl.c b/av1/encoder/ratectrl.c index f0df0d6daa89aff03dc4735893f80f305a6cbead..bcb5ab8c741f2802af2f9c4b7a33209c23c74406 100644 --- a/av1/encoder/ratectrl.c +++ b/av1/encoder/ratectrl.c @@ -16,8 +16,8 @@ #include <stdlib.h> #include <string.h> -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "aom_ports/system_state.h" @@ -101,7 +101,7 @@ static int kf_low = 400; // The formulae were derived from computing a 3rd order polynomial best // fit to the original data (after plotting real maxq vs minq (not q index)) static int get_minq_index(double maxq, double x3, double x2, double x1, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int i; const double minqtarget = VPXMIN(((x3 * maxq + x2) * maxq + x1) * maxq, maxq); @@ -118,7 +118,7 @@ static int get_minq_index(double maxq, double x3, double x2, double x1, static void init_minq_luts(int *kf_low_m, int *kf_high_m, int *arfgf_low, int *arfgf_high, int *inter, int *rtc, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int i; for (i = 0; i < QINDEX_RANGE; i++) { const double maxq = vp10_convert_qindex_to_q(i, bit_depth); @@ -148,7 +148,7 @@ void vp10_rc_init_minq_luts(void) { // These functions use formulaic calculations to make playing with the // quantizer tables easier. If necessary they can be replaced by lookup // tables if and when things settle down in the experimental bitstream -double vp10_convert_qindex_to_q(int qindex, vpx_bit_depth_t bit_depth) { +double vp10_convert_qindex_to_q(int qindex, aom_bit_depth_t bit_depth) { // Convert the index to a real Q value (scaled down to match old Q values) #if CONFIG_VPX_HIGHBITDEPTH switch (bit_depth) { @@ -165,7 +165,7 @@ double vp10_convert_qindex_to_q(int qindex, vpx_bit_depth_t bit_depth) { } int vp10_rc_bits_per_mb(FRAME_TYPE frame_type, int qindex, - double correction_factor, vpx_bit_depth_t bit_depth) { + double correction_factor, aom_bit_depth_t bit_depth) { const double q = vp10_convert_qindex_to_q(qindex, bit_depth); int enumerator = frame_type == KEY_FRAME ? 2700000 : 1800000; @@ -179,7 +179,7 @@ int vp10_rc_bits_per_mb(FRAME_TYPE frame_type, int qindex, int vp10_estimate_bits_at_q(FRAME_TYPE frame_type, int q, int mbs, double correction_factor, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { const int bpm = (int)(vp10_rc_bits_per_mb(frame_type, q, correction_factor, bit_depth)); return VPXMAX(FRAME_OVERHEAD_BITS, @@ -414,7 +414,7 @@ void vp10_rc_update_rate_correction_factors(VP10_COMP *cpi) { if (cpi->rc.is_src_frame_alt_ref) return; // Clear down mmx registers to allow floating point in what follows - vpx_clear_system_state(); + aom_clear_system_state(); // Work out how big we would have expected the frame to be at this Q given // the current correction factor. @@ -532,7 +532,7 @@ static int get_active_quality(int q, int gfu_boost, int low, int high, } static int get_kf_active_quality(const RATE_CONTROL *const rc, int q, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int *kf_low_motion_minq; int *kf_high_motion_minq; ASSIGN_MINQ_TABLE(bit_depth, kf_low_motion_minq); @@ -542,7 +542,7 @@ static int get_kf_active_quality(const RATE_CONTROL *const rc, int q, } static int get_gf_active_quality(const RATE_CONTROL *const rc, int q, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int *arfgf_low_motion_minq; int *arfgf_high_motion_minq; ASSIGN_MINQ_TABLE(bit_depth, arfgf_low_motion_minq); @@ -710,7 +710,7 @@ static int rc_pick_q_and_bounds_one_pass_cbr(const VP10_COMP *cpi, if (cm->frame_type == KEY_FRAME && !rc->this_key_frame_forced && !(cm->current_video_frame == 0)) { int qdelta = 0; - vpx_clear_system_state(); + aom_clear_system_state(); qdelta = vp10_compute_qdelta_by_rate( &cpi->rc, cm->frame_type, active_worst_quality, 2.0, cm->bit_depth); *top_index = active_worst_quality + qdelta; @@ -864,7 +864,7 @@ static int rc_pick_q_and_bounds_one_pass_vbr(const VP10_COMP *cpi, #if LIMIT_QRANGE_FOR_ALTREF_AND_KEY { int qdelta = 0; - vpx_clear_system_state(); + aom_clear_system_state(); // Limit Q range for the adaptive loop. if (cm->frame_type == KEY_FRAME && !rc->this_key_frame_forced && @@ -1049,7 +1049,7 @@ static int rc_pick_q_and_bounds_two_pass(const VP10_COMP *cpi, } #if LIMIT_QRANGE_FOR_ALTREF_AND_KEY - vpx_clear_system_state(); + aom_clear_system_state(); // Static forced key frames Q restrictions dealt with elsewhere. if (!(frame_is_intra_only(cm)) || !rc->this_key_frame_forced || (cpi->twopass.last_kfgroup_zeromotion_pct < STATIC_MOTION_THRESH)) { @@ -1470,7 +1470,7 @@ void vp10_rc_get_one_pass_cbr_params(VP10_COMP *cpi) { } int vp10_compute_qdelta(const RATE_CONTROL *rc, double qstart, double qtarget, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int start_index = rc->worst_quality; int target_index = rc->worst_quality; int i; @@ -1492,7 +1492,7 @@ int vp10_compute_qdelta(const RATE_CONTROL *rc, double qstart, double qtarget, int vp10_compute_qdelta_by_rate(const RATE_CONTROL *rc, FRAME_TYPE frame_type, int qindex, double rate_target_ratio, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int target_index = rc->worst_quality; int i; diff --git a/av1/encoder/ratectrl.h b/av1/encoder/ratectrl.h index eaf3b57a61fe511f2f2795513be7ab5d7b84fc7c..410cebfbf4393d48979aee58c04cd8a2e7d3801f 100644 --- a/av1/encoder/ratectrl.h +++ b/av1/encoder/ratectrl.h @@ -12,8 +12,8 @@ #ifndef VP10_ENCODER_RATECTRL_H_ #define VP10_ENCODER_RATECTRL_H_ -#include "aom/vpx_codec.h" -#include "aom/vpx_integer.h" +#include "aom/aom_codec.h" +#include "aom/aom_integer.h" #include "av1/common/blockd.h" @@ -153,9 +153,9 @@ void vp10_rc_init(const struct VP10EncoderConfig *oxcf, int pass, int vp10_estimate_bits_at_q(FRAME_TYPE frame_kind, int q, int mbs, double correction_factor, - vpx_bit_depth_t bit_depth); + aom_bit_depth_t bit_depth); -double vp10_convert_qindex_to_q(int qindex, vpx_bit_depth_t bit_depth); +double vp10_convert_qindex_to_q(int qindex, aom_bit_depth_t bit_depth); void vp10_rc_init_minq_luts(void); @@ -222,7 +222,7 @@ int vp10_rc_regulate_q(const struct VP10_COMP *cpi, int target_bits_per_frame, // Estimates bits per mb for a given qindex and correction factor. int vp10_rc_bits_per_mb(FRAME_TYPE frame_type, int qindex, - double correction_factor, vpx_bit_depth_t bit_depth); + double correction_factor, aom_bit_depth_t bit_depth); // Clamping utilities for bitrate targets for iframes and pframes. int vp10_rc_clamp_iframe_target_size(const struct VP10_COMP *const cpi, @@ -236,13 +236,13 @@ void vp10_rc_set_frame_target(struct VP10_COMP *cpi, int target); // Computes a q delta (in "q index" terms) to get from a starting q value // to a target q value int vp10_compute_qdelta(const RATE_CONTROL *rc, double qstart, double qtarget, - vpx_bit_depth_t bit_depth); + aom_bit_depth_t bit_depth); // Computes a q delta (in "q index" terms) to get from a starting q value // to a value that should equate to the given rate ratio. int vp10_compute_qdelta_by_rate(const RATE_CONTROL *rc, FRAME_TYPE frame_type, int qindex, double rate_target_ratio, - vpx_bit_depth_t bit_depth); + aom_bit_depth_t bit_depth); int vp10_frame_type_qdelta(const struct VP10_COMP *cpi, int rf_level, int q); diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c index fabb6af56268499df11ca6a46bd80b4a6a31a055..0d12f2d32d74c676d899890d412dff0831f608d9 100644 --- a/av1/encoder/rd.c +++ b/av1/encoder/rd.c @@ -15,8 +15,8 @@ #include "./av1_rtcd.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/bitops.h" #include "aom_ports/mem.h" #include "aom_ports/system_state.h" @@ -105,7 +105,7 @@ static void fill_token_costs(vp10_coeff_cost *c, for (j = 0; j < REF_TYPES; ++j) for (k = 0; k < COEF_BANDS; ++k) for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) { - vpx_prob probs[ENTROPY_NODES]; + aom_prob probs[ENTROPY_NODES]; vp10_model_to_full_probs(p[t][i][j][k][l], probs); vp10_cost_tokens((int *)c[t][i][j][k][0][l], probs, vp10_coef_tree); vp10_cost_tokens_skip((int *)c[t][i][j][k][1][l], probs, @@ -127,7 +127,7 @@ static int sad_per_bit4lut_12[QINDEX_RANGE]; #endif static void init_me_luts_bd(int *bit16lut, int *bit4lut, int range, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int i; // Initialize the sad lut tables using a formulaic calculation for now. // This is to make it easier to resolve the impact of experimental changes @@ -182,7 +182,7 @@ int vp10_compute_rd_mult(const VP10_COMP *cpi, int qindex) { return (int)rdmult; } -static int compute_rd_thresh_factor(int qindex, vpx_bit_depth_t bit_depth) { +static int compute_rd_thresh_factor(int qindex, aom_bit_depth_t bit_depth) { double q; #if CONFIG_VPX_HIGHBITDEPTH switch (bit_depth) { @@ -264,7 +264,7 @@ void vp10_initialize_rd_consts(VP10_COMP *cpi) { RD_OPT *const rd = &cpi->rd; int i; - vpx_clear_system_state(); + aom_clear_system_state(); rd->RDDIV = RDDIV_BITS; // In bits (to multiply D by 128). rd->RDMULT = vp10_compute_rd_mult(cpi, cm->base_qindex + cm->y_dc_delta_q); @@ -620,7 +620,7 @@ void vp10_update_rd_thresh_fact(int (*factor_buf)[MAX_MODES], int rd_thresh, } int vp10_get_intra_cost_penalty(int qindex, int qdelta, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { const int q = vp10_dc_quant(qindex, qdelta, bit_depth); #if CONFIG_VPX_HIGHBITDEPTH switch (bit_depth) { diff --git a/av1/encoder/rd.h b/av1/encoder/rd.h index 0a699bcef15be3ef51c6ae48cb2a8f6eb32cc5ec..9d253c3d4d1ddf4c0abd2a15176b3608d568a432 100644 --- a/av1/encoder/rd.h +++ b/av1/encoder/rd.h @@ -186,7 +186,7 @@ void vp10_setup_pred_block(const MACROBLOCKD *xd, const struct scale_factors *scale_uv); int vp10_get_intra_cost_penalty(int qindex, int qdelta, - vpx_bit_depth_t bit_depth); + aom_bit_depth_t bit_depth); #ifdef __cplusplus } // extern "C" diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c index a02c88b55d8aa19e77c3ac932cddfb01e3619cce..e00717a8fb8c48bdfc36080287afce397443db30 100644 --- a/av1/encoder/rdopt.c +++ b/av1/encoder/rdopt.c @@ -13,10 +13,10 @@ #include <math.h> #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" #include "aom_ports/system_state.h" @@ -574,7 +574,7 @@ static void choose_largest_tx_size(VP10_COMP *cpi, MACROBLOCK *x, int *rate, TX_TYPE tx_type, best_tx_type = DCT_DCT; int r, s; int64_t d, psse, this_rd, best_rd = INT64_MAX; - vpx_prob skip_prob = vp10_get_skip_prob(cm, xd); + aom_prob skip_prob = vp10_get_skip_prob(cm, xd); int s0 = vp10_cost_bit(skip_prob, 0); int s1 = vp10_cost_bit(skip_prob, 1); const int is_inter = is_inter_block(mbmi); @@ -640,7 +640,7 @@ static void choose_tx_size_from_rd(VP10_COMP *cpi, MACROBLOCK *x, int *rate, VP10_COMMON *const cm = &cpi->common; MACROBLOCKD *const xd = &x->e_mbd; MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi; - vpx_prob skip_prob = vp10_get_skip_prob(cm, xd); + aom_prob skip_prob = vp10_get_skip_prob(cm, xd); int r, s; int64_t d, sse; int64_t rd = INT64_MAX; @@ -653,7 +653,7 @@ static void choose_tx_size_from_rd(VP10_COMP *cpi, MACROBLOCK *x, int *rate, TX_TYPE tx_type, best_tx_type = DCT_DCT; const int is_inter = is_inter_block(mbmi); - const vpx_prob *tx_probs = get_tx_probs2(max_tx_size, xd, &cm->fc->tx_probs); + const aom_prob *tx_probs = get_tx_probs2(max_tx_size, xd, &cm->fc->tx_probs); assert(skip_prob > 0); s0 = vp10_cost_bit(skip_prob, 0); s1 = vp10_cost_bit(skip_prob, 1); @@ -842,7 +842,7 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x, int row, xd->mi[0]->bmi[block].as_mode = mode; vp10_predict_intra_block(xd, 1, 1, TX_4X4, mode, dst, dst_stride, dst, dst_stride, col + idx, row + idy, 0); - vpx_highbd_subtract_block(4, 4, src_diff, 8, src, src_stride, dst, + aom_highbd_subtract_block(4, 4, src_diff, 8, src, src_stride, dst, dst_stride, xd->bd); if (xd->lossless[xd->mi[0]->mbmi.segment_id]) { TX_TYPE tx_type = get_tx_type(PLANE_TYPE_Y, xd, block); @@ -937,7 +937,7 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x, int row, xd->mi[0]->bmi[block].as_mode = mode; vp10_predict_intra_block(xd, 1, 1, TX_4X4, mode, dst, dst_stride, dst, dst_stride, col + idx, row + idy, 0); - vpx_subtract_block(4, 4, src_diff, 8, src, src_stride, dst, dst_stride); + aom_subtract_block(4, 4, src_diff, 8, src, src_stride, dst, dst_stride); if (xd->lossless[xd->mi[0]->mbmi.segment_id]) { TX_TYPE tx_type = get_tx_type(PLANE_TYPE_Y, xd, block); @@ -1330,27 +1330,27 @@ static int64_t encode_inter_mb_segment(VP10_COMP *cpi, MACROBLOCK *x, #if CONFIG_VPX_HIGHBITDEPTH if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { fwd_txm4x4 = xd->lossless[mi->mbmi.segment_id] ? vp10_highbd_fwht4x4 - : vpx_highbd_fdct4x4; + : aom_highbd_fdct4x4; } else { - fwd_txm4x4 = xd->lossless[mi->mbmi.segment_id] ? vp10_fwht4x4 : vpx_fdct4x4; + fwd_txm4x4 = xd->lossless[mi->mbmi.segment_id] ? vp10_fwht4x4 : aom_fdct4x4; } #else - fwd_txm4x4 = xd->lossless[mi->mbmi.segment_id] ? vp10_fwht4x4 : vpx_fdct4x4; + fwd_txm4x4 = xd->lossless[mi->mbmi.segment_id] ? vp10_fwht4x4 : aom_fdct4x4; #endif // CONFIG_VPX_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { - vpx_highbd_subtract_block( + aom_highbd_subtract_block( height, width, vp10_raster_block_offset_int16(BLOCK_8X8, i, p->src_diff), 8, src, p->src.stride, dst, pd->dst.stride, xd->bd); } else { - vpx_subtract_block(height, width, vp10_raster_block_offset_int16( + aom_subtract_block(height, width, vp10_raster_block_offset_int16( BLOCK_8X8, i, p->src_diff), 8, src, p->src.stride, dst, pd->dst.stride); } #else - vpx_subtract_block(height, width, + aom_subtract_block(height, width, vp10_raster_block_offset_int16(BLOCK_8X8, i, p->src_diff), 8, src, p->src.stride, dst, pd->dst.stride); #endif // CONFIG_VPX_HIGHBITDEPTH @@ -1996,7 +1996,7 @@ static void estimate_ref_frame_costs(const VP10_COMMON *cm, const MACROBLOCKD *xd, int segment_id, unsigned int *ref_costs_single, unsigned int *ref_costs_comp, - vpx_prob *comp_mode_p) { + aom_prob *comp_mode_p) { int seg_ref_active = segfeature_active(&cm->seg, segment_id, SEG_LVL_REF_FRAME); if (seg_ref_active) { @@ -2004,8 +2004,8 @@ static void estimate_ref_frame_costs(const VP10_COMMON *cm, memset(ref_costs_comp, 0, MAX_REF_FRAMES * sizeof(*ref_costs_comp)); *comp_mode_p = 128; } else { - vpx_prob intra_inter_p = vp10_get_intra_inter_prob(cm, xd); - vpx_prob comp_inter_p = 128; + aom_prob intra_inter_p = vp10_get_intra_inter_prob(cm, xd); + aom_prob comp_inter_p = 128; if (cm->reference_mode == REFERENCE_MODE_SELECT) { comp_inter_p = vp10_get_reference_mode_prob(cm, xd); @@ -2017,8 +2017,8 @@ static void estimate_ref_frame_costs(const VP10_COMMON *cm, ref_costs_single[INTRA_FRAME] = vp10_cost_bit(intra_inter_p, 0); if (cm->reference_mode != COMPOUND_REFERENCE) { - vpx_prob ref_single_p1 = vp10_get_pred_prob_single_ref_p1(cm, xd); - vpx_prob ref_single_p2 = vp10_get_pred_prob_single_ref_p2(cm, xd); + aom_prob ref_single_p1 = vp10_get_pred_prob_single_ref_p1(cm, xd); + aom_prob ref_single_p2 = vp10_get_pred_prob_single_ref_p2(cm, xd); unsigned int base_cost = vp10_cost_bit(intra_inter_p, 1); if (cm->reference_mode == REFERENCE_MODE_SELECT) @@ -2037,7 +2037,7 @@ static void estimate_ref_frame_costs(const VP10_COMMON *cm, ref_costs_single[ALTREF_FRAME] = 512; } if (cm->reference_mode != SINGLE_REFERENCE) { - vpx_prob ref_comp_p = vp10_get_pred_prob_comp_ref_p(cm, xd); + aom_prob ref_comp_p = vp10_get_pred_prob_comp_ref_p(cm, xd); unsigned int base_cost = vp10_cost_bit(intra_inter_p, 1); if (cm->reference_mode == REFERENCE_MODE_SELECT) @@ -2834,7 +2834,7 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi, TileDataEnc *tile_data, int best_mode_skippable = 0; int midx, best_mode_index = -1; unsigned int ref_costs_single[MAX_REF_FRAMES], ref_costs_comp[MAX_REF_FRAMES]; - vpx_prob comp_mode_p; + aom_prob comp_mode_p; int64_t best_intra_rd = INT64_MAX; unsigned int best_pred_sse = UINT_MAX; PREDICTION_MODE best_intra_mode = DC_PRED; @@ -3416,7 +3416,7 @@ void vp10_rd_pick_inter_mode_sb_seg_skip(VP10_COMP *cpi, TileDataEnc *tile_data, int64_t best_pred_diff[REFERENCE_MODES]; int64_t best_filter_diff[SWITCHABLE_FILTER_CONTEXTS]; unsigned int ref_costs_single[MAX_REF_FRAMES], ref_costs_comp[MAX_REF_FRAMES]; - vpx_prob comp_mode_p; + aom_prob comp_mode_p; INTERP_FILTER best_filter = SWITCHABLE; int64_t this_rd = INT64_MAX; int rate2 = 0; @@ -3521,7 +3521,7 @@ void vp10_rd_pick_inter_mode_sub8x8(VP10_COMP *cpi, TileDataEnc *tile_data, MB_MODE_INFO best_mbmode; int ref_index, best_ref_index = 0; unsigned int ref_costs_single[MAX_REF_FRAMES], ref_costs_comp[MAX_REF_FRAMES]; - vpx_prob comp_mode_p; + aom_prob comp_mode_p; INTERP_FILTER tmp_best_filter = SWITCHABLE; int rate_uv_intra, rate_uv_tokenonly; int64_t dist_uv; diff --git a/av1/encoder/resize.c b/av1/encoder/resize.c index 623b1ab939035972ef9d251c880fdb599967ed62..18731d6a6aa0aa42bfa3a4d96fd63528e6337ef3 100644 --- a/av1/encoder/resize.c +++ b/av1/encoder/resize.c @@ -17,7 +17,7 @@ #include <string.h> #if CONFIG_VPX_HIGHBITDEPTH -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" #endif // CONFIG_VPX_HIGHBITDEPTH #include "aom_ports/mem.h" #include "av1/common/common.h" diff --git a/av1/encoder/resize.h b/av1/encoder/resize.h index df514a6e6f462cb81148c0b32246d0a436b2df3b..030f4e46c18afc6e72a1d53e36e46ef12b5e5cc1 100644 --- a/av1/encoder/resize.h +++ b/av1/encoder/resize.h @@ -13,7 +13,7 @@ #define VP10_ENCODER_RESIZE_H_ #include <stdio.h> -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #ifdef __cplusplus extern "C" { diff --git a/av1/encoder/segmentation.c b/av1/encoder/segmentation.c index 888445acacf7b45378faddeee76420990684e09c..0c0dccefd92f94519be26a39ee5167a5c95aaf8d 100644 --- a/av1/encoder/segmentation.c +++ b/av1/encoder/segmentation.c @@ -11,7 +11,7 @@ #include <limits.h> -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "av1/common/pred_common.h" #include "av1/common/tile_common.h" @@ -50,8 +50,8 @@ void vp10_clear_segdata(struct segmentation *seg, int segment_id, // Based on set of segment counts calculate a probability tree static void calc_segtree_probs(unsigned *segcounts, - vpx_prob *segment_tree_probs, - const vpx_prob *cur_tree_probs) { + aom_prob *segment_tree_probs, + const aom_prob *cur_tree_probs) { // Work out probabilities of each segment const unsigned cc[4] = { segcounts[0] + segcounts[1], segcounts[2] + segcounts[3], @@ -83,7 +83,7 @@ static void calc_segtree_probs(unsigned *segcounts, } // Based on set of segment counts and probabilities calculate a cost estimate -static int cost_segmap(unsigned *segcounts, vpx_prob *probs) { +static int cost_segmap(unsigned *segcounts, aom_prob *probs) { const int c01 = segcounts[0] + segcounts[1]; const int c23 = segcounts[2] + segcounts[3]; const int c45 = segcounts[4] + segcounts[5]; @@ -227,9 +227,9 @@ void vp10_choose_segmap_coding_method(VP10_COMMON *cm, MACROBLOCKD *xd) { unsigned t_unpred_seg_counts[MAX_SEGMENTS] = { 0 }; #endif - vpx_prob no_pred_tree[SEG_TREE_PROBS]; - vpx_prob t_pred_tree[SEG_TREE_PROBS]; - vpx_prob t_nopred_prob[PREDICTION_PROBS]; + aom_prob no_pred_tree[SEG_TREE_PROBS]; + aom_prob t_pred_tree[SEG_TREE_PROBS]; + aom_prob t_nopred_prob[PREDICTION_PROBS]; #if CONFIG_MISC_FIXES (void)xd; diff --git a/av1/encoder/skin_detection.c b/av1/encoder/skin_detection.c index c0484f42cbb38b932966b29eaf71beac3a52029c..b24bdae7a3351c59018f87577dedea5d2c216813 100644 --- a/av1/encoder/skin_detection.c +++ b/av1/encoder/skin_detection.c @@ -61,10 +61,10 @@ void vp10_compute_skin_map(VP10_COMP *const cpi, FILE *yuv_skinmap_file) { const int src_uvstride = cpi->Source->uv_stride; YV12_BUFFER_CONFIG skinmap; memset(&skinmap, 0, sizeof(YV12_BUFFER_CONFIG)); - if (vpx_alloc_frame_buffer(&skinmap, cm->width, cm->height, cm->subsampling_x, + if (aom_alloc_frame_buffer(&skinmap, cm->width, cm->height, cm->subsampling_x, cm->subsampling_y, VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment)) { - vpx_free_frame_buffer(&skinmap); + aom_free_frame_buffer(&skinmap); return; } memset(skinmap.buffer_alloc, 128, skinmap.frame_size); @@ -99,6 +99,6 @@ void vp10_compute_skin_map(VP10_COMP *const cpi, FILE *yuv_skinmap_file) { src_v += (src_uvstride << 2) - ((cm->mi_cols - 1) << 2); } vp10_write_yuv_frame_420(&skinmap, yuv_skinmap_file); - vpx_free_frame_buffer(&skinmap); + aom_free_frame_buffer(&skinmap); } #endif diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c index 8fcd902ed715ed0d14f93e155c748ea39921a0f9..72e2a95f7769412f9d4a17cabca09737b8bb8b9f 100644 --- a/av1/encoder/speed_features.c +++ b/av1/encoder/speed_features.c @@ -15,7 +15,7 @@ #include "av1/encoder/speed_features.h" #include "av1/encoder/rdopt.h" -#include "aom_dsp/vpx_dsp_common.h" +#include "aom_dsp/aom_dsp_common.h" // Mesh search patters for various speed settings static MESH_PATTERN best_quality_mesh_pattern[MAX_MESH_STEP] = { @@ -265,7 +265,7 @@ static void set_rt_speed_feature_framesize_dependent(VP10_COMP *cpi, } static void set_rt_speed_feature(VP10_COMP *cpi, SPEED_FEATURES *sf, int speed, - vpx_tune_content content) { + aom_tune_content content) { VP10_COMMON *const cm = &cpi->common; const int is_keyframe = cm->frame_type == KEY_FRAME; const int frames_since_key = is_keyframe ? 0 : cpi->rc.frames_since_key; diff --git a/av1/encoder/subexp.c b/av1/encoder/subexp.c index 44df62e96970905f49054bc586cd57526ba079cb..d1930a21d06353a7ad32ede670aff2936f7c5e52 100644 --- a/av1/encoder/subexp.c +++ b/av1/encoder/subexp.c @@ -83,49 +83,49 @@ static int remap_prob(int v, int m) { return i; } -static int prob_diff_update_cost(vpx_prob newp, vpx_prob oldp) { +static int prob_diff_update_cost(aom_prob newp, aom_prob oldp) { int delp = remap_prob(newp, oldp); return update_bits[delp] << VP9_PROB_COST_SHIFT; } -static void encode_uniform(vpx_writer *w, int v) { +static void encode_uniform(aom_writer *w, int v) { const int l = 8; const int m = (1 << l) - 191 + CONFIG_MISC_FIXES; if (v < m) { - vpx_write_literal(w, v, l - 1); + aom_write_literal(w, v, l - 1); } else { - vpx_write_literal(w, m + ((v - m) >> 1), l - 1); - vpx_write_literal(w, (v - m) & 1, 1); + aom_write_literal(w, m + ((v - m) >> 1), l - 1); + aom_write_literal(w, (v - m) & 1, 1); } } -static INLINE int write_bit_gte(vpx_writer *w, int word, int test) { - vpx_write_literal(w, word >= test, 1); +static INLINE int write_bit_gte(aom_writer *w, int word, int test) { + aom_write_literal(w, word >= test, 1); return word >= test; } -static void encode_term_subexp(vpx_writer *w, int word) { +static void encode_term_subexp(aom_writer *w, int word) { if (!write_bit_gte(w, word, 16)) { - vpx_write_literal(w, word, 4); + aom_write_literal(w, word, 4); } else if (!write_bit_gte(w, word, 32)) { - vpx_write_literal(w, word - 16, 4); + aom_write_literal(w, word - 16, 4); } else if (!write_bit_gte(w, word, 64)) { - vpx_write_literal(w, word - 32, 5); + aom_write_literal(w, word - 32, 5); } else { encode_uniform(w, word - 64); } } -void vp10_write_prob_diff_update(vpx_writer *w, vpx_prob newp, vpx_prob oldp) { +void vp10_write_prob_diff_update(aom_writer *w, aom_prob newp, aom_prob oldp) { const int delp = remap_prob(newp, oldp); encode_term_subexp(w, delp); } -int vp10_prob_diff_update_savings_search(const unsigned int *ct, vpx_prob oldp, - vpx_prob *bestp, vpx_prob upd) { +int vp10_prob_diff_update_savings_search(const unsigned int *ct, aom_prob oldp, + aom_prob *bestp, aom_prob upd) { const int old_b = cost_branch256(ct, oldp); int bestsavings = 0; - vpx_prob newp, bestnewp = oldp; + aom_prob newp, bestnewp = oldp; const int step = *bestp > oldp ? -1 : 1; for (newp = *bestp; newp != oldp; newp += step) { @@ -142,14 +142,14 @@ int vp10_prob_diff_update_savings_search(const unsigned int *ct, vpx_prob oldp, } int vp10_prob_diff_update_savings_search_model(const unsigned int *ct, - const vpx_prob *oldp, - vpx_prob *bestp, vpx_prob upd, + const aom_prob *oldp, + aom_prob *bestp, aom_prob upd, int stepsize) { int i, old_b, new_b, update_b, savings, bestsavings, step; int newp; - vpx_prob bestnewp, newplist[ENTROPY_NODES], oldplist[ENTROPY_NODES]; + aom_prob bestnewp, newplist[ENTROPY_NODES], oldplist[ENTROPY_NODES]; vp10_model_to_full_probs(oldp, oldplist); - memcpy(newplist, oldp, sizeof(vpx_prob) * UNCONSTRAINED_NODES); + memcpy(newplist, oldp, sizeof(aom_prob) * UNCONSTRAINED_NODES); for (i = UNCONSTRAINED_NODES, old_b = 0; i < ENTROPY_NODES; ++i) old_b += cost_branch256(ct + 2 * i, oldplist[i]); old_b += cost_branch256(ct + 2 * PIVOT_NODE, oldplist[PIVOT_NODE]); @@ -197,26 +197,26 @@ int vp10_prob_diff_update_savings_search_model(const unsigned int *ct, return bestsavings; } -void vp10_cond_prob_diff_update(vpx_writer *w, vpx_prob *oldp, +void vp10_cond_prob_diff_update(aom_writer *w, aom_prob *oldp, const unsigned int ct[2]) { - const vpx_prob upd = DIFF_UPDATE_PROB; - vpx_prob newp = get_binary_prob(ct[0], ct[1]); + const aom_prob upd = DIFF_UPDATE_PROB; + aom_prob newp = get_binary_prob(ct[0], ct[1]); const int savings = vp10_prob_diff_update_savings_search(ct, *oldp, &newp, upd); assert(newp >= 1); if (savings > 0) { - vpx_write(w, 1, upd); + aom_write(w, 1, upd); vp10_write_prob_diff_update(w, newp, *oldp); *oldp = newp; } else { - vpx_write(w, 0, upd); + aom_write(w, 0, upd); } } -int vp10_cond_prob_diff_update_savings(vpx_prob *oldp, +int vp10_cond_prob_diff_update_savings(aom_prob *oldp, const unsigned int ct[2]) { - const vpx_prob upd = DIFF_UPDATE_PROB; - vpx_prob newp = get_binary_prob(ct[0], ct[1]); + const aom_prob upd = DIFF_UPDATE_PROB; + aom_prob newp = get_binary_prob(ct[0], ct[1]); const int savings = vp10_prob_diff_update_savings_search(ct, *oldp, &newp, upd); return savings; diff --git a/av1/encoder/subexp.h b/av1/encoder/subexp.h index 257c7fdacb2287d2327b962748de3ef45d9752bc..9d870f56b2b6d11126c64ff9bb30f80ee3d93818 100644 --- a/av1/encoder/subexp.h +++ b/av1/encoder/subexp.h @@ -18,23 +18,23 @@ extern "C" { #include "aom_dsp/prob.h" -struct vpx_writer; +struct aom_writer; -void vp10_write_prob_diff_update(struct vpx_writer *w, vpx_prob newp, - vpx_prob oldp); +void vp10_write_prob_diff_update(struct aom_writer *w, aom_prob newp, + aom_prob oldp); -void vp10_cond_prob_diff_update(struct vpx_writer *w, vpx_prob *oldp, +void vp10_cond_prob_diff_update(struct aom_writer *w, aom_prob *oldp, const unsigned int ct[2]); -int vp10_prob_diff_update_savings_search(const unsigned int *ct, vpx_prob oldp, - vpx_prob *bestp, vpx_prob upd); +int vp10_prob_diff_update_savings_search(const unsigned int *ct, aom_prob oldp, + aom_prob *bestp, aom_prob upd); int vp10_prob_diff_update_savings_search_model(const unsigned int *ct, - const vpx_prob *oldp, - vpx_prob *bestp, vpx_prob upd, + const aom_prob *oldp, + aom_prob *bestp, aom_prob upd, int stepsize); -int vp10_cond_prob_diff_update_savings(vpx_prob *oldp, +int vp10_cond_prob_diff_update_savings(aom_prob *oldp, const unsigned int ct[2]); #ifdef __cplusplus } // extern "C" diff --git a/av1/encoder/temporal_filter.c b/av1/encoder/temporal_filter.c index cb21703113b5ae5bcc620f54bb9fd1f3fdab2605..cdad633ec6f992191328765e07464355116cc41c 100644 --- a/av1/encoder/temporal_filter.c +++ b/av1/encoder/temporal_filter.c @@ -25,11 +25,11 @@ #include "av1/encoder/ratectrl.h" #include "av1/encoder/segmentation.h" #include "av1/encoder/temporal_filter.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" -#include "aom_ports/vpx_timer.h" -#include "aom_scale/vpx_scale.h" +#include "aom_ports/aom_timer.h" +#include "aom_scale/aom_scale.h" static void temporal_filter_predictors_mb_c( MACROBLOCKD *xd, uint8_t *y_mb_ptr, uint8_t *u_mb_ptr, uint8_t *v_mb_ptr, diff --git a/av1/encoder/tokenize.c b/av1/encoder/tokenize.c index f9590f60571432ba5f2ffa05c268e309c6920881..21fd17c767634b791e2ea71b0d0e0d38382ce365 100644 --- a/av1/encoder/tokenize.c +++ b/av1/encoder/tokenize.c @@ -14,7 +14,7 @@ #include <stdio.h> #include <string.h> -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" #include "av1/common/entropy.h" #include "av1/common/pred_common.h" @@ -52,7 +52,7 @@ const TOKENVALUE *vp10_dct_cat_lt_10_value_tokens = 2; // Array indices are identical to previously-existing CONTEXT_NODE indices -const vpx_tree_index vp10_coef_tree[TREE_SIZE(ENTROPY_TOKENS)] = { +const aom_tree_index vp10_coef_tree[TREE_SIZE(ENTROPY_TOKENS)] = { -EOB_TOKEN, 2, // 0 = EOB -ZERO_TOKEN, @@ -77,12 +77,12 @@ const vpx_tree_index vp10_coef_tree[TREE_SIZE(ENTROPY_TOKENS)] = { -CATEGORY6_TOKEN // 10 = CAT_FIVE }; -static const vpx_tree_index cat1[2] = { 0, 0 }; -static const vpx_tree_index cat2[4] = { 2, 2, 0, 0 }; -static const vpx_tree_index cat3[6] = { 2, 2, 4, 4, 0, 0 }; -static const vpx_tree_index cat4[8] = { 2, 2, 4, 4, 6, 6, 0, 0 }; -static const vpx_tree_index cat5[10] = { 2, 2, 4, 4, 6, 6, 8, 8, 0, 0 }; -static const vpx_tree_index cat6[28] = { 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, +static const aom_tree_index cat1[2] = { 0, 0 }; +static const aom_tree_index cat2[4] = { 2, 2, 0, 0 }; +static const aom_tree_index cat3[6] = { 2, 2, 4, 4, 0, 0 }; +static const aom_tree_index cat4[8] = { 2, 2, 4, 4, 6, 6, 0, 0 }; +static const aom_tree_index cat5[10] = { 2, 2, 4, 4, 6, 6, 8, 8, 0, 0 }; +static const aom_tree_index cat6[28] = { 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 0, 0 }; @@ -257,21 +257,21 @@ const int vp10_cat6_high12_high_cost[1024] = { #endif #if CONFIG_VPX_HIGHBITDEPTH -static const vpx_tree_index cat1_high10[2] = { 0, 0 }; -static const vpx_tree_index cat2_high10[4] = { 2, 2, 0, 0 }; -static const vpx_tree_index cat3_high10[6] = { 2, 2, 4, 4, 0, 0 }; -static const vpx_tree_index cat4_high10[8] = { 2, 2, 4, 4, 6, 6, 0, 0 }; -static const vpx_tree_index cat5_high10[10] = { 2, 2, 4, 4, 6, 6, 8, 8, 0, 0 }; -static const vpx_tree_index cat6_high10[32] = { 2, 2, 4, 4, 6, 6, 8, 8, +static const aom_tree_index cat1_high10[2] = { 0, 0 }; +static const aom_tree_index cat2_high10[4] = { 2, 2, 0, 0 }; +static const aom_tree_index cat3_high10[6] = { 2, 2, 4, 4, 0, 0 }; +static const aom_tree_index cat4_high10[8] = { 2, 2, 4, 4, 6, 6, 0, 0 }; +static const aom_tree_index cat5_high10[10] = { 2, 2, 4, 4, 6, 6, 8, 8, 0, 0 }; +static const aom_tree_index cat6_high10[32] = { 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 0, 0 }; -static const vpx_tree_index cat1_high12[2] = { 0, 0 }; -static const vpx_tree_index cat2_high12[4] = { 2, 2, 0, 0 }; -static const vpx_tree_index cat3_high12[6] = { 2, 2, 4, 4, 0, 0 }; -static const vpx_tree_index cat4_high12[8] = { 2, 2, 4, 4, 6, 6, 0, 0 }; -static const vpx_tree_index cat5_high12[10] = { 2, 2, 4, 4, 6, 6, 8, 8, 0, 0 }; -static const vpx_tree_index cat6_high12[36] = { +static const aom_tree_index cat1_high12[2] = { 0, 0 }; +static const aom_tree_index cat2_high12[4] = { 2, 2, 0, 0 }; +static const aom_tree_index cat3_high12[6] = { 2, 2, 4, 4, 0, 0 }; +static const aom_tree_index cat4_high12[8] = { 2, 2, 4, 4, 6, 6, 0, 0 }; +static const aom_tree_index cat5_high12[10] = { 2, 2, 4, 4, 6, 6, 8, 8, 0, 0 }; +static const aom_tree_index cat6_high12[36] = { 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, 32, 34, 34, 0, 0 }; @@ -347,7 +347,7 @@ static void set_entropy_context_b(int plane, int block, int blk_row, blk_row); } -static INLINE void add_token(TOKENEXTRA **t, const vpx_prob *context_tree, +static INLINE void add_token(TOKENEXTRA **t, const aom_prob *context_tree, int32_t extra, uint8_t token, uint8_t skip_eob_node, unsigned int *counts) { (*t)->token = token; @@ -359,7 +359,7 @@ static INLINE void add_token(TOKENEXTRA **t, const vpx_prob *context_tree, } static INLINE void add_token_no_extra(TOKENEXTRA **t, - const vpx_prob *context_tree, + const aom_prob *context_tree, uint8_t token, uint8_t skip_eob_node, unsigned int *counts) { (*t)->token = token; @@ -400,7 +400,7 @@ static void tokenize_b(int plane, int block, int blk_row, int blk_col, const int ref = is_inter_block(mbmi); unsigned int (*const counts)[COEFF_CONTEXTS][ENTROPY_TOKENS] = td->rd_counts.coef_counts[tx_size][type][ref]; - vpx_prob (*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = + aom_prob (*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = cpi->common.fc->coef_probs[tx_size][type][ref]; unsigned int (*const eob_branch)[COEFF_CONTEXTS] = td->counts->eob_branch[tx_size][type][ref]; diff --git a/av1/encoder/tokenize.h b/av1/encoder/tokenize.h index f90ec0a0192f8fe796d0babf6b4a15af8cbf10a7..a7a37cb211bc5161db8d3d8e25dcc476f684a27b 100644 --- a/av1/encoder/tokenize.h +++ b/av1/encoder/tokenize.h @@ -35,14 +35,14 @@ typedef struct { } TOKENVALUE; typedef struct { - const vpx_prob *context_tree; + const aom_prob *context_tree; EXTRABIT extra; uint8_t token; uint8_t skip_eob_node; } TOKENEXTRA; -extern const vpx_tree_index vp10_coef_tree[]; -extern const vpx_tree_index vp10_coef_con_tree[]; +extern const aom_tree_index vp10_coef_tree[]; +extern const aom_tree_index vp10_coef_con_tree[]; extern const struct vp10_token vp10_coef_encodings[]; int vp10_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane); diff --git a/av1/encoder/treewriter.c b/av1/encoder/treewriter.c index d87654f384a6895becb2c687ab0f53884e37e3aa..e1b98871bab7871a1ec162bed22efdd8e6e614dd 100644 --- a/av1/encoder/treewriter.c +++ b/av1/encoder/treewriter.c @@ -11,13 +11,13 @@ #include "av1/encoder/treewriter.h" -static void tree2tok(struct vp10_token *tokens, const vpx_tree_index *tree, +static void tree2tok(struct vp10_token *tokens, const aom_tree_index *tree, int i, int v, int l) { v += v; ++l; do { - const vpx_tree_index j = tree[i++]; + const aom_tree_index j = tree[i++]; if (j <= 0) { tokens[-j].value = v; tokens[-j].len = l; @@ -28,11 +28,11 @@ static void tree2tok(struct vp10_token *tokens, const vpx_tree_index *tree, } void vp10_tokens_from_tree(struct vp10_token *tokens, - const vpx_tree_index *tree) { + const aom_tree_index *tree) { tree2tok(tokens, tree, 0, 0, 0); } -static unsigned int convert_distribution(unsigned int i, vpx_tree tree, +static unsigned int convert_distribution(unsigned int i, aom_tree tree, unsigned int branch_ct[][2], const unsigned int num_events[]) { unsigned int left, right; @@ -52,7 +52,7 @@ static unsigned int convert_distribution(unsigned int i, vpx_tree tree, return left + right; } -void vp10_tree_probs_from_distribution(vpx_tree tree, +void vp10_tree_probs_from_distribution(aom_tree tree, unsigned int branch_ct[/* n-1 */][2], const unsigned int num_events[/* n */]) { convert_distribution(0, tree, branch_ct, num_events); diff --git a/av1/encoder/treewriter.h b/av1/encoder/treewriter.h index f471b7ec2b1a52eec9e5109a941a5de27d82650e..306bd4a92286e13c50c4bd52ece36163e7e4ecea 100644 --- a/av1/encoder/treewriter.h +++ b/av1/encoder/treewriter.h @@ -18,7 +18,7 @@ extern "C" { #endif -void vp10_tree_probs_from_distribution(vpx_tree tree, +void vp10_tree_probs_from_distribution(aom_tree tree, unsigned int branch_ct[/* n - 1 */][2], const unsigned int num_events[/* n */]); @@ -27,20 +27,20 @@ struct vp10_token { int len; }; -void vp10_tokens_from_tree(struct vp10_token *, const vpx_tree_index *); +void vp10_tokens_from_tree(struct vp10_token *, const aom_tree_index *); -static INLINE void vp10_write_tree(vpx_writer *w, const vpx_tree_index *tree, - const vpx_prob *probs, int bits, int len, - vpx_tree_index i) { +static INLINE void vp10_write_tree(aom_writer *w, const aom_tree_index *tree, + const aom_prob *probs, int bits, int len, + aom_tree_index i) { do { const int bit = (bits >> --len) & 1; - vpx_write(w, bit, probs[i >> 1]); + aom_write(w, bit, probs[i >> 1]); i = tree[i + bit]; } while (len); } -static INLINE void vp10_write_token(vpx_writer *w, const vpx_tree_index *tree, - const vpx_prob *probs, +static INLINE void vp10_write_token(aom_writer *w, const aom_tree_index *tree, + const aom_prob *probs, const struct vp10_token *token) { vp10_write_tree(w, tree, probs, token->value, token->len, 0); } diff --git a/av1/encoder/x86/dct_sse2.c b/av1/encoder/x86/dct_sse2.c index 69f10b75861784d7f1ca2a9b0bd99ced5e8b17c1..54a9d2daeef0768d29527e0e0c183b3aa7e638fd 100644 --- a/av1/encoder/x86/dct_sse2.c +++ b/av1/encoder/x86/dct_sse2.c @@ -13,7 +13,7 @@ #include <emmintrin.h> // SSE2 #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "aom_dsp/txfm_common.h" #include "aom_dsp/x86/fwd_txfm_sse2.h" #include "aom_dsp/x86/txfm_common_sse2.h" @@ -157,7 +157,7 @@ void vp10_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, __m128i in[4]; switch (tx_type) { - case DCT_DCT: vpx_fdct4x4_sse2(input, output, stride); break; + case DCT_DCT: aom_fdct4x4_sse2(input, output, stride); break; case ADST_DCT: load_buffer_4x4(input, in, stride); fadst4_sse2(in); @@ -1134,7 +1134,7 @@ void vp10_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, __m128i in[8]; switch (tx_type) { - case DCT_DCT: vpx_fdct8x8_sse2(input, output, stride); break; + case DCT_DCT: aom_fdct8x8_sse2(input, output, stride); break; case ADST_DCT: load_buffer_8x8(input, in, stride); fadst8_sse2(in); @@ -2017,7 +2017,7 @@ void vp10_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, __m128i in0[16], in1[16]; switch (tx_type) { - case DCT_DCT: vpx_fdct16x16_sse2(input, output, stride); break; + case DCT_DCT: aom_fdct16x16_sse2(input, output, stride); break; case ADST_DCT: load_buffer_16x16(input, in0, in1, stride); fadst16_sse2(in0, in1); diff --git a/av1/encoder/x86/error_intrin_avx2.c b/av1/encoder/x86/error_intrin_avx2.c index 7533557e1b7b3bef78a72518d6c81a7a3e48202b..5f60c3c71c7bc07ca0fa010b48353aaae3c2fa5a 100644 --- a/av1/encoder/x86/error_intrin_avx2.c +++ b/av1/encoder/x86/error_intrin_avx2.c @@ -12,7 +12,7 @@ #include <immintrin.h> // AVX2 #include "./av1_rtcd.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" int64_t vp10_block_error_avx2(const int16_t *coeff, const int16_t *dqcoeff, intptr_t block_size, int64_t *ssz) { diff --git a/av1/encoder/x86/quantize_sse2.c b/av1/encoder/x86/quantize_sse2.c index 7e0c0ec088d789b84241309ff24643740f05d191..44b44d04d8c5ab7efcef58bf24f1b99dcd2741ad 100644 --- a/av1/encoder/x86/quantize_sse2.c +++ b/av1/encoder/x86/quantize_sse2.c @@ -13,7 +13,7 @@ #include <xmmintrin.h> #include "./av1_rtcd.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" void vp10_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t* zbin_ptr, diff --git a/av1/exports_dec b/av1/exports_dec index 71c8369ba4a23fbc011c93117775cdad8e80f600..67f427fd7feafb63f3801bc30b0af4cbe1f7e57e 100644 --- a/av1/exports_dec +++ b/av1/exports_dec @@ -1,2 +1,2 @@ -data vpx_codec_vp10_dx_algo -text vpx_codec_vp10_dx +data aom_codec_vp10_dx_algo +text aom_codec_vp10_dx diff --git a/av1/exports_enc b/av1/exports_enc index d1644f2605eed71e13b5fd65c021e755a05025c8..f55fef9aaa986c217a1d2a17412f9f07180f6d16 100644 --- a/av1/exports_enc +++ b/av1/exports_enc @@ -1,2 +1,2 @@ -data vpx_codec_vp10_cx_algo -text vpx_codec_vp10_cx +data aom_codec_vp10_cx_algo +text aom_codec_vp10_cx diff --git a/build/make/Android.mk b/build/make/Android.mk index 5d735f631a054f55f3ac662503de6d32f46ef85e..0c229c43fb2f73f58bc2e7837ba15cfae2e941fa 100644 --- a/build/make/Android.mk +++ b/build/make/Android.mk @@ -102,18 +102,18 @@ $(ASM_CNV_PATH)/libaom/%.asm.s: $(LIBAOM_PATH)/%.asm TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN))) target := libs -LOCAL_SRC_FILES += vpx_config.c +LOCAL_SRC_FILES += aom_config.c # Remove duplicate entries CODEC_SRCS_UNIQUE = $(sort $(CODEC_SRCS)) -# Pull out C files. vpx_config.c is in the immediate directory and +# Pull out C files. aom_config.c is in the immediate directory and # so it does not need libaom/ prefixed like the rest of the source files. # The neon files with intrinsics need to have .neon appended so the proper # flags are applied. CODEC_SRCS_C = $(filter %.c, $(CODEC_SRCS_UNIQUE)) LOCAL_NEON_SRCS_C = $(filter %_neon.c, $(CODEC_SRCS_C)) -LOCAL_CODEC_SRCS_C = $(filter-out vpx_config.c %_neon.c, $(CODEC_SRCS_C)) +LOCAL_CODEC_SRCS_C = $(filter-out aom_config.c %_neon.c, $(CODEC_SRCS_C)) LOCAL_SRC_FILES += $(foreach file, $(LOCAL_CODEC_SRCS_C), libaom/$(file)) ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) @@ -154,7 +154,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) endif LOCAL_CFLAGS += \ - -DHAVE_CONFIG_H=vpx_config.h \ + -DHAVE_CONFIG_H=aom_config.h \ -I$(LIBAOM_PATH) \ -I$(ASM_CNV_PATH) @@ -171,11 +171,11 @@ rtcd_dep_template_SRCS := $$(rtcd_dep_template_SRCS:.neon=) ifeq ($(CONFIG_VP10), yes) $$(rtcd_dep_template_SRCS): av1_rtcd.h endif -$$(rtcd_dep_template_SRCS): vpx_scale_rtcd.h -$$(rtcd_dep_template_SRCS): vpx_dsp_rtcd.h +$$(rtcd_dep_template_SRCS): aom_scale_rtcd.h +$$(rtcd_dep_template_SRCS): aom_dsp_rtcd.h ifneq ($(findstring $(TARGET_ARCH_ABI),x86 x86_64),) -$$(rtcd_dep_template_SRCS): vpx_config.asm +$$(rtcd_dep_template_SRCS): aom_config.asm endif endef diff --git a/build/make/Makefile b/build/make/Makefile index 3081a92680316a3227fa60f6145c8d059c2bc995..6da1021acd85102a83215fbcb1afe05c55fb51cc 100644 --- a/build/make/Makefile +++ b/build/make/Makefile @@ -98,7 +98,7 @@ distclean: clean if [ -z "$(target)" ]; then \ rm -f Makefile; \ rm -f config.log config.mk; \ - rm -f vpx_config.[hc] vpx_config.asm; \ + rm -f aom_config.[hc] aom_config.asm; \ else \ rm -f $(target)-$(TOOLCHAIN).mk; \ fi @@ -215,7 +215,7 @@ ifeq ($(HAVE_GNU_STRIP),yes) # Older binutils strip global symbols not needed for relocation processing # when given --strip-unneeded. Using nm and awk to identify globals and # keep them caused command line length issues under mingw and segfaults in -# test_libvpx were observed under OS/2: simply use --strip-debug. +# test_libaom were observed under OS/2: simply use --strip-debug. %.a: %_g.a $(if $(quiet),@echo " [STRIP] $@ < $<") $(qexec)$(STRIP) --strip-debug \ diff --git a/build/make/configure.sh b/build/make/configure.sh index f732a90eac30f9e788d9c8c2387bb42e20a2f7d5..0da7cef00f58f6fa9e3451b61bfc595cf1a54794 100644 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -256,12 +256,12 @@ else TMPDIRx="/tmp" fi RAND=$(awk 'BEGIN { srand(); printf "%d\n",(rand() * 32768)}') -TMP_H="${TMPDIRx}/vpx-conf-$$-${RAND}.h" -TMP_C="${TMPDIRx}/vpx-conf-$$-${RAND}.c" -TMP_CC="${TMPDIRx}/vpx-conf-$$-${RAND}.cc" -TMP_O="${TMPDIRx}/vpx-conf-$$-${RAND}.o" -TMP_X="${TMPDIRx}/vpx-conf-$$-${RAND}.x" -TMP_ASM="${TMPDIRx}/vpx-conf-$$-${RAND}.asm" +TMP_H="${TMPDIRx}/aom-conf-$$-${RAND}.h" +TMP_C="${TMPDIRx}/aom-conf-$$-${RAND}.c" +TMP_CC="${TMPDIRx}/aom-conf-$$-${RAND}.cc" +TMP_O="${TMPDIRx}/aom-conf-$$-${RAND}.o" +TMP_X="${TMPDIRx}/aom-conf-$$-${RAND}.x" +TMP_ASM="${TMPDIRx}/aom-conf-$$-${RAND}.asm" clean_temp_files() { rm -f ${TMP_C} ${TMP_CC} ${TMP_H} ${TMP_O} ${TMP_X} ${TMP_ASM} diff --git a/build/make/gen_msvs_proj.sh b/build/make/gen_msvs_proj.sh index 0cf335b3d26f0dd1081c783ba9f588f3a1624c20..0e1343be98826a775d6b68ef7ffb19203f207b41 100755 --- a/build/make/gen_msvs_proj.sh +++ b/build/make/gen_msvs_proj.sh @@ -73,8 +73,8 @@ generate_filter() { open_tag File RelativePath="$f" if [ "$pat" == "asm" ] && $asm_use_custom_step; then - # Avoid object file name collisions, i.e. vpx_config.c and - # vpx_config.asm produce the same object file without + # Avoid object file name collisions, i.e. aom_config.c and + # aom_config.asm produce the same object file without # this additional suffix. objf=${objf%.obj}_asm.obj for plat in "${platforms[@]}"; do @@ -299,7 +299,7 @@ generate_vcproj() { case "$target" in x86*) case "$name" in - vpx) + aom) tag Tool \ Name="VCCLCompilerTool" \ Optimization="0" \ @@ -384,7 +384,7 @@ generate_vcproj() { case "$target" in x86*) case "$name" in - vpx) + aom) tag Tool \ Name="VCCLCompilerTool" \ Optimization="2" \ diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh index 520656c917f97eac207e9ba6a80b14f286561d7b..c75c9815715e5b16fb6d312b939c71322abe3fac 100755 --- a/build/make/gen_msvs_vcxproj.sh +++ b/build/make/gen_msvs_vcxproj.sh @@ -83,8 +83,8 @@ generate_filter() { -e 's/^[\./]\+//g' -e 's,[:/ ],_,g') if ([ "$pat" == "asm" ] || [ "$pat" == "s" ]) && $asm_use_custom_step; then - # Avoid object file name collisions, i.e. vpx_config.c and - # vpx_config.asm produce the same object file without + # Avoid object file name collisions, i.e. aom_config.c and + # aom_config.asm produce the same object file without # this additional suffix. objf=${objf%.obj}_asm.obj open_tag CustomBuild \ @@ -392,7 +392,7 @@ generate_vcxproj() { for config in Debug Release; do open_tag ItemDefinitionGroup \ Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" - if [ "$name" == "vpx" ]; then + if [ "$name" == "aom" ]; then hostplat=$plat if [ "$hostplat" == "ARM" ]; then hostplat=Win32 diff --git a/build/make/iosbuild.sh b/build/make/iosbuild.sh index 6ae539ed33ff386624c5d71b9a9d70f52081cabc..bffd62e2a06e6c2247607217a211f5006c34bd79 100755 --- a/build/make/iosbuild.sh +++ b/build/make/iosbuild.sh @@ -24,7 +24,7 @@ CONFIGURE_ARGS="--disable-docs --disable-unit-tests" DIST_DIR="_dist" FRAMEWORK_DIR="VPX.framework" -HEADER_DIR="${FRAMEWORK_DIR}/Headers/vpx" +HEADER_DIR="${FRAMEWORK_DIR}/Headers/aom" SCRIPT_DIR=$(dirname "$0") LIBAOM_SOURCE_DIR=$(cd ${SCRIPT_DIR}/../..; pwd) LIPO=$(xcrun -sdk iphoneos${SDK} -find lipo) @@ -92,12 +92,12 @@ target_to_preproc_symbol() { esac } -# Create a vpx_config.h shim that, based on preprocessor settings for the -# current target CPU, includes the real vpx_config.h for the current target. +# Create a aom_config.h shim that, based on preprocessor settings for the +# current target CPU, includes the real aom_config.h for the current target. # $1 is the list of targets. -create_vpx_framework_config_shim() { +create_aom_framework_config_shim() { local targets="$1" - local config_file="${HEADER_DIR}/vpx_config.h" + local config_file="${HEADER_DIR}/aom_config.h" local preproc_symbol="" local target="" local include_guard="VPX_FRAMEWORK_HEADERS_VPX_VPX_CONFIG_H_" @@ -124,10 +124,10 @@ create_vpx_framework_config_shim() { preproc_symbol=$(target_to_preproc_symbol "${target}") printf " ${preproc_symbol}\n" >> "${config_file}" printf "#define VPX_FRAMEWORK_TARGET \"${target}\"\n" >> "${config_file}" - printf "#include \"VPX/vpx/${target}/vpx_config.h\"\n" >> "${config_file}" + printf "#include \"VPX/aom/${target}/aom_config.h\"\n" >> "${config_file}" printf "#elif defined" >> "${config_file}" mkdir "${HEADER_DIR}/${target}" - cp -p "${BUILD_ROOT}/${target}/vpx_config.h" "${HEADER_DIR}/${target}" + cp -p "${BUILD_ROOT}/${target}/aom_config.h" "${HEADER_DIR}/${target}" done # Consume the last line of output from the loop: We don't want it. @@ -164,17 +164,17 @@ build_framework() { # The basic libaom API includes are all the same; just grab the most recent # set. - cp -p "${target_dist_dir}"/include/vpx/* "${HEADER_DIR}" + cp -p "${target_dist_dir}"/include/aom/* "${HEADER_DIR}" # Build the fat library. ${LIPO} -create ${lib_list} -output ${FRAMEWORK_DIR}/VPX - # Create the vpx_config.h shim that allows usage of vpx_config.h from + # Create the aom_config.h shim that allows usage of aom_config.h from # within VPX.framework. - create_vpx_framework_config_shim "${targets}" + create_aom_framework_config_shim "${targets}" - # Copy in vpx_version.h. - cp -p "${BUILD_ROOT}/${target}/vpx_version.h" "${HEADER_DIR}" + # Copy in aom_version.h. + cp -p "${BUILD_ROOT}/${target}/aom_version.h" "${HEADER_DIR}" vlog "Created fat library ${FRAMEWORK_DIR}/VPX containing:" for lib in ${lib_list}; do diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl index 59dbe524b188dd8837831feec14b0173736c8a33..a286f52a99d134d50da42361f799671e081d2e27 100755 --- a/build/make/rtcd.pl +++ b/build/make/rtcd.pl @@ -59,7 +59,7 @@ close CONFIG_FILE; # # Routines for the RTCD DSL to call # -sub vpx_config($) { +sub aom_config($) { return (defined $config{$_[0]}) ? $config{$_[0]} : ""; } @@ -122,7 +122,7 @@ sub process_forward_decls() { } sub determine_indirection { - vpx_config("CONFIG_RUNTIME_CPU_DETECT") eq "yes" or &require(@ALL_ARCHS); + aom_config("CONFIG_RUNTIME_CPU_DETECT") eq "yes" or &require(@ALL_ARCHS); foreach my $fn (keys %ALL_FUNCS) { my $n = ""; my @val = @{$ALL_FUNCS{$fn}}; @@ -282,7 +282,7 @@ sub arm() { common_top; print <<EOF; -#include "vpx_config.h" +#include "aom_config.h" #ifdef RTCD_C #include "aom_ports/arm.h" @@ -308,7 +308,7 @@ sub mips() { common_top; print <<EOF; -#include "vpx_config.h" +#include "aom_config.h" #ifdef RTCD_C static void setup_rtcd_internal(void) @@ -319,8 +319,8 @@ EOF print <<EOF; #if HAVE_DSPR2 -void vpx_dsputil_static_init(); -vpx_dsputil_static_init(); +void aom_dsputil_static_init(); +aom_dsputil_static_init(); #endif } #endif @@ -332,7 +332,7 @@ sub unoptimized() { determine_indirection "c"; common_top; print <<EOF; -#include "vpx_config.h" +#include "aom_config.h" #ifdef RTCD_C static void setup_rtcd_internal(void) diff --git a/configure b/configure index b82a4a475f81372c8f1f2382db231a49dc983ff4..17f5b1096fdce67a6e81a0625919f3fcfb4d9c90 100755 --- a/configure +++ b/configure @@ -34,7 +34,7 @@ Advanced options: ${toggle_codec_srcs} in/exclude codec library source code ${toggle_debug_libs} in/exclude debug version of libraries ${toggle_static_msvcrt} use static MSVCRT (VS builds only) - ${toggle_vpx_highbitdepth} use high bit depth (10/12) profiles + ${toggle_aom_highbitdepth} use high bit depth (10/12) profiles ${toggle_vp10} VP10 codec support ${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders) ${toggle_multithread} multithreaded encoding and decoding @@ -166,7 +166,7 @@ fi if [ "`cd \"${source_path}\" && pwd`" != "`pwd`" ]; then # test to see if source_path already configured - if [ -f "${source_path}/vpx_config.h" ]; then + if [ -f "${source_path}/aom_config.h" ]; then die "source directory already configured; run 'make distclean' there first" fi fi @@ -241,7 +241,7 @@ ARCH_EXT_LIST=" " HAVE_LIST=" ${ARCH_EXT_LIST} - vpx_ports + aom_ports pthread_h unistd_h " @@ -299,7 +299,7 @@ CONFIG_LIST=" multi_res_encoding temporal_denoising coefficient_range_checking - vpx_highbitdepth + aom_highbitdepth experimental size_limit aom_qm @@ -355,7 +355,7 @@ CMDLINE_SELECT=" multi_res_encoding temporal_denoising coefficient_range_checking - vpx_highbitdepth + aom_highbitdepth experimental aom_qm " @@ -411,12 +411,12 @@ post_process_cmdline() { process_targets() { enabled child || write_common_config_banner - write_common_target_config_h ${BUILD_PFX}vpx_config.h + write_common_target_config_h ${BUILD_PFX}aom_config.h write_common_config_targets # Calculate the default distribution name, based on the enabled features cf="" - DIST_DIR=vpx + DIST_DIR=aom for cf in $CODEC_FAMILIES; do if enabled ${cf}_encoder && enabled ${cf}_decoder; then DIST_DIR="${DIST_DIR}-${cf}" @@ -475,7 +475,7 @@ EOF if enabled $tgt; then echo "Creating makefiles for ${toolchain} ${tgt}" - write_common_target_config_mk $tgt_fn ${BUILD_PFX}vpx_config.h + write_common_target_config_mk $tgt_fn ${BUILD_PFX}aom_config.h #write_${tgt}_config fi done @@ -544,7 +544,7 @@ EOF check_header pthread.h check_header unistd.h # for sysconf(3) and friends. - check_header aom/vpx_integer.h -I${source_path} && enable_feature vpx_ports + check_header aom/aom_integer.h -I${source_path} && enable_feature aom_ports } process_toolchain() { @@ -565,7 +565,7 @@ process_toolchain() { check_add_cflags -Wunused-variable case ${CC} in *clang*) - # libvpx and/or clang have issues with aliasing: + # libaom and/or clang have issues with aliasing: # https://code.google.com/p/webm/issues/detail?id=603 # work around them until they are fixed check_add_cflags -fno-strict-aliasing @@ -698,9 +698,9 @@ EOF ## CONFIGURE_ARGS="$@" process "$@" -print_webm_license ${BUILD_PFX}vpx_config.c "/*" " */" -cat <<EOF >> ${BUILD_PFX}vpx_config.c -#include "aom/vpx_codec.h" +print_webm_license ${BUILD_PFX}aom_config.c "/*" " */" +cat <<EOF >> ${BUILD_PFX}aom_config.c +#include "aom/aom_codec.h" static const char* const cfg = "$CONFIGURE_ARGS"; -const char *vpx_codec_build_config(void) {return cfg;} +const char *aom_codec_build_config(void) {return cfg;} EOF diff --git a/examples.mk b/examples.mk index eaeee2a746e1b8d3920392f1485c5a6d52487d6b..c3c203e401ee93c45fc577846579f10e4372b619 100644 --- a/examples.mk +++ b/examples.mk @@ -54,58 +54,58 @@ LIBWEBM_PARSER_SRCS = third_party/libwebm/mkvparser.cpp \ # List of examples to build. UTILS are tools meant for distribution # while EXAMPLES demonstrate specific portions of the API. -UTILS-$(CONFIG_DECODERS) += vpxdec.c -vpxdec.SRCS += md5_utils.c md5_utils.h -vpxdec.SRCS += aom_ports/mem_ops.h -vpxdec.SRCS += aom_ports/mem_ops_aligned.h -vpxdec.SRCS += aom_ports/msvc.h -vpxdec.SRCS += aom_ports/vpx_timer.h -vpxdec.SRCS += aom/vpx_integer.h -vpxdec.SRCS += args.c args.h -vpxdec.SRCS += ivfdec.c ivfdec.h -vpxdec.SRCS += tools_common.c tools_common.h -vpxdec.SRCS += y4menc.c y4menc.h +UTILS-$(CONFIG_DECODERS) += aomdec.c +aomdec.SRCS += md5_utils.c md5_utils.h +aomdec.SRCS += aom_ports/mem_ops.h +aomdec.SRCS += aom_ports/mem_ops_aligned.h +aomdec.SRCS += aom_ports/msvc.h +aomdec.SRCS += aom_ports/aom_timer.h +aomdec.SRCS += aom/aom_integer.h +aomdec.SRCS += args.c args.h +aomdec.SRCS += ivfdec.c ivfdec.h +aomdec.SRCS += tools_common.c tools_common.h +aomdec.SRCS += y4menc.c y4menc.h ifeq ($(CONFIG_LIBYUV),yes) - vpxdec.SRCS += $(LIBYUV_SRCS) + aomdec.SRCS += $(LIBYUV_SRCS) endif ifeq ($(CONFIG_WEBM_IO),yes) - vpxdec.SRCS += $(LIBWEBM_COMMON_SRCS) - vpxdec.SRCS += $(LIBWEBM_PARSER_SRCS) - vpxdec.SRCS += webmdec.cc webmdec.h + aomdec.SRCS += $(LIBWEBM_COMMON_SRCS) + aomdec.SRCS += $(LIBWEBM_PARSER_SRCS) + aomdec.SRCS += webmdec.cc webmdec.h endif -vpxdec.GUID = BA5FE66F-38DD-E034-F542-B1578C5FB950 -vpxdec.DESCRIPTION = Full featured decoder -UTILS-$(CONFIG_ENCODERS) += vpxenc.c -vpxenc.SRCS += args.c args.h y4minput.c y4minput.h vpxenc.h -vpxenc.SRCS += ivfdec.c ivfdec.h -vpxenc.SRCS += ivfenc.c ivfenc.h -vpxenc.SRCS += rate_hist.c rate_hist.h -vpxenc.SRCS += tools_common.c tools_common.h -vpxenc.SRCS += warnings.c warnings.h -vpxenc.SRCS += aom_ports/mem_ops.h -vpxenc.SRCS += aom_ports/mem_ops_aligned.h -vpxenc.SRCS += aom_ports/msvc.h -vpxenc.SRCS += aom_ports/vpx_timer.h -vpxenc.SRCS += vpxstats.c vpxstats.h +aomdec.GUID = BA5FE66F-38DD-E034-F542-B1578C5FB950 +aomdec.DESCRIPTION = Full featured decoder +UTILS-$(CONFIG_ENCODERS) += aomenc.c +aomenc.SRCS += args.c args.h y4minput.c y4minput.h aomenc.h +aomenc.SRCS += ivfdec.c ivfdec.h +aomenc.SRCS += ivfenc.c ivfenc.h +aomenc.SRCS += rate_hist.c rate_hist.h +aomenc.SRCS += tools_common.c tools_common.h +aomenc.SRCS += warnings.c warnings.h +aomenc.SRCS += aom_ports/mem_ops.h +aomenc.SRCS += aom_ports/mem_ops_aligned.h +aomenc.SRCS += aom_ports/msvc.h +aomenc.SRCS += aom_ports/aom_timer.h +aomenc.SRCS += aomstats.c aomstats.h ifeq ($(CONFIG_LIBYUV),yes) - vpxenc.SRCS += $(LIBYUV_SRCS) + aomenc.SRCS += $(LIBYUV_SRCS) endif ifeq ($(CONFIG_WEBM_IO),yes) - vpxenc.SRCS += $(LIBWEBM_COMMON_SRCS) - vpxenc.SRCS += $(LIBWEBM_MUXER_SRCS) - vpxenc.SRCS += webmenc.cc webmenc.h + aomenc.SRCS += $(LIBWEBM_COMMON_SRCS) + aomenc.SRCS += $(LIBWEBM_MUXER_SRCS) + aomenc.SRCS += webmenc.cc webmenc.h endif -vpxenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1 -vpxenc.DESCRIPTION = Full featured encoder +aomenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1 +aomenc.DESCRIPTION = Full featured encoder -EXAMPLES-$(CONFIG_ENCODERS) += vpx_temporal_svc_encoder.c -vpx_temporal_svc_encoder.SRCS += ivfenc.c ivfenc.h -vpx_temporal_svc_encoder.SRCS += tools_common.c tools_common.h -vpx_temporal_svc_encoder.SRCS += video_common.h -vpx_temporal_svc_encoder.SRCS += video_writer.h video_writer.c -vpx_temporal_svc_encoder.SRCS += aom_ports/msvc.h -vpx_temporal_svc_encoder.GUID = B18C08F2-A439-4502-A78E-849BE3D60947 -vpx_temporal_svc_encoder.DESCRIPTION = Temporal SVC Encoder +EXAMPLES-$(CONFIG_ENCODERS) += aom_temporal_svc_encoder.c +aom_temporal_svc_encoder.SRCS += ivfenc.c ivfenc.h +aom_temporal_svc_encoder.SRCS += tools_common.c tools_common.h +aom_temporal_svc_encoder.SRCS += video_common.h +aom_temporal_svc_encoder.SRCS += video_writer.h video_writer.c +aom_temporal_svc_encoder.SRCS += aom_ports/msvc.h +aom_temporal_svc_encoder.GUID = B18C08F2-A439-4502-A78E-849BE3D60947 +aom_temporal_svc_encoder.DESCRIPTION = Temporal SVC Encoder EXAMPLES-$(CONFIG_DECODERS) += simple_decoder.c simple_decoder.GUID = D3BBF1E9-2427-450D-BBFF-B2843C1D44CC simple_decoder.SRCS += ivfdec.h ivfdec.c @@ -268,7 +268,7 @@ endif # even though there is no real dependency there (the dependency is on # the makefiles). We may want to revisit this. define vcproj_template -$(1): $($(1:.$(VCPROJ_SFX)=).SRCS) vpx.$(VCPROJ_SFX) +$(1): $($(1:.$(VCPROJ_SFX)=).SRCS) aom.$(VCPROJ_SFX) $(if $(quiet),@echo " [vcproj] $$@") $(qexec)$$(GEN_VCPROJ)\ --exe\ diff --git a/examples/vpx_temporal_svc_encoder.c b/examples/aom_temporal_svc_encoder.c similarity index 91% rename from examples/vpx_temporal_svc_encoder.c rename to examples/aom_temporal_svc_encoder.c index 94d814612a7cfadc4bbbf26d98c698aaa16d8365..3e473d7837fbd879d83bb2cc3334967eb1025e71 100644 --- a/examples/vpx_temporal_svc_encoder.c +++ b/examples/aom_temporal_svc_encoder.c @@ -19,10 +19,10 @@ #include <stdlib.h> #include <string.h> -#include "./vpx_config.h" -#include "../aom_ports/vpx_timer.h" +#include "./aom_config.h" +#include "../aom_ports/aom_timer.h" #include "aom/vp8cx.h" -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #include "../tools_common.h" #include "../video_writer.h" @@ -79,7 +79,7 @@ struct RateControlMetrics { // TODO(marpan): Update these metrics to account for multiple key frames // in the stream. static void set_rate_control_metrics(struct RateControlMetrics *rc, - vpx_codec_enc_cfg_t *cfg) { + aom_codec_enc_cfg_t *cfg) { unsigned int i = 0; // Set the layer (cumulative) framerate and the target layer (non-cumulative) // per-frame-bandwidth, for the rate control encoding stats below. @@ -108,7 +108,7 @@ static void set_rate_control_metrics(struct RateControlMetrics *rc, } static void printout_rate_control_summary(struct RateControlMetrics *rc, - vpx_codec_enc_cfg_t *cfg, + aom_codec_enc_cfg_t *cfg, int frame_cnt) { unsigned int i = 0; int tot_num_frames = 0; @@ -161,7 +161,7 @@ static void printout_rate_control_summary(struct RateControlMetrics *rc, // frames should be allocated to layers in the order LAST, GF, ARF. // Other combinations work, but may produce slightly inferior results. static void set_temporal_layer_pattern(int layering_mode, - vpx_codec_enc_cfg_t *cfg, + aom_codec_enc_cfg_t *cfg, int *layer_flags, int *flag_periodicity) { switch (layering_mode) { @@ -464,11 +464,11 @@ static void set_temporal_layer_pattern(int layering_mode, int main(int argc, char **argv) { VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = { NULL }; - vpx_codec_ctx_t codec; - vpx_codec_enc_cfg_t cfg; + aom_codec_ctx_t codec; + aom_codec_enc_cfg_t cfg; int frame_cnt = 0; - vpx_image_t raw; - vpx_codec_err_t res; + aom_image_t raw; + aom_codec_err_t res; unsigned int width; unsigned int height; int speed; @@ -482,9 +482,9 @@ int main(int argc, char **argv) { int layer_flags[VPX_TS_MAX_PERIODICITY] = { 0 }; int flag_periodicity = 1; #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION) - vpx_svc_layer_id_t layer_id = { 0, 0 }; + aom_svc_layer_id_t layer_id = { 0, 0 }; #else - vpx_svc_layer_id_t layer_id = { 0 }; + aom_svc_layer_id_t layer_id = { 0 }; #endif const VpxInterface *encoder = NULL; FILE *infile = NULL; @@ -492,7 +492,7 @@ int main(int argc, char **argv) { int64_t cx_time = 0; const int min_args_base = 11; #if CONFIG_VPX_HIGHBITDEPTH - vpx_bit_depth_t bit_depth = VPX_BITS_8; + aom_bit_depth_t bit_depth = VPX_BITS_8; int input_bit_depth = 8; const int min_args = min_args_base + 1; #else @@ -520,10 +520,10 @@ int main(int argc, char **argv) { #endif // CONFIG_VPX_HIGHBITDEPTH } - encoder = get_vpx_encoder_by_name(argv[3]); + encoder = get_aom_encoder_by_name(argv[3]); if (!encoder) die("Unsupported codec."); - printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface())); + printf("Using %s\n", aom_codec_iface_name(encoder->codec_interface())); width = strtol(argv[4], NULL, 0); height = strtol(argv[5], NULL, 0); @@ -556,21 +556,21 @@ int main(int argc, char **argv) { break; default: die("Invalid bit depth (8, 10, 12) %s", argv[argc - 1]); } - if (!vpx_img_alloc( + if (!aom_img_alloc( &raw, bit_depth == VPX_BITS_8 ? VPX_IMG_FMT_I420 : VPX_IMG_FMT_I42016, width, height, 32)) { die("Failed to allocate image", width, height); } #else - if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 32)) { + if (!aom_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 32)) { die("Failed to allocate image", width, height); } #endif // CONFIG_VPX_HIGHBITDEPTH // Populate encoder configuration. - res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); + res = aom_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); if (res) { - printf("Failed to get config: %s\n", vpx_codec_err_to_string(res)); + printf("Failed to get config: %s\n", aom_codec_err_to_string(res)); return EXIT_FAILURE; } @@ -658,7 +658,7 @@ int main(int argc, char **argv) { info.time_base.denominator = cfg.g_timebase.den; snprintf(file_name, sizeof(file_name), "%s_%d.ivf", argv[2], i); - outfile[i] = vpx_video_writer_open(file_name, kContainerIVF, &info); + outfile[i] = aom_video_writer_open(file_name, kContainerIVF, &info); if (!outfile[i]) die("Failed to open %s for writing", file_name); assert(outfile[i] != NULL); @@ -668,28 +668,28 @@ int main(int argc, char **argv) { // Initialize codec. #if CONFIG_VPX_HIGHBITDEPTH - if (vpx_codec_enc_init( + if (aom_codec_enc_init( &codec, encoder->codec_interface(), &cfg, bit_depth == VPX_BITS_8 ? 0 : VPX_CODEC_USE_HIGHBITDEPTH)) #else - if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0)) + if (aom_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0)) #endif // CONFIG_VPX_HIGHBITDEPTH die_codec(&codec, "Failed to initialize encoder"); if (strncmp(encoder->name, "vp8", 3) == 0) { - vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed); - vpx_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOff); - vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1); + aom_codec_control(&codec, VP8E_SET_CPUUSED, -speed); + aom_codec_control(&codec, VP8E_SET_NOISE_SENSITIVITY, kDenoiserOff); + aom_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1); } else if (strncmp(encoder->name, "vp9", 3) == 0) { - vpx_svc_extra_cfg_t svc_params; - vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed); - vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3); - vpx_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0); - vpx_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, 0); - vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1); - vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0); - vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1)); - if (vpx_codec_control(&codec, VP9E_SET_SVC, layering_mode > 0 ? 1 : 0)) + aom_svc_extra_cfg_t svc_params; + aom_codec_control(&codec, VP8E_SET_CPUUSED, speed); + aom_codec_control(&codec, VP9E_SET_AQ_MODE, 3); + aom_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0); + aom_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, 0); + aom_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1); + aom_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0); + aom_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1)); + if (aom_codec_control(&codec, VP9E_SET_SVC, layering_mode > 0 ? 1 : 0)) die_codec(&codec, "Failed to set SVC"); for (i = 0; i < cfg.ts_number_layers; ++i) { svc_params.max_quantizers[i] = cfg.rc_max_quantizer; @@ -697,26 +697,26 @@ int main(int argc, char **argv) { } svc_params.scaling_factor_num[0] = cfg.g_h; svc_params.scaling_factor_den[0] = cfg.g_h; - vpx_codec_control(&codec, VP9E_SET_SVC_PARAMETERS, &svc_params); + aom_codec_control(&codec, VP9E_SET_SVC_PARAMETERS, &svc_params); } if (strncmp(encoder->name, "vp8", 3) == 0) { - vpx_codec_control(&codec, VP8E_SET_SCREEN_CONTENT_MODE, 0); + aom_codec_control(&codec, VP8E_SET_SCREEN_CONTENT_MODE, 0); } - vpx_codec_control(&codec, VP8E_SET_TOKEN_PARTITIONS, 1); + aom_codec_control(&codec, VP8E_SET_TOKEN_PARTITIONS, 1); // This controls the maximum target size of the key frame. // For generating smaller key frames, use a smaller max_intra_size_pct // value, like 100 or 200. { const int max_intra_size_pct = 900; - vpx_codec_control(&codec, VP8E_SET_MAX_INTRA_BITRATE_PCT, + aom_codec_control(&codec, VP8E_SET_MAX_INTRA_BITRATE_PCT, max_intra_size_pct); } frame_avail = 1; while (frame_avail || got_data) { - struct vpx_usec_timer timer; - vpx_codec_iter_t iter = NULL; - const vpx_codec_cx_pkt_t *pkt; + struct aom_usec_timer timer; + aom_codec_iter_t iter = NULL; + const aom_codec_cx_pkt_t *pkt; #if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION) // Update the temporal layer_id. No spatial layers in this test. layer_id.spatial_layer_id = 0; @@ -724,34 +724,34 @@ int main(int argc, char **argv) { layer_id.temporal_layer_id = cfg.ts_layer_id[frame_cnt % cfg.ts_periodicity]; if (strncmp(encoder->name, "vp9", 3) == 0) { - vpx_codec_control(&codec, VP9E_SET_SVC_LAYER_ID, &layer_id); + aom_codec_control(&codec, VP9E_SET_SVC_LAYER_ID, &layer_id); } else if (strncmp(encoder->name, "vp8", 3) == 0) { - vpx_codec_control(&codec, VP8E_SET_TEMPORAL_LAYER_ID, + aom_codec_control(&codec, VP8E_SET_TEMPORAL_LAYER_ID, layer_id.temporal_layer_id); } flags = layer_flags[frame_cnt % flag_periodicity]; if (layering_mode == 0) flags = 0; - frame_avail = vpx_img_read(&raw, infile); + frame_avail = aom_img_read(&raw, infile); if (frame_avail) ++rc.layer_input_frames[layer_id.temporal_layer_id]; - vpx_usec_timer_start(&timer); - if (vpx_codec_encode(&codec, frame_avail ? &raw : NULL, pts, 1, flags, + aom_usec_timer_start(&timer); + if (aom_codec_encode(&codec, frame_avail ? &raw : NULL, pts, 1, flags, VPX_DL_REALTIME)) { die_codec(&codec, "Failed to encode frame"); } - vpx_usec_timer_mark(&timer); - cx_time += vpx_usec_timer_elapsed(&timer); + aom_usec_timer_mark(&timer); + cx_time += aom_usec_timer_elapsed(&timer); // Reset KF flag. if (layering_mode != 7) { layer_flags[0] &= ~VPX_EFLAG_FORCE_KF; } got_data = 0; - while ((pkt = vpx_codec_get_cx_data(&codec, &iter))) { + while ((pkt = aom_codec_get_cx_data(&codec, &iter))) { got_data = 1; switch (pkt->kind) { case VPX_CODEC_CX_FRAME_PKT: for (i = cfg.ts_layer_id[frame_cnt % cfg.ts_periodicity]; i < cfg.ts_number_layers; ++i) { - vpx_video_writer_write_frame(outfile[i], pkt->data.frame.buf, + aom_video_writer_write_frame(outfile[i], pkt->data.frame.buf, pkt->data.frame.sz, pts); ++rc.layer_tot_enc_frames[i]; rc.layer_encoding_bitrate[i] += 8.0 * pkt->data.frame.sz; @@ -806,11 +806,11 @@ int main(int argc, char **argv) { frame_cnt, 1000 * (float)cx_time / (double)(frame_cnt * 1000000), 1000000 * (double)frame_cnt / (double)cx_time); - if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec"); + if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec"); // Try to rewrite the output file headers with the actual frame count. - for (i = 0; i < cfg.ts_number_layers; ++i) vpx_video_writer_close(outfile[i]); + for (i = 0; i < cfg.ts_number_layers; ++i) aom_video_writer_close(outfile[i]); - vpx_img_free(&raw); + aom_img_free(&raw); return EXIT_SUCCESS; } diff --git a/examples/decode_to_md5.c b/examples/decode_to_md5.c index d99c7e1b16944f95cbc95c7c7f6be543e35d56f4..1b94fbce9ec280faae7a5320b89a3d5d256f34e7 100644 --- a/examples/decode_to_md5.c +++ b/examples/decode_to_md5.c @@ -35,14 +35,14 @@ #include <string.h> #include "aom/vp8dx.h" -#include "aom/vpx_decoder.h" +#include "aom/aom_decoder.h" #include "../md5_utils.h" #include "../tools_common.h" #include "../video_reader.h" -#include "./vpx_config.h" +#include "./aom_config.h" -static void get_image_md5(const vpx_image_t *img, unsigned char digest[16]) { +static void get_image_md5(const aom_image_t *img, unsigned char digest[16]) { int plane, y; MD5Context md5; @@ -79,7 +79,7 @@ void usage_exit(void) { int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; - vpx_codec_ctx_t codec; + aom_codec_ctx_t codec; VpxVideoReader *reader = NULL; const VpxVideoInfo *info = NULL; const VpxInterface *decoder = NULL; @@ -88,32 +88,32 @@ int main(int argc, char **argv) { if (argc != 3) die("Invalid number of arguments."); - reader = vpx_video_reader_open(argv[1]); + reader = aom_video_reader_open(argv[1]); if (!reader) die("Failed to open %s for reading.", argv[1]); if (!(outfile = fopen(argv[2], "wb"))) die("Failed to open %s for writing.", argv[2]); - info = vpx_video_reader_get_info(reader); + info = aom_video_reader_get_info(reader); - decoder = get_vpx_decoder_by_fourcc(info->codec_fourcc); + decoder = get_aom_decoder_by_fourcc(info->codec_fourcc); if (!decoder) die("Unknown input codec."); - printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface())); + printf("Using %s\n", aom_codec_iface_name(decoder->codec_interface())); - if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0)) + if (aom_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0)) die_codec(&codec, "Failed to initialize decoder"); - while (vpx_video_reader_read_frame(reader)) { - vpx_codec_iter_t iter = NULL; - vpx_image_t *img = NULL; + while (aom_video_reader_read_frame(reader)) { + aom_codec_iter_t iter = NULL; + aom_image_t *img = NULL; size_t frame_size = 0; const unsigned char *frame = - vpx_video_reader_get_frame(reader, &frame_size); - if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0)) + aom_video_reader_get_frame(reader, &frame_size); + if (aom_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0)) die_codec(&codec, "Failed to decode frame"); - while ((img = vpx_codec_get_frame(&codec, &iter)) != NULL) { + while ((img = aom_codec_get_frame(&codec, &iter)) != NULL) { unsigned char digest[16]; get_image_md5(img, digest); @@ -124,9 +124,9 @@ int main(int argc, char **argv) { } printf("Processed %d frames.\n", frame_cnt); - if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); + if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); - vpx_video_reader_close(reader); + aom_video_reader_close(reader); fclose(outfile); return EXIT_SUCCESS; diff --git a/examples/decode_with_drops.c b/examples/decode_with_drops.c index 6d6e8078168f66d540c603accba7973f380eb582..a977970d9716e95e73d3830697c18651da7a4b36 100644 --- a/examples/decode_with_drops.c +++ b/examples/decode_with_drops.c @@ -58,11 +58,11 @@ #include <string.h> #include "aom/vp8dx.h" -#include "aom/vpx_decoder.h" +#include "aom/aom_decoder.h" #include "../tools_common.h" #include "../video_reader.h" -#include "./vpx_config.h" +#include "./aom_config.h" static const char *exec_name; @@ -74,7 +74,7 @@ void usage_exit(void) { int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; - vpx_codec_ctx_t codec; + aom_codec_ctx_t codec; const VpxInterface *decoder = NULL; VpxVideoReader *reader = NULL; const VpxVideoInfo *info = NULL; @@ -87,7 +87,7 @@ int main(int argc, char **argv) { if (argc != 4) die("Invalid number of arguments."); - reader = vpx_video_reader_open(argv[1]); + reader = aom_video_reader_open(argv[1]); if (!reader) die("Failed to open %s for reading.", argv[1]); if (!(outfile = fopen(argv[2], "wb"))) @@ -99,24 +99,24 @@ int main(int argc, char **argv) { if (!n || !m || (*nptr != '-' && *nptr != '/')) die("Couldn't parse pattern %s.\n", argv[3]); - info = vpx_video_reader_get_info(reader); + info = aom_video_reader_get_info(reader); - decoder = get_vpx_decoder_by_fourcc(info->codec_fourcc); + decoder = get_aom_decoder_by_fourcc(info->codec_fourcc); if (!decoder) die("Unknown input codec."); - printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface())); + printf("Using %s\n", aom_codec_iface_name(decoder->codec_interface())); - if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0)) + if (aom_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0)) die_codec(&codec, "Failed to initialize decoder."); - while (vpx_video_reader_read_frame(reader)) { - vpx_codec_iter_t iter = NULL; - vpx_image_t *img = NULL; + while (aom_video_reader_read_frame(reader)) { + aom_codec_iter_t iter = NULL; + aom_image_t *img = NULL; size_t frame_size = 0; int skip; const unsigned char *frame = - vpx_video_reader_get_frame(reader, &frame_size); - if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0)) + aom_video_reader_get_frame(reader, &frame_size); + if (aom_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0)) die_codec(&codec, "Failed to decode frame."); ++frame_cnt; @@ -127,8 +127,8 @@ int main(int argc, char **argv) { if (!skip) { putc('.', stdout); - while ((img = vpx_codec_get_frame(&codec, &iter)) != NULL) - vpx_img_write(img, outfile); + while ((img = aom_codec_get_frame(&codec, &iter)) != NULL) + aom_img_write(img, outfile); } else { putc('X', stdout); } @@ -137,12 +137,12 @@ int main(int argc, char **argv) { } printf("Processed %d frames.\n", frame_cnt); - if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); + if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); printf("Play: ffplay -f rawvideo -pix_fmt yuv420p -s %dx%d %s\n", info->frame_width, info->frame_height, argv[2]); - vpx_video_reader_close(reader); + aom_video_reader_close(reader); fclose(outfile); return EXIT_SUCCESS; diff --git a/examples/set_maps.c b/examples/set_maps.c index f79cc060c714587aa7079017b93c0a10f42c73bd..bedef03c1b525325ef17e9d77fc1b81ce78327a4 100644 --- a/examples/set_maps.c +++ b/examples/set_maps.c @@ -48,7 +48,7 @@ #include <string.h> #include "aom/vp8cx.h" -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #include "../tools_common.h" #include "../video_writer.h" @@ -61,10 +61,10 @@ void usage_exit(void) { exit(EXIT_FAILURE); } -static void set_roi_map(const vpx_codec_enc_cfg_t *cfg, - vpx_codec_ctx_t *codec) { +static void set_roi_map(const aom_codec_enc_cfg_t *cfg, + aom_codec_ctx_t *codec) { unsigned int i; - vpx_roi_map_t roi; + aom_roi_map_t roi; memset(&roi, 0, sizeof(roi)); roi.rows = (cfg->g_h + 15) / 16; @@ -88,16 +88,16 @@ static void set_roi_map(const vpx_codec_enc_cfg_t *cfg, roi.roi_map = (uint8_t *)malloc(roi.rows * roi.cols); for (i = 0; i < roi.rows * roi.cols; ++i) roi.roi_map[i] = i % 4; - if (vpx_codec_control(codec, VP8E_SET_ROI_MAP, &roi)) + if (aom_codec_control(codec, VP8E_SET_ROI_MAP, &roi)) die_codec(codec, "Failed to set ROI map"); free(roi.roi_map); } -static void set_active_map(const vpx_codec_enc_cfg_t *cfg, - vpx_codec_ctx_t *codec) { +static void set_active_map(const aom_codec_enc_cfg_t *cfg, + aom_codec_ctx_t *codec) { unsigned int i; - vpx_active_map_t map = { 0, 0, 0 }; + aom_active_map_t map = { 0, 0, 0 }; map.rows = (cfg->g_h + 15) / 16; map.cols = (cfg->g_w + 15) / 16; @@ -105,39 +105,39 @@ static void set_active_map(const vpx_codec_enc_cfg_t *cfg, map.active_map = (uint8_t *)malloc(map.rows * map.cols); for (i = 0; i < map.rows * map.cols; ++i) map.active_map[i] = i % 2; - if (vpx_codec_control(codec, VP8E_SET_ACTIVEMAP, &map)) + if (aom_codec_control(codec, VP8E_SET_ACTIVEMAP, &map)) die_codec(codec, "Failed to set active map"); free(map.active_map); } -static void unset_active_map(const vpx_codec_enc_cfg_t *cfg, - vpx_codec_ctx_t *codec) { - vpx_active_map_t map = { 0, 0, 0 }; +static void unset_active_map(const aom_codec_enc_cfg_t *cfg, + aom_codec_ctx_t *codec) { + aom_active_map_t map = { 0, 0, 0 }; map.rows = (cfg->g_h + 15) / 16; map.cols = (cfg->g_w + 15) / 16; map.active_map = NULL; - if (vpx_codec_control(codec, VP8E_SET_ACTIVEMAP, &map)) + if (aom_codec_control(codec, VP8E_SET_ACTIVEMAP, &map)) die_codec(codec, "Failed to set active map"); } -static int encode_frame(vpx_codec_ctx_t *codec, vpx_image_t *img, +static int encode_frame(aom_codec_ctx_t *codec, aom_image_t *img, int frame_index, VpxVideoWriter *writer) { int got_pkts = 0; - vpx_codec_iter_t iter = NULL; - const vpx_codec_cx_pkt_t *pkt = NULL; - const vpx_codec_err_t res = - vpx_codec_encode(codec, img, frame_index, 1, 0, VPX_DL_GOOD_QUALITY); + aom_codec_iter_t iter = NULL; + const aom_codec_cx_pkt_t *pkt = NULL; + const aom_codec_err_t res = + aom_codec_encode(codec, img, frame_index, 1, 0, VPX_DL_GOOD_QUALITY); if (res != VPX_CODEC_OK) die_codec(codec, "Failed to encode frame"); - while ((pkt = vpx_codec_get_cx_data(codec, &iter)) != NULL) { + while ((pkt = aom_codec_get_cx_data(codec, &iter)) != NULL) { got_pkts = 1; if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) { const int keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0; - if (!vpx_video_writer_write_frame(writer, pkt->data.frame.buf, + if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf, pkt->data.frame.sz, pkt->data.frame.pts)) { die_codec(codec, "Failed to write compressed frame"); @@ -153,11 +153,11 @@ static int encode_frame(vpx_codec_ctx_t *codec, vpx_image_t *img, int main(int argc, char **argv) { FILE *infile = NULL; - vpx_codec_ctx_t codec; - vpx_codec_enc_cfg_t cfg; + aom_codec_ctx_t codec; + aom_codec_enc_cfg_t cfg; int frame_count = 0; - vpx_image_t raw; - vpx_codec_err_t res; + aom_image_t raw; + aom_codec_err_t res; VpxVideoInfo info; VpxVideoWriter *writer = NULL; const VpxInterface *encoder = NULL; @@ -169,7 +169,7 @@ int main(int argc, char **argv) { memset(&info, 0, sizeof(info)); - encoder = get_vpx_encoder_by_name(argv[1]); + encoder = get_aom_encoder_by_name(argv[1]); if (encoder == NULL) { die("Unsupported codec."); } @@ -185,14 +185,14 @@ int main(int argc, char **argv) { die("Invalid frame size: %dx%d", info.frame_width, info.frame_height); } - if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width, + if (!aom_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width, info.frame_height, 1)) { die("Failed to allocate image."); } - printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface())); + printf("Using %s\n", aom_codec_iface_name(encoder->codec_interface())); - res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); + res = aom_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); if (res) die_codec(&codec, "Failed to get default codec config."); cfg.g_w = info.frame_width; @@ -203,17 +203,17 @@ int main(int argc, char **argv) { (unsigned int)(bits_per_pixel_per_frame * cfg.g_w * cfg.g_h * fps / 1000); cfg.g_lag_in_frames = 0; - writer = vpx_video_writer_open(argv[5], kContainerIVF, &info); + writer = aom_video_writer_open(argv[5], kContainerIVF, &info); if (!writer) die("Failed to open %s for writing.", argv[5]); if (!(infile = fopen(argv[4], "rb"))) die("Failed to open %s for reading.", argv[4]); - if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0)) + if (aom_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0)) die_codec(&codec, "Failed to initialize encoder"); // Encode frames. - while (vpx_img_read(&raw, infile)) { + while (aom_img_read(&raw, infile)) { ++frame_count; if (frame_count == 22 && encoder->fourcc == VP8_FOURCC) { @@ -235,10 +235,10 @@ int main(int argc, char **argv) { fclose(infile); printf("Processed %d frames.\n", frame_count); - vpx_img_free(&raw); - if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); + aom_img_free(&raw); + if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); - vpx_video_writer_close(writer); + aom_video_writer_close(writer); return EXIT_SUCCESS; } diff --git a/examples/simple_decoder.c b/examples/simple_decoder.c index f0aaa6e3267f46cdbab8c7ad2854ff378e34fa9c..67d9cb5b34c352e029dd1ebcf2da1a77c6aa4699 100644 --- a/examples/simple_decoder.c +++ b/examples/simple_decoder.c @@ -27,26 +27,26 @@ // // Standard Includes // ----------------- -// For decoders, you only have to include `vpx_decoder.h` and then any +// For decoders, you only have to include `aom_decoder.h` and then any // header files for the specific codecs you use. In this case, we're using // vp8. // // Initializing The Codec // ---------------------- -// The libaom decoder is initialized by the call to vpx_codec_dec_init(). +// The libaom decoder is initialized by the call to aom_codec_dec_init(). // Determining the codec interface to use is handled by VpxVideoReader and the -// functions prefixed with vpx_video_reader_. Discussion of those functions is +// functions prefixed with aom_video_reader_. Discussion of those functions is // beyond the scope of this example, but the main gist is to open the input file // and parse just enough of it to determine if it's a VPx file and which VPx // codec is contained within the file. -// Note the NULL pointer passed to vpx_codec_dec_init(). We do that in this +// Note the NULL pointer passed to aom_codec_dec_init(). We do that in this // example because we want the algorithm to determine the stream configuration // (width/height) and allocate memory automatically. // // Decoding A Frame // ---------------- // Once the frame has been read into memory, it is decoded using the -// `vpx_codec_decode` function. The call takes a pointer to the data +// `aom_codec_decode` function. The call takes a pointer to the data // (`frame`) and the length of the data (`frame_size`). No application data // is associated with the frame in this example, so the `user_priv` // parameter is NULL. The `deadline` parameter is left at zero for this @@ -54,10 +54,10 @@ // processing. // // Codecs may produce a variable number of output frames for every call to -// `vpx_codec_decode`. These frames are retrieved by the -// `vpx_codec_get_frame` iterator function. The iterator variable `iter` is -// initialized to NULL each time `vpx_codec_decode` is called. -// `vpx_codec_get_frame` is called in a loop, returning a pointer to a +// `aom_codec_decode`. These frames are retrieved by the +// `aom_codec_get_frame` iterator function. The iterator variable `iter` is +// initialized to NULL each time `aom_codec_decode` is called. +// `aom_codec_get_frame` is called in a loop, returning a pointer to a // decoded image or NULL to indicate the end of list. // // Processing The Decoded Data @@ -67,24 +67,24 @@ // // Cleanup // ------- -// The `vpx_codec_destroy` call frees any memory allocated by the codec. +// The `aom_codec_destroy` call frees any memory allocated by the codec. // // Error Handling // -------------- // This example does not special case any error return codes. If there was // an error, a descriptive message is printed and the program exits. With -// few exceptions, vpx_codec functions return an enumerated error status, +// few exceptions, aom_codec functions return an enumerated error status, // with the value `0` indicating success. #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "aom/vpx_decoder.h" +#include "aom/aom_decoder.h" #include "../tools_common.h" #include "../video_reader.h" -#include "./vpx_config.h" +#include "./aom_config.h" static const char *exec_name; @@ -96,7 +96,7 @@ void usage_exit(void) { int main(int argc, char **argv) { int frame_cnt = 0; FILE *outfile = NULL; - vpx_codec_ctx_t codec; + aom_codec_ctx_t codec; VpxVideoReader *reader = NULL; const VpxInterface *decoder = NULL; const VpxVideoInfo *info = NULL; @@ -105,44 +105,44 @@ int main(int argc, char **argv) { if (argc != 3) die("Invalid number of arguments."); - reader = vpx_video_reader_open(argv[1]); + reader = aom_video_reader_open(argv[1]); if (!reader) die("Failed to open %s for reading.", argv[1]); if (!(outfile = fopen(argv[2], "wb"))) die("Failed to open %s for writing.", argv[2]); - info = vpx_video_reader_get_info(reader); + info = aom_video_reader_get_info(reader); - decoder = get_vpx_decoder_by_fourcc(info->codec_fourcc); + decoder = get_aom_decoder_by_fourcc(info->codec_fourcc); if (!decoder) die("Unknown input codec."); - printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface())); + printf("Using %s\n", aom_codec_iface_name(decoder->codec_interface())); - if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0)) + if (aom_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0)) die_codec(&codec, "Failed to initialize decoder."); - while (vpx_video_reader_read_frame(reader)) { - vpx_codec_iter_t iter = NULL; - vpx_image_t *img = NULL; + while (aom_video_reader_read_frame(reader)) { + aom_codec_iter_t iter = NULL; + aom_image_t *img = NULL; size_t frame_size = 0; const unsigned char *frame = - vpx_video_reader_get_frame(reader, &frame_size); - if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0)) + aom_video_reader_get_frame(reader, &frame_size); + if (aom_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0)) die_codec(&codec, "Failed to decode frame."); - while ((img = vpx_codec_get_frame(&codec, &iter)) != NULL) { - vpx_img_write(img, outfile); + while ((img = aom_codec_get_frame(&codec, &iter)) != NULL) { + aom_img_write(img, outfile); ++frame_cnt; } } printf("Processed %d frames.\n", frame_cnt); - if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec"); + if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec"); printf("Play: ffplay -f rawvideo -pix_fmt yuv420p -s %dx%d %s\n", info->frame_width, info->frame_height, argv[2]); - vpx_video_reader_close(reader); + aom_video_reader_close(reader); fclose(outfile); diff --git a/examples/simple_encoder.c b/examples/simple_encoder.c index 47feb7679124c4707ddae02bf96e4b406d83a9b6..339816f8b07b00f9463c5546d79b98e74e41c469 100644 --- a/examples/simple_encoder.c +++ b/examples/simple_encoder.c @@ -27,7 +27,7 @@ // // Standard Includes // ----------------- -// For encoders, you only have to include `vpx_encoder.h` and then any +// For encoders, you only have to include `aom_encoder.h` and then any // header files for the specific codecs you use. In this case, we're using // vp8. // @@ -67,7 +67,7 @@ // Forced Keyframes // ---------------- // Keyframes can be forced by setting the VPX_EFLAG_FORCE_KF bit of the -// flags passed to `vpx_codec_control()`. In this example, we force a +// flags passed to `aom_codec_control()`. In this example, we force a // keyframe every <keyframe-interval> frames. Note, the output stream can // contain additional keyframes beyond those that have been forced using the // VPX_EFLAG_FORCE_KF flag because of automatic keyframe placement by the @@ -80,13 +80,13 @@ // // Cleanup // ------- -// The `vpx_codec_destroy` call frees any memory allocated by the codec. +// The `aom_codec_destroy` call frees any memory allocated by the codec. // // Error Handling // -------------- // This example does not special case any error return codes. If there was // an error, a descriptive message is printed and the program exits. With -// few exeptions, vpx_codec functions return an enumerated error status, +// few exeptions, aom_codec functions return an enumerated error status, // with the value `0` indicating success. // // Error Resiliency Features @@ -100,7 +100,7 @@ #include <stdlib.h> #include <string.h> -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #include "../tools_common.h" #include "../video_writer.h" @@ -116,21 +116,21 @@ void usage_exit(void) { exit(EXIT_FAILURE); } -static int encode_frame(vpx_codec_ctx_t *codec, vpx_image_t *img, +static int encode_frame(aom_codec_ctx_t *codec, aom_image_t *img, int frame_index, int flags, VpxVideoWriter *writer) { int got_pkts = 0; - vpx_codec_iter_t iter = NULL; - const vpx_codec_cx_pkt_t *pkt = NULL; - const vpx_codec_err_t res = - vpx_codec_encode(codec, img, frame_index, 1, flags, VPX_DL_GOOD_QUALITY); + aom_codec_iter_t iter = NULL; + const aom_codec_cx_pkt_t *pkt = NULL; + const aom_codec_err_t res = + aom_codec_encode(codec, img, frame_index, 1, flags, VPX_DL_GOOD_QUALITY); if (res != VPX_CODEC_OK) die_codec(codec, "Failed to encode frame"); - while ((pkt = vpx_codec_get_cx_data(codec, &iter)) != NULL) { + while ((pkt = aom_codec_get_cx_data(codec, &iter)) != NULL) { got_pkts = 1; if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) { const int keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0; - if (!vpx_video_writer_write_frame(writer, pkt->data.frame.buf, + if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf, pkt->data.frame.sz, pkt->data.frame.pts)) { die_codec(codec, "Failed to write compressed frame"); @@ -145,11 +145,11 @@ static int encode_frame(vpx_codec_ctx_t *codec, vpx_image_t *img, int main(int argc, char **argv) { FILE *infile = NULL; - vpx_codec_ctx_t codec; - vpx_codec_enc_cfg_t cfg; + aom_codec_ctx_t codec; + aom_codec_enc_cfg_t cfg; int frame_count = 0; - vpx_image_t raw; - vpx_codec_err_t res; + aom_image_t raw; + aom_codec_err_t res; VpxVideoInfo info = { 0 }; VpxVideoWriter *writer = NULL; const VpxInterface *encoder = NULL; @@ -177,7 +177,7 @@ int main(int argc, char **argv) { outfile_arg = argv[5]; keyframe_interval_arg = argv[6]; - encoder = get_vpx_encoder_by_name(codec_arg); + encoder = get_aom_encoder_by_name(codec_arg); if (!encoder) die("Unsupported codec."); info.codec_fourcc = encoder->fourcc; @@ -191,7 +191,7 @@ int main(int argc, char **argv) { die("Invalid frame size: %dx%d", info.frame_width, info.frame_height); } - if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width, + if (!aom_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width, info.frame_height, 1)) { die("Failed to allocate image."); } @@ -199,9 +199,9 @@ int main(int argc, char **argv) { keyframe_interval = strtol(keyframe_interval_arg, NULL, 0); if (keyframe_interval < 0) die("Invalid keyframe interval value."); - printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface())); + printf("Using %s\n", aom_codec_iface_name(encoder->codec_interface())); - res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); + res = aom_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); if (res) die_codec(&codec, "Failed to get default codec config."); cfg.g_w = info.frame_width; @@ -211,17 +211,17 @@ int main(int argc, char **argv) { cfg.rc_target_bitrate = bitrate; cfg.g_error_resilient = argc > 7 ? strtol(argv[7], NULL, 0) : 0; - writer = vpx_video_writer_open(outfile_arg, kContainerIVF, &info); + writer = aom_video_writer_open(outfile_arg, kContainerIVF, &info); if (!writer) die("Failed to open %s for writing.", outfile_arg); if (!(infile = fopen(infile_arg, "rb"))) die("Failed to open %s for reading.", infile_arg); - if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0)) + if (aom_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0)) die_codec(&codec, "Failed to initialize encoder"); // Encode frames. - while (vpx_img_read(&raw, infile)) { + while (aom_img_read(&raw, infile)) { int flags = 0; if (keyframe_interval > 0 && frame_count % keyframe_interval == 0) flags |= VPX_EFLAG_FORCE_KF; @@ -235,10 +235,10 @@ int main(int argc, char **argv) { fclose(infile); printf("Processed %d frames.\n", frame_count); - vpx_img_free(&raw); - if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); + aom_img_free(&raw); + if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); - vpx_video_writer_close(writer); + aom_video_writer_close(writer); return EXIT_SUCCESS; } diff --git a/examples/twopass_encoder.c b/examples/twopass_encoder.c index 46a9a38305241aabda97c5ce703da88e2e727aa8..e8acc88271328cb467216a1fd7696a1f0c9bfd0f 100644 --- a/examples/twopass_encoder.c +++ b/examples/twopass_encoder.c @@ -52,7 +52,7 @@ #include <stdlib.h> #include <string.h> -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #include "../tools_common.h" #include "../video_writer.h" @@ -65,18 +65,18 @@ void usage_exit(void) { exit(EXIT_FAILURE); } -static int get_frame_stats(vpx_codec_ctx_t *ctx, const vpx_image_t *img, - vpx_codec_pts_t pts, unsigned int duration, - vpx_enc_frame_flags_t flags, unsigned int deadline, - vpx_fixed_buf_t *stats) { +static int get_frame_stats(aom_codec_ctx_t *ctx, const aom_image_t *img, + aom_codec_pts_t pts, unsigned int duration, + aom_enc_frame_flags_t flags, unsigned int deadline, + aom_fixed_buf_t *stats) { int got_pkts = 0; - vpx_codec_iter_t iter = NULL; - const vpx_codec_cx_pkt_t *pkt = NULL; - const vpx_codec_err_t res = - vpx_codec_encode(ctx, img, pts, duration, flags, deadline); + aom_codec_iter_t iter = NULL; + const aom_codec_cx_pkt_t *pkt = NULL; + const aom_codec_err_t res = + aom_codec_encode(ctx, img, pts, duration, flags, deadline); if (res != VPX_CODEC_OK) die_codec(ctx, "Failed to get frame stats."); - while ((pkt = vpx_codec_get_cx_data(ctx, &iter)) != NULL) { + while ((pkt = aom_codec_get_cx_data(ctx, &iter)) != NULL) { got_pkts = 1; if (pkt->kind == VPX_CODEC_STATS_PKT) { @@ -91,23 +91,23 @@ static int get_frame_stats(vpx_codec_ctx_t *ctx, const vpx_image_t *img, return got_pkts; } -static int encode_frame(vpx_codec_ctx_t *ctx, const vpx_image_t *img, - vpx_codec_pts_t pts, unsigned int duration, - vpx_enc_frame_flags_t flags, unsigned int deadline, +static int encode_frame(aom_codec_ctx_t *ctx, const aom_image_t *img, + aom_codec_pts_t pts, unsigned int duration, + aom_enc_frame_flags_t flags, unsigned int deadline, VpxVideoWriter *writer) { int got_pkts = 0; - vpx_codec_iter_t iter = NULL; - const vpx_codec_cx_pkt_t *pkt = NULL; - const vpx_codec_err_t res = - vpx_codec_encode(ctx, img, pts, duration, flags, deadline); + aom_codec_iter_t iter = NULL; + const aom_codec_cx_pkt_t *pkt = NULL; + const aom_codec_err_t res = + aom_codec_encode(ctx, img, pts, duration, flags, deadline); if (res != VPX_CODEC_OK) die_codec(ctx, "Failed to encode frame."); - while ((pkt = vpx_codec_get_cx_data(ctx, &iter)) != NULL) { + while ((pkt = aom_codec_get_cx_data(ctx, &iter)) != NULL) { got_pkts = 1; if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) { const int keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0; - if (!vpx_video_writer_write_frame(writer, pkt->data.frame.buf, + if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf, pkt->data.frame.sz, pkt->data.frame.pts)) die_codec(ctx, "Failed to write compressed frame."); @@ -119,18 +119,18 @@ static int encode_frame(vpx_codec_ctx_t *ctx, const vpx_image_t *img, return got_pkts; } -static vpx_fixed_buf_t pass0(vpx_image_t *raw, FILE *infile, +static aom_fixed_buf_t pass0(aom_image_t *raw, FILE *infile, const VpxInterface *encoder, - const vpx_codec_enc_cfg_t *cfg) { - vpx_codec_ctx_t codec; + const aom_codec_enc_cfg_t *cfg) { + aom_codec_ctx_t codec; int frame_count = 0; - vpx_fixed_buf_t stats = { NULL, 0 }; + aom_fixed_buf_t stats = { NULL, 0 }; - if (vpx_codec_enc_init(&codec, encoder->codec_interface(), cfg, 0)) + if (aom_codec_enc_init(&codec, encoder->codec_interface(), cfg, 0)) die_codec(&codec, "Failed to initialize encoder"); // Calculate frame statistics. - while (vpx_img_read(raw, infile)) { + while (aom_img_read(raw, infile)) { ++frame_count; get_frame_stats(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY, &stats); @@ -142,29 +142,29 @@ static vpx_fixed_buf_t pass0(vpx_image_t *raw, FILE *infile, } printf("Pass 0 complete. Processed %d frames.\n", frame_count); - if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); + if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); return stats; } -static void pass1(vpx_image_t *raw, FILE *infile, const char *outfile_name, - const VpxInterface *encoder, const vpx_codec_enc_cfg_t *cfg) { +static void pass1(aom_image_t *raw, FILE *infile, const char *outfile_name, + const VpxInterface *encoder, const aom_codec_enc_cfg_t *cfg) { VpxVideoInfo info = { encoder->fourcc, cfg->g_w, cfg->g_h, { cfg->g_timebase.num, cfg->g_timebase.den } }; VpxVideoWriter *writer = NULL; - vpx_codec_ctx_t codec; + aom_codec_ctx_t codec; int frame_count = 0; - writer = vpx_video_writer_open(outfile_name, kContainerIVF, &info); + writer = aom_video_writer_open(outfile_name, kContainerIVF, &info); if (!writer) die("Failed to open %s for writing", outfile_name); - if (vpx_codec_enc_init(&codec, encoder->codec_interface(), cfg, 0)) + if (aom_codec_enc_init(&codec, encoder->codec_interface(), cfg, 0)) die_codec(&codec, "Failed to initialize encoder"); // Encode frames. - while (vpx_img_read(raw, infile)) { + while (aom_img_read(raw, infile)) { ++frame_count; encode_frame(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY, writer); } @@ -175,9 +175,9 @@ static void pass1(vpx_image_t *raw, FILE *infile, const char *outfile_name, printf("\n"); - if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); + if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec."); - vpx_video_writer_close(writer); + aom_video_writer_close(writer); printf("Pass 1 complete. Processed %d frames.\n", frame_count); } @@ -185,11 +185,11 @@ static void pass1(vpx_image_t *raw, FILE *infile, const char *outfile_name, int main(int argc, char **argv) { FILE *infile = NULL; int w, h; - vpx_codec_ctx_t codec; - vpx_codec_enc_cfg_t cfg; - vpx_image_t raw; - vpx_codec_err_t res; - vpx_fixed_buf_t stats; + aom_codec_ctx_t codec; + aom_codec_enc_cfg_t cfg; + aom_image_t raw; + aom_codec_err_t res; + aom_fixed_buf_t stats; const VpxInterface *encoder = NULL; const int fps = 30; // TODO(dkovalev) add command line argument @@ -203,7 +203,7 @@ int main(int argc, char **argv) { if (argc != 6) die("Invalid number of arguments."); - encoder = get_vpx_encoder_by_name(codec_arg); + encoder = get_aom_encoder_by_name(codec_arg); if (!encoder) die("Unsupported codec."); w = strtol(width_arg, NULL, 0); @@ -212,13 +212,13 @@ int main(int argc, char **argv) { if (w <= 0 || h <= 0 || (w % 2) != 0 || (h % 2) != 0) die("Invalid frame size: %dx%d", w, h); - if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, w, h, 1)) + if (!aom_img_alloc(&raw, VPX_IMG_FMT_I420, w, h, 1)) die("Failed to allocate image", w, h); - printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface())); + printf("Using %s\n", aom_codec_iface_name(encoder->codec_interface())); // Configuration - res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); + res = aom_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); if (res) die_codec(&codec, "Failed to get default codec config."); cfg.g_w = w; @@ -241,7 +241,7 @@ int main(int argc, char **argv) { pass1(&raw, infile, outfile_arg, encoder, &cfg); free(stats.buf); - vpx_img_free(&raw); + aom_img_free(&raw); fclose(infile); return EXIT_SUCCESS; diff --git a/ivfdec.c b/ivfdec.c index abb52863eaf59783bbb2768b38e45400e21f2a7b..2134c5fc3d2bf0d86822a68a33d4b919837012d9 100644 --- a/ivfdec.c +++ b/ivfdec.c @@ -20,7 +20,7 @@ static const char *IVF_SIGNATURE = "DKIF"; static void fix_framerate(int *num, int *den) { - // Some versions of vpxenc used 1/(2*fps) for the timebase, so + // Some versions of aomenc used 1/(2*fps) for the timebase, so // we can guess the framerate using only the timebase in this // case. Other files would require reading ahead to guess the // timebase, like we do for webm. diff --git a/ivfenc.c b/ivfenc.c index 4657212f8aea68b23df6ec153ecce6f43fe0612c..80f4d14e39bab672e546aee25fa10a1920dde793 100644 --- a/ivfenc.c +++ b/ivfenc.c @@ -11,10 +11,10 @@ #include "./ivfenc.h" -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #include "aom_ports/mem_ops.h" -void ivf_write_file_header(FILE *outfile, const struct vpx_codec_enc_cfg *cfg, +void ivf_write_file_header(FILE *outfile, const struct aom_codec_enc_cfg *cfg, unsigned int fourcc, int frame_cnt) { char header[32]; diff --git a/ivfenc.h b/ivfenc.h index 3c91ac664de8a26b17c7cbcd90f55cbb71214140..62b3a91501532e13d4e9803fd25afe6ebfaef9da 100644 --- a/ivfenc.h +++ b/ivfenc.h @@ -13,14 +13,14 @@ #include "./tools_common.h" -struct vpx_codec_enc_cfg; -struct vpx_codec_cx_pkt; +struct aom_codec_enc_cfg; +struct aom_codec_cx_pkt; #ifdef __cplusplus extern "C" { #endif -void ivf_write_file_header(FILE *outfile, const struct vpx_codec_enc_cfg *cfg, +void ivf_write_file_header(FILE *outfile, const struct aom_codec_enc_cfg *cfg, uint32_t fourcc, int frame_cnt); void ivf_write_frame_header(FILE *outfile, int64_t pts, size_t frame_size); diff --git a/libs.mk b/libs.mk index 13d85b9ee03883e20686fe2c3df9e9b5eccd7bfd..bee92043dbaa18dcad33965fffe9c3392b54129b 100644 --- a/libs.mk +++ b/libs.mk @@ -34,23 +34,23 @@ endef CODEC_SRCS-yes += CHANGELOG CODEC_SRCS-yes += libs.mk -include $(SRC_PATH_BARE)/aom/vpx_codec.mk +include $(SRC_PATH_BARE)/aom/aom_codec.mk CODEC_SRCS-yes += $(addprefix aom/,$(call enabled,API_SRCS)) CODEC_DOC_SRCS += $(addprefix aom/,$(call enabled,API_DOC_SRCS)) -include $(SRC_PATH_BARE)/aom_mem/vpx_mem.mk +include $(SRC_PATH_BARE)/aom_mem/aom_mem.mk CODEC_SRCS-yes += $(addprefix aom_mem/,$(call enabled,MEM_SRCS)) -include $(SRC_PATH_BARE)/aom_scale/vpx_scale.mk +include $(SRC_PATH_BARE)/aom_scale/aom_scale.mk CODEC_SRCS-yes += $(addprefix aom_scale/,$(call enabled,SCALE_SRCS)) -include $(SRC_PATH_BARE)/aom_ports/vpx_ports.mk +include $(SRC_PATH_BARE)/aom_ports/aom_ports.mk CODEC_SRCS-yes += $(addprefix aom_ports/,$(call enabled,PORTS_SRCS)) -include $(SRC_PATH_BARE)/aom_dsp/vpx_dsp.mk +include $(SRC_PATH_BARE)/aom_dsp/aom_dsp.mk CODEC_SRCS-yes += $(addprefix aom_dsp/,$(call enabled,DSP_SRCS)) -include $(SRC_PATH_BARE)/aom_util/vpx_util.mk +include $(SRC_PATH_BARE)/aom_util/aom_util.mk CODEC_SRCS-yes += $(addprefix aom_util/,$(call enabled,UTIL_SRCS)) # VP10 make file @@ -96,7 +96,7 @@ endif ifeq ($(CONFIG_MSVS),yes) -CODEC_LIB=$(if $(CONFIG_STATIC_MSVCRT),vpxmt,vpxmd) +CODEC_LIB=$(if $(CONFIG_STATIC_MSVCRT),aommt,aommd) GTEST_LIB=$(if $(CONFIG_STATIC_MSVCRT),gtestmt,gtestmd) # This variable uses deferred expansion intentionally, since the results of # $(wildcard) may change during the course of the Make. @@ -119,9 +119,9 @@ CODEC_SRCS-yes += build/make/rtcd.pl CODEC_SRCS-yes += aom_ports/emmintrin_compat.h CODEC_SRCS-yes += aom_ports/mem_ops.h CODEC_SRCS-yes += aom_ports/mem_ops_aligned.h -CODEC_SRCS-yes += aom_ports/vpx_once.h -CODEC_SRCS-yes += $(BUILD_PFX)vpx_config.c -INSTALL-SRCS-no += $(BUILD_PFX)vpx_config.c +CODEC_SRCS-yes += aom_ports/aom_once.h +CODEC_SRCS-yes += $(BUILD_PFX)aom_config.c +INSTALL-SRCS-no += $(BUILD_PFX)aom_config.c ifeq ($(ARCH_X86)$(ARCH_X86_64),yes) INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += third_party/x86inc/x86inc.asm endif @@ -129,18 +129,18 @@ CODEC_EXPORTS-yes += aom/exports_com CODEC_EXPORTS-$(CONFIG_ENCODERS) += aom/exports_enc CODEC_EXPORTS-$(CONFIG_DECODERS) += aom/exports_dec -INSTALL-LIBS-yes += include/aom/vpx_codec.h -INSTALL-LIBS-yes += include/aom/vpx_frame_buffer.h -INSTALL-LIBS-yes += include/aom/vpx_image.h -INSTALL-LIBS-yes += include/aom/vpx_integer.h -INSTALL-LIBS-$(CONFIG_DECODERS) += include/aom/vpx_decoder.h -INSTALL-LIBS-$(CONFIG_ENCODERS) += include/aom/vpx_encoder.h +INSTALL-LIBS-yes += include/aom/aom_codec.h +INSTALL-LIBS-yes += include/aom/aom_frame_buffer.h +INSTALL-LIBS-yes += include/aom/aom_image.h +INSTALL-LIBS-yes += include/aom/aom_integer.h +INSTALL-LIBS-$(CONFIG_DECODERS) += include/aom/aom_decoder.h +INSTALL-LIBS-$(CONFIG_ENCODERS) += include/aom/aom_encoder.h ifeq ($(CONFIG_EXTERNAL_BUILD),yes) ifeq ($(CONFIG_MSVS),yes) INSTALL-LIBS-yes += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB).lib) INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB)d.lib) -INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/vpx.dll) -INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/vpx.exp) +INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/aom.dll) +INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/aom.exp) endif else INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libaom.a @@ -163,39 +163,39 @@ CLEAN-OBJS += libaom_srcs.txt ifeq ($(CONFIG_EXTERNAL_BUILD),yes) ifeq ($(CONFIG_MSVS),yes) -vpx.def: $(call enabled,CODEC_EXPORTS) +aom.def: $(call enabled,CODEC_EXPORTS) @echo " [CREATE] $@" $(qexec)$(SRC_PATH_BARE)/build/make/gen_msvs_def.sh\ - --name=vpx\ + --name=aom\ --out=$@ $^ -CLEAN-OBJS += vpx.def +CLEAN-OBJS += aom.def # Assembly files that are included, but don't define symbols themselves. # Filtered out to avoid Visual Studio build warnings. ASM_INCLUDES := \ third_party/x86inc/x86inc.asm \ - vpx_config.asm \ - vpx_ports/x86_abi_support.asm \ + aom_config.asm \ + aom_ports/x86_abi_support.asm \ -vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def +aom.$(VCPROJ_SFX): $(CODEC_SRCS) aom.def @echo " [CREATE] $@" $(qexec)$(GEN_VCPROJ) \ $(if $(CONFIG_SHARED),--dll,--lib) \ --target=$(TOOLCHAIN) \ $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ - --name=vpx \ + --name=aom \ --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \ - --module-def=vpx.def \ + --module-def=aom.def \ --ver=$(CONFIG_VS_VERSION) \ --src-path-bare="$(SRC_PATH_BARE)" \ --out=$@ $(CFLAGS) \ $(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) \ --src-path-bare="$(SRC_PATH_BARE)" \ -PROJECTS-yes += vpx.$(VCPROJ_SFX) +PROJECTS-yes += aom.$(VCPROJ_SFX) -vpx.$(VCPROJ_SFX): vpx_config.asm -vpx.$(VCPROJ_SFX): $(RTCD) +aom.$(VCPROJ_SFX): aom_config.asm +aom.$(VCPROJ_SFX): $(RTCD) endif else @@ -255,7 +255,7 @@ libaom.def: $(call enabled,CODEC_EXPORTS) $(qexec)echo LIBRARY $(LIBAOM_SO:.dll=) INITINSTANCE TERMINSTANCE > $@ $(qexec)echo "DATA MULTIPLE NONSHARED" >> $@ $(qexec)echo "EXPORTS" >> $@ - $(qexec)awk '!/vpx_svc_*/ {print "_"$$2}' $^ >>$@ + $(qexec)awk '!/aom_svc_*/ {print "_"$$2}' $^ >>$@ CLEAN-OBJS += libaom.def libaom_dll.a: $(LIBAOM_SO) @@ -283,8 +283,8 @@ INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBAOM_SO) INSTALL-LIBS-$(CONFIG_SHARED) += $(if $(LIBAOM_SO_IMPLIB),$(LIBSUBDIR)/$(LIBAOM_SO_IMPLIB)) -LIBS-yes += vpx.pc -vpx.pc: config.mk libs.mk +LIBS-yes += aom.pc +aom.pc: config.mk libs.mk @echo " [CREATE] $@" $(qexec)echo '# pkg-config file from libaom $(VERSION_STRING)' > $@ $(qexec)echo 'prefix=$(PREFIX)' >> $@ @@ -292,7 +292,7 @@ vpx.pc: config.mk libs.mk $(qexec)echo 'libdir=$${prefix}/$(LIBSUBDIR)' >> $@ $(qexec)echo 'includedir=$${prefix}/include' >> $@ $(qexec)echo '' >> $@ - $(qexec)echo 'Name: vpx' >> $@ + $(qexec)echo 'Name: aom' >> $@ $(qexec)echo 'Description: WebM Project VPx codec implementation' >> $@ $(qexec)echo 'Version: $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)' >> $@ $(qexec)echo 'Requires:' >> $@ @@ -304,9 +304,9 @@ else $(qexec)echo 'Libs.private: -lm' >> $@ endif $(qexec)echo 'Cflags: -I$${includedir}' >> $@ -INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc +INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/aom.pc INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc -CLEAN-OBJS += vpx.pc +CLEAN-OBJS += aom.pc endif # @@ -314,29 +314,29 @@ endif # ifeq ($(ARCH_X86)$(ARCH_X86_64),yes) # YASM -$(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h +$(BUILD_PFX)aom_config.asm: $(BUILD_PFX)aom_config.h @echo " [CREATE] $@" @egrep "#define [A-Z0-9_]+ [01]" $< \ | awk '{print $$2 " equ " $$3}' > $@ else ADS2GAS=$(if $(filter yes,$(CONFIG_GCC)),| $(ASM_CONVERSION)) -$(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h +$(BUILD_PFX)aom_config.asm: $(BUILD_PFX)aom_config.h @echo " [CREATE] $@" @egrep "#define [A-Z0-9_]+ [01]" $< \ | awk '{print $$2 " EQU " $$3}' $(ADS2GAS) > $@ @echo " END" $(ADS2GAS) >> $@ -CLEAN-OBJS += $(BUILD_PFX)vpx_config.asm +CLEAN-OBJS += $(BUILD_PFX)aom_config.asm endif # # Add assembler dependencies for configuration. # -$(filter %.s.o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm -$(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm +$(filter %.s.o,$(OBJS-yes)): $(BUILD_PFX)aom_config.asm +$(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)aom_config.asm -$(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)vpx_version.h) -CLEAN-OBJS += $(BUILD_PFX)vpx_version.h +$(shell $(SRC_PATH_BARE)/build/make/version.sh "$(SRC_PATH_BARE)" $(BUILD_PFX)aom_version.h) +CLEAN-OBJS += $(BUILD_PFX)aom_version.h ## @@ -350,7 +350,7 @@ LIBAOM_TEST_SRCS=$(addprefix test/,$(call enabled,LIBAOM_TEST_SRCS)) LIBAOM_TEST_BIN=./test_libaom$(EXE_SFX) LIBAOM_TEST_DATA=$(addprefix $(LIBAOM_TEST_DATA_PATH)/,\ $(call enabled,LIBAOM_TEST_DATA)) -libaom_test_data_url=http://downloads.webmproject.org/test_data/libvpx/$(1) +libaom_test_data_url=http://downloads.webmproject.org/test_data/libaom/$(1) TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX) TEST_INTRA_PRED_SPEED_SRCS=$(addprefix test/,$(call enabled,TEST_INTRA_PRED_SPEED_SRCS)) @@ -400,7 +400,7 @@ gtest.$(VCPROJ_SFX): $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.c PROJECTS-$(CONFIG_MSVS) += gtest.$(VCPROJ_SFX) -test_libaom.$(VCPROJ_SFX): $(LIBAOM_TEST_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) +test_libaom.$(VCPROJ_SFX): $(LIBAOM_TEST_SRCS) aom.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) @echo " [CREATE] $@" $(qexec)$(GEN_VCPROJ) \ --exe \ @@ -421,7 +421,7 @@ LIBAOM_TEST_BIN := $(addprefix $(TGT_OS:win64=x64)/Release/,$(notdir $(LIBAOM_TE ifneq ($(strip $(TEST_INTRA_PRED_SPEED_OBJS)),) PROJECTS-$(CONFIG_MSVS) += test_intra_pred_speed.$(VCPROJ_SFX) -test_intra_pred_speed.$(VCPROJ_SFX): $(TEST_INTRA_PRED_SPEED_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) +test_intra_pred_speed.$(VCPROJ_SFX): $(TEST_INTRA_PRED_SPEED_SRCS) aom.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX) @echo " [CREATE] $@" $(qexec)$(GEN_VCPROJ) \ --exe \ @@ -526,7 +526,7 @@ endif SRCS += $(CODEC_SRCS) $(LIBAOM_TEST_SRCS) $(GTEST_SRCS) ## -## vpxdec/vpxenc tests. +## aomdec/aomenc tests. ## ifeq ($(CONFIG_UNIT_TESTS),yes) TEST_BIN_PATH = . @@ -539,10 +539,10 @@ ifeq ($(CONFIG_MSVS),yes) TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH)) endif utiltest utiltest-no-data-check: - $(qexec)$(SRC_PATH_BARE)/test/vpxdec.sh \ + $(qexec)$(SRC_PATH_BARE)/test/aomdec.sh \ --test-data-path $(LIBAOM_TEST_DATA_PATH) \ --bin-path $(TEST_BIN_PATH) - $(qexec)$(SRC_PATH_BARE)/test/vpxenc.sh \ + $(qexec)$(SRC_PATH_BARE)/test/aomenc.sh \ --test-data-path $(LIBAOM_TEST_DATA_PATH) \ --bin-path $(TEST_BIN_PATH) utiltest: testdata diff --git a/rate_hist.c b/rate_hist.c index 34c9a5cc53501d4304096bc0f7c151b29cd0247e..ffc7b8997e063ad2b5cff301f26e85d9bfcb4eb6 100644 --- a/rate_hist.c +++ b/rate_hist.c @@ -35,8 +35,8 @@ struct rate_hist { int total; }; -struct rate_hist *init_rate_histogram(const vpx_codec_enc_cfg_t *cfg, - const vpx_rational_t *fps) { +struct rate_hist *init_rate_histogram(const aom_codec_enc_cfg_t *cfg, + const aom_rational_t *fps) { int i; struct rate_hist *hist = malloc(sizeof(*hist)); @@ -71,8 +71,8 @@ void destroy_rate_histogram(struct rate_hist *hist) { } void update_rate_histogram(struct rate_hist *hist, - const vpx_codec_enc_cfg_t *cfg, - const vpx_codec_cx_pkt_t *pkt) { + const aom_codec_enc_cfg_t *cfg, + const aom_codec_cx_pkt_t *pkt) { int i; int64_t then = 0; int64_t avg_bitrate = 0; @@ -255,7 +255,7 @@ void show_q_histogram(const int counts[64], int max_buckets) { show_histogram(bucket, buckets, total, scale); } -void show_rate_histogram(struct rate_hist *hist, const vpx_codec_enc_cfg_t *cfg, +void show_rate_histogram(struct rate_hist *hist, const aom_codec_enc_cfg_t *cfg, int max_buckets) { int i, scale; int buckets = 0; diff --git a/rate_hist.h b/rate_hist.h index eaeaa35734e58648e6a12801518283a9be2bdd24..e6aa149aef7da7e9d0093ef69d2c5fa79aa3aa22 100644 --- a/rate_hist.h +++ b/rate_hist.h @@ -12,7 +12,7 @@ #ifndef RATE_HIST_H_ #define RATE_HIST_H_ -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #ifdef __cplusplus extern "C" { @@ -20,18 +20,18 @@ extern "C" { struct rate_hist; -struct rate_hist *init_rate_histogram(const vpx_codec_enc_cfg_t *cfg, - const vpx_rational_t *fps); +struct rate_hist *init_rate_histogram(const aom_codec_enc_cfg_t *cfg, + const aom_rational_t *fps); void destroy_rate_histogram(struct rate_hist *hist); void update_rate_histogram(struct rate_hist *hist, - const vpx_codec_enc_cfg_t *cfg, - const vpx_codec_cx_pkt_t *pkt); + const aom_codec_enc_cfg_t *cfg, + const aom_codec_cx_pkt_t *pkt); void show_q_histogram(const int counts[64], int max_buckets); -void show_rate_histogram(struct rate_hist *hist, const vpx_codec_enc_cfg_t *cfg, +void show_rate_histogram(struct rate_hist *hist, const aom_codec_enc_cfg_t *cfg, int max_buckets); #ifdef __cplusplus diff --git a/solution.mk b/solution.mk index 3f1346ee52ce0e98d84ddc4788906189f62c6872..22c47df32d53b2e08e3003fa61c0dff6c0e0cfea 100644 --- a/solution.mk +++ b/solution.mk @@ -9,22 +9,22 @@ ## # libaom reverse dependencies (targets that depend on libaom) -VPX_NONDEPS=$(addsuffix .$(VCPROJ_SFX),vpx gtest) +VPX_NONDEPS=$(addsuffix .$(VCPROJ_SFX),aom gtest) VPX_RDEPS=$(foreach vcp,\ - $(filter-out $(VPX_NONDEPS),$^), --dep=$(vcp:.$(VCPROJ_SFX)=):vpx) + $(filter-out $(VPX_NONDEPS),$^), --dep=$(vcp:.$(VCPROJ_SFX)=):aom) -vpx.sln: $(wildcard *.$(VCPROJ_SFX)) +aom.sln: $(wildcard *.$(VCPROJ_SFX)) @echo " [CREATE] $@" $(SRC_PATH_BARE)/build/make/gen_msvs_sln.sh \ - $(if $(filter vpx.$(VCPROJ_SFX),$^),$(VPX_RDEPS)) \ + $(if $(filter aom.$(VCPROJ_SFX),$^),$(VPX_RDEPS)) \ --dep=test_libaom:gtest \ --ver=$(CONFIG_VS_VERSION)\ --out=$@ $^ -vpx.sln.mk: vpx.sln +aom.sln.mk: aom.sln @true -PROJECTS-yes += vpx.sln vpx.sln.mk --include vpx.sln.mk +PROJECTS-yes += aom.sln aom.sln.mk +-include aom.sln.mk # Always install this file, as it is an unconditional post-build rule. INSTALL_MAPS += src/% $(SRC_PATH_BARE)/% diff --git a/test/acm_random.h b/test/acm_random.h index b3f8985cc423bf92fc60eed42e810464629d18e1..f7ce6e0b240543c5a533f9dcc38beaf555190619 100644 --- a/test/acm_random.h +++ b/test/acm_random.h @@ -14,7 +14,7 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" namespace libaom_test { diff --git a/test/active_map_refresh_test.cc b/test/active_map_refresh_test.cc index 5231ccc7cf17d1a0d895e0f9ddf39c169fb76b10..a95c6644b63bfe36274f28fa7791f7b8189c7f91 100644 --- a/test/active_map_refresh_test.cc +++ b/test/active_map_refresh_test.cc @@ -17,7 +17,7 @@ namespace { // Check if any pixel in a 16x16 macroblock varies between frames. -int CheckMb(const vpx_image_t ¤t, const vpx_image_t &previous, int mb_r, +int CheckMb(const aom_image_t ¤t, const aom_image_t &previous, int mb_r, int mb_c) { for (int plane = 0; plane < 3; plane++) { int r = 16 * mb_r; @@ -45,8 +45,8 @@ int CheckMb(const vpx_image_t ¤t, const vpx_image_t &previous, int mb_r, return 0; } -void GenerateMap(int mb_rows, int mb_cols, const vpx_image_t ¤t, - const vpx_image_t &previous, uint8_t *map) { +void GenerateMap(int mb_rows, int mb_cols, const aom_image_t ¤t, + const aom_image_t &previous, uint8_t *map) { for (int mb_r = 0; mb_r < mb_rows; ++mb_r) { for (int mb_c = 0; mb_c < mb_cols; ++mb_c) { map[mb_r * mb_cols + mb_c] = CheckMb(current, previous, mb_r, mb_c); @@ -77,10 +77,10 @@ class ActiveMapRefreshTest encoder->Control(VP8E_SET_CPUUSED, cpu_used_); encoder->Control(VP9E_SET_AQ_MODE, kAqModeCyclicRefresh); } else if (video->frame() >= 2 && video->img()) { - vpx_image_t *current = video->img(); - vpx_image_t *previous = y4m_holder_->img(); + aom_image_t *current = video->img(); + aom_image_t *previous = y4m_holder_->img(); ASSERT_TRUE(previous != NULL); - vpx_active_map_t map = vpx_active_map_t(); + aom_active_map_t map = aom_active_map_t(); const int width = static_cast<int>(current->d_w); const int height = static_cast<int>(current->d_h); const int mb_width = (width + 15) / 16; diff --git a/test/active_map_test.cc b/test/active_map_test.cc index a01810b4bf9574b30dd576f78cad57c883db57df..d633dc393210a84321af6549e41ccf32cffe3de2 100644 --- a/test/active_map_test.cc +++ b/test/active_map_test.cc @@ -38,7 +38,7 @@ class ActiveMapTest if (video->frame() == 1) { encoder->Control(VP8E_SET_CPUUSED, cpu_used_); } else if (video->frame() == 3) { - vpx_active_map_t map = vpx_active_map_t(); + aom_active_map_t map = aom_active_map_t(); uint8_t active_map[9 * 13] = { 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, @@ -53,7 +53,7 @@ class ActiveMapTest map.active_map = active_map; encoder->Control(VP8E_SET_ACTIVEMAP, &map); } else if (video->frame() == 15) { - vpx_active_map_t map = vpx_active_map_t(); + aom_active_map_t map = aom_active_map_t(); map.cols = (kWidth + 15) / 16; map.rows = (kHeight + 15) / 16; map.active_map = NULL; diff --git a/test/android/Android.mk b/test/android/Android.mk index ab8287a3462d8f47bd51ff1591b5a3cf5d98575a..c525f9e8c2939f1c424ae235d6be6e19c2ad6300 100644 --- a/test/android/Android.mk +++ b/test/android/Android.mk @@ -6,7 +6,7 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. # -# This make file builds vpx_test app for android. +# This make file builds aom_test app for android. # The test app itself runs on the command line through adb shell # The paths are really messed up as the libaom make file # expects to be made from a parent directory. @@ -42,9 +42,9 @@ LOCAL_MODULE := libaom_test LOCAL_STATIC_LIBRARIES := gtest libwebm ifeq ($(ENABLE_SHARED),1) - LOCAL_SHARED_LIBRARIES := vpx + LOCAL_SHARED_LIBRARIES := aom else - LOCAL_STATIC_LIBRARIES += vpx + LOCAL_STATIC_LIBRARIES += aom endif include $(LOCAL_PATH)/test/test.mk diff --git a/test/android/README b/test/android/README index 4a1adcf7f48d3648a63d38acdb56d7e2d6a6c924..35c8297386e64cfc9f66c47bfc6282e7bca0fb6e 100644 --- a/test/android/README +++ b/test/android/README @@ -1,12 +1,12 @@ -Android.mk will build vpx unittests on android. -1) Configure libvpx from the parent directory: -./libvpx/configure --target=armv7-android-gcc --enable-external-build \ +Android.mk will build aom unittests on android. +1) Configure libaom from the parent directory: +./libaom/configure --target=armv7-android-gcc --enable-external-build \ --enable-postproc --disable-install-srcs --enable-multi-res-encoding \ --enable-temporal-denoising --disable-unit-tests --disable-install-docs \ --disable-examples --disable-runtime-cpu-detect --sdk-path=$NDK 2) From the parent directory, invoke ndk-build: -NDK_PROJECT_PATH=. ndk-build APP_BUILD_SCRIPT=./libvpx/test/android/Android.mk \ +NDK_PROJECT_PATH=. ndk-build APP_BUILD_SCRIPT=./libaom/test/android/Android.mk \ APP_ABI=armeabi-v7a APP_PLATFORM=android-18 APP_OPTIM=release \ APP_STL=gnustl_static @@ -15,7 +15,7 @@ Note: Both adb and ndk-build are available prebuilt at: 3) Run get_files.py to download the test files: python get_files.py -i /path/to/test-data.sha1 -o /path/to/put/files \ - -u http://downloads.webmproject.org/test_data/libvpx + -u http://downloads.webmproject.org/test_data/libaom 4) Transfer files to device using adb. Ensure you have proper permissions for the target @@ -29,4 +29,4 @@ NOTE: Built_libs defaults to parent_dir/libs/armeabi-v7a adb shell (on device) cd /data/local/tmp -LD_LIBRARY_PATH=. ./vpx_test +LD_LIBRARY_PATH=. ./aom_test diff --git a/test/android/scrape_gtest_log.py b/test/android/scrape_gtest_log.py index 487845c270c3e6c66444486bb8586bcef39a3b54..44cdcc43e9942bf523cb8991dc837228b242f506 100644 --- a/test/android/scrape_gtest_log.py +++ b/test/android/scrape_gtest_log.py @@ -8,7 +8,7 @@ """Standalone script which parses a gtest log for json. -Json is returned returns as an array. This script is used by the libvpx +Json is returned returns as an array. This script is used by the libaom waterfall to gather json results mixed in with gtest logs. This is dubious software engineering. """ diff --git a/test/vpx_temporal_svc_encoder.sh b/test/aom_temporal_svc_encoder.sh similarity index 56% rename from test/vpx_temporal_svc_encoder.sh rename to test/aom_temporal_svc_encoder.sh index 628114362f051ba374df41019bfcfaf57620e8e0..ad6686a86de71a5ca076cc85207558302ac5c73f 100755 --- a/test/vpx_temporal_svc_encoder.sh +++ b/test/aom_temporal_svc_encoder.sh @@ -8,30 +8,30 @@ ## in the file PATENTS. All contributing project authors may ## be found in the AUTHORS file in the root of the source tree. ## -## This file tests the libaom vpx_temporal_svc_encoder example. To add new +## This file tests the libaom aom_temporal_svc_encoder example. To add new ## tests to this file, do the following: ## 1. Write a shell function (this is your test). -## 2. Add the function to vpx_tsvc_encoder_tests (on a new line). +## 2. Add the function to aom_tsvc_encoder_tests (on a new line). ## . $(dirname $0)/tools_common.sh # Environment check: $YUV_RAW_INPUT is required. -vpx_tsvc_encoder_verify_environment() { +aom_tsvc_encoder_verify_environment() { if [ ! -e "${YUV_RAW_INPUT}" ]; then - echo "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi - if [ "$(vpx_config_option_enabled CONFIG_TEMPORAL_DENOISING)" != "yes" ]; then + if [ "$(aom_config_option_enabled CONFIG_TEMPORAL_DENOISING)" != "yes" ]; then elog "Warning: Temporal denoising is disabled! Spatial denoising will be " \ "used instead, which is probably not what you want for this test." fi } -# Runs vpx_temporal_svc_encoder using the codec specified by $1 and output file +# Runs aom_temporal_svc_encoder using the codec specified by $1 and output file # name by $2. Additional positional parameters are passed directly to -# vpx_temporal_svc_encoder. -vpx_tsvc_encoder() { - local encoder="${LIBAOM_BIN_PATH}/vpx_temporal_svc_encoder" +# aom_temporal_svc_encoder. +aom_tsvc_encoder() { + local encoder="${LIBAOM_BIN_PATH}/aom_temporal_svc_encoder" encoder="${encoder}${VPX_TEST_EXE_SUFFIX}" local codec="$1" local output_file_base="$2" @@ -56,8 +56,8 @@ vpx_tsvc_encoder() { } # Confirms that all expected output files exist given the output file name -# passed to vpx_temporal_svc_encoder. -# The file name passed to vpx_temporal_svc_encoder is joined with the stream +# passed to aom_temporal_svc_encoder. +# The file name passed to aom_temporal_svc_encoder is joined with the stream # number and the extension .ivf to produce per stream output files. Here $1 is # file name, and $2 is expected number of files. files_exist() { @@ -68,223 +68,223 @@ files_exist() { done } -# Run vpx_temporal_svc_encoder in all supported modes for vp8 and vp9. +# Run aom_temporal_svc_encoder in all supported modes for vp8 and vp9. -vpx_tsvc_encoder_vp8_mode_0() { +aom_tsvc_encoder_vp8_mode_0() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 0 200 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 0 200 || return 1 # Mode 0 produces 1 stream files_exist "${FUNCNAME}" 1 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_1() { +aom_tsvc_encoder_vp8_mode_1() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 1 200 400 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 1 200 400 || return 1 # Mode 1 produces 2 streams files_exist "${FUNCNAME}" 2 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_2() { +aom_tsvc_encoder_vp8_mode_2() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 2 200 400 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 2 200 400 || return 1 # Mode 2 produces 2 streams files_exist "${FUNCNAME}" 2 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_3() { +aom_tsvc_encoder_vp8_mode_3() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 3 200 400 600 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 3 200 400 600 || return 1 # Mode 3 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_4() { +aom_tsvc_encoder_vp8_mode_4() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 4 200 400 600 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 4 200 400 600 || return 1 # Mode 4 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_5() { +aom_tsvc_encoder_vp8_mode_5() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 5 200 400 600 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 5 200 400 600 || return 1 # Mode 5 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_6() { +aom_tsvc_encoder_vp8_mode_6() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 6 200 400 600 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 6 200 400 600 || return 1 # Mode 6 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_7() { +aom_tsvc_encoder_vp8_mode_7() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 7 200 400 600 800 1000 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 7 200 400 600 800 1000 || return 1 # Mode 7 produces 5 streams files_exist "${FUNCNAME}" 5 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_8() { +aom_tsvc_encoder_vp8_mode_8() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 8 200 400 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 8 200 400 || return 1 # Mode 8 produces 2 streams files_exist "${FUNCNAME}" 2 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_9() { +aom_tsvc_encoder_vp8_mode_9() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 9 200 400 600 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 9 200 400 600 || return 1 # Mode 9 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_10() { +aom_tsvc_encoder_vp8_mode_10() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 10 200 400 600 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 10 200 400 600 || return 1 # Mode 10 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp8_mode_11() { +aom_tsvc_encoder_vp8_mode_11() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp8 "${FUNCNAME}" 11 200 400 600 || return 1 + aom_tsvc_encoder vp8 "${FUNCNAME}" 11 200 400 600 || return 1 # Mode 11 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_0() { +aom_tsvc_encoder_vp9_mode_0() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 0 200 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 0 200 || return 1 # Mode 0 produces 1 stream files_exist "${FUNCNAME}" 1 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_1() { +aom_tsvc_encoder_vp9_mode_1() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 1 200 400 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 1 200 400 || return 1 # Mode 1 produces 2 streams files_exist "${FUNCNAME}" 2 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_2() { +aom_tsvc_encoder_vp9_mode_2() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 2 200 400 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 2 200 400 || return 1 # Mode 2 produces 2 streams files_exist "${FUNCNAME}" 2 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_3() { +aom_tsvc_encoder_vp9_mode_3() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 3 200 400 600 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 3 200 400 600 || return 1 # Mode 3 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_4() { +aom_tsvc_encoder_vp9_mode_4() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 4 200 400 600 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 4 200 400 600 || return 1 # Mode 4 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_5() { +aom_tsvc_encoder_vp9_mode_5() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 5 200 400 600 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 5 200 400 600 || return 1 # Mode 5 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_6() { +aom_tsvc_encoder_vp9_mode_6() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 6 200 400 600 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 6 200 400 600 || return 1 # Mode 6 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_7() { +aom_tsvc_encoder_vp9_mode_7() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 7 200 400 600 800 1000 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 7 200 400 600 800 1000 || return 1 # Mode 7 produces 5 streams files_exist "${FUNCNAME}" 5 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_8() { +aom_tsvc_encoder_vp9_mode_8() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 8 200 400 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 8 200 400 || return 1 # Mode 8 produces 2 streams files_exist "${FUNCNAME}" 2 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_9() { +aom_tsvc_encoder_vp9_mode_9() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 9 200 400 600 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 9 200 400 600 || return 1 # Mode 9 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_10() { +aom_tsvc_encoder_vp9_mode_10() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 10 200 400 600 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 10 200 400 600 || return 1 # Mode 10 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_vp9_mode_11() { +aom_tsvc_encoder_vp9_mode_11() { if [ "$(vp9_encode_available)" = "yes" ]; then - vpx_tsvc_encoder vp9 "${FUNCNAME}" 11 200 400 600 || return 1 + aom_tsvc_encoder vp9 "${FUNCNAME}" 11 200 400 600 || return 1 # Mode 11 produces 3 streams files_exist "${FUNCNAME}" 3 || return 1 fi } -vpx_tsvc_encoder_tests="vpx_tsvc_encoder_vp8_mode_0 - vpx_tsvc_encoder_vp8_mode_1 - vpx_tsvc_encoder_vp8_mode_2 - vpx_tsvc_encoder_vp8_mode_3 - vpx_tsvc_encoder_vp8_mode_4 - vpx_tsvc_encoder_vp8_mode_5 - vpx_tsvc_encoder_vp8_mode_6 - vpx_tsvc_encoder_vp8_mode_7 - vpx_tsvc_encoder_vp8_mode_8 - vpx_tsvc_encoder_vp8_mode_9 - vpx_tsvc_encoder_vp8_mode_10 - vpx_tsvc_encoder_vp8_mode_11 - vpx_tsvc_encoder_vp9_mode_0 - vpx_tsvc_encoder_vp9_mode_1 - vpx_tsvc_encoder_vp9_mode_2 - vpx_tsvc_encoder_vp9_mode_3 - vpx_tsvc_encoder_vp9_mode_4 - vpx_tsvc_encoder_vp9_mode_5 - vpx_tsvc_encoder_vp9_mode_6 - vpx_tsvc_encoder_vp9_mode_7 - vpx_tsvc_encoder_vp9_mode_8 - vpx_tsvc_encoder_vp9_mode_9 - vpx_tsvc_encoder_vp9_mode_10 - vpx_tsvc_encoder_vp9_mode_11" - -run_tests vpx_tsvc_encoder_verify_environment "${vpx_tsvc_encoder_tests}" +aom_tsvc_encoder_tests="aom_tsvc_encoder_vp8_mode_0 + aom_tsvc_encoder_vp8_mode_1 + aom_tsvc_encoder_vp8_mode_2 + aom_tsvc_encoder_vp8_mode_3 + aom_tsvc_encoder_vp8_mode_4 + aom_tsvc_encoder_vp8_mode_5 + aom_tsvc_encoder_vp8_mode_6 + aom_tsvc_encoder_vp8_mode_7 + aom_tsvc_encoder_vp8_mode_8 + aom_tsvc_encoder_vp8_mode_9 + aom_tsvc_encoder_vp8_mode_10 + aom_tsvc_encoder_vp8_mode_11 + aom_tsvc_encoder_vp9_mode_0 + aom_tsvc_encoder_vp9_mode_1 + aom_tsvc_encoder_vp9_mode_2 + aom_tsvc_encoder_vp9_mode_3 + aom_tsvc_encoder_vp9_mode_4 + aom_tsvc_encoder_vp9_mode_5 + aom_tsvc_encoder_vp9_mode_6 + aom_tsvc_encoder_vp9_mode_7 + aom_tsvc_encoder_vp9_mode_8 + aom_tsvc_encoder_vp9_mode_9 + aom_tsvc_encoder_vp9_mode_10 + aom_tsvc_encoder_vp9_mode_11" + +run_tests aom_tsvc_encoder_verify_environment "${aom_tsvc_encoder_tests}" diff --git a/test/vpxdec.sh b/test/aomdec.sh similarity index 53% rename from test/vpxdec.sh rename to test/aomdec.sh index 4d6199447c91654a51d365b8bcb10119e776243d..e23adff955151e3bdd4e5a4356d32d40c6c59910 100755 --- a/test/vpxdec.sh +++ b/test/aomdec.sh @@ -8,94 +8,94 @@ ## in the file PATENTS. All contributing project authors may ## be found in the AUTHORS file in the root of the source tree. ## -## This file tests vpxdec. To add new tests to this file, do the following: +## This file tests aomdec. To add new tests to this file, do the following: ## 1. Write a shell function (this is your test). -## 2. Add the function to vpxdec_tests (on a new line). +## 2. Add the function to aomdec_tests (on a new line). ## . $(dirname $0)/tools_common.sh # Environment check: Make sure input is available. -vpxdec_verify_environment() { +aomdec_verify_environment() { if [ ! -e "${VP8_IVF_FILE}" ] || [ ! -e "${VP9_WEBM_FILE}" ] || \ [ ! -e "${VP9_FPM_WEBM_FILE}" ] || \ [ ! -e "${VP9_LT_50_FRAMES_WEBM_FILE}" ] ; then - elog "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + elog "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi - if [ -z "$(vpx_tool_path vpxdec)" ]; then - elog "vpxdec not found. It must exist in LIBAOM_BIN_PATH or its parent." + if [ -z "$(aom_tool_path aomdec)" ]; then + elog "aomdec not found. It must exist in LIBAOM_BIN_PATH or its parent." return 1 fi } -# Wrapper function for running vpxdec with pipe input. Requires that -# LIBAOM_BIN_PATH points to the directory containing vpxdec. $1 is used as the +# Wrapper function for running aomdec with pipe input. Requires that +# LIBAOM_BIN_PATH points to the directory containing aomdec. $1 is used as the # input file path and shifted away. All remaining parameters are passed through -# to vpxdec. -vpxdec_pipe() { - local readonly decoder="$(vpx_tool_path vpxdec)" +# to aomdec. +aomdec_pipe() { + local readonly decoder="$(aom_tool_path aomdec)" local readonly input="$1" shift cat "${input}" | eval "${VPX_TEST_PREFIX}" "${decoder}" - "$@" ${devnull} } -# Wrapper function for running vpxdec. Requires that LIBAOM_BIN_PATH points to -# the directory containing vpxdec. $1 one is used as the input file path and -# shifted away. All remaining parameters are passed through to vpxdec. -vpxdec() { - local readonly decoder="$(vpx_tool_path vpxdec)" +# Wrapper function for running aomdec. Requires that LIBAOM_BIN_PATH points to +# the directory containing aomdec. $1 one is used as the input file path and +# shifted away. All remaining parameters are passed through to aomdec. +aomdec() { + local readonly decoder="$(aom_tool_path aomdec)" local readonly input="$1" shift eval "${VPX_TEST_PREFIX}" "${decoder}" "$input" "$@" ${devnull} } -vpxdec_can_decode_vp8() { +aomdec_can_decode_vp8() { if [ "$(vp8_decode_available)" = "yes" ]; then echo yes fi } -vpxdec_can_decode_vp9() { +aomdec_can_decode_vp9() { if [ "$(vp9_decode_available)" = "yes" ]; then echo yes fi } -vpxdec_vp8_ivf() { - if [ "$(vpxdec_can_decode_vp8)" = "yes" ]; then - vpxdec "${VP8_IVF_FILE}" --summary --noblit +aomdec_vp8_ivf() { + if [ "$(aomdec_can_decode_vp8)" = "yes" ]; then + aomdec "${VP8_IVF_FILE}" --summary --noblit fi } -vpxdec_vp8_ivf_pipe_input() { - if [ "$(vpxdec_can_decode_vp8)" = "yes" ]; then - vpxdec_pipe "${VP8_IVF_FILE}" --summary --noblit +aomdec_vp8_ivf_pipe_input() { + if [ "$(aomdec_can_decode_vp8)" = "yes" ]; then + aomdec_pipe "${VP8_IVF_FILE}" --summary --noblit fi } -vpxdec_vp9_webm() { - if [ "$(vpxdec_can_decode_vp9)" = "yes" ] && \ +aomdec_vp9_webm() { + if [ "$(aomdec_can_decode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then - vpxdec "${VP9_WEBM_FILE}" --summary --noblit + aomdec "${VP9_WEBM_FILE}" --summary --noblit fi } -vpxdec_vp9_webm_frame_parallel() { - if [ "$(vpxdec_can_decode_vp9)" = "yes" ] && \ +aomdec_vp9_webm_frame_parallel() { + if [ "$(aomdec_can_decode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then for threads in 2 3 4 5 6 7 8; do - vpxdec "${VP9_FPM_WEBM_FILE}" --summary --noblit --threads=$threads \ + aomdec "${VP9_FPM_WEBM_FILE}" --summary --noblit --threads=$threads \ --frame-parallel done fi } -vpxdec_vp9_webm_less_than_50_frames() { +aomdec_vp9_webm_less_than_50_frames() { # ensure that reaching eof in webm_guess_framerate doesn't result in invalid # frames in actual webm_read_frame calls. - if [ "$(vpxdec_can_decode_vp9)" = "yes" ] && \ + if [ "$(aomdec_can_decode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then - local readonly decoder="$(vpx_tool_path vpxdec)" + local readonly decoder="$(aom_tool_path aomdec)" local readonly expected=10 local readonly num_frames=$(${VPX_TEST_PREFIX} "${decoder}" \ "${VP9_LT_50_FRAMES_WEBM_FILE}" --summary --noblit 2>&1 \ @@ -107,10 +107,10 @@ vpxdec_vp9_webm_less_than_50_frames() { fi } -vpxdec_tests="vpxdec_vp8_ivf - vpxdec_vp8_ivf_pipe_input - vpxdec_vp9_webm - vpxdec_vp9_webm_frame_parallel - vpxdec_vp9_webm_less_than_50_frames" +aomdec_tests="aomdec_vp8_ivf + aomdec_vp8_ivf_pipe_input + aomdec_vp9_webm + aomdec_vp9_webm_frame_parallel + aomdec_vp9_webm_less_than_50_frames" -run_tests vpxdec_verify_environment "${vpxdec_tests}" +run_tests aomdec_verify_environment "${aomdec_tests}" diff --git a/test/vpxenc.sh b/test/aomenc.sh similarity index 68% rename from test/vpxenc.sh rename to test/aomenc.sh index 897c0b67527f250b2852ca4f58b195cbc0727227..1d907a6e239f987c6265ba9ebb1ca59caad093a1 100755 --- a/test/vpxenc.sh +++ b/test/aomenc.sh @@ -8,47 +8,47 @@ ## in the file PATENTS. All contributing project authors may ## be found in the AUTHORS file in the root of the source tree. ## -## This file tests vpxenc using hantro_collage_w352h288.yuv as input. To add +## This file tests aomenc using hantro_collage_w352h288.yuv as input. To add ## new tests to this file, do the following: ## 1. Write a shell function (this is your test). -## 2. Add the function to vpxenc_tests (on a new line). +## 2. Add the function to aomenc_tests (on a new line). ## . $(dirname $0)/tools_common.sh readonly TEST_FRAMES=10 # Environment check: Make sure input is available. -vpxenc_verify_environment() { +aomenc_verify_environment() { if [ ! -e "${YUV_RAW_INPUT}" ]; then elog "The file ${YUV_RAW_INPUT##*/} must exist in LIBAOM_TEST_DATA_PATH." return 1 fi - if [ "$(vpxenc_can_encode_vp9)" = "yes" ]; then + if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then if [ ! -e "${Y4M_NOSQ_PAR_INPUT}" ]; then elog "The file ${Y4M_NOSQ_PAR_INPUT##*/} must exist in" elog "LIBAOM_TEST_DATA_PATH." return 1 fi fi - if [ -z "$(vpx_tool_path vpxenc)" ]; then - elog "vpxenc not found. It must exist in LIBAOM_BIN_PATH or its parent." + if [ -z "$(aom_tool_path aomenc)" ]; then + elog "aomenc not found. It must exist in LIBAOM_BIN_PATH or its parent." return 1 fi } -vpxenc_can_encode_vp8() { +aomenc_can_encode_vp8() { if [ "$(vp8_encode_available)" = "yes" ]; then echo yes fi } -vpxenc_can_encode_vp9() { +aomenc_can_encode_vp9() { if [ "$(vp9_encode_available)" = "yes" ]; then echo yes fi } -# Echo vpxenc command line parameters allowing use of +# Echo aomenc command line parameters allowing use of # hantro_collage_w352h288.yuv as input. yuv_input_hantro_collage() { echo ""${YUV_RAW_INPUT}" @@ -64,9 +64,9 @@ y4m_input_720p() { echo ""${Y4M_720P_INPUT}"" } -# Echo default vpxenc real time encoding params. $1 is the codec, which defaults +# Echo default aomenc real time encoding params. $1 is the codec, which defaults # to vp8 if unspecified. -vpxenc_rt_params() { +aomenc_rt_params() { local readonly codec="${1:-vp8}" echo "--codec=${codec} --buf-initial-sz=500 @@ -90,12 +90,12 @@ vpxenc_rt_params() { --undershoot-pct=50" } -# Wrapper function for running vpxenc with pipe input. Requires that -# LIBAOM_BIN_PATH points to the directory containing vpxenc. $1 is used as the +# Wrapper function for running aomenc with pipe input. Requires that +# LIBAOM_BIN_PATH points to the directory containing aomenc. $1 is used as the # input file path and shifted away. All remaining parameters are passed through -# to vpxenc. -vpxenc_pipe() { - local readonly encoder="$(vpx_tool_path vpxenc)" +# to aomenc. +aomenc_pipe() { + local readonly encoder="$(aom_tool_path aomenc)" local readonly input="$1" shift cat "${input}" | eval "${VPX_TEST_PREFIX}" "${encoder}" - \ @@ -103,11 +103,11 @@ vpxenc_pipe() { "$@" ${devnull} } -# Wrapper function for running vpxenc. Requires that LIBAOM_BIN_PATH points to -# the directory containing vpxenc. $1 one is used as the input file path and -# shifted away. All remaining parameters are passed through to vpxenc. -vpxenc() { - local readonly encoder="$(vpx_tool_path vpxenc)" +# Wrapper function for running aomenc. Requires that LIBAOM_BIN_PATH points to +# the directory containing aomenc. $1 one is used as the input file path and +# shifted away. All remaining parameters are passed through to aomenc. +aomenc() { + local readonly encoder="$(aom_tool_path aomenc)" local readonly input="$1" shift eval "${VPX_TEST_PREFIX}" "${encoder}" "${input}" \ @@ -115,10 +115,10 @@ vpxenc() { "$@" ${devnull} } -vpxenc_vp8_ivf() { - if [ "$(vpxenc_can_encode_vp8)" = "yes" ]; then +aomenc_vp8_ivf() { + if [ "$(aomenc_can_encode_vp8)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8.ivf" - vpxenc $(yuv_input_hantro_collage) \ + aomenc $(yuv_input_hantro_collage) \ --codec=vp8 \ --limit="${TEST_FRAMES}" \ --ivf \ @@ -131,11 +131,11 @@ vpxenc_vp8_ivf() { fi } -vpxenc_vp8_webm() { - if [ "$(vpxenc_can_encode_vp8)" = "yes" ] && \ +aomenc_vp8_webm() { + if [ "$(aomenc_can_encode_vp8)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8.webm" - vpxenc $(yuv_input_hantro_collage) \ + aomenc $(yuv_input_hantro_collage) \ --codec=vp8 \ --limit="${TEST_FRAMES}" \ --output="${output}" @@ -147,12 +147,12 @@ vpxenc_vp8_webm() { fi } -vpxenc_vp8_webm_rt() { - if [ "$(vpxenc_can_encode_vp8)" = "yes" ] && \ +aomenc_vp8_webm_rt() { + if [ "$(aomenc_can_encode_vp8)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8_rt.webm" - vpxenc $(yuv_input_hantro_collage) \ - $(vpxenc_rt_params vp8) \ + aomenc $(yuv_input_hantro_collage) \ + $(aomenc_rt_params vp8) \ --output="${output}" if [ ! -e "${output}" ]; then elog "Output file does not exist." @@ -161,11 +161,11 @@ vpxenc_vp8_webm_rt() { fi } -vpxenc_vp8_webm_2pass() { - if [ "$(vpxenc_can_encode_vp8)" = "yes" ] && \ +aomenc_vp8_webm_2pass() { + if [ "$(aomenc_can_encode_vp8)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8.webm" - vpxenc $(yuv_input_hantro_collage) \ + aomenc $(yuv_input_hantro_collage) \ --codec=vp8 \ --limit="${TEST_FRAMES}" \ --output="${output}" \ @@ -178,13 +178,13 @@ vpxenc_vp8_webm_2pass() { fi } -vpxenc_vp8_webm_lag10_frames20() { - if [ "$(vpxenc_can_encode_vp8)" = "yes" ] && \ +aomenc_vp8_webm_lag10_frames20() { + if [ "$(aomenc_can_encode_vp8)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly lag_total_frames=20 local readonly lag_frames=10 local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8_lag10_frames20.webm" - vpxenc $(yuv_input_hantro_collage) \ + aomenc $(yuv_input_hantro_collage) \ --codec=vp8 \ --limit="${lag_total_frames}" \ --lag-in-frames="${lag_frames}" \ @@ -199,10 +199,10 @@ vpxenc_vp8_webm_lag10_frames20() { fi } -vpxenc_vp8_ivf_piped_input() { - if [ "$(vpxenc_can_encode_vp8)" = "yes" ]; then +aomenc_vp8_ivf_piped_input() { + if [ "$(aomenc_can_encode_vp8)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8_piped_input.ivf" - vpxenc_pipe $(yuv_input_hantro_collage) \ + aomenc_pipe $(yuv_input_hantro_collage) \ --codec=vp8 \ --limit="${TEST_FRAMES}" \ --ivf \ @@ -215,10 +215,10 @@ vpxenc_vp8_ivf_piped_input() { fi } -vpxenc_vp9_ivf() { - if [ "$(vpxenc_can_encode_vp9)" = "yes" ]; then +aomenc_vp9_ivf() { + if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.ivf" - vpxenc $(yuv_input_hantro_collage) \ + aomenc $(yuv_input_hantro_collage) \ --codec=vp9 \ --limit="${TEST_FRAMES}" \ --ivf \ @@ -231,11 +231,11 @@ vpxenc_vp9_ivf() { fi } -vpxenc_vp9_webm() { - if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ +aomenc_vp9_webm() { + if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.webm" - vpxenc $(yuv_input_hantro_collage) \ + aomenc $(yuv_input_hantro_collage) \ --codec=vp9 \ --limit="${TEST_FRAMES}" \ --output="${output}" @@ -247,12 +247,12 @@ vpxenc_vp9_webm() { fi } -vpxenc_vp9_webm_rt() { - if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ +aomenc_vp9_webm_rt() { + if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_rt.webm" - vpxenc $(yuv_input_hantro_collage) \ - $(vpxenc_rt_params vp9) \ + aomenc $(yuv_input_hantro_collage) \ + $(aomenc_rt_params vp9) \ --output="${output}" if [ ! -e "${output}" ]; then @@ -262,8 +262,8 @@ vpxenc_vp9_webm_rt() { fi } -vpxenc_vp9_webm_rt_multithread_tiled() { - if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ +aomenc_vp9_webm_rt_multithread_tiled() { + if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_rt_multithread_tiled.webm" local readonly tilethread_min=2 @@ -273,8 +273,8 @@ vpxenc_vp9_webm_rt_multithread_tiled() { for threads in ${num_threads}; do for tile_cols in ${num_tile_cols}; do - vpxenc $(y4m_input_720p) \ - $(vpxenc_rt_params vp9) \ + aomenc $(y4m_input_720p) \ + $(aomenc_rt_params vp9) \ --threads=${threads} \ --tile-columns=${tile_cols} \ --output="${output}" @@ -290,8 +290,8 @@ vpxenc_vp9_webm_rt_multithread_tiled() { fi } -vpxenc_vp9_webm_rt_multithread_tiled_frameparallel() { - if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ +aomenc_vp9_webm_rt_multithread_tiled_frameparallel() { + if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_rt_mt_t_fp.webm" local readonly tilethread_min=2 @@ -301,8 +301,8 @@ vpxenc_vp9_webm_rt_multithread_tiled_frameparallel() { for threads in ${num_threads}; do for tile_cols in ${num_tile_cols}; do - vpxenc $(y4m_input_720p) \ - $(vpxenc_rt_params vp9) \ + aomenc $(y4m_input_720p) \ + $(aomenc_rt_params vp9) \ --threads=${threads} \ --tile-columns=${tile_cols} \ --frame-parallel=1 \ @@ -319,11 +319,11 @@ vpxenc_vp9_webm_rt_multithread_tiled_frameparallel() { fi } -vpxenc_vp9_webm_2pass() { - if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ +aomenc_vp9_webm_2pass() { + if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.webm" - vpxenc $(yuv_input_hantro_collage) \ + aomenc $(yuv_input_hantro_collage) \ --codec=vp9 \ --limit="${TEST_FRAMES}" \ --output="${output}" \ @@ -336,10 +336,10 @@ vpxenc_vp9_webm_2pass() { fi } -vpxenc_vp9_ivf_lossless() { - if [ "$(vpxenc_can_encode_vp9)" = "yes" ]; then +aomenc_vp9_ivf_lossless() { + if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_lossless.ivf" - vpxenc $(yuv_input_hantro_collage) \ + aomenc $(yuv_input_hantro_collage) \ --codec=vp9 \ --limit="${TEST_FRAMES}" \ --ivf \ @@ -353,10 +353,10 @@ vpxenc_vp9_ivf_lossless() { fi } -vpxenc_vp9_ivf_minq0_maxq0() { - if [ "$(vpxenc_can_encode_vp9)" = "yes" ]; then +aomenc_vp9_ivf_minq0_maxq0() { + if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_lossless_minq0_maxq0.ivf" - vpxenc $(yuv_input_hantro_collage) \ + aomenc $(yuv_input_hantro_collage) \ --codec=vp9 \ --limit="${TEST_FRAMES}" \ --ivf \ @@ -371,13 +371,13 @@ vpxenc_vp9_ivf_minq0_maxq0() { fi } -vpxenc_vp9_webm_lag10_frames20() { - if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ +aomenc_vp9_webm_lag10_frames20() { + if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly lag_total_frames=20 local readonly lag_frames=10 local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_lag10_frames20.webm" - vpxenc $(yuv_input_hantro_collage) \ + aomenc $(yuv_input_hantro_collage) \ --codec=vp9 \ --limit="${lag_total_frames}" \ --lag-in-frames="${lag_frames}" \ @@ -393,11 +393,11 @@ vpxenc_vp9_webm_lag10_frames20() { } # TODO(fgalligan): Test that DisplayWidth is different than video width. -vpxenc_vp9_webm_non_square_par() { - if [ "$(vpxenc_can_encode_vp9)" = "yes" ] && \ +aomenc_vp9_webm_non_square_par() { + if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \ [ "$(webm_io_available)" = "yes" ]; then local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_non_square_par.webm" - vpxenc $(y4m_input_non_square_par) \ + aomenc $(y4m_input_non_square_par) \ --codec=vp9 \ --limit="${TEST_FRAMES}" \ --output="${output}" @@ -409,21 +409,21 @@ vpxenc_vp9_webm_non_square_par() { fi } -vpxenc_tests="vpxenc_vp8_ivf - vpxenc_vp8_webm - vpxenc_vp8_webm_rt - vpxenc_vp8_webm_2pass - vpxenc_vp8_webm_lag10_frames20 - vpxenc_vp8_ivf_piped_input - vpxenc_vp9_ivf - vpxenc_vp9_webm - vpxenc_vp9_webm_rt - vpxenc_vp9_webm_rt_multithread_tiled - vpxenc_vp9_webm_rt_multithread_tiled_frameparallel - vpxenc_vp9_webm_2pass - vpxenc_vp9_ivf_lossless - vpxenc_vp9_ivf_minq0_maxq0 - vpxenc_vp9_webm_lag10_frames20 - vpxenc_vp9_webm_non_square_par" - -run_tests vpxenc_verify_environment "${vpxenc_tests}" +aomenc_tests="aomenc_vp8_ivf + aomenc_vp8_webm + aomenc_vp8_webm_rt + aomenc_vp8_webm_2pass + aomenc_vp8_webm_lag10_frames20 + aomenc_vp8_ivf_piped_input + aomenc_vp9_ivf + aomenc_vp9_webm + aomenc_vp9_webm_rt + aomenc_vp9_webm_rt_multithread_tiled + aomenc_vp9_webm_rt_multithread_tiled_frameparallel + aomenc_vp9_webm_2pass + aomenc_vp9_ivf_lossless + aomenc_vp9_ivf_minq0_maxq0 + aomenc_vp9_webm_lag10_frames20 + aomenc_vp9_webm_non_square_par" + +run_tests aomenc_verify_environment "${aomenc_tests}" diff --git a/test/arf_freq_test.cc b/test/arf_freq_test.cc index 11680cdc5b61d542808a03f9a8a466830c43e062..9ba1e3bd0ba0c93947b22d2fe2438c453748ddc5 100644 --- a/test/arf_freq_test.cc +++ b/test/arf_freq_test.cc @@ -32,8 +32,8 @@ typedef struct { unsigned int framerate_num; unsigned int framerate_den; unsigned int input_bit_depth; - vpx_img_fmt fmt; - vpx_bit_depth_t bit_depth; + aom_img_fmt fmt; + aom_bit_depth_t bit_depth; unsigned int profile; } TestVideoParam; @@ -106,7 +106,7 @@ class ArfFreqTest run_of_visible_frames_ = 0; } - int GetNumFramesInPkt(const vpx_codec_cx_pkt_t *pkt) { + int GetNumFramesInPkt(const aom_codec_cx_pkt_t *pkt) { const uint8_t *buffer = reinterpret_cast<uint8_t *>(pkt->data.frame.buf); const uint8_t marker = buffer[pkt->data.frame.sz - 1]; const int mag = ((marker >> 3) & 3) + 1; @@ -123,7 +123,7 @@ class ArfFreqTest return frames; } - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) return; const int frames = GetNumFramesInPkt(pkt); if (frames == 1) { diff --git a/test/av1_dct_test.cc b/test/av1_dct_test.cc index 31701e7b5f2ee0748ad15dc49facd92a8046e199..6ab6a900ac04ff77855b6c9060c4986e608954b5 100644 --- a/test/av1_dct_test.cc +++ b/test/av1_dct_test.cc @@ -15,7 +15,7 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/acm_random.h" #include "test/util.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom_ports/msvc.h" #undef CONFIG_COEFFICIENT_RANGE_CHECKING diff --git a/test/av1_inv_txfm_test.cc b/test/av1_inv_txfm_test.cc index d00701456a87cbfc1143ff7ceb46429089641c65..a2731c7f3ed500ceba03af9f3a6ee4b46a2016f6 100644 --- a/test/av1_inv_txfm_test.cc +++ b/test/av1_inv_txfm_test.cc @@ -15,14 +15,14 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/blockd.h" #include "av1/common/scan.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "av1/common/av1_inv_txfm.h" using libaom_test::ACMRandom; @@ -258,18 +258,18 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P( C, Vp10PartialIDctTest, - ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vp10_idct32x32_1024_add_c, + ::testing::Values(make_tuple(&aom_fdct32x32_c, &vp10_idct32x32_1024_add_c, &vp10_idct32x32_34_add_c, TX_32X32, 34), - make_tuple(&vpx_fdct32x32_c, &vp10_idct32x32_1024_add_c, + make_tuple(&aom_fdct32x32_c, &vp10_idct32x32_1024_add_c, &vp10_idct32x32_1_add_c, TX_32X32, 1), - make_tuple(&vpx_fdct16x16_c, &vp10_idct16x16_256_add_c, + make_tuple(&aom_fdct16x16_c, &vp10_idct16x16_256_add_c, &vp10_idct16x16_10_add_c, TX_16X16, 10), - make_tuple(&vpx_fdct16x16_c, &vp10_idct16x16_256_add_c, + make_tuple(&aom_fdct16x16_c, &vp10_idct16x16_256_add_c, &vp10_idct16x16_1_add_c, TX_16X16, 1), - make_tuple(&vpx_fdct8x8_c, &vp10_idct8x8_64_add_c, + make_tuple(&aom_fdct8x8_c, &vp10_idct8x8_64_add_c, &vp10_idct8x8_12_add_c, TX_8X8, 12), - make_tuple(&vpx_fdct8x8_c, &vp10_idct8x8_64_add_c, + make_tuple(&aom_fdct8x8_c, &vp10_idct8x8_64_add_c, &vp10_idct8x8_1_add_c, TX_8X8, 1), - make_tuple(&vpx_fdct4x4_c, &vp10_idct4x4_16_add_c, + make_tuple(&aom_fdct4x4_c, &vp10_idct4x4_16_add_c, &vp10_idct4x4_1_add_c, TX_4X4, 1))); } // namespace diff --git a/test/avg_test.cc b/test/avg_test.cc index 10499e26123461c2b19291f4308182984112bed3..84651384bbd01f353cbb69cd61a42c7ff17271bb 100644 --- a/test/avg_test.cc +++ b/test/avg_test.cc @@ -14,14 +14,14 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" using libaom_test::ACMRandom; @@ -32,11 +32,11 @@ class AverageTestBase : public ::testing::Test { static void SetUpTestCase() { source_data_ = reinterpret_cast<uint8_t *>( - vpx_memalign(kDataAlignment, kDataBlockSize)); + aom_memalign(kDataAlignment, kDataBlockSize)); } static void TearDownTestCase() { - vpx_free(source_data_); + aom_free(source_data_); source_data_ = NULL; } @@ -131,15 +131,15 @@ class IntProRowTest : public AverageTestBase, protected: virtual void SetUp() { hbuf_asm_ = reinterpret_cast<int16_t *>( - vpx_memalign(kDataAlignment, sizeof(*hbuf_asm_) * 16)); + aom_memalign(kDataAlignment, sizeof(*hbuf_asm_) * 16)); hbuf_c_ = reinterpret_cast<int16_t *>( - vpx_memalign(kDataAlignment, sizeof(*hbuf_c_) * 16)); + aom_memalign(kDataAlignment, sizeof(*hbuf_c_) * 16)); } virtual void TearDown() { - vpx_free(hbuf_c_); + aom_free(hbuf_c_); hbuf_c_ = NULL; - vpx_free(hbuf_asm_); + aom_free(hbuf_asm_); hbuf_asm_ = NULL; } @@ -194,13 +194,13 @@ class SatdTest : public ::testing::Test, satd_func_ = GET_PARAM(1); rnd_.Reset(ACMRandom::DeterministicSeed()); src_ = reinterpret_cast<int16_t *>( - vpx_memalign(16, sizeof(*src_) * satd_size_)); + aom_memalign(16, sizeof(*src_) * satd_size_)); ASSERT_TRUE(src_ != NULL); } virtual void TearDown() { libaom_test::ClearSystemState(); - vpx_free(src_); + aom_free(src_); } void FillConstant(const int16_t val) { @@ -309,86 +309,86 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P( C, AverageTest, - ::testing::Values(make_tuple(16, 16, 1, 8, &vpx_avg_8x8_c), - make_tuple(16, 16, 1, 4, &vpx_avg_4x4_c))); + ::testing::Values(make_tuple(16, 16, 1, 8, &aom_avg_8x8_c), + make_tuple(16, 16, 1, 4, &aom_avg_4x4_c))); INSTANTIATE_TEST_CASE_P(C, SatdTest, - ::testing::Values(make_tuple(16, &vpx_satd_c), - make_tuple(64, &vpx_satd_c), - make_tuple(256, &vpx_satd_c), - make_tuple(1024, &vpx_satd_c))); + ::testing::Values(make_tuple(16, &aom_satd_c), + make_tuple(64, &aom_satd_c), + make_tuple(256, &aom_satd_c), + make_tuple(1024, &aom_satd_c))); #if HAVE_SSE2 INSTANTIATE_TEST_CASE_P( SSE2, AverageTest, - ::testing::Values(make_tuple(16, 16, 0, 8, &vpx_avg_8x8_sse2), - make_tuple(16, 16, 5, 8, &vpx_avg_8x8_sse2), - make_tuple(32, 32, 15, 8, &vpx_avg_8x8_sse2), - make_tuple(16, 16, 0, 4, &vpx_avg_4x4_sse2), - make_tuple(16, 16, 5, 4, &vpx_avg_4x4_sse2), - make_tuple(32, 32, 15, 4, &vpx_avg_4x4_sse2))); + ::testing::Values(make_tuple(16, 16, 0, 8, &aom_avg_8x8_sse2), + make_tuple(16, 16, 5, 8, &aom_avg_8x8_sse2), + make_tuple(32, 32, 15, 8, &aom_avg_8x8_sse2), + make_tuple(16, 16, 0, 4, &aom_avg_4x4_sse2), + make_tuple(16, 16, 5, 4, &aom_avg_4x4_sse2), + make_tuple(32, 32, 15, 4, &aom_avg_4x4_sse2))); INSTANTIATE_TEST_CASE_P( SSE2, IntProRowTest, - ::testing::Values(make_tuple(16, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c), - make_tuple(32, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c), - make_tuple(64, &vpx_int_pro_row_sse2, - &vpx_int_pro_row_c))); + ::testing::Values(make_tuple(16, &aom_int_pro_row_sse2, &aom_int_pro_row_c), + make_tuple(32, &aom_int_pro_row_sse2, &aom_int_pro_row_c), + make_tuple(64, &aom_int_pro_row_sse2, + &aom_int_pro_row_c))); INSTANTIATE_TEST_CASE_P( SSE2, IntProColTest, - ::testing::Values(make_tuple(16, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c), - make_tuple(32, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c), - make_tuple(64, &vpx_int_pro_col_sse2, - &vpx_int_pro_col_c))); + ::testing::Values(make_tuple(16, &aom_int_pro_col_sse2, &aom_int_pro_col_c), + make_tuple(32, &aom_int_pro_col_sse2, &aom_int_pro_col_c), + make_tuple(64, &aom_int_pro_col_sse2, + &aom_int_pro_col_c))); INSTANTIATE_TEST_CASE_P(SSE2, SatdTest, - ::testing::Values(make_tuple(16, &vpx_satd_sse2), - make_tuple(64, &vpx_satd_sse2), - make_tuple(256, &vpx_satd_sse2), - make_tuple(1024, &vpx_satd_sse2))); + ::testing::Values(make_tuple(16, &aom_satd_sse2), + make_tuple(64, &aom_satd_sse2), + make_tuple(256, &aom_satd_sse2), + make_tuple(1024, &aom_satd_sse2))); #endif #if HAVE_NEON INSTANTIATE_TEST_CASE_P( NEON, AverageTest, - ::testing::Values(make_tuple(16, 16, 0, 8, &vpx_avg_8x8_neon), - make_tuple(16, 16, 5, 8, &vpx_avg_8x8_neon), - make_tuple(32, 32, 15, 8, &vpx_avg_8x8_neon), - make_tuple(16, 16, 0, 4, &vpx_avg_4x4_neon), - make_tuple(16, 16, 5, 4, &vpx_avg_4x4_neon), - make_tuple(32, 32, 15, 4, &vpx_avg_4x4_neon))); + ::testing::Values(make_tuple(16, 16, 0, 8, &aom_avg_8x8_neon), + make_tuple(16, 16, 5, 8, &aom_avg_8x8_neon), + make_tuple(32, 32, 15, 8, &aom_avg_8x8_neon), + make_tuple(16, 16, 0, 4, &aom_avg_4x4_neon), + make_tuple(16, 16, 5, 4, &aom_avg_4x4_neon), + make_tuple(32, 32, 15, 4, &aom_avg_4x4_neon))); INSTANTIATE_TEST_CASE_P( NEON, IntProRowTest, - ::testing::Values(make_tuple(16, &vpx_int_pro_row_neon, &vpx_int_pro_row_c), - make_tuple(32, &vpx_int_pro_row_neon, &vpx_int_pro_row_c), - make_tuple(64, &vpx_int_pro_row_neon, - &vpx_int_pro_row_c))); + ::testing::Values(make_tuple(16, &aom_int_pro_row_neon, &aom_int_pro_row_c), + make_tuple(32, &aom_int_pro_row_neon, &aom_int_pro_row_c), + make_tuple(64, &aom_int_pro_row_neon, + &aom_int_pro_row_c))); INSTANTIATE_TEST_CASE_P( NEON, IntProColTest, - ::testing::Values(make_tuple(16, &vpx_int_pro_col_neon, &vpx_int_pro_col_c), - make_tuple(32, &vpx_int_pro_col_neon, &vpx_int_pro_col_c), - make_tuple(64, &vpx_int_pro_col_neon, - &vpx_int_pro_col_c))); + ::testing::Values(make_tuple(16, &aom_int_pro_col_neon, &aom_int_pro_col_c), + make_tuple(32, &aom_int_pro_col_neon, &aom_int_pro_col_c), + make_tuple(64, &aom_int_pro_col_neon, + &aom_int_pro_col_c))); INSTANTIATE_TEST_CASE_P(NEON, SatdTest, - ::testing::Values(make_tuple(16, &vpx_satd_neon), - make_tuple(64, &vpx_satd_neon), - make_tuple(256, &vpx_satd_neon), - make_tuple(1024, &vpx_satd_neon))); + ::testing::Values(make_tuple(16, &aom_satd_neon), + make_tuple(64, &aom_satd_neon), + make_tuple(256, &aom_satd_neon), + make_tuple(1024, &aom_satd_neon))); #endif #if HAVE_MSA INSTANTIATE_TEST_CASE_P( MSA, AverageTest, - ::testing::Values(make_tuple(16, 16, 0, 8, &vpx_avg_8x8_msa), - make_tuple(16, 16, 5, 8, &vpx_avg_8x8_msa), - make_tuple(32, 32, 15, 8, &vpx_avg_8x8_msa), - make_tuple(16, 16, 0, 4, &vpx_avg_4x4_msa), - make_tuple(16, 16, 5, 4, &vpx_avg_4x4_msa), - make_tuple(32, 32, 15, 4, &vpx_avg_4x4_msa))); + ::testing::Values(make_tuple(16, 16, 0, 8, &aom_avg_8x8_msa), + make_tuple(16, 16, 5, 8, &aom_avg_8x8_msa), + make_tuple(32, 32, 15, 8, &aom_avg_8x8_msa), + make_tuple(16, 16, 0, 4, &aom_avg_4x4_msa), + make_tuple(16, 16, 5, 4, &aom_avg_4x4_msa), + make_tuple(32, 32, 15, 4, &aom_avg_4x4_msa))); #endif } // namespace diff --git a/test/boolcoder_test.cc b/test/boolcoder_test.cc index 6aebf2cda6ab99ab53616df6f2e9c928e7d67ec3..18d5c02125f65636a9ed9137f8dd02604e59d42d 100644 --- a/test/boolcoder_test.cc +++ b/test/boolcoder_test.cc @@ -15,7 +15,7 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/acm_random.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_dsp/bitreader.h" #include "aom_dsp/bitwriter.h" @@ -60,9 +60,9 @@ TEST(VP10, TestBitIO) { const int random_seed = 6432; const int kBufferSize = 10000; ACMRandom bit_rnd(random_seed); - vpx_writer bw; + aom_writer bw; uint8_t bw_buffer[kBufferSize]; - vpx_start_encode(&bw, bw_buffer); + aom_start_encode(&bw, bw_buffer); int bit = (bit_method == 0) ? 0 : (bit_method == 1) ? 1 : 0; for (int i = 0; i < kBitsToTest; ++i) { @@ -71,16 +71,16 @@ TEST(VP10, TestBitIO) { } else if (bit_method == 3) { bit = bit_rnd(2); } - vpx_write(&bw, bit, static_cast<int>(probas[i])); + aom_write(&bw, bit, static_cast<int>(probas[i])); } - vpx_stop_encode(&bw); + aom_stop_encode(&bw); // First bit should be zero GTEST_ASSERT_EQ(bw_buffer[0] & 0x80, 0); - vpx_reader br; - vpx_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL); + aom_reader br; + aom_reader_init(&br, bw_buffer, kBufferSize, NULL, NULL); bit_rnd.Reset(random_seed); for (int i = 0; i < kBitsToTest; ++i) { if (bit_method == 2) { @@ -88,7 +88,7 @@ TEST(VP10, TestBitIO) { } else if (bit_method == 3) { bit = bit_rnd(2); } - GTEST_ASSERT_EQ(vpx_read(&br, probas[i]), bit) + GTEST_ASSERT_EQ(aom_read(&br, probas[i]), bit) << "pos: " << i << " / " << kBitsToTest << " bit_method: " << bit_method << " method: " << method; } diff --git a/test/borders_test.cc b/test/borders_test.cc index 0c6155cc469b32a8828fea5b2b14580034b108ef..7fad160afe3a3e6ff196e55d3e850e21d03b782e 100644 --- a/test/borders_test.cc +++ b/test/borders_test.cc @@ -40,7 +40,7 @@ class BordersTest } } - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) { } } diff --git a/test/clear_system_state.h b/test/clear_system_state.h index 2d7ffdc71de4fb3cc44dffd707e24391fe9a1285..4f3c1eed0774301aeb586fc1258cbc53d87d7885 100644 --- a/test/clear_system_state.h +++ b/test/clear_system_state.h @@ -11,7 +11,7 @@ #ifndef TEST_CLEAR_SYSTEM_STATE_H_ #define TEST_CLEAR_SYSTEM_STATE_H_ -#include "./vpx_config.h" +#include "./aom_config.h" #if ARCH_X86 || ARCH_X86_64 #include "aom_ports/x86.h" #endif @@ -22,7 +22,7 @@ namespace libaom_test { // test cases. inline void ClearSystemState() { #if ARCH_X86 || ARCH_X86_64 - vpx_reset_mmx_state(); + aom_reset_mmx_state(); #endif } diff --git a/test/codec_factory.h b/test/codec_factory.h index 14524b7eca5c10fcc5f75728a43e2e9ae714cf3e..db65ac35e2045aafd5b35114fda8c7f8b2b895da 100644 --- a/test/codec_factory.h +++ b/test/codec_factory.h @@ -11,9 +11,9 @@ #ifndef TEST_CODEC_FACTORY_H_ #define TEST_CODEC_FACTORY_H_ -#include "./vpx_config.h" -#include "aom/vpx_decoder.h" -#include "aom/vpx_encoder.h" +#include "./aom_config.h" +#include "aom/aom_decoder.h" +#include "aom/aom_encoder.h" #if CONFIG_VP10_ENCODER #include "aom/vp8cx.h" #endif @@ -33,20 +33,20 @@ class CodecFactory { virtual ~CodecFactory() {} - virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg, + virtual Decoder* CreateDecoder(aom_codec_dec_cfg_t cfg, unsigned long deadline) const = 0; - virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg, - const vpx_codec_flags_t flags, + virtual Decoder* CreateDecoder(aom_codec_dec_cfg_t cfg, + const aom_codec_flags_t flags, unsigned long deadline) // NOLINT(runtime/int) const = 0; - virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg, + virtual Encoder* CreateEncoder(aom_codec_enc_cfg_t cfg, unsigned long deadline, const unsigned long init_flags, TwopassStatsStore* stats) const = 0; - virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t* cfg, + virtual aom_codec_err_t DefaultEncoderConfig(aom_codec_enc_cfg_t* cfg, int usage) const = 0; }; @@ -75,17 +75,17 @@ class CodecTestWith3Params #if CONFIG_VP10 class VP10Decoder : public Decoder { public: - VP10Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline) + VP10Decoder(aom_codec_dec_cfg_t cfg, unsigned long deadline) : Decoder(cfg, deadline) {} - VP10Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag, + VP10Decoder(aom_codec_dec_cfg_t cfg, const aom_codec_flags_t flag, unsigned long deadline) // NOLINT : Decoder(cfg, flag, deadline) {} protected: - virtual vpx_codec_iface_t* CodecInterface() const { + virtual aom_codec_iface_t* CodecInterface() const { #if CONFIG_VP10_DECODER - return &vpx_codec_vp10_dx_algo; + return &aom_codec_vp10_dx_algo; #else return NULL; #endif @@ -94,14 +94,14 @@ class VP10Decoder : public Decoder { class VP10Encoder : public Encoder { public: - VP10Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline, + VP10Encoder(aom_codec_enc_cfg_t cfg, unsigned long deadline, const unsigned long init_flags, TwopassStatsStore* stats) : Encoder(cfg, deadline, init_flags, stats) {} protected: - virtual vpx_codec_iface_t* CodecInterface() const { + virtual aom_codec_iface_t* CodecInterface() const { #if CONFIG_VP10_ENCODER - return &vpx_codec_vp10_cx_algo; + return &aom_codec_vp10_cx_algo; #else return NULL; #endif @@ -112,13 +112,13 @@ class VP10CodecFactory : public CodecFactory { public: VP10CodecFactory() : CodecFactory() {} - virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg, + virtual Decoder* CreateDecoder(aom_codec_dec_cfg_t cfg, unsigned long deadline) const { return CreateDecoder(cfg, 0, deadline); } - virtual Decoder* CreateDecoder(vpx_codec_dec_cfg_t cfg, - const vpx_codec_flags_t flags, + virtual Decoder* CreateDecoder(aom_codec_dec_cfg_t cfg, + const aom_codec_flags_t flags, unsigned long deadline) const { // NOLINT #if CONFIG_VP10_DECODER return new VP10Decoder(cfg, flags, deadline); @@ -127,7 +127,7 @@ class VP10CodecFactory : public CodecFactory { #endif } - virtual Encoder* CreateEncoder(vpx_codec_enc_cfg_t cfg, + virtual Encoder* CreateEncoder(aom_codec_enc_cfg_t cfg, unsigned long deadline, const unsigned long init_flags, TwopassStatsStore* stats) const { @@ -138,10 +138,10 @@ class VP10CodecFactory : public CodecFactory { #endif } - virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t* cfg, + virtual aom_codec_err_t DefaultEncoderConfig(aom_codec_enc_cfg_t* cfg, int usage) const { #if CONFIG_VP10_ENCODER - return vpx_codec_enc_config_default(&vpx_codec_vp10_cx_algo, cfg, usage); + return aom_codec_enc_config_default(&aom_codec_vp10_cx_algo, cfg, usage); #else return VPX_CODEC_INCAPABLE; #endif diff --git a/test/convolve_test.cc b/test/convolve_test.cc index 54537dc57fc61e5885d8f08019655d52246ecafc..004e2e2fc3802ffe00a97ccd8e474c8d261aa3da 100644 --- a/test/convolve_test.cc +++ b/test/convolve_test.cc @@ -12,18 +12,18 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/common.h" #include "av1/common/filter.h" -#include "aom_dsp/vpx_dsp_common.h" -#include "aom_dsp/vpx_filter.h" -#include "aom_mem/vpx_mem.h" +#include "aom_dsp/aom_dsp_common.h" +#include "aom_dsp/aom_filter.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" namespace { @@ -273,38 +273,38 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { static void SetUpTestCase() { // Force input_ to be unaligned, output to be 16 byte aligned. input_ = reinterpret_cast<uint8_t *>( - vpx_memalign(kDataAlignment, kInputBufferSize + 1)) + + aom_memalign(kDataAlignment, kInputBufferSize + 1)) + 1; output_ = reinterpret_cast<uint8_t *>( - vpx_memalign(kDataAlignment, kOutputBufferSize)); + aom_memalign(kDataAlignment, kOutputBufferSize)); output_ref_ = reinterpret_cast<uint8_t *>( - vpx_memalign(kDataAlignment, kOutputBufferSize)); + aom_memalign(kDataAlignment, kOutputBufferSize)); #if CONFIG_VPX_HIGHBITDEPTH - input16_ = reinterpret_cast<uint16_t *>(vpx_memalign( + input16_ = reinterpret_cast<uint16_t *>(aom_memalign( kDataAlignment, (kInputBufferSize + 1) * sizeof(uint16_t))) + 1; output16_ = reinterpret_cast<uint16_t *>( - vpx_memalign(kDataAlignment, (kOutputBufferSize) * sizeof(uint16_t))); + aom_memalign(kDataAlignment, (kOutputBufferSize) * sizeof(uint16_t))); output16_ref_ = reinterpret_cast<uint16_t *>( - vpx_memalign(kDataAlignment, (kOutputBufferSize) * sizeof(uint16_t))); + aom_memalign(kDataAlignment, (kOutputBufferSize) * sizeof(uint16_t))); #endif } virtual void TearDown() { libaom_test::ClearSystemState(); } static void TearDownTestCase() { - vpx_free(input_ - 1); + aom_free(input_ - 1); input_ = NULL; - vpx_free(output_); + aom_free(output_); output_ = NULL; - vpx_free(output_ref_); + aom_free(output_ref_); output_ref_ = NULL; #if CONFIG_VPX_HIGHBITDEPTH - vpx_free(input16_ - 1); + aom_free(input16_ - 1); input16_ = NULL; - vpx_free(output16_); + aom_free(output16_); output16_ = NULL; - vpx_free(output16_ref_); + aom_free(output16_ref_); output16_ref_ = NULL; #endif } @@ -367,7 +367,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { void SetConstantInput(int value) { memset(input_, value, kInputBufferSize); #if CONFIG_VPX_HIGHBITDEPTH - vpx_memset16(input16_, value, kInputBufferSize); + aom_memset16(input16_, value, kInputBufferSize); #endif } @@ -900,7 +900,7 @@ using std::tr1::make_tuple; const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \ ptrdiff_t dst_stride, const int16_t *filter_x, int filter_x_stride, \ const int16_t *filter_y, int filter_y_stride, int w, int h) { \ - vpx_highbd_##func(src, src_stride, dst, dst_stride, filter_x, \ + aom_highbd_##func(src, src_stride, dst, dst_stride, filter_x, \ filter_x_stride, filter_y, filter_y_stride, w, h, bd); \ } #if HAVE_SSE2 && ARCH_X86_64 @@ -1013,11 +1013,11 @@ INSTANTIATE_TEST_CASE_P( #else const ConvolveFunctions convolve8_c( - vpx_convolve_copy_c, vpx_convolve_avg_c, vpx_convolve8_horiz_c, - vpx_convolve8_avg_horiz_c, vpx_convolve8_vert_c, vpx_convolve8_avg_vert_c, - vpx_convolve8_c, vpx_convolve8_avg_c, vpx_scaled_horiz_c, - vpx_scaled_avg_horiz_c, vpx_scaled_vert_c, vpx_scaled_avg_vert_c, - vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0); + aom_convolve_copy_c, aom_convolve_avg_c, aom_convolve8_horiz_c, + aom_convolve8_avg_horiz_c, aom_convolve8_vert_c, aom_convolve8_avg_vert_c, + aom_convolve8_c, aom_convolve8_avg_c, aom_scaled_horiz_c, + aom_scaled_avg_horiz_c, aom_scaled_vert_c, aom_scaled_avg_vert_c, + aom_scaled_2d_c, aom_scaled_avg_2d_c, 0); INSTANTIATE_TEST_CASE_P( C, ConvolveTest, @@ -1106,15 +1106,15 @@ INSTANTIATE_TEST_CASE_P( #else const ConvolveFunctions convolve8_sse2( #if CONFIG_USE_X86INC - vpx_convolve_copy_sse2, vpx_convolve_avg_sse2, + aom_convolve_copy_sse2, aom_convolve_avg_sse2, #else - vpx_convolve_copy_c, vpx_convolve_avg_c, + aom_convolve_copy_c, aom_convolve_avg_c, #endif // CONFIG_USE_X86INC - vpx_convolve8_horiz_sse2, vpx_convolve8_avg_horiz_sse2, - vpx_convolve8_vert_sse2, vpx_convolve8_avg_vert_sse2, vpx_convolve8_sse2, - vpx_convolve8_avg_sse2, vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, - vpx_scaled_vert_c, vpx_scaled_avg_vert_c, vpx_scaled_2d_c, - vpx_scaled_avg_2d_c, 0); + aom_convolve8_horiz_sse2, aom_convolve8_avg_horiz_sse2, + aom_convolve8_vert_sse2, aom_convolve8_avg_vert_sse2, aom_convolve8_sse2, + aom_convolve8_avg_sse2, aom_scaled_horiz_c, aom_scaled_avg_horiz_c, + aom_scaled_vert_c, aom_scaled_avg_vert_c, aom_scaled_2d_c, + aom_scaled_avg_2d_c, 0); INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values(make_tuple(4, 4, &convolve8_sse2), @@ -1135,11 +1135,11 @@ INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, #if HAVE_SSSE3 const ConvolveFunctions convolve8_ssse3( - vpx_convolve_copy_c, vpx_convolve_avg_c, vpx_convolve8_horiz_ssse3, - vpx_convolve8_avg_horiz_ssse3, vpx_convolve8_vert_ssse3, - vpx_convolve8_avg_vert_ssse3, vpx_convolve8_ssse3, vpx_convolve8_avg_ssse3, - vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, vpx_scaled_vert_c, - vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0); + aom_convolve_copy_c, aom_convolve_avg_c, aom_convolve8_horiz_ssse3, + aom_convolve8_avg_horiz_ssse3, aom_convolve8_vert_ssse3, + aom_convolve8_avg_vert_ssse3, aom_convolve8_ssse3, aom_convolve8_avg_ssse3, + aom_scaled_horiz_c, aom_scaled_avg_horiz_c, aom_scaled_vert_c, + aom_scaled_avg_vert_c, aom_scaled_2d_c, aom_scaled_avg_2d_c, 0); INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest, ::testing::Values(make_tuple(4, 4, &convolve8_ssse3), @@ -1160,11 +1160,11 @@ INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest, #if HAVE_AVX2 && HAVE_SSSE3 const ConvolveFunctions convolve8_avx2( - vpx_convolve_copy_c, vpx_convolve_avg_c, vpx_convolve8_horiz_avx2, - vpx_convolve8_avg_horiz_ssse3, vpx_convolve8_vert_avx2, - vpx_convolve8_avg_vert_ssse3, vpx_convolve8_avx2, vpx_convolve8_avg_ssse3, - vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, vpx_scaled_vert_c, - vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0); + aom_convolve_copy_c, aom_convolve_avg_c, aom_convolve8_horiz_avx2, + aom_convolve8_avg_horiz_ssse3, aom_convolve8_vert_avx2, + aom_convolve8_avg_vert_ssse3, aom_convolve8_avx2, aom_convolve8_avg_ssse3, + aom_scaled_horiz_c, aom_scaled_avg_horiz_c, aom_scaled_vert_c, + aom_scaled_avg_vert_c, aom_scaled_2d_c, aom_scaled_avg_2d_c, 0); INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest, ::testing::Values(make_tuple(4, 4, &convolve8_avx2), @@ -1185,18 +1185,18 @@ INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest, #if HAVE_NEON #if HAVE_NEON_ASM const ConvolveFunctions convolve8_neon( - vpx_convolve_copy_neon, vpx_convolve_avg_neon, vpx_convolve8_horiz_neon, - vpx_convolve8_avg_horiz_neon, vpx_convolve8_vert_neon, - vpx_convolve8_avg_vert_neon, vpx_convolve8_neon, vpx_convolve8_avg_neon, - vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, vpx_scaled_vert_c, - vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0); + aom_convolve_copy_neon, aom_convolve_avg_neon, aom_convolve8_horiz_neon, + aom_convolve8_avg_horiz_neon, aom_convolve8_vert_neon, + aom_convolve8_avg_vert_neon, aom_convolve8_neon, aom_convolve8_avg_neon, + aom_scaled_horiz_c, aom_scaled_avg_horiz_c, aom_scaled_vert_c, + aom_scaled_avg_vert_c, aom_scaled_2d_c, aom_scaled_avg_2d_c, 0); #else // HAVE_NEON const ConvolveFunctions convolve8_neon( - vpx_convolve_copy_neon, vpx_convolve_avg_neon, vpx_convolve8_horiz_neon, - vpx_convolve8_avg_horiz_neon, vpx_convolve8_vert_neon, - vpx_convolve8_avg_vert_neon, vpx_convolve8_neon, vpx_convolve8_avg_neon, - vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, vpx_scaled_vert_c, - vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0); + aom_convolve_copy_neon, aom_convolve_avg_neon, aom_convolve8_horiz_neon, + aom_convolve8_avg_horiz_neon, aom_convolve8_vert_neon, + aom_convolve8_avg_vert_neon, aom_convolve8_neon, aom_convolve8_avg_neon, + aom_scaled_horiz_c, aom_scaled_avg_horiz_c, aom_scaled_vert_c, + aom_scaled_avg_vert_c, aom_scaled_2d_c, aom_scaled_avg_2d_c, 0); #endif // HAVE_NEON_ASM INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest, @@ -1217,11 +1217,11 @@ INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest, #if HAVE_DSPR2 const ConvolveFunctions convolve8_dspr2( - vpx_convolve_copy_dspr2, vpx_convolve_avg_dspr2, vpx_convolve8_horiz_dspr2, - vpx_convolve8_avg_horiz_dspr2, vpx_convolve8_vert_dspr2, - vpx_convolve8_avg_vert_dspr2, vpx_convolve8_dspr2, vpx_convolve8_avg_dspr2, - vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, vpx_scaled_vert_c, - vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0); + aom_convolve_copy_dspr2, aom_convolve_avg_dspr2, aom_convolve8_horiz_dspr2, + aom_convolve8_avg_horiz_dspr2, aom_convolve8_vert_dspr2, + aom_convolve8_avg_vert_dspr2, aom_convolve8_dspr2, aom_convolve8_avg_dspr2, + aom_scaled_horiz_c, aom_scaled_avg_horiz_c, aom_scaled_vert_c, + aom_scaled_avg_vert_c, aom_scaled_2d_c, aom_scaled_avg_2d_c, 0); INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest, ::testing::Values(make_tuple(4, 4, &convolve8_dspr2), @@ -1242,11 +1242,11 @@ INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest, #if HAVE_MSA const ConvolveFunctions convolve8_msa( - vpx_convolve_copy_msa, vpx_convolve_avg_msa, vpx_convolve8_horiz_msa, - vpx_convolve8_avg_horiz_msa, vpx_convolve8_vert_msa, - vpx_convolve8_avg_vert_msa, vpx_convolve8_msa, vpx_convolve8_avg_msa, - vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, vpx_scaled_vert_c, - vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0); + aom_convolve_copy_msa, aom_convolve_avg_msa, aom_convolve8_horiz_msa, + aom_convolve8_avg_horiz_msa, aom_convolve8_vert_msa, + aom_convolve8_avg_vert_msa, aom_convolve8_msa, aom_convolve8_avg_msa, + aom_scaled_horiz_c, aom_scaled_avg_horiz_c, aom_scaled_vert_c, + aom_scaled_avg_vert_c, aom_scaled_2d_c, aom_scaled_avg_2d_c, 0); INSTANTIATE_TEST_CASE_P( MSA, ConvolveTest, diff --git a/test/cpu_speed_test.cc b/test/cpu_speed_test.cc index 7103fbff37a36b026b06b322be98c6390fa4c805..a5339b7687fb52be59238eb122b515991f72dd42 100644 --- a/test/cpu_speed_test.cc +++ b/test/cpu_speed_test.cc @@ -54,7 +54,7 @@ class CpuSpeedTest } } - virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void PSNRPktHook(const aom_codec_cx_pkt_t *pkt) { if (pkt->data.psnr.psnr[0] < min_psnr_) min_psnr_ = pkt->data.psnr.psnr[0]; } diff --git a/test/datarate_test.cc b/test/datarate_test.cc index 5e718a6e498778f03607bd9dee74bca5d6f6d3bd..2aa7a049533289c23e1d6a1aa52645daf79ae54d 100644 --- a/test/datarate_test.cc +++ b/test/datarate_test.cc @@ -7,14 +7,14 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#include "./vpx_config.h" +#include "./aom_config.h" #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/codec_factory.h" #include "test/encode_test_driver.h" #include "test/i420_video_source.h" #include "test/util.h" #include "test/y4m_video_source.h" -#include "aom/vpx_codec.h" +#include "aom/aom_codec.h" namespace { @@ -59,14 +59,14 @@ class DatarateTestLarge encoder->Control(VP8E_SET_NOISE_SENSITIVITY, denoiser_on_); } - const vpx_rational_t tb = video->timebase(); + const aom_rational_t tb = video->timebase(); timebase_ = static_cast<double>(tb.num) / tb.den; duration_ = 0; } - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { // Time since last timestamp = duration. - vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_; + aom_codec_pts_t duration = pkt->data.frame.pts - last_pts_; // TODO(jimbankoski): Remove these lines when the issue: // http://code.google.com/p/webm/issues/detail?id=496 is fixed. @@ -125,11 +125,11 @@ class DatarateTestLarge } } - vpx_codec_pts_t last_pts_; + aom_codec_pts_t last_pts_; int64_t bits_in_buffer_model_; double timebase_; int frame_number_; - vpx_codec_pts_t first_drop_; + aom_codec_pts_t first_drop_; int64_t bits_total_; double duration_; double file_datarate_; @@ -242,7 +242,7 @@ TEST_P(DatarateTestLarge, ChangingDropFrameThresh) { // as the drop frame threshold is increased. const int kDropFrameThreshTestStep = 30; - vpx_codec_pts_t last_drop = frame_count; + aom_codec_pts_t last_drop = frame_count; for (int i = 1; i < 91; i += kDropFrameThreshTestStep) { cfg_.rc_dropframe_thresh = i; ResetModel(); @@ -370,21 +370,21 @@ class DatarateTestVP9Large if (video->frame() == 0) { encoder->Control(VP9E_SET_SVC, 1); } - vpx_svc_layer_id_t layer_id; + aom_svc_layer_id_t layer_id; layer_id.spatial_layer_id = 0; frame_flags_ = SetFrameFlags(video->frame(), cfg_.ts_number_layers); layer_id.temporal_layer_id = SetLayerId(video->frame(), cfg_.ts_number_layers); encoder->Control(VP9E_SET_SVC_LAYER_ID, &layer_id); } - const vpx_rational_t tb = video->timebase(); + const aom_rational_t tb = video->timebase(); timebase_ = static_cast<double>(tb.num) / tb.den; duration_ = 0; } - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { // Time since last timestamp = duration. - vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_; + aom_codec_pts_t duration = pkt->data.frame.pts - last_pts_; if (duration > 1) { // If first drop not set and we have a drop set it to this time. @@ -431,7 +431,7 @@ class DatarateTestVP9Large } } - vpx_codec_pts_t last_pts_; + aom_codec_pts_t last_pts_; double timebase_; int frame_number_; // Counter for number of non-dropped/encoded frames. int tot_frame_number_; // Counter for total number of input frames. @@ -440,7 +440,7 @@ class DatarateTestVP9Large double effective_datarate_[3]; int set_cpu_used_; int64_t bits_in_buffer_model_; - vpx_codec_pts_t first_drop_; + aom_codec_pts_t first_drop_; int num_drops_; int denoiser_on_; int denoiser_offon_test_; @@ -521,7 +521,7 @@ TEST_P(DatarateTestVP9Large, ChangingDropFrameThresh) { 30, 1, 0, 140); const int kDropFrameThreshTestStep = 30; - vpx_codec_pts_t last_drop = 140; + aom_codec_pts_t last_drop = 140; int last_num_drops = 0; for (int i = 10; i < 100; i += kDropFrameThreshTestStep) { cfg_.rc_dropframe_thresh = i; @@ -723,12 +723,12 @@ class DatarateOnePassCbrSvc encoder->Control(VP8E_SET_MAX_INTRA_BITRATE_PCT, 300); encoder->Control(VP9E_SET_TILE_COLUMNS, (cfg_.g_threads >> 1)); } - const vpx_rational_t tb = video->timebase(); + const aom_rational_t tb = video->timebase(); timebase_ = static_cast<double>(tb.num) / tb.den; duration_ = 0; } - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { - vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_; + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { + aom_codec_pts_t duration = pkt->data.frame.pts - last_pts_; if (last_pts_ == 0) duration = 1; bits_in_buffer_model_ += static_cast<int64_t>( duration * timebase_ * cfg_.rc_target_bitrate * 1000); @@ -756,7 +756,7 @@ class DatarateOnePassCbrSvc } } - virtual void MismatchHook(const vpx_image_t *img1, const vpx_image_t *img2) { + virtual void MismatchHook(const aom_image_t *img1, const aom_image_t *img2) { double mismatch_psnr = compute_psnr(img1, img2); mismatch_psnr_ += mismatch_psnr; ++mismatch_nframes_; @@ -764,23 +764,23 @@ class DatarateOnePassCbrSvc unsigned int GetMismatchFrames() { return mismatch_nframes_; } - vpx_codec_pts_t last_pts_; + aom_codec_pts_t last_pts_; int64_t bits_in_buffer_model_; double timebase_; int frame_number_; - vpx_codec_pts_t first_drop_; + aom_codec_pts_t first_drop_; int64_t bits_total_; double duration_; double file_datarate_; double effective_datarate_; size_t bits_in_last_frame_; - vpx_svc_extra_cfg_t svc_params_; + aom_svc_extra_cfg_t svc_params_; int speed_setting_; double mismatch_psnr_; int mismatch_nframes_; }; -static void assign_layer_bitrates(vpx_codec_enc_cfg_t *const enc_cfg, - const vpx_svc_extra_cfg_t *svc_params, +static void assign_layer_bitrates(aom_codec_enc_cfg_t *const enc_cfg, + const aom_svc_extra_cfg_t *svc_params, int spatial_layers, int temporal_layers, int temporal_layering_mode, unsigned int total_rate) { diff --git a/test/dct16x16_test.cc b/test/dct16x16_test.cc index ae38aaa7cee24426debbdb72686de576d42688b1..e662592c5efab3365e5464b1b3f650f3f67e352c 100644 --- a/test/dct16x16_test.cc +++ b/test/dct16x16_test.cc @@ -15,15 +15,15 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/entropy.h" #include "av1/common/scan.h" -#include "aom/vpx_codec.h" -#include "aom/vpx_integer.h" +#include "aom/aom_codec.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" using libaom_test::ACMRandom; @@ -237,19 +237,19 @@ typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride, typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride, int tx_type); -typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct16x16Param; -typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht16x16Param; -typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t> +typedef std::tr1::tuple<FdctFunc, IdctFunc, int, aom_bit_depth_t> Dct16x16Param; +typedef std::tr1::tuple<FhtFunc, IhtFunc, int, aom_bit_depth_t> Ht16x16Param; +typedef std::tr1::tuple<IdctFunc, IdctFunc, int, aom_bit_depth_t> Idct16x16Param; void fdct16x16_ref(const int16_t *in, tran_low_t *out, int stride, int /*tx_type*/) { - vpx_fdct16x16_c(in, out, stride); + aom_fdct16x16_c(in, out, stride); } void idct16x16_ref(const tran_low_t *in, uint8_t *dest, int stride, int /*tx_type*/) { - vpx_idct16x16_256_add_c(in, dest, stride); + aom_idct16x16_256_add_c(in, dest, stride); } void fht16x16_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { @@ -263,11 +263,11 @@ void iht16x16_ref(const tran_low_t *in, uint8_t *dest, int stride, #if CONFIG_VPX_HIGHBITDEPTH void idct16x16_10(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct16x16_256_add_c(in, out, stride, 10); + aom_highbd_idct16x16_256_add_c(in, out, stride, 10); } void idct16x16_12(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct16x16_256_add_c(in, out, stride, 12); + aom_highbd_idct16x16_256_add_c(in, out, stride, 12); } void idct16x16_10_ref(const tran_low_t *in, uint8_t *out, int stride, @@ -289,28 +289,28 @@ void iht16x16_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { } void idct16x16_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct16x16_10_add_c(in, out, stride, 10); + aom_highbd_idct16x16_10_add_c(in, out, stride, 10); } void idct16x16_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct16x16_10_add_c(in, out, stride, 12); + aom_highbd_idct16x16_10_add_c(in, out, stride, 12); } #if HAVE_SSE2 void idct16x16_256_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct16x16_256_add_sse2(in, out, stride, 10); + aom_highbd_idct16x16_256_add_sse2(in, out, stride, 10); } void idct16x16_256_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct16x16_256_add_sse2(in, out, stride, 12); + aom_highbd_idct16x16_256_add_sse2(in, out, stride, 12); } void idct16x16_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct16x16_10_add_sse2(in, out, stride, 10); + aom_highbd_idct16x16_10_add_sse2(in, out, stride, 10); } void idct16x16_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct16x16_10_add_sse2(in, out, stride, 12); + aom_highbd_idct16x16_10_add_sse2(in, out, stride, 12); } #endif // HAVE_SSE2 #endif // CONFIG_VPX_HIGHBITDEPTH @@ -610,7 +610,7 @@ class Trans16x16TestBase { int pitch_; int tx_type_; - vpx_bit_depth_t bit_depth_; + aom_bit_depth_t bit_depth_; int mask_; FhtFunc fwd_txfm_ref; IhtFunc inv_txfm_ref; @@ -754,13 +754,13 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P( C, Trans16x16DCT, ::testing::Values( - make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_10, 0, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_12, 0, VPX_BITS_12), - make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, 0, VPX_BITS_8))); + make_tuple(&aom_highbd_fdct16x16_c, &idct16x16_10, 0, VPX_BITS_10), + make_tuple(&aom_highbd_fdct16x16_c, &idct16x16_12, 0, VPX_BITS_12), + make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, 0, VPX_BITS_8))); #else INSTANTIATE_TEST_CASE_P(C, Trans16x16DCT, - ::testing::Values(make_tuple(&vpx_fdct16x16_c, - &vpx_idct16x16_256_add_c, + ::testing::Values(make_tuple(&aom_fdct16x16_c, + &aom_idct16x16_256_add_c, 0, VPX_BITS_8))); #endif // CONFIG_VPX_HIGHBITDEPTH @@ -793,15 +793,15 @@ INSTANTIATE_TEST_CASE_P( #if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( NEON, Trans16x16DCT, - ::testing::Values(make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_neon, + ::testing::Values(make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_neon, 0, VPX_BITS_8))); #endif #if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( SSE2, Trans16x16DCT, - ::testing::Values(make_tuple(&vpx_fdct16x16_sse2, - &vpx_idct16x16_256_add_sse2, 0, VPX_BITS_8))); + ::testing::Values(make_tuple(&aom_fdct16x16_sse2, + &aom_idct16x16_256_add_sse2, 0, VPX_BITS_8))); INSTANTIATE_TEST_CASE_P( SSE2, Trans16x16HT, ::testing::Values(make_tuple(&vp10_fht16x16_sse2, @@ -818,13 +818,13 @@ INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P( SSE2, Trans16x16DCT, ::testing::Values( - make_tuple(&vpx_highbd_fdct16x16_sse2, &idct16x16_10, 0, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_256_add_10_sse2, 0, + make_tuple(&aom_highbd_fdct16x16_sse2, &idct16x16_10, 0, VPX_BITS_10), + make_tuple(&aom_highbd_fdct16x16_c, &idct16x16_256_add_10_sse2, 0, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct16x16_sse2, &idct16x16_12, 0, VPX_BITS_12), - make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_256_add_12_sse2, 0, + make_tuple(&aom_highbd_fdct16x16_sse2, &idct16x16_12, 0, VPX_BITS_12), + make_tuple(&aom_highbd_fdct16x16_c, &idct16x16_256_add_12_sse2, 0, VPX_BITS_12), - make_tuple(&vpx_fdct16x16_sse2, &vpx_idct16x16_256_add_c, 0, + make_tuple(&aom_fdct16x16_sse2, &aom_idct16x16_256_add_c, 0, VPX_BITS_8))); INSTANTIATE_TEST_CASE_P( SSE2, Trans16x16HT, @@ -852,8 +852,8 @@ INSTANTIATE_TEST_CASE_P( #if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P(MSA, Trans16x16DCT, - ::testing::Values(make_tuple(&vpx_fdct16x16_msa, - &vpx_idct16x16_256_add_msa, + ::testing::Values(make_tuple(&aom_fdct16x16_msa, + &aom_idct16x16_256_add_msa, 0, VPX_BITS_8))); INSTANTIATE_TEST_CASE_P( MSA, Trans16x16HT, diff --git a/test/dct32x32_test.cc b/test/dct32x32_test.cc index 2cdfb909f6e4f13b9cc42ef646ffdc3d04de158d..466076b0268a26c97676180c3b08262bdeab7b35 100644 --- a/test/dct32x32_test.cc +++ b/test/dct32x32_test.cc @@ -15,15 +15,15 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "./av1_rtcd.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/entropy.h" -#include "aom/vpx_codec.h" -#include "aom/vpx_integer.h" +#include "aom/aom_codec.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" using libaom_test::ACMRandom; @@ -72,20 +72,20 @@ void reference_32x32_dct_2d(const int16_t input[kNumCoeffs], typedef void (*FwdTxfmFunc)(const int16_t *in, tran_low_t *out, int stride); typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride); -typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t> +typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, aom_bit_depth_t> Trans32x32Param; #if CONFIG_VPX_HIGHBITDEPTH void idct32x32_8(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct32x32_1024_add_c(in, out, stride, 8); + aom_highbd_idct32x32_1024_add_c(in, out, stride, 8); } void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct32x32_1024_add_c(in, out, stride, 10); + aom_highbd_idct32x32_1024_add_c(in, out, stride, 10); } void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct32x32_1024_add_c(in, out, stride, 12); + aom_highbd_idct32x32_1024_add_c(in, out, stride, 12); } #endif // CONFIG_VPX_HIGHBITDEPTH @@ -105,7 +105,7 @@ class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> { protected: int version_; - vpx_bit_depth_t bit_depth_; + aom_bit_depth_t bit_depth_; int mask_; FwdTxfmFunc fwd_txfm_; InvTxfmFunc inv_txfm_; @@ -189,7 +189,7 @@ TEST_P(Trans32x32Test, CoeffCheck) { input_block[j] = (rnd.Rand16() & mask_) - (rnd.Rand16() & mask_); const int stride = 32; - vpx_fdct32x32_c(input_block, output_ref_block, stride); + aom_fdct32x32_c(input_block, output_ref_block, stride); ASM_REGISTER_STATE_CHECK(fwd_txfm_(input_block, output_block, stride)); if (version_ == 0) { @@ -224,7 +224,7 @@ TEST_P(Trans32x32Test, MemCheck) { } const int stride = 32; - vpx_fdct32x32_c(input_extreme_block, output_ref_block, stride); + aom_fdct32x32_c(input_extreme_block, output_ref_block, stride); ASM_REGISTER_STATE_CHECK( fwd_txfm_(input_extreme_block, output_block, stride)); @@ -306,71 +306,71 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P( C, Trans32x32Test, ::testing::Values( - make_tuple(&vpx_highbd_fdct32x32_c, &idct32x32_10, 0, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct32x32_rd_c, &idct32x32_10, 1, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct32x32_c, &idct32x32_12, 0, VPX_BITS_12), - make_tuple(&vpx_highbd_fdct32x32_rd_c, &idct32x32_12, 1, VPX_BITS_12), - make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c, 0, VPX_BITS_8), - make_tuple(&vpx_fdct32x32_rd_c, &vpx_idct32x32_1024_add_c, 1, + make_tuple(&aom_highbd_fdct32x32_c, &idct32x32_10, 0, VPX_BITS_10), + make_tuple(&aom_highbd_fdct32x32_rd_c, &idct32x32_10, 1, VPX_BITS_10), + make_tuple(&aom_highbd_fdct32x32_c, &idct32x32_12, 0, VPX_BITS_12), + make_tuple(&aom_highbd_fdct32x32_rd_c, &idct32x32_12, 1, VPX_BITS_12), + make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, 0, VPX_BITS_8), + make_tuple(&aom_fdct32x32_rd_c, &aom_idct32x32_1024_add_c, 1, VPX_BITS_8))); #else INSTANTIATE_TEST_CASE_P( C, Trans32x32Test, - ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c, 0, + ::testing::Values(make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, 0, VPX_BITS_8), - make_tuple(&vpx_fdct32x32_rd_c, &vpx_idct32x32_1024_add_c, + make_tuple(&aom_fdct32x32_rd_c, &aom_idct32x32_1024_add_c, 1, VPX_BITS_8))); #endif // CONFIG_VPX_HIGHBITDEPTH #if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( NEON, Trans32x32Test, - ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_neon, + ::testing::Values(make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_neon, 0, VPX_BITS_8), - make_tuple(&vpx_fdct32x32_rd_c, - &vpx_idct32x32_1024_add_neon, 1, VPX_BITS_8))); + make_tuple(&aom_fdct32x32_rd_c, + &aom_idct32x32_1024_add_neon, 1, VPX_BITS_8))); #endif // HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE #if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( SSE2, Trans32x32Test, - ::testing::Values(make_tuple(&vpx_fdct32x32_sse2, - &vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8), - make_tuple(&vpx_fdct32x32_rd_sse2, - &vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); + ::testing::Values(make_tuple(&aom_fdct32x32_sse2, + &aom_idct32x32_1024_add_sse2, 0, VPX_BITS_8), + make_tuple(&aom_fdct32x32_rd_sse2, + &aom_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); #endif // HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE #if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( SSE2, Trans32x32Test, ::testing::Values( - make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1, + make_tuple(&aom_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10), + make_tuple(&aom_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12), - make_tuple(&vpx_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1, + make_tuple(&aom_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12), + make_tuple(&aom_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1, VPX_BITS_12), - make_tuple(&vpx_fdct32x32_sse2, &vpx_idct32x32_1024_add_c, 0, + make_tuple(&aom_fdct32x32_sse2, &aom_idct32x32_1024_add_c, 0, VPX_BITS_8), - make_tuple(&vpx_fdct32x32_rd_sse2, &vpx_idct32x32_1024_add_c, 1, + make_tuple(&aom_fdct32x32_rd_sse2, &aom_idct32x32_1024_add_c, 1, VPX_BITS_8))); #endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE #if HAVE_AVX2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( AVX2, Trans32x32Test, - ::testing::Values(make_tuple(&vpx_fdct32x32_avx2, - &vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8), - make_tuple(&vpx_fdct32x32_rd_avx2, - &vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); + ::testing::Values(make_tuple(&aom_fdct32x32_avx2, + &aom_idct32x32_1024_add_sse2, 0, VPX_BITS_8), + make_tuple(&aom_fdct32x32_rd_avx2, + &aom_idct32x32_1024_add_sse2, 1, VPX_BITS_8))); #endif // HAVE_AVX2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE #if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( MSA, Trans32x32Test, - ::testing::Values(make_tuple(&vpx_fdct32x32_msa, - &vpx_idct32x32_1024_add_msa, 0, VPX_BITS_8), - make_tuple(&vpx_fdct32x32_rd_msa, - &vpx_idct32x32_1024_add_msa, 1, VPX_BITS_8))); + ::testing::Values(make_tuple(&aom_fdct32x32_msa, + &aom_idct32x32_1024_add_msa, 0, VPX_BITS_8), + make_tuple(&aom_fdct32x32_rd_msa, + &aom_idct32x32_1024_add_msa, 1, VPX_BITS_8))); #endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE } // namespace diff --git a/test/decode_api_test.cc b/test/decode_api_test.cc index 6aceaba3afa5ca907f00fe626d84eb606bd867df..1fc083c9b5aba8267fd4da934dd1b0813f871988 100644 --- a/test/decode_api_test.cc +++ b/test/decode_api_test.cc @@ -10,47 +10,47 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "test/ivf_video_source.h" #include "aom/vp8dx.h" -#include "aom/vpx_decoder.h" +#include "aom/aom_decoder.h" namespace { #define NELEMENTS(x) static_cast<int>(sizeof(x) / sizeof(x[0])) TEST(DecodeAPI, InvalidParams) { - static const vpx_codec_iface_t *kCodecs[] = { + static const aom_codec_iface_t *kCodecs[] = { #if CONFIG_VP10_DECODER - &vpx_codec_vp10_dx_algo, + &aom_codec_vp10_dx_algo, #endif }; uint8_t buf[1] = { 0 }; - vpx_codec_ctx_t dec; + aom_codec_ctx_t dec; - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_dec_init(NULL, NULL, NULL, 0)); - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_dec_init(&dec, NULL, NULL, 0)); - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_decode(NULL, NULL, 0, NULL, 0)); - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_decode(NULL, buf, 0, NULL, 0)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_dec_init(NULL, NULL, NULL, 0)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_dec_init(&dec, NULL, NULL, 0)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_decode(NULL, NULL, 0, NULL, 0)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_decode(NULL, buf, 0, NULL, 0)); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, - vpx_codec_decode(NULL, buf, NELEMENTS(buf), NULL, 0)); + aom_codec_decode(NULL, buf, NELEMENTS(buf), NULL, 0)); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, - vpx_codec_decode(NULL, NULL, NELEMENTS(buf), NULL, 0)); - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_destroy(NULL)); - EXPECT_TRUE(vpx_codec_error(NULL) != NULL); + aom_codec_decode(NULL, NULL, NELEMENTS(buf), NULL, 0)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_destroy(NULL)); + EXPECT_TRUE(aom_codec_error(NULL) != NULL); for (int i = 0; i < NELEMENTS(kCodecs); ++i) { EXPECT_EQ(VPX_CODEC_INVALID_PARAM, - vpx_codec_dec_init(NULL, kCodecs[i], NULL, 0)); + aom_codec_dec_init(NULL, kCodecs[i], NULL, 0)); - EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, kCodecs[i], NULL, 0)); + EXPECT_EQ(VPX_CODEC_OK, aom_codec_dec_init(&dec, kCodecs[i], NULL, 0)); EXPECT_EQ(VPX_CODEC_UNSUP_BITSTREAM, - vpx_codec_decode(&dec, buf, NELEMENTS(buf), NULL, 0)); + aom_codec_decode(&dec, buf, NELEMENTS(buf), NULL, 0)); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, - vpx_codec_decode(&dec, NULL, NELEMENTS(buf), NULL, 0)); - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_decode(&dec, buf, 0, NULL, 0)); + aom_codec_decode(&dec, NULL, NELEMENTS(buf), NULL, 0)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_decode(&dec, buf, 0, NULL, 0)); - EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec)); + EXPECT_EQ(VPX_CODEC_OK, aom_codec_destroy(&dec)); } } diff --git a/test/decode_perf_test.cc b/test/decode_perf_test.cc index 9ccfc08ee345ff2b2084eadebe922dfcbf113be8..58dcb4cd6fb6b5016509cc69a852ebcd2d2d1157 100644 --- a/test/decode_perf_test.cc +++ b/test/decode_perf_test.cc @@ -17,9 +17,9 @@ #include "test/md5_helper.h" #include "test/util.h" #include "test/webm_video_source.h" -#include "aom_ports/vpx_timer.h" +#include "aom_ports/aom_timer.h" #include "./ivfenc.h" -#include "./vpx_version.h" +#include "./aom_version.h" using std::tr1::make_tuple; @@ -79,19 +79,19 @@ TEST_P(DecodePerfTest, PerfTest) { libaom_test::WebMVideoSource video(video_name); video.Init(); - vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); + aom_codec_dec_cfg_t cfg = aom_codec_dec_cfg_t(); cfg.threads = threads; libaom_test::VP9Decoder decoder(cfg, 0); - vpx_usec_timer t; - vpx_usec_timer_start(&t); + aom_usec_timer t; + aom_usec_timer_start(&t); for (video.Begin(); video.cxdata() != NULL; video.Next()) { decoder.DecodeFrame(video.cxdata(), video.frame_size()); } - vpx_usec_timer_mark(&t); - const double elapsed_secs = double(vpx_usec_timer_elapsed(&t)) / kUsecsInSec; + aom_usec_timer_mark(&t); + const double elapsed_secs = double(aom_usec_timer_elapsed(&t)) / kUsecsInSec; const unsigned frames = video.frame_number(); const double fps = double(frames) / elapsed_secs; @@ -161,7 +161,7 @@ class VP9NewEncodeDecodePerfTest } } - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { ++out_frames_; // Write initial file header if first frame. @@ -206,7 +206,7 @@ TEST_P(VP9NewEncodeDecodePerfTest, PerfTest) { // TODO(JBB): Make this work by going through the set of given files. const int i = 0; - const vpx_rational timebase = { 33333333, 1000000000 }; + const aom_rational timebase = { 33333333, 1000000000 }; cfg_.g_timebase = timebase; cfg_.rc_target_bitrate = kVP9EncodePerfTestVectors[i].bitrate; @@ -226,21 +226,21 @@ TEST_P(VP9NewEncodeDecodePerfTest, PerfTest) { libaom_test::IVFVideoSource decode_video(kNewEncodeOutputFile); decode_video.Init(); - vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); + aom_codec_dec_cfg_t cfg = aom_codec_dec_cfg_t(); cfg.threads = threads; libaom_test::VP9Decoder decoder(cfg, 0); - vpx_usec_timer t; - vpx_usec_timer_start(&t); + aom_usec_timer t; + aom_usec_timer_start(&t); for (decode_video.Begin(); decode_video.cxdata() != NULL; decode_video.Next()) { decoder.DecodeFrame(decode_video.cxdata(), decode_video.frame_size()); } - vpx_usec_timer_mark(&t); + aom_usec_timer_mark(&t); const double elapsed_secs = - static_cast<double>(vpx_usec_timer_elapsed(&t)) / kUsecsInSec; + static_cast<double>(aom_usec_timer_elapsed(&t)) / kUsecsInSec; const unsigned decode_frames = decode_video.frame_number(); const double fps = static_cast<double>(decode_frames) / elapsed_secs; diff --git a/test/decode_test_driver.cc b/test/decode_test_driver.cc index bff1a7d25468a9d5b1b089c6e2b4b2106e074129..8dbf84205110d7a8466af56ade41ace15d05a143 100644 --- a/test/decode_test_driver.cc +++ b/test/decode_test_driver.cc @@ -19,22 +19,22 @@ namespace libaom_test { const char kVP8Name[] = "WebM Project VP8"; -vpx_codec_err_t Decoder::PeekStream(const uint8_t *cxdata, size_t size, - vpx_codec_stream_info_t *stream_info) { - return vpx_codec_peek_stream_info( +aom_codec_err_t Decoder::PeekStream(const uint8_t *cxdata, size_t size, + aom_codec_stream_info_t *stream_info) { + return aom_codec_peek_stream_info( CodecInterface(), cxdata, static_cast<unsigned int>(size), stream_info); } -vpx_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size) { +aom_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size) { return DecodeFrame(cxdata, size, NULL); } -vpx_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size, +aom_codec_err_t Decoder::DecodeFrame(const uint8_t *cxdata, size_t size, void *user_priv) { - vpx_codec_err_t res_dec; + aom_codec_err_t res_dec; InitOnce(); API_REGISTER_STATE_CHECK( - res_dec = vpx_codec_decode( + res_dec = aom_codec_decode( &decoder_, cxdata, static_cast<unsigned int>(size), user_priv, 0)); return res_dec; } @@ -46,7 +46,7 @@ bool Decoder::IsVP8() const { void DecoderTest::HandlePeekResult(Decoder *const decoder, CompressedVideoSource *video, - const vpx_codec_err_t res_peek) { + const aom_codec_err_t res_peek) { const bool is_vp8 = decoder->IsVP8(); if (is_vp8) { /* Vp8's implementation of PeekStream returns an error if the frame you @@ -54,17 +54,17 @@ void DecoderTest::HandlePeekResult(Decoder *const decoder, * frame, which must be a keyframe. */ if (video->frame_number() == 0) ASSERT_EQ(VPX_CODEC_OK, res_peek) << "Peek return failed: " - << vpx_codec_err_to_string(res_peek); + << aom_codec_err_to_string(res_peek); } else { /* The Vp9 implementation of PeekStream returns an error only if the * data passed to it isn't a valid Vp9 chunk. */ ASSERT_EQ(VPX_CODEC_OK, res_peek) << "Peek return failed: " - << vpx_codec_err_to_string(res_peek); + << aom_codec_err_to_string(res_peek); } } void DecoderTest::RunLoop(CompressedVideoSource *video, - const vpx_codec_dec_cfg_t &dec_cfg) { + const aom_codec_dec_cfg_t &dec_cfg) { Decoder *const decoder = codec_->CreateDecoder(dec_cfg, flags_, 0); ASSERT_TRUE(decoder != NULL); bool end_of_file = false; @@ -74,27 +74,27 @@ void DecoderTest::RunLoop(CompressedVideoSource *video, video->Next()) { PreDecodeFrameHook(*video, decoder); - vpx_codec_stream_info_t stream_info; + aom_codec_stream_info_t stream_info; stream_info.sz = sizeof(stream_info); if (video->cxdata() != NULL) { - const vpx_codec_err_t res_peek = decoder->PeekStream( + const aom_codec_err_t res_peek = decoder->PeekStream( video->cxdata(), video->frame_size(), &stream_info); HandlePeekResult(decoder, video, res_peek); ASSERT_FALSE(::testing::Test::HasFailure()); - vpx_codec_err_t res_dec = + aom_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(), video->frame_size()); if (!HandleDecodeResult(res_dec, *video, decoder)) break; } else { // Signal end of the file to the decoder. - const vpx_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0); + const aom_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0); ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError(); end_of_file = true; } DxDataIterator dec_iter = decoder->GetDxData(); - const vpx_image_t *img = NULL; + const aom_image_t *img = NULL; // Get decompressed data while ((img = dec_iter.Next())) @@ -104,14 +104,14 @@ void DecoderTest::RunLoop(CompressedVideoSource *video, } void DecoderTest::RunLoop(CompressedVideoSource *video) { - vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t(); + aom_codec_dec_cfg_t dec_cfg = aom_codec_dec_cfg_t(); RunLoop(video, dec_cfg); } -void DecoderTest::set_cfg(const vpx_codec_dec_cfg_t &dec_cfg) { +void DecoderTest::set_cfg(const aom_codec_dec_cfg_t &dec_cfg) { memcpy(&cfg_, &dec_cfg, sizeof(cfg_)); } -void DecoderTest::set_flags(const vpx_codec_flags_t flags) { flags_ = flags; } +void DecoderTest::set_flags(const aom_codec_flags_t flags) { flags_ = flags; } } // namespace libaom_test diff --git a/test/decode_test_driver.h b/test/decode_test_driver.h index 63ee555bdee66c3f04ab0a78c8ab7c2e72bbd31e..bf5c42d0a729e8724cdc527e8611372d06c9eef1 100644 --- a/test/decode_test_driver.h +++ b/test/decode_test_driver.h @@ -13,8 +13,8 @@ #define TEST_DECODE_TEST_DRIVER_H_ #include <cstring> #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" -#include "aom/vpx_decoder.h" +#include "./aom_config.h" +#include "aom/aom_decoder.h" namespace libaom_test { @@ -24,14 +24,14 @@ class CompressedVideoSource; // Provides an object to handle decoding output class DxDataIterator { public: - explicit DxDataIterator(vpx_codec_ctx_t *decoder) + explicit DxDataIterator(aom_codec_ctx_t *decoder) : decoder_(decoder), iter_(NULL) {} - const vpx_image_t *Next() { return vpx_codec_get_frame(decoder_, &iter_); } + const aom_image_t *Next() { return aom_codec_get_frame(decoder_, &iter_); } private: - vpx_codec_ctx_t *decoder_; - vpx_codec_iter_t iter_; + aom_codec_ctx_t *decoder_; + aom_codec_iter_t iter_; }; // Provides a simplified interface to manage one video decoding. @@ -39,12 +39,12 @@ class DxDataIterator { // as more tests are added. class Decoder { public: - Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline) + Decoder(aom_codec_dec_cfg_t cfg, unsigned long deadline) : cfg_(cfg), flags_(0), deadline_(deadline), init_done_(false) { memset(&decoder_, 0, sizeof(decoder_)); } - Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag, + Decoder(aom_codec_dec_cfg_t cfg, const aom_codec_flags_t flag, unsigned long deadline) // NOLINT : cfg_(cfg), flags_(flag), @@ -53,14 +53,14 @@ class Decoder { memset(&decoder_, 0, sizeof(decoder_)); } - virtual ~Decoder() { vpx_codec_destroy(&decoder_); } + virtual ~Decoder() { aom_codec_destroy(&decoder_); } - vpx_codec_err_t PeekStream(const uint8_t *cxdata, size_t size, - vpx_codec_stream_info_t *stream_info); + aom_codec_err_t PeekStream(const uint8_t *cxdata, size_t size, + aom_codec_stream_info_t *stream_info); - vpx_codec_err_t DecodeFrame(const uint8_t *cxdata, size_t size); + aom_codec_err_t DecodeFrame(const uint8_t *cxdata, size_t size); - vpx_codec_err_t DecodeFrame(const uint8_t *cxdata, size_t size, + aom_codec_err_t DecodeFrame(const uint8_t *cxdata, size_t size, void *user_priv); DxDataIterator GetDxData() { return DxDataIterator(&decoder_); } @@ -71,53 +71,53 @@ class Decoder { void Control(int ctrl_id, const void *arg) { InitOnce(); - const vpx_codec_err_t res = vpx_codec_control_(&decoder_, ctrl_id, arg); + const aom_codec_err_t res = aom_codec_control_(&decoder_, ctrl_id, arg); ASSERT_EQ(VPX_CODEC_OK, res) << DecodeError(); } - void Control(int ctrl_id, int arg, vpx_codec_err_t expected_value) { + void Control(int ctrl_id, int arg, aom_codec_err_t expected_value) { InitOnce(); - const vpx_codec_err_t res = vpx_codec_control_(&decoder_, ctrl_id, arg); + const aom_codec_err_t res = aom_codec_control_(&decoder_, ctrl_id, arg); ASSERT_EQ(expected_value, res) << DecodeError(); } const char *DecodeError() { - const char *detail = vpx_codec_error_detail(&decoder_); - return detail ? detail : vpx_codec_error(&decoder_); + const char *detail = aom_codec_error_detail(&decoder_); + return detail ? detail : aom_codec_error(&decoder_); } // Passes the external frame buffer information to libaom. - vpx_codec_err_t SetFrameBufferFunctions( - vpx_get_frame_buffer_cb_fn_t cb_get, - vpx_release_frame_buffer_cb_fn_t cb_release, void *user_priv) { + aom_codec_err_t SetFrameBufferFunctions( + aom_get_frame_buffer_cb_fn_t cb_get, + aom_release_frame_buffer_cb_fn_t cb_release, void *user_priv) { InitOnce(); - return vpx_codec_set_frame_buffer_functions(&decoder_, cb_get, cb_release, + return aom_codec_set_frame_buffer_functions(&decoder_, cb_get, cb_release, user_priv); } const char *GetDecoderName() const { - return vpx_codec_iface_name(CodecInterface()); + return aom_codec_iface_name(CodecInterface()); } bool IsVP8() const; - vpx_codec_ctx_t *GetDecoder() { return &decoder_; } + aom_codec_ctx_t *GetDecoder() { return &decoder_; } protected: - virtual vpx_codec_iface_t *CodecInterface() const = 0; + virtual aom_codec_iface_t *CodecInterface() const = 0; void InitOnce() { if (!init_done_) { - const vpx_codec_err_t res = - vpx_codec_dec_init(&decoder_, CodecInterface(), &cfg_, flags_); + const aom_codec_err_t res = + aom_codec_dec_init(&decoder_, CodecInterface(), &cfg_, flags_); ASSERT_EQ(VPX_CODEC_OK, res) << DecodeError(); init_done_ = true; } } - vpx_codec_ctx_t decoder_; - vpx_codec_dec_cfg_t cfg_; - vpx_codec_flags_t flags_; + aom_codec_ctx_t decoder_; + aom_codec_dec_cfg_t cfg_; + aom_codec_flags_t flags_; unsigned int deadline_; bool init_done_; }; @@ -128,17 +128,17 @@ class DecoderTest { // Main decoding loop virtual void RunLoop(CompressedVideoSource *video); virtual void RunLoop(CompressedVideoSource *video, - const vpx_codec_dec_cfg_t &dec_cfg); + const aom_codec_dec_cfg_t &dec_cfg); - virtual void set_cfg(const vpx_codec_dec_cfg_t &dec_cfg); - virtual void set_flags(const vpx_codec_flags_t flags); + virtual void set_cfg(const aom_codec_dec_cfg_t &dec_cfg); + virtual void set_flags(const aom_codec_flags_t flags); // Hook to be called before decompressing every frame. virtual void PreDecodeFrameHook(const CompressedVideoSource & /*video*/, Decoder * /*decoder*/) {} // Hook to be called to handle decode result. Return true to continue. - virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec, + virtual bool HandleDecodeResult(const aom_codec_err_t res_dec, const CompressedVideoSource & /*video*/, Decoder *decoder) { EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError(); @@ -146,13 +146,13 @@ class DecoderTest { } // Hook to be called on every decompressed frame. - virtual void DecompressedFrameHook(const vpx_image_t & /*img*/, + virtual void DecompressedFrameHook(const aom_image_t & /*img*/, const unsigned int /*frame_number*/) {} // Hook to be called on peek result virtual void HandlePeekResult(Decoder *const decoder, CompressedVideoSource *video, - const vpx_codec_err_t res_peek); + const aom_codec_err_t res_peek); protected: explicit DecoderTest(const CodecFactory *codec) @@ -161,8 +161,8 @@ class DecoderTest { virtual ~DecoderTest() {} const CodecFactory *codec_; - vpx_codec_dec_cfg_t cfg_; - vpx_codec_flags_t flags_; + aom_codec_dec_cfg_t cfg_; + aom_codec_flags_t flags_; }; } // namespace libaom_test diff --git a/test/decode_to_md5.sh b/test/decode_to_md5.sh index 89fa024dd5e523fae4f466ac7b802fb624c6bb0c..b28a2b6a98031e4bfc0727cfde7b8f51734df07f 100755 --- a/test/decode_to_md5.sh +++ b/test/decode_to_md5.sh @@ -19,7 +19,7 @@ # $VP8_IVF_FILE and $VP9_IVF_FILE are required. decode_to_md5_verify_environment() { if [ ! -e "${VP8_IVF_FILE}" ] || [ ! -e "${VP9_IVF_FILE}" ]; then - echo "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi } diff --git a/test/decode_with_drops.sh b/test/decode_with_drops.sh index 3bda69e79ba687f1c04f8683536c8018228d22a9..ed48b2b81dc4327de48348cb2675ba57c69d5afc 100755 --- a/test/decode_with_drops.sh +++ b/test/decode_with_drops.sh @@ -19,7 +19,7 @@ # $VP8_IVF_FILE and $VP9_IVF_FILE are required. decode_with_drops_verify_environment() { if [ ! -e "${VP8_IVF_FILE}" ] || [ ! -e "${VP9_IVF_FILE}" ]; then - echo "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi } diff --git a/test/denoiser_sse2_test.cc b/test/denoiser_sse2_test.cc index c49aced0c667fc6490b8f9ef9dc97bf5a5ed9f9c..88600094a5842452a1b72de6db64b846bb577226 100644 --- a/test/denoiser_sse2_test.cc +++ b/test/denoiser_sse2_test.cc @@ -19,7 +19,7 @@ #include "test/util.h" #include "aom_scale/yv12config.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "av1/common/reconinter.h" #include "av1/encoder/context_tree.h" #include "av1/encoder/denoiser.h" diff --git a/test/encode_api_test.cc b/test/encode_api_test.cc index 5faf701b536cd79c6a02bd2758be9d422cf0465c..e01646d1887a133c31a812d81e6fff03a01366a2 100644 --- a/test/encode_api_test.cc +++ b/test/encode_api_test.cc @@ -10,58 +10,58 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "aom/vp8cx.h" -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" namespace { #define NELEMENTS(x) static_cast<int>(sizeof(x) / sizeof(x[0])) TEST(EncodeAPI, InvalidParams) { - static const vpx_codec_iface_t *kCodecs[] = { + static const aom_codec_iface_t *kCodecs[] = { #if CONFIG_VP8_ENCODER - &vpx_codec_vp8_cx_algo, + &aom_codec_vp8_cx_algo, #endif #if CONFIG_VP9_ENCODER - &vpx_codec_vp9_cx_algo, + &aom_codec_vp9_cx_algo, #endif #if CONFIG_VP10_ENCODER - &vpx_codec_vp10_cx_algo, + &aom_codec_vp10_cx_algo, #endif }; uint8_t buf[1] = { 0 }; - vpx_image_t img; - vpx_codec_ctx_t enc; - vpx_codec_enc_cfg_t cfg; + aom_image_t img; + aom_codec_ctx_t enc; + aom_codec_enc_cfg_t cfg; - EXPECT_EQ(&img, vpx_img_wrap(&img, VPX_IMG_FMT_I420, 1, 1, 1, buf)); + EXPECT_EQ(&img, aom_img_wrap(&img, VPX_IMG_FMT_I420, 1, 1, 1, buf)); - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_enc_init(NULL, NULL, NULL, 0)); - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_enc_init(&enc, NULL, NULL, 0)); - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_encode(NULL, NULL, 0, 0, 0, 0)); - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_encode(NULL, &img, 0, 0, 0, 0)); - EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_destroy(NULL)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_enc_init(NULL, NULL, NULL, 0)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_enc_init(&enc, NULL, NULL, 0)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_encode(NULL, NULL, 0, 0, 0, 0)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_encode(NULL, &img, 0, 0, 0, 0)); + EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_destroy(NULL)); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, - vpx_codec_enc_config_default(NULL, NULL, 0)); + aom_codec_enc_config_default(NULL, NULL, 0)); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, - vpx_codec_enc_config_default(NULL, &cfg, 0)); - EXPECT_TRUE(vpx_codec_error(NULL) != NULL); + aom_codec_enc_config_default(NULL, &cfg, 0)); + EXPECT_TRUE(aom_codec_error(NULL) != NULL); for (int i = 0; i < NELEMENTS(kCodecs); ++i) { - SCOPED_TRACE(vpx_codec_iface_name(kCodecs[i])); + SCOPED_TRACE(aom_codec_iface_name(kCodecs[i])); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, - vpx_codec_enc_init(NULL, kCodecs[i], NULL, 0)); + aom_codec_enc_init(NULL, kCodecs[i], NULL, 0)); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, - vpx_codec_enc_init(&enc, kCodecs[i], NULL, 0)); + aom_codec_enc_init(&enc, kCodecs[i], NULL, 0)); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, - vpx_codec_enc_config_default(kCodecs[i], &cfg, 1)); + aom_codec_enc_config_default(kCodecs[i], &cfg, 1)); - EXPECT_EQ(VPX_CODEC_OK, vpx_codec_enc_config_default(kCodecs[i], &cfg, 0)); - EXPECT_EQ(VPX_CODEC_OK, vpx_codec_enc_init(&enc, kCodecs[i], &cfg, 0)); - EXPECT_EQ(VPX_CODEC_OK, vpx_codec_encode(&enc, NULL, 0, 0, 0, 0)); + EXPECT_EQ(VPX_CODEC_OK, aom_codec_enc_config_default(kCodecs[i], &cfg, 0)); + EXPECT_EQ(VPX_CODEC_OK, aom_codec_enc_init(&enc, kCodecs[i], &cfg, 0)); + EXPECT_EQ(VPX_CODEC_OK, aom_codec_encode(&enc, NULL, 0, 0, 0, 0)); - EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&enc)); + EXPECT_EQ(VPX_CODEC_OK, aom_codec_destroy(&enc)); } } diff --git a/test/encode_perf_test.cc b/test/encode_perf_test.cc index 7f33d55717fe894d34e5a9e0f08f125a4cc20860..9b4abeec388d859796fcf7cf998f4b0acd90c295 100644 --- a/test/encode_perf_test.cc +++ b/test/encode_perf_test.cc @@ -9,14 +9,14 @@ */ #include <string> #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" -#include "./vpx_version.h" +#include "./aom_config.h" +#include "./aom_version.h" #include "test/codec_factory.h" #include "test/encode_test_driver.h" #include "test/i420_video_source.h" #include "test/util.h" #include "test/y4m_video_source.h" -#include "aom_ports/vpx_timer.h" +#include "aom_ports/aom_timer.h" namespace { @@ -98,7 +98,7 @@ class VP9EncodePerfTest nframes_ = 0; } - virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void PSNRPktHook(const aom_codec_cx_pkt_t *pkt) { if (pkt->data.psnr.psnr[0] < min_psnr_) { min_psnr_ = pkt->data.psnr.psnr[0]; } @@ -135,7 +135,7 @@ TEST_P(VP9EncodePerfTest, PerfTest) { set_threads(kEncodePerfTestThreads[k]); SetUp(); - const vpx_rational timebase = { 33333333, 1000000000 }; + const aom_rational timebase = { 33333333, 1000000000 }; cfg_.g_timebase = timebase; cfg_.rc_target_bitrate = kVP9EncodePerfTestVectors[i].bitrate; @@ -149,13 +149,13 @@ TEST_P(VP9EncodePerfTest, PerfTest) { kVP9EncodePerfTestVectors[i].frames); set_speed(kEncodePerfTestSpeeds[j]); - vpx_usec_timer t; - vpx_usec_timer_start(&t); + aom_usec_timer t; + aom_usec_timer_start(&t); ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); - vpx_usec_timer_mark(&t); - const double elapsed_secs = vpx_usec_timer_elapsed(&t) / kUsecsInSec; + aom_usec_timer_mark(&t); + const double elapsed_secs = aom_usec_timer_elapsed(&t) / kUsecsInSec; const double fps = frames / elapsed_secs; const double minimum_psnr = min_psnr(); std::string display_name(video_name); diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc index 7d42d3bedfe334c14b3ebecf5c9c5d58a125548c..1d658e14f873da5ebb288caa23cbf947ec03dc94 100644 --- a/test/encode_test_driver.cc +++ b/test/encode_test_driver.cc @@ -12,7 +12,7 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "test/codec_factory.h" #include "test/decode_test_driver.h" #include "test/encode_test_driver.h" @@ -21,8 +21,8 @@ namespace libaom_test { void Encoder::InitEncoder(VideoSource *video) { - vpx_codec_err_t res; - const vpx_image_t *img = video->img(); + aom_codec_err_t res; + const aom_image_t *img = video->img(); if (video->img() && !encoder_.priv) { cfg_.g_w = img->d_w; @@ -30,14 +30,14 @@ void Encoder::InitEncoder(VideoSource *video) { cfg_.g_timebase = video->timebase(); cfg_.rc_twopass_stats_in = stats_->buf(); - res = vpx_codec_enc_init(&encoder_, CodecInterface(), &cfg_, init_flags_); + res = aom_codec_enc_init(&encoder_, CodecInterface(), &cfg_, init_flags_); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); #if CONFIG_VP10_ENCODER - if (CodecInterface() == &vpx_codec_vp10_cx_algo) { + if (CodecInterface() == &aom_codec_vp10_cx_algo) { // Default to 1 tile column for VP10. const int log2_tile_columns = 0; - res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS, + res = aom_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS, log2_tile_columns); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); } @@ -54,7 +54,7 @@ void Encoder::EncodeFrame(VideoSource *video, const unsigned long frame_flags) { // Handle twopass stats CxDataIterator iter = GetCxData(); - while (const vpx_codec_cx_pkt_t *pkt = iter.Next()) { + while (const aom_codec_cx_pkt_t *pkt = iter.Next()) { if (pkt->kind != VPX_CODEC_STATS_PKT) continue; stats_->Append(*pkt); @@ -63,27 +63,27 @@ void Encoder::EncodeFrame(VideoSource *video, const unsigned long frame_flags) { void Encoder::EncodeFrameInternal(const VideoSource &video, const unsigned long frame_flags) { - vpx_codec_err_t res; - const vpx_image_t *img = video.img(); + aom_codec_err_t res; + const aom_image_t *img = video.img(); // Handle frame resizing if (cfg_.g_w != img->d_w || cfg_.g_h != img->d_h) { cfg_.g_w = img->d_w; cfg_.g_h = img->d_h; - res = vpx_codec_enc_config_set(&encoder_, &cfg_); + res = aom_codec_enc_config_set(&encoder_, &cfg_); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); } // Encode the frame - API_REGISTER_STATE_CHECK(res = vpx_codec_encode(&encoder_, img, video.pts(), + API_REGISTER_STATE_CHECK(res = aom_codec_encode(&encoder_, img, video.pts(), video.duration(), frame_flags, deadline_)); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); } void Encoder::Flush() { - const vpx_codec_err_t res = - vpx_codec_encode(&encoder_, NULL, 0, 0, 0, deadline_); + const aom_codec_err_t res = + aom_codec_encode(&encoder_, NULL, 0, 0, 0, deadline_); if (!encoder_.priv) ASSERT_EQ(VPX_CODEC_ERROR, res) << EncoderError(); else @@ -91,8 +91,8 @@ void Encoder::Flush() { } void EncoderTest::InitializeConfig() { - const vpx_codec_err_t res = codec_->DefaultEncoderConfig(&cfg_, 0); - dec_cfg_ = vpx_codec_dec_cfg_t(); + const aom_codec_err_t res = codec_->DefaultEncoderConfig(&cfg_, 0); + dec_cfg_ = aom_codec_dec_cfg_t(); ASSERT_EQ(VPX_CODEC_OK, res); } @@ -116,7 +116,7 @@ void EncoderTest::SetMode(TestMode mode) { } // The function should return "true" most of the time, therefore no early // break-out is implemented within the match checking process. -static bool compare_img(const vpx_image_t *img1, const vpx_image_t *img2) { +static bool compare_img(const aom_image_t *img1, const aom_image_t *img2) { bool match = (img1->fmt == img2->fmt) && (img1->cs == img2->cs) && (img1->d_w == img2->d_w) && (img1->d_h == img2->d_h); @@ -143,13 +143,13 @@ static bool compare_img(const vpx_image_t *img1, const vpx_image_t *img2) { return match; } -void EncoderTest::MismatchHook(const vpx_image_t * /*img1*/, - const vpx_image_t * /*img2*/) { +void EncoderTest::MismatchHook(const aom_image_t * /*img1*/, + const aom_image_t * /*img2*/) { ASSERT_TRUE(0) << "Encode/Decode mismatch found"; } void EncoderTest::RunLoop(VideoSource *video) { - vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t(); + aom_codec_dec_cfg_t dec_cfg = aom_codec_dec_cfg_t(); stats_.Reset(); @@ -191,14 +191,14 @@ void EncoderTest::RunLoop(VideoSource *video) { bool has_cxdata = false; bool has_dxdata = false; - while (const vpx_codec_cx_pkt_t *pkt = iter.Next()) { + while (const aom_codec_cx_pkt_t *pkt = iter.Next()) { pkt = MutateEncoderOutputHook(pkt); again = true; switch (pkt->kind) { case VPX_CODEC_CX_FRAME_PKT: has_cxdata = true; if (decoder && DoDecode()) { - vpx_codec_err_t res_dec = decoder->DecodeFrame( + aom_codec_err_t res_dec = decoder->DecodeFrame( (const uint8_t *)pkt->data.frame.buf, pkt->data.frame.sz); if (!HandleDecodeResult(res_dec, *video, decoder)) break; @@ -218,14 +218,14 @@ void EncoderTest::RunLoop(VideoSource *video) { // Flush the decoder when there are no more fragments. if ((init_flags_ & VPX_CODEC_USE_OUTPUT_PARTITION) && has_dxdata) { - const vpx_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0); + const aom_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0); if (!HandleDecodeResult(res_dec, *video, decoder)) break; } if (has_dxdata && has_cxdata) { - const vpx_image_t *img_enc = encoder->GetPreviewFrame(); + const aom_image_t *img_enc = encoder->GetPreviewFrame(); DxDataIterator dec_iter = decoder->GetDxData(); - const vpx_image_t *img_dec = dec_iter.Next(); + const aom_image_t *img_dec = dec_iter.Next(); if (img_enc && img_dec) { const bool res = compare_img(img_enc, img_dec); if (!res) { // Mismatch diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h index be5e7f3d11462dae4de7ac520d19d9dc86cb45e4..e8d2e9dc5728a6f5323c2fa1a12b04f5ed69be01 100644 --- a/test/encode_test_driver.h +++ b/test/encode_test_driver.h @@ -16,11 +16,11 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" +#include "./aom_config.h" #if CONFIG_VP10_ENCODER #include "aom/vp8cx.h" #endif -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" namespace libaom_test { @@ -49,28 +49,28 @@ enum TestMode { // Provides an object to handle the libaom get_cx_data() iteration pattern class CxDataIterator { public: - explicit CxDataIterator(vpx_codec_ctx_t *encoder) + explicit CxDataIterator(aom_codec_ctx_t *encoder) : encoder_(encoder), iter_(NULL) {} - const vpx_codec_cx_pkt_t *Next() { - return vpx_codec_get_cx_data(encoder_, &iter_); + const aom_codec_cx_pkt_t *Next() { + return aom_codec_get_cx_data(encoder_, &iter_); } private: - vpx_codec_ctx_t *encoder_; - vpx_codec_iter_t iter_; + aom_codec_ctx_t *encoder_; + aom_codec_iter_t iter_; }; // Implements an in-memory store for libaom twopass statistics class TwopassStatsStore { public: - void Append(const vpx_codec_cx_pkt_t &pkt) { + void Append(const aom_codec_cx_pkt_t &pkt) { buffer_.append(reinterpret_cast<char *>(pkt.data.twopass_stats.buf), pkt.data.twopass_stats.sz); } - vpx_fixed_buf_t buf() { - const vpx_fixed_buf_t buf = { &buffer_[0], buffer_.size() }; + aom_fixed_buf_t buf() { + const aom_fixed_buf_t buf = { &buffer_[0], buffer_.size() }; return buf; } @@ -87,61 +87,61 @@ class TwopassStatsStore { // level of abstraction will be fleshed out as more tests are written. class Encoder { public: - Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline, + Encoder(aom_codec_enc_cfg_t cfg, unsigned long deadline, const unsigned long init_flags, TwopassStatsStore *stats) : cfg_(cfg), deadline_(deadline), init_flags_(init_flags), stats_(stats) { memset(&encoder_, 0, sizeof(encoder_)); } - virtual ~Encoder() { vpx_codec_destroy(&encoder_); } + virtual ~Encoder() { aom_codec_destroy(&encoder_); } CxDataIterator GetCxData() { return CxDataIterator(&encoder_); } void InitEncoder(VideoSource *video); - const vpx_image_t *GetPreviewFrame() { - return vpx_codec_get_preview_frame(&encoder_); + const aom_image_t *GetPreviewFrame() { + return aom_codec_get_preview_frame(&encoder_); } - // This is a thin wrapper around vpx_codec_encode(), so refer to - // vpx_encoder.h for its semantics. + // This is a thin wrapper around aom_codec_encode(), so refer to + // aom_encoder.h for its semantics. void EncodeFrame(VideoSource *video, const unsigned long frame_flags); // Convenience wrapper for EncodeFrame() void EncodeFrame(VideoSource *video) { EncodeFrame(video, 0); } void Control(int ctrl_id, int arg) { - const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); + const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); } void Control(int ctrl_id, int *arg) { - const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); + const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); } - void Control(int ctrl_id, struct vpx_scaling_mode *arg) { - const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); + void Control(int ctrl_id, struct aom_scaling_mode *arg) { + const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); } - void Control(int ctrl_id, struct vpx_svc_layer_id *arg) { - const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); + void Control(int ctrl_id, struct aom_svc_layer_id *arg) { + const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); } - void Control(int ctrl_id, struct vpx_svc_parameters *arg) { - const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); + void Control(int ctrl_id, struct aom_svc_parameters *arg) { + const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); } #if CONFIG_VP10_ENCODER - void Control(int ctrl_id, vpx_active_map_t *arg) { - const vpx_codec_err_t res = vpx_codec_control_(&encoder_, ctrl_id, arg); + void Control(int ctrl_id, aom_active_map_t *arg) { + const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); } #endif - void Config(const vpx_codec_enc_cfg_t *cfg) { - const vpx_codec_err_t res = vpx_codec_enc_config_set(&encoder_, cfg); + void Config(const aom_codec_enc_cfg_t *cfg) { + const aom_codec_err_t res = aom_codec_enc_config_set(&encoder_, cfg); ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError(); cfg_ = *cfg; } @@ -149,11 +149,11 @@ class Encoder { void set_deadline(unsigned long deadline) { deadline_ = deadline; } protected: - virtual vpx_codec_iface_t *CodecInterface() const = 0; + virtual aom_codec_iface_t *CodecInterface() const = 0; const char *EncoderError() { - const char *detail = vpx_codec_error_detail(&encoder_); - return detail ? detail : vpx_codec_error(&encoder_); + const char *detail = aom_codec_error_detail(&encoder_); + return detail ? detail : aom_codec_error(&encoder_); } // Encode an image @@ -163,8 +163,8 @@ class Encoder { // Flush the encoder on EOS void Flush(); - vpx_codec_ctx_t encoder_; - vpx_codec_enc_cfg_t cfg_; + aom_codec_ctx_t encoder_; + aom_codec_enc_cfg_t cfg_; unsigned long deadline_; unsigned long init_flags_; TwopassStatsStore *stats_; @@ -214,10 +214,10 @@ class EncoderTest { Encoder * /*encoder*/) {} // Hook to be called on every compressed data packet. - virtual void FramePktHook(const vpx_codec_cx_pkt_t * /*pkt*/) {} + virtual void FramePktHook(const aom_codec_cx_pkt_t * /*pkt*/) {} // Hook to be called on every PSNR packet. - virtual void PSNRPktHook(const vpx_codec_cx_pkt_t * /*pkt*/) {} + virtual void PSNRPktHook(const aom_codec_cx_pkt_t * /*pkt*/) {} // Hook to determine whether the encode loop should continue. virtual bool Continue() const { @@ -229,14 +229,14 @@ class EncoderTest { virtual bool DoDecode() const { return 1; } // Hook to handle encode/decode mismatch - virtual void MismatchHook(const vpx_image_t *img1, const vpx_image_t *img2); + virtual void MismatchHook(const aom_image_t *img1, const aom_image_t *img2); // Hook to be called on every decompressed frame. - virtual void DecompressedFrameHook(const vpx_image_t & /*img*/, - vpx_codec_pts_t /*pts*/) {} + virtual void DecompressedFrameHook(const aom_image_t & /*img*/, + aom_codec_pts_t /*pts*/) {} // Hook to be called to handle decode result. Return true to continue. - virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec, + virtual bool HandleDecodeResult(const aom_codec_err_t res_dec, const VideoSource & /*video*/, Decoder *decoder) { EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError(); @@ -244,20 +244,20 @@ class EncoderTest { } // Hook that can modify the encoder's output data - virtual const vpx_codec_cx_pkt_t *MutateEncoderOutputHook( - const vpx_codec_cx_pkt_t *pkt) { + virtual const aom_codec_cx_pkt_t *MutateEncoderOutputHook( + const aom_codec_cx_pkt_t *pkt) { return pkt; } bool abort_; - vpx_codec_enc_cfg_t cfg_; - vpx_codec_dec_cfg_t dec_cfg_; + aom_codec_enc_cfg_t cfg_; + aom_codec_dec_cfg_t dec_cfg_; unsigned int passes_; unsigned long deadline_; TwopassStatsStore stats_; unsigned long init_flags_; unsigned long frame_flags_; - vpx_codec_pts_t last_pts_; + aom_codec_pts_t last_pts_; }; } // namespace libaom_test diff --git a/test/encoder_parms_get_to_decoder.cc b/test/encoder_parms_get_to_decoder.cc index 010475682b766466116be3a76f340292fdfe5edc..52d15a5be72845739b5e370495e4d414253e054b 100644 --- a/test/encoder_parms_get_to_decoder.cc +++ b/test/encoder_parms_get_to_decoder.cc @@ -38,8 +38,8 @@ struct EncodeParameters { int32_t lossless; int32_t error_resilient; int32_t frame_parallel; - vpx_color_range_t color_range; - vpx_color_space_t cs; + aom_color_range_t color_range; + aom_color_space_t cs; int render_size[2]; // TODO(JBB): quantizers / bitrate }; @@ -92,12 +92,12 @@ class VpxEncoderParmsGetToDecoder } } - virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec, + virtual bool HandleDecodeResult(const aom_codec_err_t res_dec, const libaom_test::VideoSource &video, libaom_test::Decoder *decoder) { - vpx_codec_ctx_t *const vp9_decoder = decoder->GetDecoder(); - vpx_codec_alg_priv_t *const priv = - reinterpret_cast<vpx_codec_alg_priv_t *>(vp9_decoder->priv); + aom_codec_ctx_t *const vp9_decoder = decoder->GetDecoder(); + aom_codec_alg_priv_t *const priv = + reinterpret_cast<aom_codec_alg_priv_t *>(vp9_decoder->priv); FrameWorkerData *const worker_data = reinterpret_cast<FrameWorkerData *>(priv->frame_workers[0].data1); VP10_COMMON *const common = &worker_data->pbi->common; diff --git a/test/end_to_end_test.cc b/test/end_to_end_test.cc index 08b24ab3a77122f42769788766127bbb451c1566..1617f4ade8f66d0a39ed6f285eb62ec0d36738e6 100644 --- a/test/end_to_end_test.cc +++ b/test/end_to_end_test.cc @@ -34,8 +34,8 @@ const double kPsnrThreshold[][5] = { typedef struct { const char *filename; unsigned int input_bit_depth; - vpx_img_fmt fmt; - vpx_bit_depth_t bit_depth; + aom_img_fmt fmt; + aom_bit_depth_t bit_depth; unsigned int profile; } TestVideoParam; @@ -106,7 +106,7 @@ class EndToEndTestLarge nframes_ = 0; } - virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void PSNRPktHook(const aom_codec_cx_pkt_t *pkt) { psnr_ += pkt->data.psnr.psnr[0]; nframes_++; } diff --git a/test/error_block_test.cc b/test/error_block_test.cc index 72d7283810ac8bd0738cd0a312273ce0bbee7703..9eb51ae900063ddc1727f80a3cc1d75184c3f478 100644 --- a/test/error_block_test.cc +++ b/test/error_block_test.cc @@ -14,15 +14,15 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "./av1_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/entropy.h" -#include "aom/vpx_codec.h" -#include "aom/vpx_integer.h" +#include "aom/aom_codec.h" +#include "aom/aom_integer.h" using libaom_test::ACMRandom; @@ -34,7 +34,7 @@ typedef int64_t (*ErrorBlockFunc)(const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bps); -typedef std::tr1::tuple<ErrorBlockFunc, ErrorBlockFunc, vpx_bit_depth_t> +typedef std::tr1::tuple<ErrorBlockFunc, ErrorBlockFunc, aom_bit_depth_t> ErrorBlockParam; class ErrorBlockTest : public ::testing::TestWithParam<ErrorBlockParam> { @@ -49,7 +49,7 @@ class ErrorBlockTest : public ::testing::TestWithParam<ErrorBlockParam> { virtual void TearDown() { libaom_test::ClearSystemState(); } protected: - vpx_bit_depth_t bit_depth_; + aom_bit_depth_t bit_depth_; ErrorBlockFunc error_block_op_; ErrorBlockFunc ref_error_block_op_; }; diff --git a/test/error_resilience_test.cc b/test/error_resilience_test.cc index 3605405da05af066328c64e614a328b00256cef2..8f39dffa79b245749bb7a0f5c236b18358c78db6 100644 --- a/test/error_resilience_test.cc +++ b/test/error_resilience_test.cc @@ -50,7 +50,7 @@ class ErrorResilienceTestLarge mismatch_nframes_ = 0; } - virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void PSNRPktHook(const aom_codec_cx_pkt_t *pkt) { psnr_ += pkt->data.psnr.psnr[0]; nframes_++; } @@ -144,7 +144,7 @@ class ErrorResilienceTestLarge return 1; } - virtual void MismatchHook(const vpx_image_t *img1, const vpx_image_t *img2) { + virtual void MismatchHook(const aom_image_t *img1, const aom_image_t *img2) { double mismatch_psnr = compute_psnr(img1, img2); mismatch_psnr_ += mismatch_psnr; ++mismatch_nframes_; @@ -191,7 +191,7 @@ class ErrorResilienceTestLarge }; TEST_P(ErrorResilienceTestLarge, OnVersusOff) { - const vpx_rational timebase = { 33333333, 1000000000 }; + const aom_rational timebase = { 33333333, 1000000000 }; cfg_.g_timebase = timebase; cfg_.rc_target_bitrate = 2000; cfg_.g_lag_in_frames = 10; @@ -226,7 +226,7 @@ TEST_P(ErrorResilienceTestLarge, OnVersusOff) { // frames (i.e., frames that don't update any reference buffers). // Check both isolated and consecutive loss. TEST_P(ErrorResilienceTestLarge, DropFramesWithoutRecovery) { - const vpx_rational timebase = { 33333333, 1000000000 }; + const aom_rational timebase = { 33333333, 1000000000 }; cfg_.g_timebase = timebase; cfg_.rc_target_bitrate = 500; // FIXME(debargha): Fix this to work for any lag. @@ -288,7 +288,7 @@ TEST_P(ErrorResilienceTestLarge, 2LayersDropEnhancement) { // This test doesn't run if SVC is not supported. if (!svc_support_) return; - const vpx_rational timebase = { 33333333, 1000000000 }; + const aom_rational timebase = { 33333333, 1000000000 }; cfg_.g_timebase = timebase; cfg_.rc_target_bitrate = 500; cfg_.g_lag_in_frames = 0; @@ -335,7 +335,7 @@ TEST_P(ErrorResilienceTestLarge, 2LayersNoRefLast) { // This test doesn't run if SVC is not supported. if (!svc_support_) return; - const vpx_rational timebase = { 33333333, 1000000000 }; + const aom_rational timebase = { 33333333, 1000000000 }; cfg_.g_timebase = timebase; cfg_.rc_target_bitrate = 500; cfg_.g_lag_in_frames = 0; @@ -466,16 +466,16 @@ class ErrorResilienceTestLargeCodecControls encoder->Control(VP8E_SET_TEMPORAL_LAYER_ID, layer_id); encoder->Control(VP8E_SET_FRAME_FLAGS, frame_flags); } - const vpx_rational_t tb = video->timebase(); + const aom_rational_t tb = video->timebase(); timebase_ = static_cast<double>(tb.num) / tb.den; duration_ = 0; return; } } - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { // Time since last timestamp = duration. - vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_; + aom_codec_pts_t duration = pkt->data.frame.pts - last_pts_; if (duration > 1) { // Update counter for total number of frames (#frames input to encoder). // Needed for setting the proper layer_id below. @@ -511,7 +511,7 @@ class ErrorResilienceTestLargeCodecControls private: libaom_test::TestMode encoding_mode_; - vpx_codec_pts_t last_pts_; + aom_codec_pts_t last_pts_; double timebase_; int64_t bits_total_[3]; double duration_; diff --git a/test/ethread_test.cc b/test/ethread_test.cc index 568fb573ebc6894b4f0426e3e552e4eaefb8e190..2250361ab455e11c1e37524ecc33460f390a6959 100644 --- a/test/ethread_test.cc +++ b/test/ethread_test.cc @@ -26,7 +26,7 @@ class VPxEncoderThreadTest : EncoderTest(GET_PARAM(0)), encoder_initialized_(false), tiles_(2), encoding_mode_(GET_PARAM(1)), set_cpu_used_(GET_PARAM(2)) { init_flags_ = VPX_CODEC_USE_PSNR; - vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); + aom_codec_dec_cfg_t cfg = aom_codec_dec_cfg_t(); cfg.w = 1280; cfg.h = 720; decoder_ = codec_->CreateDecoder(cfg, 0); @@ -76,14 +76,14 @@ class VPxEncoderThreadTest } } - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { - const vpx_codec_err_t res = decoder_->DecodeFrame( + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { + const aom_codec_err_t res = decoder_->DecodeFrame( reinterpret_cast<uint8_t *>(pkt->data.frame.buf), pkt->data.frame.sz); if (res != VPX_CODEC_OK) { abort_ = true; ASSERT_EQ(VPX_CODEC_OK, res); } - const vpx_image_t *img = decoder_->GetDxData().Next(); + const aom_image_t *img = decoder_->GetDxData().Next(); if (img) { ::libaom_test::MD5 md5_res; diff --git a/test/fdct4x4_test.cc b/test/fdct4x4_test.cc index f1fd7e3af7984645accbf475e1ac2013bb45166d..0c4cafb6bf6ad9bcac146f6435b441a6925a12c6 100644 --- a/test/fdct4x4_test.cc +++ b/test/fdct4x4_test.cc @@ -15,14 +15,14 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/entropy.h" -#include "aom/vpx_codec.h" -#include "aom/vpx_integer.h" +#include "aom/aom_codec.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" using libaom_test::ACMRandom; @@ -36,11 +36,11 @@ typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride, typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride, int tx_type); -typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct4x4Param; -typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht4x4Param; +typedef std::tr1::tuple<FdctFunc, IdctFunc, int, aom_bit_depth_t> Dct4x4Param; +typedef std::tr1::tuple<FhtFunc, IhtFunc, int, aom_bit_depth_t> Ht4x4Param; void fdct4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { - vpx_fdct4x4_c(in, out, stride); + aom_fdct4x4_c(in, out, stride); } void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { @@ -53,11 +53,11 @@ void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { #if CONFIG_VPX_HIGHBITDEPTH void idct4x4_10(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct4x4_16_add_c(in, out, stride, 10); + aom_highbd_idct4x4_16_add_c(in, out, stride, 10); } void idct4x4_12(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct4x4_16_add_c(in, out, stride, 12); + aom_highbd_idct4x4_16_add_c(in, out, stride, 12); } void iht4x4_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { @@ -69,20 +69,20 @@ void iht4x4_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { } void iwht4x4_10(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_iwht4x4_16_add_c(in, out, stride, 10); + aom_highbd_iwht4x4_16_add_c(in, out, stride, 10); } void iwht4x4_12(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_iwht4x4_16_add_c(in, out, stride, 12); + aom_highbd_iwht4x4_16_add_c(in, out, stride, 12); } #if HAVE_SSE2 void idct4x4_10_sse2(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct4x4_16_add_sse2(in, out, stride, 10); + aom_highbd_idct4x4_16_add_sse2(in, out, stride, 10); } void idct4x4_12_sse2(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct4x4_16_add_sse2(in, out, stride, 12); + aom_highbd_idct4x4_16_add_sse2(in, out, stride, 12); } #endif // HAVE_SSE2 #endif // CONFIG_VPX_HIGHBITDEPTH @@ -267,7 +267,7 @@ class Trans4x4TestBase { int pitch_; int tx_type_; FhtFunc fwd_txfm_ref; - vpx_bit_depth_t bit_depth_; + aom_bit_depth_t bit_depth_; int mask_; }; @@ -385,13 +385,13 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P( C, Trans4x4DCT, ::testing::Values( - make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12), - make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8))); + make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10), + make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12), + make_tuple(&aom_fdct4x4_c, &aom_idct4x4_16_add_c, 0, VPX_BITS_8))); #else INSTANTIATE_TEST_CASE_P(C, Trans4x4DCT, - ::testing::Values(make_tuple(&vpx_fdct4x4_c, - &vpx_idct4x4_16_add_c, 0, + ::testing::Values(make_tuple(&aom_fdct4x4_c, + &aom_idct4x4_16_add_c, 0, VPX_BITS_8))); #endif // CONFIG_VPX_HIGHBITDEPTH @@ -427,18 +427,18 @@ INSTANTIATE_TEST_CASE_P( ::testing::Values( make_tuple(&vp10_highbd_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10), make_tuple(&vp10_highbd_fwht4x4_c, &iwht4x4_12, 0, VPX_BITS_12), - make_tuple(&vp10_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8))); + make_tuple(&vp10_fwht4x4_c, &aom_iwht4x4_16_add_c, 0, VPX_BITS_8))); #else INSTANTIATE_TEST_CASE_P(C, Trans4x4WHT, ::testing::Values(make_tuple(&vp10_fwht4x4_c, - &vpx_iwht4x4_16_add_c, 0, + &aom_iwht4x4_16_add_c, 0, VPX_BITS_8))); #endif // CONFIG_VPX_HIGHBITDEPTH #if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P(NEON, Trans4x4DCT, - ::testing::Values(make_tuple(&vpx_fdct4x4_c, - &vpx_idct4x4_16_add_neon, + ::testing::Values(make_tuple(&aom_fdct4x4_c, + &aom_idct4x4_16_add_neon, 0, VPX_BITS_8))); #endif // HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE @@ -456,7 +456,7 @@ INSTANTIATE_TEST_CASE_P( !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P(MMX, Trans4x4WHT, ::testing::Values(make_tuple(&vp10_fwht4x4_mmx, - &vpx_iwht4x4_16_add_c, 0, + &aom_iwht4x4_16_add_c, 0, VPX_BITS_8))); #endif @@ -464,14 +464,14 @@ INSTANTIATE_TEST_CASE_P(MMX, Trans4x4WHT, !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P(SSE2, Trans4x4WHT, ::testing::Values(make_tuple(&vp10_fwht4x4_c, - &vpx_iwht4x4_16_add_sse2, + &aom_iwht4x4_16_add_sse2, 0, VPX_BITS_8))); #endif #if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P(SSE2, Trans4x4DCT, - ::testing::Values(make_tuple(&vpx_fdct4x4_sse2, - &vpx_idct4x4_16_add_sse2, + ::testing::Values(make_tuple(&aom_fdct4x4_sse2, + &aom_idct4x4_16_add_sse2, 0, VPX_BITS_8))); INSTANTIATE_TEST_CASE_P( SSE2, Trans4x4HT, @@ -487,11 +487,11 @@ INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P( SSE2, Trans4x4DCT, ::testing::Values( - make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_10_sse2, 0, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct4x4_c, &idct4x4_12_sse2, 0, VPX_BITS_12), - make_tuple(&vpx_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0, VPX_BITS_12), - make_tuple(&vpx_fdct4x4_sse2, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8))); + make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_10_sse2, 0, VPX_BITS_10), + make_tuple(&aom_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0, VPX_BITS_10), + make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_12_sse2, 0, VPX_BITS_12), + make_tuple(&aom_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0, VPX_BITS_12), + make_tuple(&aom_fdct4x4_sse2, &aom_idct4x4_16_add_c, 0, VPX_BITS_8))); INSTANTIATE_TEST_CASE_P( SSE2, Trans4x4HT, @@ -504,8 +504,8 @@ INSTANTIATE_TEST_CASE_P( #if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P(MSA, Trans4x4DCT, - ::testing::Values(make_tuple(&vpx_fdct4x4_msa, - &vpx_idct4x4_16_add_msa, 0, + ::testing::Values(make_tuple(&aom_fdct4x4_msa, + &aom_idct4x4_16_add_msa, 0, VPX_BITS_8))); INSTANTIATE_TEST_CASE_P( MSA, Trans4x4HT, diff --git a/test/fdct8x8_test.cc b/test/fdct8x8_test.cc index 4aa130fbf4f6cf425bfff01ecc630370f5c1ceef..197f01d6a0647068ce2543a6e3d60b452f8fcb79 100644 --- a/test/fdct8x8_test.cc +++ b/test/fdct8x8_test.cc @@ -15,15 +15,15 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/entropy.h" #include "av1/common/scan.h" -#include "aom/vpx_codec.h" -#include "aom/vpx_integer.h" +#include "aom/aom_codec.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" using libaom_test::ACMRandom; @@ -43,9 +43,9 @@ typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride, typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride, int tx_type); -typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct8x8Param; -typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht8x8Param; -typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t> Idct8x8Param; +typedef std::tr1::tuple<FdctFunc, IdctFunc, int, aom_bit_depth_t> Dct8x8Param; +typedef std::tr1::tuple<FhtFunc, IhtFunc, int, aom_bit_depth_t> Ht8x8Param; +typedef std::tr1::tuple<IdctFunc, IdctFunc, int, aom_bit_depth_t> Idct8x8Param; void reference_8x8_dct_1d(const double in[8], double out[8], int stride) { const double kInvSqrt2 = 0.707106781186547524400844362104; @@ -77,7 +77,7 @@ void reference_8x8_dct_2d(const int16_t input[kNumCoeffs], } void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { - vpx_fdct8x8_c(in, out, stride); + aom_fdct8x8_c(in, out, stride); } void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { @@ -86,11 +86,11 @@ void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { #if CONFIG_VPX_HIGHBITDEPTH void idct8x8_10(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct8x8_64_add_c(in, out, stride, 10); + aom_highbd_idct8x8_64_add_c(in, out, stride, 10); } void idct8x8_12(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct8x8_64_add_c(in, out, stride, 12); + aom_highbd_idct8x8_64_add_c(in, out, stride, 12); } void iht8x8_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { @@ -102,28 +102,28 @@ void iht8x8_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { } void idct8x8_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct8x8_10_add_c(in, out, stride, 10); + aom_highbd_idct8x8_10_add_c(in, out, stride, 10); } void idct8x8_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct8x8_10_add_c(in, out, stride, 12); + aom_highbd_idct8x8_10_add_c(in, out, stride, 12); } #if HAVE_SSE2 void idct8x8_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct8x8_10_add_sse2(in, out, stride, 10); + aom_highbd_idct8x8_10_add_sse2(in, out, stride, 10); } void idct8x8_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct8x8_10_add_sse2(in, out, stride, 12); + aom_highbd_idct8x8_10_add_sse2(in, out, stride, 12); } void idct8x8_64_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 10); + aom_highbd_idct8x8_64_add_sse2(in, out, stride, 10); } void idct8x8_64_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) { - vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 12); + aom_highbd_idct8x8_64_add_sse2(in, out, stride, 12); } #endif // HAVE_SSE2 #endif // CONFIG_VPX_HIGHBITDEPTH @@ -509,7 +509,7 @@ class FwdTrans8x8TestBase { int pitch_; int tx_type_; FhtFunc fwd_txfm_ref; - vpx_bit_depth_t bit_depth_; + aom_bit_depth_t bit_depth_; int mask_; }; @@ -624,13 +624,13 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P( C, FwdTrans8x8DCT, ::testing::Values( - make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8), - make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12))); + make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, 0, VPX_BITS_8), + make_tuple(&aom_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10), + make_tuple(&aom_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12))); #else INSTANTIATE_TEST_CASE_P(C, FwdTrans8x8DCT, - ::testing::Values(make_tuple(&vpx_fdct8x8_c, - &vpx_idct8x8_64_add_c, 0, + ::testing::Values(make_tuple(&aom_fdct8x8_c, + &aom_idct8x8_64_add_c, 0, VPX_BITS_8))); #endif // CONFIG_VPX_HIGHBITDEPTH @@ -662,8 +662,8 @@ INSTANTIATE_TEST_CASE_P( #if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P(NEON, FwdTrans8x8DCT, - ::testing::Values(make_tuple(&vpx_fdct8x8_neon, - &vpx_idct8x8_64_add_neon, + ::testing::Values(make_tuple(&aom_fdct8x8_neon, + &aom_idct8x8_64_add_neon, 0, VPX_BITS_8))); #endif // HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE @@ -679,8 +679,8 @@ INSTANTIATE_TEST_CASE_P( #if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P(SSE2, FwdTrans8x8DCT, - ::testing::Values(make_tuple(&vpx_fdct8x8_sse2, - &vpx_idct8x8_64_add_sse2, + ::testing::Values(make_tuple(&aom_fdct8x8_sse2, + &aom_idct8x8_64_add_sse2, 0, VPX_BITS_8))); INSTANTIATE_TEST_CASE_P( SSE2, FwdTrans8x8HT, @@ -695,15 +695,15 @@ INSTANTIATE_TEST_CASE_P( #if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( SSE2, FwdTrans8x8DCT, - ::testing::Values(make_tuple(&vpx_fdct8x8_sse2, &vpx_idct8x8_64_add_c, 0, + ::testing::Values(make_tuple(&aom_fdct8x8_sse2, &aom_idct8x8_64_add_c, 0, VPX_BITS_8), - make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_64_add_10_sse2, + make_tuple(&aom_highbd_fdct8x8_c, &idct8x8_64_add_10_sse2, 12, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct8x8_sse2, + make_tuple(&aom_highbd_fdct8x8_sse2, &idct8x8_64_add_10_sse2, 12, VPX_BITS_10), - make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_64_add_12_sse2, + make_tuple(&aom_highbd_fdct8x8_c, &idct8x8_64_add_12_sse2, 12, VPX_BITS_12), - make_tuple(&vpx_highbd_fdct8x8_sse2, + make_tuple(&aom_highbd_fdct8x8_sse2, &idct8x8_64_add_12_sse2, 12, VPX_BITS_12))); INSTANTIATE_TEST_CASE_P( @@ -730,15 +730,15 @@ INSTANTIATE_TEST_CASE_P( #if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \ !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P(SSSE3, FwdTrans8x8DCT, - ::testing::Values(make_tuple(&vpx_fdct8x8_ssse3, - &vpx_idct8x8_64_add_ssse3, + ::testing::Values(make_tuple(&aom_fdct8x8_ssse3, + &aom_idct8x8_64_add_ssse3, 0, VPX_BITS_8))); #endif #if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P(MSA, FwdTrans8x8DCT, - ::testing::Values(make_tuple(&vpx_fdct8x8_msa, - &vpx_idct8x8_64_add_msa, 0, + ::testing::Values(make_tuple(&aom_fdct8x8_msa, + &aom_idct8x8_64_add_msa, 0, VPX_BITS_8))); INSTANTIATE_TEST_CASE_P( MSA, FwdTrans8x8HT, diff --git a/test/frame_size_tests.cc b/test/frame_size_tests.cc index ff05119af7881abd515607680cfda0cfe690c531..c1d916f68008ca86ffa6fec2767844f7b101f12d 100644 --- a/test/frame_size_tests.cc +++ b/test/frame_size_tests.cc @@ -25,7 +25,7 @@ class VP9FrameSizeTestsLarge : public ::libaom_test::EncoderTest, SetMode(::libaom_test::kRealTime); } - virtual bool HandleDecodeResult(const vpx_codec_err_t res_dec, + virtual bool HandleDecodeResult(const aom_codec_err_t res_dec, const libaom_test::VideoSource & /*video*/, libaom_test::Decoder *decoder) { EXPECT_EQ(expected_res_, res_dec) << decoder->DecodeError(); diff --git a/test/idct8x8_test.cc b/test/idct8x8_test.cc index d3de7406eebcf2d1309b12680af7d1658037eda5..3d9f926a726884da9b4d4d57e1dee7bbd5cf09c5 100644 --- a/test/idct8x8_test.cc +++ b/test/idct8x8_test.cc @@ -14,9 +14,9 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" using libaom_test::ACMRandom; @@ -79,7 +79,7 @@ TEST(VP9Idct8x8Test, AccuracyCheck) { reference_dct_2d(input, output_r); for (int j = 0; j < 64; ++j) coeff[j] = round(output_r[j]); - vpx_idct8x8_64_add_c(coeff, dst, 8); + aom_idct8x8_64_add_c(coeff, dst, 8); for (int j = 0; j < 64; ++j) { const int diff = dst[j] - src[j]; const int error = diff * diff; diff --git a/test/idct_test.cc b/test/idct_test.cc index f8c3b086a4e0d34143f8ca726f29830defe545b0..85d8c906a6e423bf1fc2b56dd99702aac425f6d9 100644 --- a/test/idct_test.cc +++ b/test/idct_test.cc @@ -8,14 +8,14 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "./vpx_config.h" +#include "./aom_config.h" #include "./vp8_rtcd.h" #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" typedef void (*IdctFunc)(int16_t *input, unsigned char *pred_ptr, int pred_stride, unsigned char *dst_ptr, diff --git a/test/intrapred_test.cc b/test/intrapred_test.cc index cec863bd5ae5247257b9a7374f496a6a32eef5d1..545098a3c237a50ccc277ff8d47fb188b2a59ae2 100644 --- a/test/intrapred_test.cc +++ b/test/intrapred_test.cc @@ -12,15 +12,15 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/blockd.h" #include "av1/common/pred_common.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" namespace { @@ -132,84 +132,84 @@ using std::tr1::make_tuple; #if CONFIG_USE_X86INC INSTANTIATE_TEST_CASE_P( SSE2_TO_C_8, VP9IntraPredTest, - ::testing::Values(make_tuple(&vpx_highbd_dc_predictor_32x32_sse2, - &vpx_highbd_dc_predictor_32x32_c, 32, 8), - make_tuple(&vpx_highbd_tm_predictor_16x16_sse2, - &vpx_highbd_tm_predictor_16x16_c, 16, 8), - make_tuple(&vpx_highbd_tm_predictor_32x32_sse2, - &vpx_highbd_tm_predictor_32x32_c, 32, 8), - make_tuple(&vpx_highbd_dc_predictor_4x4_sse2, - &vpx_highbd_dc_predictor_4x4_c, 4, 8), - make_tuple(&vpx_highbd_dc_predictor_8x8_sse2, - &vpx_highbd_dc_predictor_8x8_c, 8, 8), - make_tuple(&vpx_highbd_dc_predictor_16x16_sse2, - &vpx_highbd_dc_predictor_16x16_c, 16, 8), - make_tuple(&vpx_highbd_v_predictor_4x4_sse2, - &vpx_highbd_v_predictor_4x4_c, 4, 8), - make_tuple(&vpx_highbd_v_predictor_8x8_sse2, - &vpx_highbd_v_predictor_8x8_c, 8, 8), - make_tuple(&vpx_highbd_v_predictor_16x16_sse2, - &vpx_highbd_v_predictor_16x16_c, 16, 8), - make_tuple(&vpx_highbd_v_predictor_32x32_sse2, - &vpx_highbd_v_predictor_32x32_c, 32, 8), - make_tuple(&vpx_highbd_tm_predictor_4x4_sse2, - &vpx_highbd_tm_predictor_4x4_c, 4, 8), - make_tuple(&vpx_highbd_tm_predictor_8x8_sse2, - &vpx_highbd_tm_predictor_8x8_c, 8, 8))); + ::testing::Values(make_tuple(&aom_highbd_dc_predictor_32x32_sse2, + &aom_highbd_dc_predictor_32x32_c, 32, 8), + make_tuple(&aom_highbd_tm_predictor_16x16_sse2, + &aom_highbd_tm_predictor_16x16_c, 16, 8), + make_tuple(&aom_highbd_tm_predictor_32x32_sse2, + &aom_highbd_tm_predictor_32x32_c, 32, 8), + make_tuple(&aom_highbd_dc_predictor_4x4_sse2, + &aom_highbd_dc_predictor_4x4_c, 4, 8), + make_tuple(&aom_highbd_dc_predictor_8x8_sse2, + &aom_highbd_dc_predictor_8x8_c, 8, 8), + make_tuple(&aom_highbd_dc_predictor_16x16_sse2, + &aom_highbd_dc_predictor_16x16_c, 16, 8), + make_tuple(&aom_highbd_v_predictor_4x4_sse2, + &aom_highbd_v_predictor_4x4_c, 4, 8), + make_tuple(&aom_highbd_v_predictor_8x8_sse2, + &aom_highbd_v_predictor_8x8_c, 8, 8), + make_tuple(&aom_highbd_v_predictor_16x16_sse2, + &aom_highbd_v_predictor_16x16_c, 16, 8), + make_tuple(&aom_highbd_v_predictor_32x32_sse2, + &aom_highbd_v_predictor_32x32_c, 32, 8), + make_tuple(&aom_highbd_tm_predictor_4x4_sse2, + &aom_highbd_tm_predictor_4x4_c, 4, 8), + make_tuple(&aom_highbd_tm_predictor_8x8_sse2, + &aom_highbd_tm_predictor_8x8_c, 8, 8))); INSTANTIATE_TEST_CASE_P( SSE2_TO_C_10, VP9IntraPredTest, - ::testing::Values(make_tuple(&vpx_highbd_dc_predictor_32x32_sse2, - &vpx_highbd_dc_predictor_32x32_c, 32, 10), - make_tuple(&vpx_highbd_tm_predictor_16x16_sse2, - &vpx_highbd_tm_predictor_16x16_c, 16, 10), - make_tuple(&vpx_highbd_tm_predictor_32x32_sse2, - &vpx_highbd_tm_predictor_32x32_c, 32, 10), - make_tuple(&vpx_highbd_dc_predictor_4x4_sse2, - &vpx_highbd_dc_predictor_4x4_c, 4, 10), - make_tuple(&vpx_highbd_dc_predictor_8x8_sse2, - &vpx_highbd_dc_predictor_8x8_c, 8, 10), - make_tuple(&vpx_highbd_dc_predictor_16x16_sse2, - &vpx_highbd_dc_predictor_16x16_c, 16, 10), - make_tuple(&vpx_highbd_v_predictor_4x4_sse2, - &vpx_highbd_v_predictor_4x4_c, 4, 10), - make_tuple(&vpx_highbd_v_predictor_8x8_sse2, - &vpx_highbd_v_predictor_8x8_c, 8, 10), - make_tuple(&vpx_highbd_v_predictor_16x16_sse2, - &vpx_highbd_v_predictor_16x16_c, 16, 10), - make_tuple(&vpx_highbd_v_predictor_32x32_sse2, - &vpx_highbd_v_predictor_32x32_c, 32, 10), - make_tuple(&vpx_highbd_tm_predictor_4x4_sse2, - &vpx_highbd_tm_predictor_4x4_c, 4, 10), - make_tuple(&vpx_highbd_tm_predictor_8x8_sse2, - &vpx_highbd_tm_predictor_8x8_c, 8, 10))); + ::testing::Values(make_tuple(&aom_highbd_dc_predictor_32x32_sse2, + &aom_highbd_dc_predictor_32x32_c, 32, 10), + make_tuple(&aom_highbd_tm_predictor_16x16_sse2, + &aom_highbd_tm_predictor_16x16_c, 16, 10), + make_tuple(&aom_highbd_tm_predictor_32x32_sse2, + &aom_highbd_tm_predictor_32x32_c, 32, 10), + make_tuple(&aom_highbd_dc_predictor_4x4_sse2, + &aom_highbd_dc_predictor_4x4_c, 4, 10), + make_tuple(&aom_highbd_dc_predictor_8x8_sse2, + &aom_highbd_dc_predictor_8x8_c, 8, 10), + make_tuple(&aom_highbd_dc_predictor_16x16_sse2, + &aom_highbd_dc_predictor_16x16_c, 16, 10), + make_tuple(&aom_highbd_v_predictor_4x4_sse2, + &aom_highbd_v_predictor_4x4_c, 4, 10), + make_tuple(&aom_highbd_v_predictor_8x8_sse2, + &aom_highbd_v_predictor_8x8_c, 8, 10), + make_tuple(&aom_highbd_v_predictor_16x16_sse2, + &aom_highbd_v_predictor_16x16_c, 16, 10), + make_tuple(&aom_highbd_v_predictor_32x32_sse2, + &aom_highbd_v_predictor_32x32_c, 32, 10), + make_tuple(&aom_highbd_tm_predictor_4x4_sse2, + &aom_highbd_tm_predictor_4x4_c, 4, 10), + make_tuple(&aom_highbd_tm_predictor_8x8_sse2, + &aom_highbd_tm_predictor_8x8_c, 8, 10))); INSTANTIATE_TEST_CASE_P( SSE2_TO_C_12, VP9IntraPredTest, - ::testing::Values(make_tuple(&vpx_highbd_dc_predictor_32x32_sse2, - &vpx_highbd_dc_predictor_32x32_c, 32, 12), - make_tuple(&vpx_highbd_tm_predictor_16x16_sse2, - &vpx_highbd_tm_predictor_16x16_c, 16, 12), - make_tuple(&vpx_highbd_tm_predictor_32x32_sse2, - &vpx_highbd_tm_predictor_32x32_c, 32, 12), - make_tuple(&vpx_highbd_dc_predictor_4x4_sse2, - &vpx_highbd_dc_predictor_4x4_c, 4, 12), - make_tuple(&vpx_highbd_dc_predictor_8x8_sse2, - &vpx_highbd_dc_predictor_8x8_c, 8, 12), - make_tuple(&vpx_highbd_dc_predictor_16x16_sse2, - &vpx_highbd_dc_predictor_16x16_c, 16, 12), - make_tuple(&vpx_highbd_v_predictor_4x4_sse2, - &vpx_highbd_v_predictor_4x4_c, 4, 12), - make_tuple(&vpx_highbd_v_predictor_8x8_sse2, - &vpx_highbd_v_predictor_8x8_c, 8, 12), - make_tuple(&vpx_highbd_v_predictor_16x16_sse2, - &vpx_highbd_v_predictor_16x16_c, 16, 12), - make_tuple(&vpx_highbd_v_predictor_32x32_sse2, - &vpx_highbd_v_predictor_32x32_c, 32, 12), - make_tuple(&vpx_highbd_tm_predictor_4x4_sse2, - &vpx_highbd_tm_predictor_4x4_c, 4, 12), - make_tuple(&vpx_highbd_tm_predictor_8x8_sse2, - &vpx_highbd_tm_predictor_8x8_c, 8, 12))); + ::testing::Values(make_tuple(&aom_highbd_dc_predictor_32x32_sse2, + &aom_highbd_dc_predictor_32x32_c, 32, 12), + make_tuple(&aom_highbd_tm_predictor_16x16_sse2, + &aom_highbd_tm_predictor_16x16_c, 16, 12), + make_tuple(&aom_highbd_tm_predictor_32x32_sse2, + &aom_highbd_tm_predictor_32x32_c, 32, 12), + make_tuple(&aom_highbd_dc_predictor_4x4_sse2, + &aom_highbd_dc_predictor_4x4_c, 4, 12), + make_tuple(&aom_highbd_dc_predictor_8x8_sse2, + &aom_highbd_dc_predictor_8x8_c, 8, 12), + make_tuple(&aom_highbd_dc_predictor_16x16_sse2, + &aom_highbd_dc_predictor_16x16_c, 16, 12), + make_tuple(&aom_highbd_v_predictor_4x4_sse2, + &aom_highbd_v_predictor_4x4_c, 4, 12), + make_tuple(&aom_highbd_v_predictor_8x8_sse2, + &aom_highbd_v_predictor_8x8_c, 8, 12), + make_tuple(&aom_highbd_v_predictor_16x16_sse2, + &aom_highbd_v_predictor_16x16_c, 16, 12), + make_tuple(&aom_highbd_v_predictor_32x32_sse2, + &aom_highbd_v_predictor_32x32_c, 32, 12), + make_tuple(&aom_highbd_tm_predictor_4x4_sse2, + &aom_highbd_tm_predictor_4x4_c, 4, 12), + make_tuple(&aom_highbd_tm_predictor_8x8_sse2, + &aom_highbd_tm_predictor_8x8_c, 8, 12))); #endif // CONFIG_USE_X86INC #endif // CONFIG_VPX_HIGHBITDEPTH diff --git a/test/lossless_test.cc b/test/lossless_test.cc index 6a804afa7fec95ba7eb52ad16d0c6de4fc2f6c03..316767e9ed6396e7963f2fe9c4af2c11d1bbe38f 100644 --- a/test/lossless_test.cc +++ b/test/lossless_test.cc @@ -10,7 +10,7 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "test/codec_factory.h" #include "test/encode_test_driver.h" #include "test/i420_video_source.h" @@ -52,7 +52,7 @@ class LosslessTest nframes_ = 0; } - virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void PSNRPktHook(const aom_codec_cx_pkt_t *pkt) { if (pkt->data.psnr.psnr[0] < psnr_) psnr_ = pkt->data.psnr.psnr[0]; } @@ -65,7 +65,7 @@ class LosslessTest }; TEST_P(LosslessTest, TestLossLessEncoding) { - const vpx_rational timebase = { 33333333, 1000000000 }; + const aom_rational timebase = { 33333333, 1000000000 }; cfg_.g_timebase = timebase; cfg_.rc_target_bitrate = 2000; cfg_.g_lag_in_frames = 25; @@ -100,7 +100,7 @@ TEST_P(LosslessTest, TestLossLessEncoding444) { } TEST_P(LosslessTest, TestLossLessEncodingCtrl) { - const vpx_rational timebase = { 33333333, 1000000000 }; + const aom_rational timebase = { 33333333, 1000000000 }; cfg_.g_timebase = timebase; cfg_.rc_target_bitrate = 2000; cfg_.g_lag_in_frames = 25; diff --git a/test/lpf_8_test.cc b/test/lpf_8_test.cc index a40e8cb520a4bbf0179b44c98bc7b416e011800e..594eae99297d71bb0c6dd0f8c3f4dc8f844e2d0b 100644 --- a/test/lpf_8_test.cc +++ b/test/lpf_8_test.cc @@ -14,15 +14,15 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/entropy.h" #include "av1/common/loopfilter.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" using libaom_test::ACMRandom; @@ -60,49 +60,49 @@ typedef std::tr1::tuple<dual_loop_op_t, dual_loop_op_t, int> dualloop8_param_t; void wrapper_vertical_16_sse2(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { - vpx_highbd_lpf_vertical_16_sse2(s, p, blimit, limit, thresh, bd); + aom_highbd_lpf_vertical_16_sse2(s, p, blimit, limit, thresh, bd); } void wrapper_vertical_16_c(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { - vpx_highbd_lpf_vertical_16_c(s, p, blimit, limit, thresh, bd); + aom_highbd_lpf_vertical_16_c(s, p, blimit, limit, thresh, bd); } void wrapper_vertical_16_dual_sse2(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { - vpx_highbd_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh, bd); + aom_highbd_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh, bd); } void wrapper_vertical_16_dual_c(uint16_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd) { - vpx_highbd_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh, bd); + aom_highbd_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh, bd); } #else void wrapper_vertical_16_sse2(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { - vpx_lpf_vertical_16_sse2(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_sse2(s, p, blimit, limit, thresh); } void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { - vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_c(s, p, blimit, limit, thresh); } void wrapper_vertical_16_dual_sse2(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { - vpx_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_dual_sse2(s, p, blimit, limit, thresh); } void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { - vpx_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh); } #endif // CONFIG_VPX_HIGHBITDEPTH #endif // HAVE_SSE2 @@ -114,25 +114,25 @@ void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, void wrapper_vertical_16_neon(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { - vpx_lpf_vertical_16_neon(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_neon(s, p, blimit, limit, thresh); } void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { - vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_c(s, p, blimit, limit, thresh); } void wrapper_vertical_16_dual_neon(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { - vpx_lpf_vertical_16_dual_neon(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_dual_neon(s, p, blimit, limit, thresh); } void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { - vpx_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_dual_c(s, p, blimit, limit, thresh); } #endif // CONFIG_VPX_HIGHBITDEPTH #endif // HAVE_NEON_ASM @@ -141,13 +141,13 @@ void wrapper_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, void wrapper_vertical_16_msa(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { - vpx_lpf_vertical_16_msa(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_msa(s, p, blimit, limit, thresh); } void wrapper_vertical_16_c(uint8_t *s, int p, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count) { - vpx_lpf_vertical_16_c(s, p, blimit, limit, thresh); + aom_lpf_vertical_16_c(s, p, blimit, limit, thresh); } #endif // HAVE_MSA && (!CONFIG_VPX_HIGHBITDEPTH) @@ -514,44 +514,44 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P( SSE2, Loop8Test6Param, ::testing::Values( - make_tuple(&vpx_highbd_lpf_horizontal_4_sse2, - &vpx_highbd_lpf_horizontal_4_c, 8, 1), - make_tuple(&vpx_highbd_lpf_vertical_4_sse2, - &vpx_highbd_lpf_vertical_4_c, 8, 1), - make_tuple(&vpx_highbd_lpf_horizontal_8_sse2, - &vpx_highbd_lpf_horizontal_8_c, 8, 1), - make_tuple(&vpx_highbd_lpf_horizontal_16_sse2, - &vpx_highbd_lpf_horizontal_16_c, 8, 1), - make_tuple(&vpx_highbd_lpf_horizontal_16_sse2, - &vpx_highbd_lpf_horizontal_16_c, 8, 2), - make_tuple(&vpx_highbd_lpf_vertical_8_sse2, - &vpx_highbd_lpf_vertical_8_c, 8, 1), + make_tuple(&aom_highbd_lpf_horizontal_4_sse2, + &aom_highbd_lpf_horizontal_4_c, 8, 1), + make_tuple(&aom_highbd_lpf_vertical_4_sse2, + &aom_highbd_lpf_vertical_4_c, 8, 1), + make_tuple(&aom_highbd_lpf_horizontal_8_sse2, + &aom_highbd_lpf_horizontal_8_c, 8, 1), + make_tuple(&aom_highbd_lpf_horizontal_16_sse2, + &aom_highbd_lpf_horizontal_16_c, 8, 1), + make_tuple(&aom_highbd_lpf_horizontal_16_sse2, + &aom_highbd_lpf_horizontal_16_c, 8, 2), + make_tuple(&aom_highbd_lpf_vertical_8_sse2, + &aom_highbd_lpf_vertical_8_c, 8, 1), make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8, 1), - make_tuple(&vpx_highbd_lpf_horizontal_4_sse2, - &vpx_highbd_lpf_horizontal_4_c, 10, 1), - make_tuple(&vpx_highbd_lpf_vertical_4_sse2, - &vpx_highbd_lpf_vertical_4_c, 10, 1), - make_tuple(&vpx_highbd_lpf_horizontal_8_sse2, - &vpx_highbd_lpf_horizontal_8_c, 10, 1), - make_tuple(&vpx_highbd_lpf_horizontal_16_sse2, - &vpx_highbd_lpf_horizontal_16_c, 10, 1), - make_tuple(&vpx_highbd_lpf_horizontal_16_sse2, - &vpx_highbd_lpf_horizontal_16_c, 10, 2), - make_tuple(&vpx_highbd_lpf_vertical_8_sse2, - &vpx_highbd_lpf_vertical_8_c, 10, 1), + make_tuple(&aom_highbd_lpf_horizontal_4_sse2, + &aom_highbd_lpf_horizontal_4_c, 10, 1), + make_tuple(&aom_highbd_lpf_vertical_4_sse2, + &aom_highbd_lpf_vertical_4_c, 10, 1), + make_tuple(&aom_highbd_lpf_horizontal_8_sse2, + &aom_highbd_lpf_horizontal_8_c, 10, 1), + make_tuple(&aom_highbd_lpf_horizontal_16_sse2, + &aom_highbd_lpf_horizontal_16_c, 10, 1), + make_tuple(&aom_highbd_lpf_horizontal_16_sse2, + &aom_highbd_lpf_horizontal_16_c, 10, 2), + make_tuple(&aom_highbd_lpf_vertical_8_sse2, + &aom_highbd_lpf_vertical_8_c, 10, 1), make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 10, 1), - make_tuple(&vpx_highbd_lpf_horizontal_4_sse2, - &vpx_highbd_lpf_horizontal_4_c, 12, 1), - make_tuple(&vpx_highbd_lpf_vertical_4_sse2, - &vpx_highbd_lpf_vertical_4_c, 12, 1), - make_tuple(&vpx_highbd_lpf_horizontal_8_sse2, - &vpx_highbd_lpf_horizontal_8_c, 12, 1), - make_tuple(&vpx_highbd_lpf_horizontal_16_sse2, - &vpx_highbd_lpf_horizontal_16_c, 12, 1), - make_tuple(&vpx_highbd_lpf_horizontal_16_sse2, - &vpx_highbd_lpf_horizontal_16_c, 12, 2), - make_tuple(&vpx_highbd_lpf_vertical_8_sse2, - &vpx_highbd_lpf_vertical_8_c, 12, 1), + make_tuple(&aom_highbd_lpf_horizontal_4_sse2, + &aom_highbd_lpf_horizontal_4_c, 12, 1), + make_tuple(&aom_highbd_lpf_vertical_4_sse2, + &aom_highbd_lpf_vertical_4_c, 12, 1), + make_tuple(&aom_highbd_lpf_horizontal_8_sse2, + &aom_highbd_lpf_horizontal_8_c, 12, 1), + make_tuple(&aom_highbd_lpf_horizontal_16_sse2, + &aom_highbd_lpf_horizontal_16_c, 12, 1), + make_tuple(&aom_highbd_lpf_horizontal_16_sse2, + &aom_highbd_lpf_horizontal_16_c, 12, 2), + make_tuple(&aom_highbd_lpf_vertical_8_sse2, + &aom_highbd_lpf_vertical_8_c, 12, 1), make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 12, 1), make_tuple(&wrapper_vertical_16_dual_sse2, &wrapper_vertical_16_dual_c, 8, 1), @@ -563,10 +563,10 @@ INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P( SSE2, Loop8Test6Param, ::testing::Values( - make_tuple(&vpx_lpf_horizontal_8_sse2, &vpx_lpf_horizontal_8_c, 8, 1), - make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 1), - make_tuple(&vpx_lpf_horizontal_16_sse2, &vpx_lpf_horizontal_16_c, 8, 2), - make_tuple(&vpx_lpf_vertical_8_sse2, &vpx_lpf_vertical_8_c, 8, 1), + make_tuple(&aom_lpf_horizontal_8_sse2, &aom_lpf_horizontal_8_c, 8, 1), + make_tuple(&aom_lpf_horizontal_16_sse2, &aom_lpf_horizontal_16_c, 8, 1), + make_tuple(&aom_lpf_horizontal_16_sse2, &aom_lpf_horizontal_16_c, 8, 2), + make_tuple(&aom_lpf_vertical_8_sse2, &aom_lpf_vertical_8_c, 8, 1), make_tuple(&wrapper_vertical_16_sse2, &wrapper_vertical_16_c, 8, 1), make_tuple(&wrapper_vertical_16_dual_sse2, &wrapper_vertical_16_dual_c, 8, 1))); @@ -576,51 +576,51 @@ INSTANTIATE_TEST_CASE_P( #if HAVE_AVX2 && (!CONFIG_VPX_HIGHBITDEPTH) INSTANTIATE_TEST_CASE_P( AVX2, Loop8Test6Param, - ::testing::Values(make_tuple(&vpx_lpf_horizontal_16_avx2, - &vpx_lpf_horizontal_16_c, 8, 1), - make_tuple(&vpx_lpf_horizontal_16_avx2, - &vpx_lpf_horizontal_16_c, 8, 2))); + ::testing::Values(make_tuple(&aom_lpf_horizontal_16_avx2, + &aom_lpf_horizontal_16_c, 8, 1), + make_tuple(&aom_lpf_horizontal_16_avx2, + &aom_lpf_horizontal_16_c, 8, 2))); #endif #if HAVE_SSE2 #if CONFIG_VPX_HIGHBITDEPTH INSTANTIATE_TEST_CASE_P( SSE2, Loop8Test9Param, - ::testing::Values(make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2, - &vpx_highbd_lpf_horizontal_4_dual_c, 8), - make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2, - &vpx_highbd_lpf_horizontal_8_dual_c, 8), - make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2, - &vpx_highbd_lpf_vertical_4_dual_c, 8), - make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2, - &vpx_highbd_lpf_vertical_8_dual_c, 8), - make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2, - &vpx_highbd_lpf_horizontal_4_dual_c, 10), - make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2, - &vpx_highbd_lpf_horizontal_8_dual_c, 10), - make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2, - &vpx_highbd_lpf_vertical_4_dual_c, 10), - make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2, - &vpx_highbd_lpf_vertical_8_dual_c, 10), - make_tuple(&vpx_highbd_lpf_horizontal_4_dual_sse2, - &vpx_highbd_lpf_horizontal_4_dual_c, 12), - make_tuple(&vpx_highbd_lpf_horizontal_8_dual_sse2, - &vpx_highbd_lpf_horizontal_8_dual_c, 12), - make_tuple(&vpx_highbd_lpf_vertical_4_dual_sse2, - &vpx_highbd_lpf_vertical_4_dual_c, 12), - make_tuple(&vpx_highbd_lpf_vertical_8_dual_sse2, - &vpx_highbd_lpf_vertical_8_dual_c, 12))); + ::testing::Values(make_tuple(&aom_highbd_lpf_horizontal_4_dual_sse2, + &aom_highbd_lpf_horizontal_4_dual_c, 8), + make_tuple(&aom_highbd_lpf_horizontal_8_dual_sse2, + &aom_highbd_lpf_horizontal_8_dual_c, 8), + make_tuple(&aom_highbd_lpf_vertical_4_dual_sse2, + &aom_highbd_lpf_vertical_4_dual_c, 8), + make_tuple(&aom_highbd_lpf_vertical_8_dual_sse2, + &aom_highbd_lpf_vertical_8_dual_c, 8), + make_tuple(&aom_highbd_lpf_horizontal_4_dual_sse2, + &aom_highbd_lpf_horizontal_4_dual_c, 10), + make_tuple(&aom_highbd_lpf_horizontal_8_dual_sse2, + &aom_highbd_lpf_horizontal_8_dual_c, 10), + make_tuple(&aom_highbd_lpf_vertical_4_dual_sse2, + &aom_highbd_lpf_vertical_4_dual_c, 10), + make_tuple(&aom_highbd_lpf_vertical_8_dual_sse2, + &aom_highbd_lpf_vertical_8_dual_c, 10), + make_tuple(&aom_highbd_lpf_horizontal_4_dual_sse2, + &aom_highbd_lpf_horizontal_4_dual_c, 12), + make_tuple(&aom_highbd_lpf_horizontal_8_dual_sse2, + &aom_highbd_lpf_horizontal_8_dual_c, 12), + make_tuple(&aom_highbd_lpf_vertical_4_dual_sse2, + &aom_highbd_lpf_vertical_4_dual_c, 12), + make_tuple(&aom_highbd_lpf_vertical_8_dual_sse2, + &aom_highbd_lpf_vertical_8_dual_c, 12))); #else INSTANTIATE_TEST_CASE_P( SSE2, Loop8Test9Param, - ::testing::Values(make_tuple(&vpx_lpf_horizontal_4_dual_sse2, - &vpx_lpf_horizontal_4_dual_c, 8), - make_tuple(&vpx_lpf_horizontal_8_dual_sse2, - &vpx_lpf_horizontal_8_dual_c, 8), - make_tuple(&vpx_lpf_vertical_4_dual_sse2, - &vpx_lpf_vertical_4_dual_c, 8), - make_tuple(&vpx_lpf_vertical_8_dual_sse2, - &vpx_lpf_vertical_8_dual_c, 8))); + ::testing::Values(make_tuple(&aom_lpf_horizontal_4_dual_sse2, + &aom_lpf_horizontal_4_dual_c, 8), + make_tuple(&aom_lpf_horizontal_8_dual_sse2, + &aom_lpf_horizontal_8_dual_c, 8), + make_tuple(&aom_lpf_vertical_4_dual_sse2, + &aom_lpf_vertical_4_dual_c, 8), + make_tuple(&aom_lpf_vertical_8_dual_sse2, + &aom_lpf_vertical_8_dual_c, 8))); #endif // CONFIG_VPX_HIGHBITDEPTH #endif @@ -635,28 +635,28 @@ INSTANTIATE_TEST_CASE_P( // Using #if inside the macro is unsupported on MSVS but the tests are // not // currently built for MSVS with ARM and NEON. - make_tuple(&vpx_lpf_horizontal_16_neon, &vpx_lpf_horizontal_16_c, 8, 1), - make_tuple(&vpx_lpf_horizontal_16_neon, &vpx_lpf_horizontal_16_c, 8, 2), + make_tuple(&aom_lpf_horizontal_16_neon, &aom_lpf_horizontal_16_c, 8, 1), + make_tuple(&aom_lpf_horizontal_16_neon, &aom_lpf_horizontal_16_c, 8, 2), make_tuple(&wrapper_vertical_16_neon, &wrapper_vertical_16_c, 8, 1), make_tuple(&wrapper_vertical_16_dual_neon, &wrapper_vertical_16_dual_c, 8, 1), #endif // HAVE_NEON_ASM - make_tuple(&vpx_lpf_horizontal_8_neon, &vpx_lpf_horizontal_8_c, 8, 1), - make_tuple(&vpx_lpf_vertical_8_neon, &vpx_lpf_vertical_8_c, 8, 1), - make_tuple(&vpx_lpf_horizontal_4_neon, &vpx_lpf_horizontal_4_c, 8, 1), - make_tuple(&vpx_lpf_vertical_4_neon, &vpx_lpf_vertical_4_c, 8, 1))); + make_tuple(&aom_lpf_horizontal_8_neon, &aom_lpf_horizontal_8_c, 8, 1), + make_tuple(&aom_lpf_vertical_8_neon, &aom_lpf_vertical_8_c, 8, 1), + make_tuple(&aom_lpf_horizontal_4_neon, &aom_lpf_horizontal_4_c, 8, 1), + make_tuple(&aom_lpf_vertical_4_neon, &aom_lpf_vertical_4_c, 8, 1))); INSTANTIATE_TEST_CASE_P(NEON, Loop8Test9Param, ::testing::Values( #if HAVE_NEON_ASM - make_tuple(&vpx_lpf_horizontal_8_dual_neon, - &vpx_lpf_horizontal_8_dual_c, 8), - make_tuple(&vpx_lpf_vertical_8_dual_neon, - &vpx_lpf_vertical_8_dual_c, 8), + make_tuple(&aom_lpf_horizontal_8_dual_neon, + &aom_lpf_horizontal_8_dual_c, 8), + make_tuple(&aom_lpf_vertical_8_dual_neon, + &aom_lpf_vertical_8_dual_c, 8), #endif // HAVE_NEON_ASM - make_tuple(&vpx_lpf_horizontal_4_dual_neon, - &vpx_lpf_horizontal_4_dual_c, 8), - make_tuple(&vpx_lpf_vertical_4_dual_neon, - &vpx_lpf_vertical_4_dual_c, 8))); + make_tuple(&aom_lpf_horizontal_4_dual_neon, + &aom_lpf_horizontal_4_dual_c, 8), + make_tuple(&aom_lpf_vertical_4_dual_neon, + &aom_lpf_vertical_4_dual_c, 8))); #endif // CONFIG_VPX_HIGHBITDEPTH #endif // HAVE_NEON @@ -664,22 +664,22 @@ INSTANTIATE_TEST_CASE_P(NEON, Loop8Test9Param, INSTANTIATE_TEST_CASE_P( MSA, Loop8Test6Param, ::testing::Values( - make_tuple(&vpx_lpf_horizontal_8_msa, &vpx_lpf_horizontal_8_c, 8, 1), - make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 1), - make_tuple(&vpx_lpf_horizontal_16_msa, &vpx_lpf_horizontal_16_c, 8, 2), - make_tuple(&vpx_lpf_vertical_8_msa, &vpx_lpf_vertical_8_c, 8, 1), + make_tuple(&aom_lpf_horizontal_8_msa, &aom_lpf_horizontal_8_c, 8, 1), + make_tuple(&aom_lpf_horizontal_16_msa, &aom_lpf_horizontal_16_c, 8, 1), + make_tuple(&aom_lpf_horizontal_16_msa, &aom_lpf_horizontal_16_c, 8, 2), + make_tuple(&aom_lpf_vertical_8_msa, &aom_lpf_vertical_8_c, 8, 1), make_tuple(&wrapper_vertical_16_msa, &wrapper_vertical_16_c, 8, 1))); INSTANTIATE_TEST_CASE_P( MSA, Loop8Test9Param, - ::testing::Values(make_tuple(&vpx_lpf_horizontal_4_dual_msa, - &vpx_lpf_horizontal_4_dual_c, 8), - make_tuple(&vpx_lpf_horizontal_8_dual_msa, - &vpx_lpf_horizontal_8_dual_c, 8), - make_tuple(&vpx_lpf_vertical_4_dual_msa, - &vpx_lpf_vertical_4_dual_c, 8), - make_tuple(&vpx_lpf_vertical_8_dual_msa, - &vpx_lpf_vertical_8_dual_c, 8))); + ::testing::Values(make_tuple(&aom_lpf_horizontal_4_dual_msa, + &aom_lpf_horizontal_4_dual_c, 8), + make_tuple(&aom_lpf_horizontal_8_dual_msa, + &aom_lpf_horizontal_8_dual_c, 8), + make_tuple(&aom_lpf_vertical_4_dual_msa, + &aom_lpf_vertical_4_dual_c, 8), + make_tuple(&aom_lpf_vertical_8_dual_msa, + &aom_lpf_vertical_8_dual_c, 8))); #endif // HAVE_MSA && (!CONFIG_VPX_HIGHBITDEPTH) } // namespace diff --git a/test/md5_helper.h b/test/md5_helper.h index 9599757e3b544de78292d6cb367b0553a50961f8..4e71301a7c013e9baf8e9b18303b5663623c859c 100644 --- a/test/md5_helper.h +++ b/test/md5_helper.h @@ -13,14 +13,14 @@ #define TEST_MD5_HELPER_H_ #include "./md5_utils.h" -#include "aom/vpx_decoder.h" +#include "aom/aom_decoder.h" namespace libaom_test { class MD5 { public: MD5() { MD5Init(&md5_); } - void Add(const vpx_image_t *img) { + void Add(const aom_image_t *img) { for (int plane = 0; plane < 3; ++plane) { const uint8_t *buf = img->planes[plane]; // Calculate the width and height to do the md5 check. For the chroma diff --git a/test/partial_idct_test.cc b/test/partial_idct_test.cc index 8e59a5d2775a398ae67c17009e61c21f4579a02a..a62afc077c4c625b11729cba30b4970ee11d40d2 100644 --- a/test/partial_idct_test.cc +++ b/test/partial_idct_test.cc @@ -15,14 +15,14 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "./av1_rtcd.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/blockd.h" #include "av1/common/scan.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" using libaom_test::ACMRandom; @@ -175,82 +175,82 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P( C, PartialIDctTest, - ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c, - &vpx_idct32x32_34_add_c, TX_32X32, 34), - make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c, - &vpx_idct32x32_1_add_c, TX_32X32, 1), - make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, - &vpx_idct16x16_10_add_c, TX_16X16, 10), - make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, - &vpx_idct16x16_1_add_c, TX_16X16, 1), - make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, - &vpx_idct8x8_12_add_c, TX_8X8, 12), - make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, - &vpx_idct8x8_1_add_c, TX_8X8, 1), - make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, - &vpx_idct4x4_1_add_c, TX_4X4, 1))); + ::testing::Values(make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, + &aom_idct32x32_34_add_c, TX_32X32, 34), + make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, + &aom_idct32x32_1_add_c, TX_32X32, 1), + make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, + &aom_idct16x16_10_add_c, TX_16X16, 10), + make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, + &aom_idct16x16_1_add_c, TX_16X16, 1), + make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, + &aom_idct8x8_12_add_c, TX_8X8, 12), + make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, + &aom_idct8x8_1_add_c, TX_8X8, 1), + make_tuple(&aom_fdct4x4_c, &aom_idct4x4_16_add_c, + &aom_idct4x4_1_add_c, TX_4X4, 1))); #if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( NEON, PartialIDctTest, - ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c, - &vpx_idct32x32_1_add_neon, TX_32X32, 1), - make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, - &vpx_idct16x16_10_add_neon, TX_16X16, 10), - make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, - &vpx_idct16x16_1_add_neon, TX_16X16, 1), - make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, - &vpx_idct8x8_12_add_neon, TX_8X8, 12), - make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, - &vpx_idct8x8_1_add_neon, TX_8X8, 1), - make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, - &vpx_idct4x4_1_add_neon, TX_4X4, 1))); + ::testing::Values(make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, + &aom_idct32x32_1_add_neon, TX_32X32, 1), + make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, + &aom_idct16x16_10_add_neon, TX_16X16, 10), + make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, + &aom_idct16x16_1_add_neon, TX_16X16, 1), + make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, + &aom_idct8x8_12_add_neon, TX_8X8, 12), + make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, + &aom_idct8x8_1_add_neon, TX_8X8, 1), + make_tuple(&aom_fdct4x4_c, &aom_idct4x4_16_add_c, + &aom_idct4x4_1_add_neon, TX_4X4, 1))); #endif // HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE #if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( SSE2, PartialIDctTest, - ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c, - &vpx_idct32x32_34_add_sse2, TX_32X32, 34), - make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c, - &vpx_idct32x32_1_add_sse2, TX_32X32, 1), - make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, - &vpx_idct16x16_10_add_sse2, TX_16X16, 10), - make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, - &vpx_idct16x16_1_add_sse2, TX_16X16, 1), - make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, - &vpx_idct8x8_12_add_sse2, TX_8X8, 12), - make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, - &vpx_idct8x8_1_add_sse2, TX_8X8, 1), - make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, - &vpx_idct4x4_1_add_sse2, TX_4X4, 1))); + ::testing::Values(make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, + &aom_idct32x32_34_add_sse2, TX_32X32, 34), + make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, + &aom_idct32x32_1_add_sse2, TX_32X32, 1), + make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, + &aom_idct16x16_10_add_sse2, TX_16X16, 10), + make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, + &aom_idct16x16_1_add_sse2, TX_16X16, 1), + make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, + &aom_idct8x8_12_add_sse2, TX_8X8, 12), + make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, + &aom_idct8x8_1_add_sse2, TX_8X8, 1), + make_tuple(&aom_fdct4x4_c, &aom_idct4x4_16_add_c, + &aom_idct4x4_1_add_sse2, TX_4X4, 1))); #endif #if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \ !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( SSSE3_64, PartialIDctTest, - ::testing::Values(make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, - &vpx_idct8x8_12_add_ssse3, TX_8X8, 12))); + ::testing::Values(make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, + &aom_idct8x8_12_add_ssse3, TX_8X8, 12))); #endif #if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE INSTANTIATE_TEST_CASE_P( MSA, PartialIDctTest, - ::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c, - &vpx_idct32x32_34_add_msa, TX_32X32, 34), - make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c, - &vpx_idct32x32_1_add_msa, TX_32X32, 1), - make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, - &vpx_idct16x16_10_add_msa, TX_16X16, 10), - make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, - &vpx_idct16x16_1_add_msa, TX_16X16, 1), - make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, - &vpx_idct8x8_12_add_msa, TX_8X8, 10), - make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, - &vpx_idct8x8_1_add_msa, TX_8X8, 1), - make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, - &vpx_idct4x4_1_add_msa, TX_4X4, 1))); + ::testing::Values(make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, + &aom_idct32x32_34_add_msa, TX_32X32, 34), + make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, + &aom_idct32x32_1_add_msa, TX_32X32, 1), + make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, + &aom_idct16x16_10_add_msa, TX_16X16, 10), + make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, + &aom_idct16x16_1_add_msa, TX_16X16, 1), + make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, + &aom_idct8x8_12_add_msa, TX_8X8, 10), + make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, + &aom_idct8x8_1_add_msa, TX_8X8, 1), + make_tuple(&aom_fdct4x4_c, &aom_idct4x4_16_add_c, + &aom_idct4x4_1_add_msa, TX_4X4, 1))); #endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE } // namespace diff --git a/test/quantize_test.cc b/test/quantize_test.cc index 2d84bba812a8f9663a392e6802fcfcbfc1baa126..29bd48d42f578ac158d04676e49c8ed006a1888e 100644 --- a/test/quantize_test.cc +++ b/test/quantize_test.cc @@ -14,16 +14,16 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" #include "av1/common/entropy.h" #include "av1/common/scan.h" -#include "aom/vpx_codec.h" -#include "aom/vpx_integer.h" +#include "aom/aom_codec.h" +#include "aom/aom_integer.h" using libaom_test::ACMRandom; @@ -39,7 +39,7 @@ typedef void (*QuantizeFunc)(const tran_low_t *coeff, intptr_t count, tran_low_t *dqcoeff, const int16_t *dequant, uint16_t *eob, const int16_t *scan, const int16_t *iscan); -typedef std::tr1::tuple<QuantizeFunc, QuantizeFunc, vpx_bit_depth_t> +typedef std::tr1::tuple<QuantizeFunc, QuantizeFunc, aom_bit_depth_t> QuantizeParam; class VP9QuantizeTest : public ::testing::TestWithParam<QuantizeParam> { @@ -55,7 +55,7 @@ class VP9QuantizeTest : public ::testing::TestWithParam<QuantizeParam> { virtual void TearDown() { libaom_test::ClearSystemState(); } protected: - vpx_bit_depth_t bit_depth_; + aom_bit_depth_t bit_depth_; int mask_; QuantizeFunc quantize_op_; QuantizeFunc ref_quantize_op_; @@ -74,7 +74,7 @@ class VP9Quantize32Test : public ::testing::TestWithParam<QuantizeParam> { virtual void TearDown() { libaom_test::ClearSystemState(); } protected: - vpx_bit_depth_t bit_depth_; + aom_bit_depth_t bit_depth_; int mask_; QuantizeFunc quantize_op_; QuantizeFunc ref_quantize_op_; @@ -326,20 +326,20 @@ using std::tr1::make_tuple; #if HAVE_SSE2 INSTANTIATE_TEST_CASE_P( SSE2, VP9QuantizeTest, - ::testing::Values(make_tuple(&vpx_highbd_quantize_b_sse2, - &vpx_highbd_quantize_b_c, VPX_BITS_8), - make_tuple(&vpx_highbd_quantize_b_sse2, - &vpx_highbd_quantize_b_c, VPX_BITS_10), - make_tuple(&vpx_highbd_quantize_b_sse2, - &vpx_highbd_quantize_b_c, VPX_BITS_12))); + ::testing::Values(make_tuple(&aom_highbd_quantize_b_sse2, + &aom_highbd_quantize_b_c, VPX_BITS_8), + make_tuple(&aom_highbd_quantize_b_sse2, + &aom_highbd_quantize_b_c, VPX_BITS_10), + make_tuple(&aom_highbd_quantize_b_sse2, + &aom_highbd_quantize_b_c, VPX_BITS_12))); INSTANTIATE_TEST_CASE_P( SSE2, VP9Quantize32Test, - ::testing::Values(make_tuple(&vpx_highbd_quantize_b_32x32_sse2, - &vpx_highbd_quantize_b_32x32_c, VPX_BITS_8), - make_tuple(&vpx_highbd_quantize_b_32x32_sse2, - &vpx_highbd_quantize_b_32x32_c, VPX_BITS_10), - make_tuple(&vpx_highbd_quantize_b_32x32_sse2, - &vpx_highbd_quantize_b_32x32_c, VPX_BITS_12))); + ::testing::Values(make_tuple(&aom_highbd_quantize_b_32x32_sse2, + &aom_highbd_quantize_b_32x32_c, VPX_BITS_8), + make_tuple(&aom_highbd_quantize_b_32x32_sse2, + &aom_highbd_quantize_b_32x32_c, VPX_BITS_10), + make_tuple(&aom_highbd_quantize_b_32x32_sse2, + &aom_highbd_quantize_b_32x32_c, VPX_BITS_12))); #endif // HAVE_SSE2 #endif // CONFIG_VPX_HIGHBITDEPTH #endif // CONFIG_AOM_QM diff --git a/test/register_state_check.h b/test/register_state_check.h index a7e110a5db964f5c1f5843816291cecb8a09ab00..1c7b855b3066d6304548ee17c06a62f0beea89d7 100644 --- a/test/register_state_check.h +++ b/test/register_state_check.h @@ -13,8 +13,8 @@ #define TEST_REGISTER_STATE_CHECK_H_ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_integer.h" // ASM_REGISTER_STATE_CHECK(asm_function) // Minimally validates the environment pre & post function execution. This @@ -100,7 +100,7 @@ class RegisterStateCheck { extern "C" { // Save the d8-d15 registers into store. -void vpx_push_neon(int64_t *store); +void aom_push_neon(int64_t *store); } namespace libaom_test { @@ -115,7 +115,7 @@ class RegisterStateCheck { private: static bool StoreRegisters(int64_t store[8]) { - vpx_push_neon(store); + aom_push_neon(store); return true; } @@ -123,7 +123,7 @@ class RegisterStateCheck { bool Check() const { if (!initialized_) return false; int64_t post_store[8]; - vpx_push_neon(post_store); + aom_push_neon(post_store); for (int i = 0; i < 8; ++i) { EXPECT_EQ(pre_store_[i], post_store[i]) << "d" << i + 8 << " has been modified"; diff --git a/test/resize_test.cc b/test/resize_test.cc index afdc43f8eb5587f0108d44c19430467a6f1cb43e..41b4a7bb99f75efc5b5498731a51a412a41bddac 100644 --- a/test/resize_test.cc +++ b/test/resize_test.cc @@ -34,7 +34,7 @@ static void mem_put_le32(char *const mem, const unsigned int val) { mem[3] = val >> 24; } -static void write_ivf_file_header(const vpx_codec_enc_cfg_t *const cfg, +static void write_ivf_file_header(const aom_codec_enc_cfg_t *const cfg, int frame_cnt, FILE *const outfile) { char header[32]; @@ -61,10 +61,10 @@ static void write_ivf_frame_size(FILE *const outfile, const size_t size) { (void)fwrite(header, 1, 4, outfile); } -static void write_ivf_frame_header(const vpx_codec_cx_pkt_t *const pkt, +static void write_ivf_frame_header(const aom_codec_cx_pkt_t *const pkt, FILE *const outfile) { char header[12]; - vpx_codec_pts_t pts; + aom_codec_pts_t pts; if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) return; @@ -81,10 +81,10 @@ const unsigned int kInitialWidth = 320; const unsigned int kInitialHeight = 240; struct FrameInfo { - FrameInfo(vpx_codec_pts_t _pts, unsigned int _w, unsigned int _h) + FrameInfo(aom_codec_pts_t _pts, unsigned int _w, unsigned int _h) : pts(_pts), w(_w), h(_h) {} - vpx_codec_pts_t pts; + aom_codec_pts_t pts; unsigned int w; unsigned int h; }; @@ -129,8 +129,8 @@ class ResizeTest SetMode(GET_PARAM(1)); } - virtual void DecompressedFrameHook(const vpx_image_t &img, - vpx_codec_pts_t pts) { + virtual void DecompressedFrameHook(const aom_image_t &img, + aom_codec_pts_t pts) { frame_info_list_.push_back(FrameInfo(pts, img.d_w, img.d_h)); } @@ -191,34 +191,34 @@ class ResizeInternalTest : public ResizeTest { if (change_config_) { int new_q = 60; if (video->frame() == 0) { - struct vpx_scaling_mode mode = { VP8E_ONETWO, VP8E_ONETWO }; + struct aom_scaling_mode mode = { VP8E_ONETWO, VP8E_ONETWO }; encoder->Control(VP8E_SET_SCALEMODE, &mode); } if (video->frame() == 1) { - struct vpx_scaling_mode mode = { VP8E_NORMAL, VP8E_NORMAL }; + struct aom_scaling_mode mode = { VP8E_NORMAL, VP8E_NORMAL }; encoder->Control(VP8E_SET_SCALEMODE, &mode); cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = new_q; encoder->Config(&cfg_); } } else { if (video->frame() == kStepDownFrame) { - struct vpx_scaling_mode mode = { VP8E_FOURFIVE, VP8E_THREEFIVE }; + struct aom_scaling_mode mode = { VP8E_FOURFIVE, VP8E_THREEFIVE }; encoder->Control(VP8E_SET_SCALEMODE, &mode); } if (video->frame() == kStepUpFrame) { - struct vpx_scaling_mode mode = { VP8E_NORMAL, VP8E_NORMAL }; + struct aom_scaling_mode mode = { VP8E_NORMAL, VP8E_NORMAL }; encoder->Control(VP8E_SET_SCALEMODE, &mode); } } } - virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void PSNRPktHook(const aom_codec_cx_pkt_t *pkt) { if (!frame0_psnr_) frame0_psnr_ = pkt->data.psnr.psnr[0]; EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0); } #if WRITE_COMPRESSED_STREAM - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { ++out_frames_; // Write initial file header if first frame. @@ -256,7 +256,7 @@ TEST_P(ResizeInternalTest, TestInternalResizeWorks) { for (std::vector<FrameInfo>::const_iterator info = frame_info_list_.begin(); info != frame_info_list_.end(); ++info) { - const vpx_codec_pts_t pts = info->pts; + const aom_codec_pts_t pts = info->pts; if (pts >= kStepDownFrame && pts < kStepUpFrame) { ASSERT_EQ(282U, info->w) << "Frame " << pts << " had unexpected width"; ASSERT_EQ(173U, info->h) << "Frame " << pts << " had unexpected height"; @@ -303,8 +303,8 @@ class ResizeRealtimeTest set_cpu_used_ = GET_PARAM(2); } - virtual void DecompressedFrameHook(const vpx_image_t &img, - vpx_codec_pts_t pts) { + virtual void DecompressedFrameHook(const aom_image_t &img, + aom_codec_pts_t pts) { frame_info_list_.push_back(FrameInfo(pts, img.d_w, img.d_h)); } @@ -426,7 +426,7 @@ TEST_P(ResizeRealtimeTest, TestInternalResizeDownUpChangeBitRate) { ASSERT_EQ(resize_count, 2) << "Resizing should occur twice."; } -vpx_img_fmt_t CspForFrameNumber(int frame) { +aom_img_fmt_t CspForFrameNumber(int frame) { if (frame < 10) return VPX_IMG_FMT_I420; if (frame < 20) return VPX_IMG_FMT_I444; return VPX_IMG_FMT_I420; @@ -474,13 +474,13 @@ class ResizeCspTest : public ResizeTest { } } - virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void PSNRPktHook(const aom_codec_cx_pkt_t *pkt) { if (!frame0_psnr_) frame0_psnr_ = pkt->data.psnr.psnr[0]; EXPECT_NEAR(pkt->data.psnr.psnr[0], frame0_psnr_, 2.0); } #if WRITE_COMPRESSED_STREAM - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { ++out_frames_; // Write initial file header if first frame. diff --git a/test/resize_util.sh b/test/resize_util.sh index 8ff07d25cbbb4e4a4ae9ebb4e8d413dddbe59c9c..5faac959936346c78a69434570b929baa8a11ee8 100755 --- a/test/resize_util.sh +++ b/test/resize_util.sh @@ -18,7 +18,7 @@ # Environment check: $YUV_RAW_INPUT is required. resize_util_verify_environment() { if [ ! -e "${YUV_RAW_INPUT}" ]; then - echo "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi } @@ -32,7 +32,7 @@ resize_util() { local target_dimensions="$1" # resize_util is available only when CONFIG_SHARED is disabled. - if [ -z "$(vpx_config_option_enabled CONFIG_SHARED)" ]; then + if [ -z "$(aom_config_option_enabled CONFIG_SHARED)" ]; then if [ ! -x "${resizer}" ]; then elog "${resizer} does not exist or is not executable." return 1 diff --git a/test/sad_test.cc b/test/sad_test.cc index 24e6a95c352482f9d578e21c3d26d78c15302a38..b450458cc67904bb6c49717c680da824790dd61f 100644 --- a/test/sad_test.cc +++ b/test/sad_test.cc @@ -14,14 +14,14 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "test/util.h" -#include "aom/vpx_codec.h" -#include "aom_mem/vpx_mem.h" +#include "aom/aom_codec.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" typedef unsigned int (*SadMxNFunc)(const uint8_t *src_ptr, int src_stride, @@ -48,31 +48,31 @@ class SADTestBase : public ::testing::Test { static void SetUpTestCase() { source_data8_ = reinterpret_cast<uint8_t *>( - vpx_memalign(kDataAlignment, kDataBlockSize)); + aom_memalign(kDataAlignment, kDataBlockSize)); reference_data8_ = reinterpret_cast<uint8_t *>( - vpx_memalign(kDataAlignment, kDataBufferSize)); + aom_memalign(kDataAlignment, kDataBufferSize)); second_pred8_ = - reinterpret_cast<uint8_t *>(vpx_memalign(kDataAlignment, 64 * 64)); + reinterpret_cast<uint8_t *>(aom_memalign(kDataAlignment, 64 * 64)); source_data16_ = reinterpret_cast<uint16_t *>( - vpx_memalign(kDataAlignment, kDataBlockSize * sizeof(uint16_t))); + aom_memalign(kDataAlignment, kDataBlockSize * sizeof(uint16_t))); reference_data16_ = reinterpret_cast<uint16_t *>( - vpx_memalign(kDataAlignment, kDataBufferSize * sizeof(uint16_t))); + aom_memalign(kDataAlignment, kDataBufferSize * sizeof(uint16_t))); second_pred16_ = reinterpret_cast<uint16_t *>( - vpx_memalign(kDataAlignment, 64 * 64 * sizeof(uint16_t))); + aom_memalign(kDataAlignment, 64 * 64 * sizeof(uint16_t))); } static void TearDownTestCase() { - vpx_free(source_data8_); + aom_free(source_data8_); source_data8_ = NULL; - vpx_free(reference_data8_); + aom_free(reference_data8_); reference_data8_ = NULL; - vpx_free(second_pred8_); + aom_free(second_pred8_); second_pred8_ = NULL; - vpx_free(source_data16_); + aom_free(source_data16_); source_data16_ = NULL; - vpx_free(reference_data16_); + aom_free(reference_data16_); reference_data16_ = NULL; - vpx_free(second_pred16_); + aom_free(second_pred16_); second_pred16_ = NULL; } @@ -94,7 +94,7 @@ class SADTestBase : public ::testing::Test { #if CONFIG_VPX_HIGHBITDEPTH } else { use_high_bit_depth_ = true; - bit_depth_ = static_cast<vpx_bit_depth_t>(bd_); + bit_depth_ = static_cast<aom_bit_depth_t>(bd_); source_data_ = CONVERT_TO_BYTEPTR(source_data16_); reference_data_ = CONVERT_TO_BYTEPTR(reference_data16_); second_pred_ = CONVERT_TO_BYTEPTR(second_pred16_); @@ -213,7 +213,7 @@ class SADTestBase : public ::testing::Test { } int width_, height_, mask_, bd_; - vpx_bit_depth_t bit_depth_; + aom_bit_depth_t bit_depth_; static uint8_t *source_data_; static uint8_t *reference_data_; static uint8_t *second_pred_; @@ -472,175 +472,175 @@ using std::tr1::make_tuple; //------------------------------------------------------------------------------ // C functions const SadMxNParam c_tests[] = { - make_tuple(64, 64, &vpx_sad64x64_c, -1), - make_tuple(64, 32, &vpx_sad64x32_c, -1), - make_tuple(32, 64, &vpx_sad32x64_c, -1), - make_tuple(32, 32, &vpx_sad32x32_c, -1), - make_tuple(32, 16, &vpx_sad32x16_c, -1), - make_tuple(16, 32, &vpx_sad16x32_c, -1), - make_tuple(16, 16, &vpx_sad16x16_c, -1), - make_tuple(16, 8, &vpx_sad16x8_c, -1), - make_tuple(8, 16, &vpx_sad8x16_c, -1), - make_tuple(8, 8, &vpx_sad8x8_c, -1), - make_tuple(8, 4, &vpx_sad8x4_c, -1), - make_tuple(4, 8, &vpx_sad4x8_c, -1), - make_tuple(4, 4, &vpx_sad4x4_c, -1), + make_tuple(64, 64, &aom_sad64x64_c, -1), + make_tuple(64, 32, &aom_sad64x32_c, -1), + make_tuple(32, 64, &aom_sad32x64_c, -1), + make_tuple(32, 32, &aom_sad32x32_c, -1), + make_tuple(32, 16, &aom_sad32x16_c, -1), + make_tuple(16, 32, &aom_sad16x32_c, -1), + make_tuple(16, 16, &aom_sad16x16_c, -1), + make_tuple(16, 8, &aom_sad16x8_c, -1), + make_tuple(8, 16, &aom_sad8x16_c, -1), + make_tuple(8, 8, &aom_sad8x8_c, -1), + make_tuple(8, 4, &aom_sad8x4_c, -1), + make_tuple(4, 8, &aom_sad4x8_c, -1), + make_tuple(4, 4, &aom_sad4x4_c, -1), #if CONFIG_VPX_HIGHBITDEPTH - make_tuple(64, 64, &vpx_highbd_sad64x64_c, 8), - make_tuple(64, 32, &vpx_highbd_sad64x32_c, 8), - make_tuple(32, 64, &vpx_highbd_sad32x64_c, 8), - make_tuple(32, 32, &vpx_highbd_sad32x32_c, 8), - make_tuple(32, 16, &vpx_highbd_sad32x16_c, 8), - make_tuple(16, 32, &vpx_highbd_sad16x32_c, 8), - make_tuple(16, 16, &vpx_highbd_sad16x16_c, 8), - make_tuple(16, 8, &vpx_highbd_sad16x8_c, 8), - make_tuple(8, 16, &vpx_highbd_sad8x16_c, 8), - make_tuple(8, 8, &vpx_highbd_sad8x8_c, 8), - make_tuple(8, 4, &vpx_highbd_sad8x4_c, 8), - make_tuple(4, 8, &vpx_highbd_sad4x8_c, 8), - make_tuple(4, 4, &vpx_highbd_sad4x4_c, 8), - make_tuple(64, 64, &vpx_highbd_sad64x64_c, 10), - make_tuple(64, 32, &vpx_highbd_sad64x32_c, 10), - make_tuple(32, 64, &vpx_highbd_sad32x64_c, 10), - make_tuple(32, 32, &vpx_highbd_sad32x32_c, 10), - make_tuple(32, 16, &vpx_highbd_sad32x16_c, 10), - make_tuple(16, 32, &vpx_highbd_sad16x32_c, 10), - make_tuple(16, 16, &vpx_highbd_sad16x16_c, 10), - make_tuple(16, 8, &vpx_highbd_sad16x8_c, 10), - make_tuple(8, 16, &vpx_highbd_sad8x16_c, 10), - make_tuple(8, 8, &vpx_highbd_sad8x8_c, 10), - make_tuple(8, 4, &vpx_highbd_sad8x4_c, 10), - make_tuple(4, 8, &vpx_highbd_sad4x8_c, 10), - make_tuple(4, 4, &vpx_highbd_sad4x4_c, 10), - make_tuple(64, 64, &vpx_highbd_sad64x64_c, 12), - make_tuple(64, 32, &vpx_highbd_sad64x32_c, 12), - make_tuple(32, 64, &vpx_highbd_sad32x64_c, 12), - make_tuple(32, 32, &vpx_highbd_sad32x32_c, 12), - make_tuple(32, 16, &vpx_highbd_sad32x16_c, 12), - make_tuple(16, 32, &vpx_highbd_sad16x32_c, 12), - make_tuple(16, 16, &vpx_highbd_sad16x16_c, 12), - make_tuple(16, 8, &vpx_highbd_sad16x8_c, 12), - make_tuple(8, 16, &vpx_highbd_sad8x16_c, 12), - make_tuple(8, 8, &vpx_highbd_sad8x8_c, 12), - make_tuple(8, 4, &vpx_highbd_sad8x4_c, 12), - make_tuple(4, 8, &vpx_highbd_sad4x8_c, 12), - make_tuple(4, 4, &vpx_highbd_sad4x4_c, 12), + make_tuple(64, 64, &aom_highbd_sad64x64_c, 8), + make_tuple(64, 32, &aom_highbd_sad64x32_c, 8), + make_tuple(32, 64, &aom_highbd_sad32x64_c, 8), + make_tuple(32, 32, &aom_highbd_sad32x32_c, 8), + make_tuple(32, 16, &aom_highbd_sad32x16_c, 8), + make_tuple(16, 32, &aom_highbd_sad16x32_c, 8), + make_tuple(16, 16, &aom_highbd_sad16x16_c, 8), + make_tuple(16, 8, &aom_highbd_sad16x8_c, 8), + make_tuple(8, 16, &aom_highbd_sad8x16_c, 8), + make_tuple(8, 8, &aom_highbd_sad8x8_c, 8), + make_tuple(8, 4, &aom_highbd_sad8x4_c, 8), + make_tuple(4, 8, &aom_highbd_sad4x8_c, 8), + make_tuple(4, 4, &aom_highbd_sad4x4_c, 8), + make_tuple(64, 64, &aom_highbd_sad64x64_c, 10), + make_tuple(64, 32, &aom_highbd_sad64x32_c, 10), + make_tuple(32, 64, &aom_highbd_sad32x64_c, 10), + make_tuple(32, 32, &aom_highbd_sad32x32_c, 10), + make_tuple(32, 16, &aom_highbd_sad32x16_c, 10), + make_tuple(16, 32, &aom_highbd_sad16x32_c, 10), + make_tuple(16, 16, &aom_highbd_sad16x16_c, 10), + make_tuple(16, 8, &aom_highbd_sad16x8_c, 10), + make_tuple(8, 16, &aom_highbd_sad8x16_c, 10), + make_tuple(8, 8, &aom_highbd_sad8x8_c, 10), + make_tuple(8, 4, &aom_highbd_sad8x4_c, 10), + make_tuple(4, 8, &aom_highbd_sad4x8_c, 10), + make_tuple(4, 4, &aom_highbd_sad4x4_c, 10), + make_tuple(64, 64, &aom_highbd_sad64x64_c, 12), + make_tuple(64, 32, &aom_highbd_sad64x32_c, 12), + make_tuple(32, 64, &aom_highbd_sad32x64_c, 12), + make_tuple(32, 32, &aom_highbd_sad32x32_c, 12), + make_tuple(32, 16, &aom_highbd_sad32x16_c, 12), + make_tuple(16, 32, &aom_highbd_sad16x32_c, 12), + make_tuple(16, 16, &aom_highbd_sad16x16_c, 12), + make_tuple(16, 8, &aom_highbd_sad16x8_c, 12), + make_tuple(8, 16, &aom_highbd_sad8x16_c, 12), + make_tuple(8, 8, &aom_highbd_sad8x8_c, 12), + make_tuple(8, 4, &aom_highbd_sad8x4_c, 12), + make_tuple(4, 8, &aom_highbd_sad4x8_c, 12), + make_tuple(4, 4, &aom_highbd_sad4x4_c, 12), #endif // CONFIG_VPX_HIGHBITDEPTH }; INSTANTIATE_TEST_CASE_P(C, SADTest, ::testing::ValuesIn(c_tests)); const SadMxNAvgParam avg_c_tests[] = { - make_tuple(64, 64, &vpx_sad64x64_avg_c, -1), - make_tuple(64, 32, &vpx_sad64x32_avg_c, -1), - make_tuple(32, 64, &vpx_sad32x64_avg_c, -1), - make_tuple(32, 32, &vpx_sad32x32_avg_c, -1), - make_tuple(32, 16, &vpx_sad32x16_avg_c, -1), - make_tuple(16, 32, &vpx_sad16x32_avg_c, -1), - make_tuple(16, 16, &vpx_sad16x16_avg_c, -1), - make_tuple(16, 8, &vpx_sad16x8_avg_c, -1), - make_tuple(8, 16, &vpx_sad8x16_avg_c, -1), - make_tuple(8, 8, &vpx_sad8x8_avg_c, -1), - make_tuple(8, 4, &vpx_sad8x4_avg_c, -1), - make_tuple(4, 8, &vpx_sad4x8_avg_c, -1), - make_tuple(4, 4, &vpx_sad4x4_avg_c, -1), + make_tuple(64, 64, &aom_sad64x64_avg_c, -1), + make_tuple(64, 32, &aom_sad64x32_avg_c, -1), + make_tuple(32, 64, &aom_sad32x64_avg_c, -1), + make_tuple(32, 32, &aom_sad32x32_avg_c, -1), + make_tuple(32, 16, &aom_sad32x16_avg_c, -1), + make_tuple(16, 32, &aom_sad16x32_avg_c, -1), + make_tuple(16, 16, &aom_sad16x16_avg_c, -1), + make_tuple(16, 8, &aom_sad16x8_avg_c, -1), + make_tuple(8, 16, &aom_sad8x16_avg_c, -1), + make_tuple(8, 8, &aom_sad8x8_avg_c, -1), + make_tuple(8, 4, &aom_sad8x4_avg_c, -1), + make_tuple(4, 8, &aom_sad4x8_avg_c, -1), + make_tuple(4, 4, &aom_sad4x4_avg_c, -1), #if CONFIG_VPX_HIGHBITDEPTH - make_tuple(64, 64, &vpx_highbd_sad64x64_avg_c, 8), - make_tuple(64, 32, &vpx_highbd_sad64x32_avg_c, 8), - make_tuple(32, 64, &vpx_highbd_sad32x64_avg_c, 8), - make_tuple(32, 32, &vpx_highbd_sad32x32_avg_c, 8), - make_tuple(32, 16, &vpx_highbd_sad32x16_avg_c, 8), - make_tuple(16, 32, &vpx_highbd_sad16x32_avg_c, 8), - make_tuple(16, 16, &vpx_highbd_sad16x16_avg_c, 8), - make_tuple(16, 8, &vpx_highbd_sad16x8_avg_c, 8), - make_tuple(8, 16, &vpx_highbd_sad8x16_avg_c, 8), - make_tuple(8, 8, &vpx_highbd_sad8x8_avg_c, 8), - make_tuple(8, 4, &vpx_highbd_sad8x4_avg_c, 8), - make_tuple(4, 8, &vpx_highbd_sad4x8_avg_c, 8), - make_tuple(4, 4, &vpx_highbd_sad4x4_avg_c, 8), - make_tuple(64, 64, &vpx_highbd_sad64x64_avg_c, 10), - make_tuple(64, 32, &vpx_highbd_sad64x32_avg_c, 10), - make_tuple(32, 64, &vpx_highbd_sad32x64_avg_c, 10), - make_tuple(32, 32, &vpx_highbd_sad32x32_avg_c, 10), - make_tuple(32, 16, &vpx_highbd_sad32x16_avg_c, 10), - make_tuple(16, 32, &vpx_highbd_sad16x32_avg_c, 10), - make_tuple(16, 16, &vpx_highbd_sad16x16_avg_c, 10), - make_tuple(16, 8, &vpx_highbd_sad16x8_avg_c, 10), - make_tuple(8, 16, &vpx_highbd_sad8x16_avg_c, 10), - make_tuple(8, 8, &vpx_highbd_sad8x8_avg_c, 10), - make_tuple(8, 4, &vpx_highbd_sad8x4_avg_c, 10), - make_tuple(4, 8, &vpx_highbd_sad4x8_avg_c, 10), - make_tuple(4, 4, &vpx_highbd_sad4x4_avg_c, 10), - make_tuple(64, 64, &vpx_highbd_sad64x64_avg_c, 12), - make_tuple(64, 32, &vpx_highbd_sad64x32_avg_c, 12), - make_tuple(32, 64, &vpx_highbd_sad32x64_avg_c, 12), - make_tuple(32, 32, &vpx_highbd_sad32x32_avg_c, 12), - make_tuple(32, 16, &vpx_highbd_sad32x16_avg_c, 12), - make_tuple(16, 32, &vpx_highbd_sad16x32_avg_c, 12), - make_tuple(16, 16, &vpx_highbd_sad16x16_avg_c, 12), - make_tuple(16, 8, &vpx_highbd_sad16x8_avg_c, 12), - make_tuple(8, 16, &vpx_highbd_sad8x16_avg_c, 12), - make_tuple(8, 8, &vpx_highbd_sad8x8_avg_c, 12), - make_tuple(8, 4, &vpx_highbd_sad8x4_avg_c, 12), - make_tuple(4, 8, &vpx_highbd_sad4x8_avg_c, 12), - make_tuple(4, 4, &vpx_highbd_sad4x4_avg_c, 12), + make_tuple(64, 64, &aom_highbd_sad64x64_avg_c, 8), + make_tuple(64, 32, &aom_highbd_sad64x32_avg_c, 8), + make_tuple(32, 64, &aom_highbd_sad32x64_avg_c, 8), + make_tuple(32, 32, &aom_highbd_sad32x32_avg_c, 8), + make_tuple(32, 16, &aom_highbd_sad32x16_avg_c, 8), + make_tuple(16, 32, &aom_highbd_sad16x32_avg_c, 8), + make_tuple(16, 16, &aom_highbd_sad16x16_avg_c, 8), + make_tuple(16, 8, &aom_highbd_sad16x8_avg_c, 8), + make_tuple(8, 16, &aom_highbd_sad8x16_avg_c, 8), + make_tuple(8, 8, &aom_highbd_sad8x8_avg_c, 8), + make_tuple(8, 4, &aom_highbd_sad8x4_avg_c, 8), + make_tuple(4, 8, &aom_highbd_sad4x8_avg_c, 8), + make_tuple(4, 4, &aom_highbd_sad4x4_avg_c, 8), + make_tuple(64, 64, &aom_highbd_sad64x64_avg_c, 10), + make_tuple(64, 32, &aom_highbd_sad64x32_avg_c, 10), + make_tuple(32, 64, &aom_highbd_sad32x64_avg_c, 10), + make_tuple(32, 32, &aom_highbd_sad32x32_avg_c, 10), + make_tuple(32, 16, &aom_highbd_sad32x16_avg_c, 10), + make_tuple(16, 32, &aom_highbd_sad16x32_avg_c, 10), + make_tuple(16, 16, &aom_highbd_sad16x16_avg_c, 10), + make_tuple(16, 8, &aom_highbd_sad16x8_avg_c, 10), + make_tuple(8, 16, &aom_highbd_sad8x16_avg_c, 10), + make_tuple(8, 8, &aom_highbd_sad8x8_avg_c, 10), + make_tuple(8, 4, &aom_highbd_sad8x4_avg_c, 10), + make_tuple(4, 8, &aom_highbd_sad4x8_avg_c, 10), + make_tuple(4, 4, &aom_highbd_sad4x4_avg_c, 10), + make_tuple(64, 64, &aom_highbd_sad64x64_avg_c, 12), + make_tuple(64, 32, &aom_highbd_sad64x32_avg_c, 12), + make_tuple(32, 64, &aom_highbd_sad32x64_avg_c, 12), + make_tuple(32, 32, &aom_highbd_sad32x32_avg_c, 12), + make_tuple(32, 16, &aom_highbd_sad32x16_avg_c, 12), + make_tuple(16, 32, &aom_highbd_sad16x32_avg_c, 12), + make_tuple(16, 16, &aom_highbd_sad16x16_avg_c, 12), + make_tuple(16, 8, &aom_highbd_sad16x8_avg_c, 12), + make_tuple(8, 16, &aom_highbd_sad8x16_avg_c, 12), + make_tuple(8, 8, &aom_highbd_sad8x8_avg_c, 12), + make_tuple(8, 4, &aom_highbd_sad8x4_avg_c, 12), + make_tuple(4, 8, &aom_highbd_sad4x8_avg_c, 12), + make_tuple(4, 4, &aom_highbd_sad4x4_avg_c, 12), #endif // CONFIG_VPX_HIGHBITDEPTH }; INSTANTIATE_TEST_CASE_P(C, SADavgTest, ::testing::ValuesIn(avg_c_tests)); const SadMxNx4Param x4d_c_tests[] = { - make_tuple(64, 64, &vpx_sad64x64x4d_c, -1), - make_tuple(64, 32, &vpx_sad64x32x4d_c, -1), - make_tuple(32, 64, &vpx_sad32x64x4d_c, -1), - make_tuple(32, 32, &vpx_sad32x32x4d_c, -1), - make_tuple(32, 16, &vpx_sad32x16x4d_c, -1), - make_tuple(16, 32, &vpx_sad16x32x4d_c, -1), - make_tuple(16, 16, &vpx_sad16x16x4d_c, -1), - make_tuple(16, 8, &vpx_sad16x8x4d_c, -1), - make_tuple(8, 16, &vpx_sad8x16x4d_c, -1), - make_tuple(8, 8, &vpx_sad8x8x4d_c, -1), - make_tuple(8, 4, &vpx_sad8x4x4d_c, -1), - make_tuple(4, 8, &vpx_sad4x8x4d_c, -1), - make_tuple(4, 4, &vpx_sad4x4x4d_c, -1), + make_tuple(64, 64, &aom_sad64x64x4d_c, -1), + make_tuple(64, 32, &aom_sad64x32x4d_c, -1), + make_tuple(32, 64, &aom_sad32x64x4d_c, -1), + make_tuple(32, 32, &aom_sad32x32x4d_c, -1), + make_tuple(32, 16, &aom_sad32x16x4d_c, -1), + make_tuple(16, 32, &aom_sad16x32x4d_c, -1), + make_tuple(16, 16, &aom_sad16x16x4d_c, -1), + make_tuple(16, 8, &aom_sad16x8x4d_c, -1), + make_tuple(8, 16, &aom_sad8x16x4d_c, -1), + make_tuple(8, 8, &aom_sad8x8x4d_c, -1), + make_tuple(8, 4, &aom_sad8x4x4d_c, -1), + make_tuple(4, 8, &aom_sad4x8x4d_c, -1), + make_tuple(4, 4, &aom_sad4x4x4d_c, -1), #if CONFIG_VPX_HIGHBITDEPTH - make_tuple(64, 64, &vpx_highbd_sad64x64x4d_c, 8), - make_tuple(64, 32, &vpx_highbd_sad64x32x4d_c, 8), - make_tuple(32, 64, &vpx_highbd_sad32x64x4d_c, 8), - make_tuple(32, 32, &vpx_highbd_sad32x32x4d_c, 8), - make_tuple(32, 16, &vpx_highbd_sad32x16x4d_c, 8), - make_tuple(16, 32, &vpx_highbd_sad16x32x4d_c, 8), - make_tuple(16, 16, &vpx_highbd_sad16x16x4d_c, 8), - make_tuple(16, 8, &vpx_highbd_sad16x8x4d_c, 8), - make_tuple(8, 16, &vpx_highbd_sad8x16x4d_c, 8), - make_tuple(8, 8, &vpx_highbd_sad8x8x4d_c, 8), - make_tuple(8, 4, &vpx_highbd_sad8x4x4d_c, 8), - make_tuple(4, 8, &vpx_highbd_sad4x8x4d_c, 8), - make_tuple(4, 4, &vpx_highbd_sad4x4x4d_c, 8), - make_tuple(64, 64, &vpx_highbd_sad64x64x4d_c, 10), - make_tuple(64, 32, &vpx_highbd_sad64x32x4d_c, 10), - make_tuple(32, 64, &vpx_highbd_sad32x64x4d_c, 10), - make_tuple(32, 32, &vpx_highbd_sad32x32x4d_c, 10), - make_tuple(32, 16, &vpx_highbd_sad32x16x4d_c, 10), - make_tuple(16, 32, &vpx_highbd_sad16x32x4d_c, 10), - make_tuple(16, 16, &vpx_highbd_sad16x16x4d_c, 10), - make_tuple(16, 8, &vpx_highbd_sad16x8x4d_c, 10), - make_tuple(8, 16, &vpx_highbd_sad8x16x4d_c, 10), - make_tuple(8, 8, &vpx_highbd_sad8x8x4d_c, 10), - make_tuple(8, 4, &vpx_highbd_sad8x4x4d_c, 10), - make_tuple(4, 8, &vpx_highbd_sad4x8x4d_c, 10), - make_tuple(4, 4, &vpx_highbd_sad4x4x4d_c, 10), - make_tuple(64, 64, &vpx_highbd_sad64x64x4d_c, 12), - make_tuple(64, 32, &vpx_highbd_sad64x32x4d_c, 12), - make_tuple(32, 64, &vpx_highbd_sad32x64x4d_c, 12), - make_tuple(32, 32, &vpx_highbd_sad32x32x4d_c, 12), - make_tuple(32, 16, &vpx_highbd_sad32x16x4d_c, 12), - make_tuple(16, 32, &vpx_highbd_sad16x32x4d_c, 12), - make_tuple(16, 16, &vpx_highbd_sad16x16x4d_c, 12), - make_tuple(16, 8, &vpx_highbd_sad16x8x4d_c, 12), - make_tuple(8, 16, &vpx_highbd_sad8x16x4d_c, 12), - make_tuple(8, 8, &vpx_highbd_sad8x8x4d_c, 12), - make_tuple(8, 4, &vpx_highbd_sad8x4x4d_c, 12), - make_tuple(4, 8, &vpx_highbd_sad4x8x4d_c, 12), - make_tuple(4, 4, &vpx_highbd_sad4x4x4d_c, 12), + make_tuple(64, 64, &aom_highbd_sad64x64x4d_c, 8), + make_tuple(64, 32, &aom_highbd_sad64x32x4d_c, 8), + make_tuple(32, 64, &aom_highbd_sad32x64x4d_c, 8), + make_tuple(32, 32, &aom_highbd_sad32x32x4d_c, 8), + make_tuple(32, 16, &aom_highbd_sad32x16x4d_c, 8), + make_tuple(16, 32, &aom_highbd_sad16x32x4d_c, 8), + make_tuple(16, 16, &aom_highbd_sad16x16x4d_c, 8), + make_tuple(16, 8, &aom_highbd_sad16x8x4d_c, 8), + make_tuple(8, 16, &aom_highbd_sad8x16x4d_c, 8), + make_tuple(8, 8, &aom_highbd_sad8x8x4d_c, 8), + make_tuple(8, 4, &aom_highbd_sad8x4x4d_c, 8), + make_tuple(4, 8, &aom_highbd_sad4x8x4d_c, 8), + make_tuple(4, 4, &aom_highbd_sad4x4x4d_c, 8), + make_tuple(64, 64, &aom_highbd_sad64x64x4d_c, 10), + make_tuple(64, 32, &aom_highbd_sad64x32x4d_c, 10), + make_tuple(32, 64, &aom_highbd_sad32x64x4d_c, 10), + make_tuple(32, 32, &aom_highbd_sad32x32x4d_c, 10), + make_tuple(32, 16, &aom_highbd_sad32x16x4d_c, 10), + make_tuple(16, 32, &aom_highbd_sad16x32x4d_c, 10), + make_tuple(16, 16, &aom_highbd_sad16x16x4d_c, 10), + make_tuple(16, 8, &aom_highbd_sad16x8x4d_c, 10), + make_tuple(8, 16, &aom_highbd_sad8x16x4d_c, 10), + make_tuple(8, 8, &aom_highbd_sad8x8x4d_c, 10), + make_tuple(8, 4, &aom_highbd_sad8x4x4d_c, 10), + make_tuple(4, 8, &aom_highbd_sad4x8x4d_c, 10), + make_tuple(4, 4, &aom_highbd_sad4x4x4d_c, 10), + make_tuple(64, 64, &aom_highbd_sad64x64x4d_c, 12), + make_tuple(64, 32, &aom_highbd_sad64x32x4d_c, 12), + make_tuple(32, 64, &aom_highbd_sad32x64x4d_c, 12), + make_tuple(32, 32, &aom_highbd_sad32x32x4d_c, 12), + make_tuple(32, 16, &aom_highbd_sad32x16x4d_c, 12), + make_tuple(16, 32, &aom_highbd_sad16x32x4d_c, 12), + make_tuple(16, 16, &aom_highbd_sad16x16x4d_c, 12), + make_tuple(16, 8, &aom_highbd_sad16x8x4d_c, 12), + make_tuple(8, 16, &aom_highbd_sad8x16x4d_c, 12), + make_tuple(8, 8, &aom_highbd_sad8x8x4d_c, 12), + make_tuple(8, 4, &aom_highbd_sad8x4x4d_c, 12), + make_tuple(4, 8, &aom_highbd_sad4x8x4d_c, 12), + make_tuple(4, 4, &aom_highbd_sad4x4x4d_c, 12), #endif // CONFIG_VPX_HIGHBITDEPTH }; INSTANTIATE_TEST_CASE_P(C, SADx4Test, ::testing::ValuesIn(x4d_c_tests)); @@ -649,27 +649,27 @@ INSTANTIATE_TEST_CASE_P(C, SADx4Test, ::testing::ValuesIn(x4d_c_tests)); // ARM functions #if HAVE_MEDIA const SadMxNParam media_tests[] = { - make_tuple(16, 16, &vpx_sad16x16_media, -1), + make_tuple(16, 16, &aom_sad16x16_media, -1), }; INSTANTIATE_TEST_CASE_P(MEDIA, SADTest, ::testing::ValuesIn(media_tests)); #endif // HAVE_MEDIA #if HAVE_NEON const SadMxNParam neon_tests[] = { - make_tuple(64, 64, &vpx_sad64x64_neon, -1), - make_tuple(32, 32, &vpx_sad32x32_neon, -1), - make_tuple(16, 16, &vpx_sad16x16_neon, -1), - make_tuple(16, 8, &vpx_sad16x8_neon, -1), - make_tuple(8, 16, &vpx_sad8x16_neon, -1), - make_tuple(8, 8, &vpx_sad8x8_neon, -1), - make_tuple(4, 4, &vpx_sad4x4_neon, -1), + make_tuple(64, 64, &aom_sad64x64_neon, -1), + make_tuple(32, 32, &aom_sad32x32_neon, -1), + make_tuple(16, 16, &aom_sad16x16_neon, -1), + make_tuple(16, 8, &aom_sad16x8_neon, -1), + make_tuple(8, 16, &aom_sad8x16_neon, -1), + make_tuple(8, 8, &aom_sad8x8_neon, -1), + make_tuple(4, 4, &aom_sad4x4_neon, -1), }; INSTANTIATE_TEST_CASE_P(NEON, SADTest, ::testing::ValuesIn(neon_tests)); const SadMxNx4Param x4d_neon_tests[] = { - make_tuple(64, 64, &vpx_sad64x64x4d_neon, -1), - make_tuple(32, 32, &vpx_sad32x32x4d_neon, -1), - make_tuple(16, 16, &vpx_sad16x16x4d_neon, -1), + make_tuple(64, 64, &aom_sad64x64x4d_neon, -1), + make_tuple(32, 32, &aom_sad32x32x4d_neon, -1), + make_tuple(16, 16, &aom_sad16x16x4d_neon, -1), }; INSTANTIATE_TEST_CASE_P(NEON, SADx4Test, ::testing::ValuesIn(x4d_neon_tests)); #endif // HAVE_NEON @@ -678,11 +678,11 @@ INSTANTIATE_TEST_CASE_P(NEON, SADx4Test, ::testing::ValuesIn(x4d_neon_tests)); // x86 functions #if HAVE_MMX const SadMxNParam mmx_tests[] = { - make_tuple(16, 16, &vpx_sad16x16_mmx, -1), - make_tuple(16, 8, &vpx_sad16x8_mmx, -1), - make_tuple(8, 16, &vpx_sad8x16_mmx, -1), - make_tuple(8, 8, &vpx_sad8x8_mmx, -1), - make_tuple(4, 4, &vpx_sad4x4_mmx, -1), + make_tuple(16, 16, &aom_sad16x16_mmx, -1), + make_tuple(16, 8, &aom_sad16x8_mmx, -1), + make_tuple(8, 16, &aom_sad8x16_mmx, -1), + make_tuple(8, 8, &aom_sad8x8_mmx, -1), + make_tuple(4, 4, &aom_sad4x4_mmx, -1), }; INSTANTIATE_TEST_CASE_P(MMX, SADTest, ::testing::ValuesIn(mmx_tests)); #endif // HAVE_MMX @@ -690,8 +690,8 @@ INSTANTIATE_TEST_CASE_P(MMX, SADTest, ::testing::ValuesIn(mmx_tests)); #if HAVE_SSE #if CONFIG_USE_X86INC const SadMxNx4Param x4d_sse_tests[] = { - make_tuple(4, 8, &vpx_sad4x8x4d_sse, -1), - make_tuple(4, 4, &vpx_sad4x4x4d_sse, -1), + make_tuple(4, 8, &aom_sad4x8x4d_sse, -1), + make_tuple(4, 4, &aom_sad4x4x4d_sse, -1), }; INSTANTIATE_TEST_CASE_P(SSE, SADx4Test, ::testing::ValuesIn(x4d_sse_tests)); #endif // CONFIG_USE_X86INC @@ -700,161 +700,161 @@ INSTANTIATE_TEST_CASE_P(SSE, SADx4Test, ::testing::ValuesIn(x4d_sse_tests)); #if HAVE_SSE2 #if CONFIG_USE_X86INC const SadMxNParam sse2_tests[] = { - make_tuple(64, 64, &vpx_sad64x64_sse2, -1), - make_tuple(64, 32, &vpx_sad64x32_sse2, -1), - make_tuple(32, 64, &vpx_sad32x64_sse2, -1), - make_tuple(32, 32, &vpx_sad32x32_sse2, -1), - make_tuple(32, 16, &vpx_sad32x16_sse2, -1), - make_tuple(16, 32, &vpx_sad16x32_sse2, -1), - make_tuple(16, 16, &vpx_sad16x16_sse2, -1), - make_tuple(16, 8, &vpx_sad16x8_sse2, -1), - make_tuple(8, 16, &vpx_sad8x16_sse2, -1), - make_tuple(8, 8, &vpx_sad8x8_sse2, -1), - make_tuple(8, 4, &vpx_sad8x4_sse2, -1), - make_tuple(4, 8, &vpx_sad4x8_sse2, -1), - make_tuple(4, 4, &vpx_sad4x4_sse2, -1), + make_tuple(64, 64, &aom_sad64x64_sse2, -1), + make_tuple(64, 32, &aom_sad64x32_sse2, -1), + make_tuple(32, 64, &aom_sad32x64_sse2, -1), + make_tuple(32, 32, &aom_sad32x32_sse2, -1), + make_tuple(32, 16, &aom_sad32x16_sse2, -1), + make_tuple(16, 32, &aom_sad16x32_sse2, -1), + make_tuple(16, 16, &aom_sad16x16_sse2, -1), + make_tuple(16, 8, &aom_sad16x8_sse2, -1), + make_tuple(8, 16, &aom_sad8x16_sse2, -1), + make_tuple(8, 8, &aom_sad8x8_sse2, -1), + make_tuple(8, 4, &aom_sad8x4_sse2, -1), + make_tuple(4, 8, &aom_sad4x8_sse2, -1), + make_tuple(4, 4, &aom_sad4x4_sse2, -1), #if CONFIG_VPX_HIGHBITDEPTH - make_tuple(64, 64, &vpx_highbd_sad64x64_sse2, 8), - make_tuple(64, 32, &vpx_highbd_sad64x32_sse2, 8), - make_tuple(32, 64, &vpx_highbd_sad32x64_sse2, 8), - make_tuple(32, 32, &vpx_highbd_sad32x32_sse2, 8), - make_tuple(32, 16, &vpx_highbd_sad32x16_sse2, 8), - make_tuple(16, 32, &vpx_highbd_sad16x32_sse2, 8), - make_tuple(16, 16, &vpx_highbd_sad16x16_sse2, 8), - make_tuple(16, 8, &vpx_highbd_sad16x8_sse2, 8), - make_tuple(8, 16, &vpx_highbd_sad8x16_sse2, 8), - make_tuple(8, 8, &vpx_highbd_sad8x8_sse2, 8), - make_tuple(8, 4, &vpx_highbd_sad8x4_sse2, 8), - make_tuple(64, 64, &vpx_highbd_sad64x64_sse2, 10), - make_tuple(64, 32, &vpx_highbd_sad64x32_sse2, 10), - make_tuple(32, 64, &vpx_highbd_sad32x64_sse2, 10), - make_tuple(32, 32, &vpx_highbd_sad32x32_sse2, 10), - make_tuple(32, 16, &vpx_highbd_sad32x16_sse2, 10), - make_tuple(16, 32, &vpx_highbd_sad16x32_sse2, 10), - make_tuple(16, 16, &vpx_highbd_sad16x16_sse2, 10), - make_tuple(16, 8, &vpx_highbd_sad16x8_sse2, 10), - make_tuple(8, 16, &vpx_highbd_sad8x16_sse2, 10), - make_tuple(8, 8, &vpx_highbd_sad8x8_sse2, 10), - make_tuple(8, 4, &vpx_highbd_sad8x4_sse2, 10), - make_tuple(64, 64, &vpx_highbd_sad64x64_sse2, 12), - make_tuple(64, 32, &vpx_highbd_sad64x32_sse2, 12), - make_tuple(32, 64, &vpx_highbd_sad32x64_sse2, 12), - make_tuple(32, 32, &vpx_highbd_sad32x32_sse2, 12), - make_tuple(32, 16, &vpx_highbd_sad32x16_sse2, 12), - make_tuple(16, 32, &vpx_highbd_sad16x32_sse2, 12), - make_tuple(16, 16, &vpx_highbd_sad16x16_sse2, 12), - make_tuple(16, 8, &vpx_highbd_sad16x8_sse2, 12), - make_tuple(8, 16, &vpx_highbd_sad8x16_sse2, 12), - make_tuple(8, 8, &vpx_highbd_sad8x8_sse2, 12), - make_tuple(8, 4, &vpx_highbd_sad8x4_sse2, 12), + make_tuple(64, 64, &aom_highbd_sad64x64_sse2, 8), + make_tuple(64, 32, &aom_highbd_sad64x32_sse2, 8), + make_tuple(32, 64, &aom_highbd_sad32x64_sse2, 8), + make_tuple(32, 32, &aom_highbd_sad32x32_sse2, 8), + make_tuple(32, 16, &aom_highbd_sad32x16_sse2, 8), + make_tuple(16, 32, &aom_highbd_sad16x32_sse2, 8), + make_tuple(16, 16, &aom_highbd_sad16x16_sse2, 8), + make_tuple(16, 8, &aom_highbd_sad16x8_sse2, 8), + make_tuple(8, 16, &aom_highbd_sad8x16_sse2, 8), + make_tuple(8, 8, &aom_highbd_sad8x8_sse2, 8), + make_tuple(8, 4, &aom_highbd_sad8x4_sse2, 8), + make_tuple(64, 64, &aom_highbd_sad64x64_sse2, 10), + make_tuple(64, 32, &aom_highbd_sad64x32_sse2, 10), + make_tuple(32, 64, &aom_highbd_sad32x64_sse2, 10), + make_tuple(32, 32, &aom_highbd_sad32x32_sse2, 10), + make_tuple(32, 16, &aom_highbd_sad32x16_sse2, 10), + make_tuple(16, 32, &aom_highbd_sad16x32_sse2, 10), + make_tuple(16, 16, &aom_highbd_sad16x16_sse2, 10), + make_tuple(16, 8, &aom_highbd_sad16x8_sse2, 10), + make_tuple(8, 16, &aom_highbd_sad8x16_sse2, 10), + make_tuple(8, 8, &aom_highbd_sad8x8_sse2, 10), + make_tuple(8, 4, &aom_highbd_sad8x4_sse2, 10), + make_tuple(64, 64, &aom_highbd_sad64x64_sse2, 12), + make_tuple(64, 32, &aom_highbd_sad64x32_sse2, 12), + make_tuple(32, 64, &aom_highbd_sad32x64_sse2, 12), + make_tuple(32, 32, &aom_highbd_sad32x32_sse2, 12), + make_tuple(32, 16, &aom_highbd_sad32x16_sse2, 12), + make_tuple(16, 32, &aom_highbd_sad16x32_sse2, 12), + make_tuple(16, 16, &aom_highbd_sad16x16_sse2, 12), + make_tuple(16, 8, &aom_highbd_sad16x8_sse2, 12), + make_tuple(8, 16, &aom_highbd_sad8x16_sse2, 12), + make_tuple(8, 8, &aom_highbd_sad8x8_sse2, 12), + make_tuple(8, 4, &aom_highbd_sad8x4_sse2, 12), #endif // CONFIG_VPX_HIGHBITDEPTH }; INSTANTIATE_TEST_CASE_P(SSE2, SADTest, ::testing::ValuesIn(sse2_tests)); const SadMxNAvgParam avg_sse2_tests[] = { - make_tuple(64, 64, &vpx_sad64x64_avg_sse2, -1), - make_tuple(64, 32, &vpx_sad64x32_avg_sse2, -1), - make_tuple(32, 64, &vpx_sad32x64_avg_sse2, -1), - make_tuple(32, 32, &vpx_sad32x32_avg_sse2, -1), - make_tuple(32, 16, &vpx_sad32x16_avg_sse2, -1), - make_tuple(16, 32, &vpx_sad16x32_avg_sse2, -1), - make_tuple(16, 16, &vpx_sad16x16_avg_sse2, -1), - make_tuple(16, 8, &vpx_sad16x8_avg_sse2, -1), - make_tuple(8, 16, &vpx_sad8x16_avg_sse2, -1), - make_tuple(8, 8, &vpx_sad8x8_avg_sse2, -1), - make_tuple(8, 4, &vpx_sad8x4_avg_sse2, -1), - make_tuple(4, 8, &vpx_sad4x8_avg_sse2, -1), - make_tuple(4, 4, &vpx_sad4x4_avg_sse2, -1), + make_tuple(64, 64, &aom_sad64x64_avg_sse2, -1), + make_tuple(64, 32, &aom_sad64x32_avg_sse2, -1), + make_tuple(32, 64, &aom_sad32x64_avg_sse2, -1), + make_tuple(32, 32, &aom_sad32x32_avg_sse2, -1), + make_tuple(32, 16, &aom_sad32x16_avg_sse2, -1), + make_tuple(16, 32, &aom_sad16x32_avg_sse2, -1), + make_tuple(16, 16, &aom_sad16x16_avg_sse2, -1), + make_tuple(16, 8, &aom_sad16x8_avg_sse2, -1), + make_tuple(8, 16, &aom_sad8x16_avg_sse2, -1), + make_tuple(8, 8, &aom_sad8x8_avg_sse2, -1), + make_tuple(8, 4, &aom_sad8x4_avg_sse2, -1), + make_tuple(4, 8, &aom_sad4x8_avg_sse2, -1), + make_tuple(4, 4, &aom_sad4x4_avg_sse2, -1), #if CONFIG_VPX_HIGHBITDEPTH - make_tuple(64, 64, &vpx_highbd_sad64x64_avg_sse2, 8), - make_tuple(64, 32, &vpx_highbd_sad64x32_avg_sse2, 8), - make_tuple(32, 64, &vpx_highbd_sad32x64_avg_sse2, 8), - make_tuple(32, 32, &vpx_highbd_sad32x32_avg_sse2, 8), - make_tuple(32, 16, &vpx_highbd_sad32x16_avg_sse2, 8), - make_tuple(16, 32, &vpx_highbd_sad16x32_avg_sse2, 8), - make_tuple(16, 16, &vpx_highbd_sad16x16_avg_sse2, 8), - make_tuple(16, 8, &vpx_highbd_sad16x8_avg_sse2, 8), - make_tuple(8, 16, &vpx_highbd_sad8x16_avg_sse2, 8), - make_tuple(8, 8, &vpx_highbd_sad8x8_avg_sse2, 8), - make_tuple(8, 4, &vpx_highbd_sad8x4_avg_sse2, 8), - make_tuple(64, 64, &vpx_highbd_sad64x64_avg_sse2, 10), - make_tuple(64, 32, &vpx_highbd_sad64x32_avg_sse2, 10), - make_tuple(32, 64, &vpx_highbd_sad32x64_avg_sse2, 10), - make_tuple(32, 32, &vpx_highbd_sad32x32_avg_sse2, 10), - make_tuple(32, 16, &vpx_highbd_sad32x16_avg_sse2, 10), - make_tuple(16, 32, &vpx_highbd_sad16x32_avg_sse2, 10), - make_tuple(16, 16, &vpx_highbd_sad16x16_avg_sse2, 10), - make_tuple(16, 8, &vpx_highbd_sad16x8_avg_sse2, 10), - make_tuple(8, 16, &vpx_highbd_sad8x16_avg_sse2, 10), - make_tuple(8, 8, &vpx_highbd_sad8x8_avg_sse2, 10), - make_tuple(8, 4, &vpx_highbd_sad8x4_avg_sse2, 10), - make_tuple(64, 64, &vpx_highbd_sad64x64_avg_sse2, 12), - make_tuple(64, 32, &vpx_highbd_sad64x32_avg_sse2, 12), - make_tuple(32, 64, &vpx_highbd_sad32x64_avg_sse2, 12), - make_tuple(32, 32, &vpx_highbd_sad32x32_avg_sse2, 12), - make_tuple(32, 16, &vpx_highbd_sad32x16_avg_sse2, 12), - make_tuple(16, 32, &vpx_highbd_sad16x32_avg_sse2, 12), - make_tuple(16, 16, &vpx_highbd_sad16x16_avg_sse2, 12), - make_tuple(16, 8, &vpx_highbd_sad16x8_avg_sse2, 12), - make_tuple(8, 16, &vpx_highbd_sad8x16_avg_sse2, 12), - make_tuple(8, 8, &vpx_highbd_sad8x8_avg_sse2, 12), - make_tuple(8, 4, &vpx_highbd_sad8x4_avg_sse2, 12), + make_tuple(64, 64, &aom_highbd_sad64x64_avg_sse2, 8), + make_tuple(64, 32, &aom_highbd_sad64x32_avg_sse2, 8), + make_tuple(32, 64, &aom_highbd_sad32x64_avg_sse2, 8), + make_tuple(32, 32, &aom_highbd_sad32x32_avg_sse2, 8), + make_tuple(32, 16, &aom_highbd_sad32x16_avg_sse2, 8), + make_tuple(16, 32, &aom_highbd_sad16x32_avg_sse2, 8), + make_tuple(16, 16, &aom_highbd_sad16x16_avg_sse2, 8), + make_tuple(16, 8, &aom_highbd_sad16x8_avg_sse2, 8), + make_tuple(8, 16, &aom_highbd_sad8x16_avg_sse2, 8), + make_tuple(8, 8, &aom_highbd_sad8x8_avg_sse2, 8), + make_tuple(8, 4, &aom_highbd_sad8x4_avg_sse2, 8), + make_tuple(64, 64, &aom_highbd_sad64x64_avg_sse2, 10), + make_tuple(64, 32, &aom_highbd_sad64x32_avg_sse2, 10), + make_tuple(32, 64, &aom_highbd_sad32x64_avg_sse2, 10), + make_tuple(32, 32, &aom_highbd_sad32x32_avg_sse2, 10), + make_tuple(32, 16, &aom_highbd_sad32x16_avg_sse2, 10), + make_tuple(16, 32, &aom_highbd_sad16x32_avg_sse2, 10), + make_tuple(16, 16, &aom_highbd_sad16x16_avg_sse2, 10), + make_tuple(16, 8, &aom_highbd_sad16x8_avg_sse2, 10), + make_tuple(8, 16, &aom_highbd_sad8x16_avg_sse2, 10), + make_tuple(8, 8, &aom_highbd_sad8x8_avg_sse2, 10), + make_tuple(8, 4, &aom_highbd_sad8x4_avg_sse2, 10), + make_tuple(64, 64, &aom_highbd_sad64x64_avg_sse2, 12), + make_tuple(64, 32, &aom_highbd_sad64x32_avg_sse2, 12), + make_tuple(32, 64, &aom_highbd_sad32x64_avg_sse2, 12), + make_tuple(32, 32, &aom_highbd_sad32x32_avg_sse2, 12), + make_tuple(32, 16, &aom_highbd_sad32x16_avg_sse2, 12), + make_tuple(16, 32, &aom_highbd_sad16x32_avg_sse2, 12), + make_tuple(16, 16, &aom_highbd_sad16x16_avg_sse2, 12), + make_tuple(16, 8, &aom_highbd_sad16x8_avg_sse2, 12), + make_tuple(8, 16, &aom_highbd_sad8x16_avg_sse2, 12), + make_tuple(8, 8, &aom_highbd_sad8x8_avg_sse2, 12), + make_tuple(8, 4, &aom_highbd_sad8x4_avg_sse2, 12), #endif // CONFIG_VPX_HIGHBITDEPTH }; INSTANTIATE_TEST_CASE_P(SSE2, SADavgTest, ::testing::ValuesIn(avg_sse2_tests)); const SadMxNx4Param x4d_sse2_tests[] = { - make_tuple(64, 64, &vpx_sad64x64x4d_sse2, -1), - make_tuple(64, 32, &vpx_sad64x32x4d_sse2, -1), - make_tuple(32, 64, &vpx_sad32x64x4d_sse2, -1), - make_tuple(32, 32, &vpx_sad32x32x4d_sse2, -1), - make_tuple(32, 16, &vpx_sad32x16x4d_sse2, -1), - make_tuple(16, 32, &vpx_sad16x32x4d_sse2, -1), - make_tuple(16, 16, &vpx_sad16x16x4d_sse2, -1), - make_tuple(16, 8, &vpx_sad16x8x4d_sse2, -1), - make_tuple(8, 16, &vpx_sad8x16x4d_sse2, -1), - make_tuple(8, 8, &vpx_sad8x8x4d_sse2, -1), - make_tuple(8, 4, &vpx_sad8x4x4d_sse2, -1), + make_tuple(64, 64, &aom_sad64x64x4d_sse2, -1), + make_tuple(64, 32, &aom_sad64x32x4d_sse2, -1), + make_tuple(32, 64, &aom_sad32x64x4d_sse2, -1), + make_tuple(32, 32, &aom_sad32x32x4d_sse2, -1), + make_tuple(32, 16, &aom_sad32x16x4d_sse2, -1), + make_tuple(16, 32, &aom_sad16x32x4d_sse2, -1), + make_tuple(16, 16, &aom_sad16x16x4d_sse2, -1), + make_tuple(16, 8, &aom_sad16x8x4d_sse2, -1), + make_tuple(8, 16, &aom_sad8x16x4d_sse2, -1), + make_tuple(8, 8, &aom_sad8x8x4d_sse2, -1), + make_tuple(8, 4, &aom_sad8x4x4d_sse2, -1), #if CONFIG_VPX_HIGHBITDEPTH - make_tuple(64, 64, &vpx_highbd_sad64x64x4d_sse2, 8), - make_tuple(64, 32, &vpx_highbd_sad64x32x4d_sse2, 8), - make_tuple(32, 64, &vpx_highbd_sad32x64x4d_sse2, 8), - make_tuple(32, 32, &vpx_highbd_sad32x32x4d_sse2, 8), - make_tuple(32, 16, &vpx_highbd_sad32x16x4d_sse2, 8), - make_tuple(16, 32, &vpx_highbd_sad16x32x4d_sse2, 8), - make_tuple(16, 16, &vpx_highbd_sad16x16x4d_sse2, 8), - make_tuple(16, 8, &vpx_highbd_sad16x8x4d_sse2, 8), - make_tuple(8, 16, &vpx_highbd_sad8x16x4d_sse2, 8), - make_tuple(8, 8, &vpx_highbd_sad8x8x4d_sse2, 8), - make_tuple(8, 4, &vpx_highbd_sad8x4x4d_sse2, 8), - make_tuple(4, 8, &vpx_highbd_sad4x8x4d_sse2, 8), - make_tuple(4, 4, &vpx_highbd_sad4x4x4d_sse2, 8), - make_tuple(64, 64, &vpx_highbd_sad64x64x4d_sse2, 10), - make_tuple(64, 32, &vpx_highbd_sad64x32x4d_sse2, 10), - make_tuple(32, 64, &vpx_highbd_sad32x64x4d_sse2, 10), - make_tuple(32, 32, &vpx_highbd_sad32x32x4d_sse2, 10), - make_tuple(32, 16, &vpx_highbd_sad32x16x4d_sse2, 10), - make_tuple(16, 32, &vpx_highbd_sad16x32x4d_sse2, 10), - make_tuple(16, 16, &vpx_highbd_sad16x16x4d_sse2, 10), - make_tuple(16, 8, &vpx_highbd_sad16x8x4d_sse2, 10), - make_tuple(8, 16, &vpx_highbd_sad8x16x4d_sse2, 10), - make_tuple(8, 8, &vpx_highbd_sad8x8x4d_sse2, 10), - make_tuple(8, 4, &vpx_highbd_sad8x4x4d_sse2, 10), - make_tuple(4, 8, &vpx_highbd_sad4x8x4d_sse2, 10), - make_tuple(4, 4, &vpx_highbd_sad4x4x4d_sse2, 10), - make_tuple(64, 64, &vpx_highbd_sad64x64x4d_sse2, 12), - make_tuple(64, 32, &vpx_highbd_sad64x32x4d_sse2, 12), - make_tuple(32, 64, &vpx_highbd_sad32x64x4d_sse2, 12), - make_tuple(32, 32, &vpx_highbd_sad32x32x4d_sse2, 12), - make_tuple(32, 16, &vpx_highbd_sad32x16x4d_sse2, 12), - make_tuple(16, 32, &vpx_highbd_sad16x32x4d_sse2, 12), - make_tuple(16, 16, &vpx_highbd_sad16x16x4d_sse2, 12), - make_tuple(16, 8, &vpx_highbd_sad16x8x4d_sse2, 12), - make_tuple(8, 16, &vpx_highbd_sad8x16x4d_sse2, 12), - make_tuple(8, 8, &vpx_highbd_sad8x8x4d_sse2, 12), - make_tuple(8, 4, &vpx_highbd_sad8x4x4d_sse2, 12), - make_tuple(4, 8, &vpx_highbd_sad4x8x4d_sse2, 12), - make_tuple(4, 4, &vpx_highbd_sad4x4x4d_sse2, 12), + make_tuple(64, 64, &aom_highbd_sad64x64x4d_sse2, 8), + make_tuple(64, 32, &aom_highbd_sad64x32x4d_sse2, 8), + make_tuple(32, 64, &aom_highbd_sad32x64x4d_sse2, 8), + make_tuple(32, 32, &aom_highbd_sad32x32x4d_sse2, 8), + make_tuple(32, 16, &aom_highbd_sad32x16x4d_sse2, 8), + make_tuple(16, 32, &aom_highbd_sad16x32x4d_sse2, 8), + make_tuple(16, 16, &aom_highbd_sad16x16x4d_sse2, 8), + make_tuple(16, 8, &aom_highbd_sad16x8x4d_sse2, 8), + make_tuple(8, 16, &aom_highbd_sad8x16x4d_sse2, 8), + make_tuple(8, 8, &aom_highbd_sad8x8x4d_sse2, 8), + make_tuple(8, 4, &aom_highbd_sad8x4x4d_sse2, 8), + make_tuple(4, 8, &aom_highbd_sad4x8x4d_sse2, 8), + make_tuple(4, 4, &aom_highbd_sad4x4x4d_sse2, 8), + make_tuple(64, 64, &aom_highbd_sad64x64x4d_sse2, 10), + make_tuple(64, 32, &aom_highbd_sad64x32x4d_sse2, 10), + make_tuple(32, 64, &aom_highbd_sad32x64x4d_sse2, 10), + make_tuple(32, 32, &aom_highbd_sad32x32x4d_sse2, 10), + make_tuple(32, 16, &aom_highbd_sad32x16x4d_sse2, 10), + make_tuple(16, 32, &aom_highbd_sad16x32x4d_sse2, 10), + make_tuple(16, 16, &aom_highbd_sad16x16x4d_sse2, 10), + make_tuple(16, 8, &aom_highbd_sad16x8x4d_sse2, 10), + make_tuple(8, 16, &aom_highbd_sad8x16x4d_sse2, 10), + make_tuple(8, 8, &aom_highbd_sad8x8x4d_sse2, 10), + make_tuple(8, 4, &aom_highbd_sad8x4x4d_sse2, 10), + make_tuple(4, 8, &aom_highbd_sad4x8x4d_sse2, 10), + make_tuple(4, 4, &aom_highbd_sad4x4x4d_sse2, 10), + make_tuple(64, 64, &aom_highbd_sad64x64x4d_sse2, 12), + make_tuple(64, 32, &aom_highbd_sad64x32x4d_sse2, 12), + make_tuple(32, 64, &aom_highbd_sad32x64x4d_sse2, 12), + make_tuple(32, 32, &aom_highbd_sad32x32x4d_sse2, 12), + make_tuple(32, 16, &aom_highbd_sad32x16x4d_sse2, 12), + make_tuple(16, 32, &aom_highbd_sad16x32x4d_sse2, 12), + make_tuple(16, 16, &aom_highbd_sad16x16x4d_sse2, 12), + make_tuple(16, 8, &aom_highbd_sad16x8x4d_sse2, 12), + make_tuple(8, 16, &aom_highbd_sad8x16x4d_sse2, 12), + make_tuple(8, 8, &aom_highbd_sad8x8x4d_sse2, 12), + make_tuple(8, 4, &aom_highbd_sad8x4x4d_sse2, 12), + make_tuple(4, 8, &aom_highbd_sad4x8x4d_sse2, 12), + make_tuple(4, 4, &aom_highbd_sad4x4x4d_sse2, 12), #endif // CONFIG_VPX_HIGHBITDEPTH }; INSTANTIATE_TEST_CASE_P(SSE2, SADx4Test, ::testing::ValuesIn(x4d_sse2_tests)); @@ -875,26 +875,26 @@ INSTANTIATE_TEST_CASE_P(SSE2, SADx4Test, ::testing::ValuesIn(x4d_sse2_tests)); #if HAVE_AVX2 const SadMxNParam avx2_tests[] = { - make_tuple(64, 64, &vpx_sad64x64_avx2, -1), - make_tuple(64, 32, &vpx_sad64x32_avx2, -1), - make_tuple(32, 64, &vpx_sad32x64_avx2, -1), - make_tuple(32, 32, &vpx_sad32x32_avx2, -1), - make_tuple(32, 16, &vpx_sad32x16_avx2, -1), + make_tuple(64, 64, &aom_sad64x64_avx2, -1), + make_tuple(64, 32, &aom_sad64x32_avx2, -1), + make_tuple(32, 64, &aom_sad32x64_avx2, -1), + make_tuple(32, 32, &aom_sad32x32_avx2, -1), + make_tuple(32, 16, &aom_sad32x16_avx2, -1), }; INSTANTIATE_TEST_CASE_P(AVX2, SADTest, ::testing::ValuesIn(avx2_tests)); const SadMxNAvgParam avg_avx2_tests[] = { - make_tuple(64, 64, &vpx_sad64x64_avg_avx2, -1), - make_tuple(64, 32, &vpx_sad64x32_avg_avx2, -1), - make_tuple(32, 64, &vpx_sad32x64_avg_avx2, -1), - make_tuple(32, 32, &vpx_sad32x32_avg_avx2, -1), - make_tuple(32, 16, &vpx_sad32x16_avg_avx2, -1), + make_tuple(64, 64, &aom_sad64x64_avg_avx2, -1), + make_tuple(64, 32, &aom_sad64x32_avg_avx2, -1), + make_tuple(32, 64, &aom_sad32x64_avg_avx2, -1), + make_tuple(32, 32, &aom_sad32x32_avg_avx2, -1), + make_tuple(32, 16, &aom_sad32x16_avg_avx2, -1), }; INSTANTIATE_TEST_CASE_P(AVX2, SADavgTest, ::testing::ValuesIn(avg_avx2_tests)); const SadMxNx4Param x4d_avx2_tests[] = { - make_tuple(64, 64, &vpx_sad64x64x4d_avx2, -1), - make_tuple(32, 32, &vpx_sad32x32x4d_avx2, -1), + make_tuple(64, 64, &aom_sad64x64x4d_avx2, -1), + make_tuple(32, 32, &aom_sad32x32x4d_avx2, -1), }; INSTANTIATE_TEST_CASE_P(AVX2, SADx4Test, ::testing::ValuesIn(x4d_avx2_tests)); #endif // HAVE_AVX2 @@ -903,53 +903,53 @@ INSTANTIATE_TEST_CASE_P(AVX2, SADx4Test, ::testing::ValuesIn(x4d_avx2_tests)); // MIPS functions #if HAVE_MSA const SadMxNParam msa_tests[] = { - make_tuple(64, 64, &vpx_sad64x64_msa, -1), - make_tuple(64, 32, &vpx_sad64x32_msa, -1), - make_tuple(32, 64, &vpx_sad32x64_msa, -1), - make_tuple(32, 32, &vpx_sad32x32_msa, -1), - make_tuple(32, 16, &vpx_sad32x16_msa, -1), - make_tuple(16, 32, &vpx_sad16x32_msa, -1), - make_tuple(16, 16, &vpx_sad16x16_msa, -1), - make_tuple(16, 8, &vpx_sad16x8_msa, -1), - make_tuple(8, 16, &vpx_sad8x16_msa, -1), - make_tuple(8, 8, &vpx_sad8x8_msa, -1), - make_tuple(8, 4, &vpx_sad8x4_msa, -1), - make_tuple(4, 8, &vpx_sad4x8_msa, -1), - make_tuple(4, 4, &vpx_sad4x4_msa, -1), + make_tuple(64, 64, &aom_sad64x64_msa, -1), + make_tuple(64, 32, &aom_sad64x32_msa, -1), + make_tuple(32, 64, &aom_sad32x64_msa, -1), + make_tuple(32, 32, &aom_sad32x32_msa, -1), + make_tuple(32, 16, &aom_sad32x16_msa, -1), + make_tuple(16, 32, &aom_sad16x32_msa, -1), + make_tuple(16, 16, &aom_sad16x16_msa, -1), + make_tuple(16, 8, &aom_sad16x8_msa, -1), + make_tuple(8, 16, &aom_sad8x16_msa, -1), + make_tuple(8, 8, &aom_sad8x8_msa, -1), + make_tuple(8, 4, &aom_sad8x4_msa, -1), + make_tuple(4, 8, &aom_sad4x8_msa, -1), + make_tuple(4, 4, &aom_sad4x4_msa, -1), }; INSTANTIATE_TEST_CASE_P(MSA, SADTest, ::testing::ValuesIn(msa_tests)); const SadMxNAvgParam avg_msa_tests[] = { - make_tuple(64, 64, &vpx_sad64x64_avg_msa, -1), - make_tuple(64, 32, &vpx_sad64x32_avg_msa, -1), - make_tuple(32, 64, &vpx_sad32x64_avg_msa, -1), - make_tuple(32, 32, &vpx_sad32x32_avg_msa, -1), - make_tuple(32, 16, &vpx_sad32x16_avg_msa, -1), - make_tuple(16, 32, &vpx_sad16x32_avg_msa, -1), - make_tuple(16, 16, &vpx_sad16x16_avg_msa, -1), - make_tuple(16, 8, &vpx_sad16x8_avg_msa, -1), - make_tuple(8, 16, &vpx_sad8x16_avg_msa, -1), - make_tuple(8, 8, &vpx_sad8x8_avg_msa, -1), - make_tuple(8, 4, &vpx_sad8x4_avg_msa, -1), - make_tuple(4, 8, &vpx_sad4x8_avg_msa, -1), - make_tuple(4, 4, &vpx_sad4x4_avg_msa, -1), + make_tuple(64, 64, &aom_sad64x64_avg_msa, -1), + make_tuple(64, 32, &aom_sad64x32_avg_msa, -1), + make_tuple(32, 64, &aom_sad32x64_avg_msa, -1), + make_tuple(32, 32, &aom_sad32x32_avg_msa, -1), + make_tuple(32, 16, &aom_sad32x16_avg_msa, -1), + make_tuple(16, 32, &aom_sad16x32_avg_msa, -1), + make_tuple(16, 16, &aom_sad16x16_avg_msa, -1), + make_tuple(16, 8, &aom_sad16x8_avg_msa, -1), + make_tuple(8, 16, &aom_sad8x16_avg_msa, -1), + make_tuple(8, 8, &aom_sad8x8_avg_msa, -1), + make_tuple(8, 4, &aom_sad8x4_avg_msa, -1), + make_tuple(4, 8, &aom_sad4x8_avg_msa, -1), + make_tuple(4, 4, &aom_sad4x4_avg_msa, -1), }; INSTANTIATE_TEST_CASE_P(MSA, SADavgTest, ::testing::ValuesIn(avg_msa_tests)); const SadMxNx4Param x4d_msa_tests[] = { - make_tuple(64, 64, &vpx_sad64x64x4d_msa, -1), - make_tuple(64, 32, &vpx_sad64x32x4d_msa, -1), - make_tuple(32, 64, &vpx_sad32x64x4d_msa, -1), - make_tuple(32, 32, &vpx_sad32x32x4d_msa, -1), - make_tuple(32, 16, &vpx_sad32x16x4d_msa, -1), - make_tuple(16, 32, &vpx_sad16x32x4d_msa, -1), - make_tuple(16, 16, &vpx_sad16x16x4d_msa, -1), - make_tuple(16, 8, &vpx_sad16x8x4d_msa, -1), - make_tuple(8, 16, &vpx_sad8x16x4d_msa, -1), - make_tuple(8, 8, &vpx_sad8x8x4d_msa, -1), - make_tuple(8, 4, &vpx_sad8x4x4d_msa, -1), - make_tuple(4, 8, &vpx_sad4x8x4d_msa, -1), - make_tuple(4, 4, &vpx_sad4x4x4d_msa, -1), + make_tuple(64, 64, &aom_sad64x64x4d_msa, -1), + make_tuple(64, 32, &aom_sad64x32x4d_msa, -1), + make_tuple(32, 64, &aom_sad32x64x4d_msa, -1), + make_tuple(32, 32, &aom_sad32x32x4d_msa, -1), + make_tuple(32, 16, &aom_sad32x16x4d_msa, -1), + make_tuple(16, 32, &aom_sad16x32x4d_msa, -1), + make_tuple(16, 16, &aom_sad16x16x4d_msa, -1), + make_tuple(16, 8, &aom_sad16x8x4d_msa, -1), + make_tuple(8, 16, &aom_sad8x16x4d_msa, -1), + make_tuple(8, 8, &aom_sad8x8x4d_msa, -1), + make_tuple(8, 4, &aom_sad8x4x4d_msa, -1), + make_tuple(4, 8, &aom_sad4x8x4d_msa, -1), + make_tuple(4, 4, &aom_sad4x4x4d_msa, -1), }; INSTANTIATE_TEST_CASE_P(MSA, SADx4Test, ::testing::ValuesIn(x4d_msa_tests)); #endif // HAVE_MSA diff --git a/test/set_maps.sh b/test/set_maps.sh index 716545b86c6552f38747e75c2664d8882bbc4236..637b96a6df0598b788b8a4f6a6e77ecdf09f400f 100755 --- a/test/set_maps.sh +++ b/test/set_maps.sh @@ -19,10 +19,10 @@ # $LIBAOM_BIN_PATH. set_maps_verify_environment() { if [ ! -e "${YUV_RAW_INPUT}" ]; then - echo "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi - if [ -z "$(vpx_tool_path set_maps)" ]; then + if [ -z "$(aom_tool_path set_maps)" ]; then elog "set_maps not found. It must exist in LIBAOM_BIN_PATH or its parent." return 1 fi @@ -30,7 +30,7 @@ set_maps_verify_environment() { # Runs set_maps using the codec specified by $1. set_maps() { - local encoder="$(vpx_tool_path set_maps)" + local encoder="$(aom_tool_path set_maps)" local codec="$1" local output_file="${VPX_TEST_OUTPUT_DIR}/set_maps_${codec}.ivf" diff --git a/test/simple_decoder.sh b/test/simple_decoder.sh index 772a40583a17ea670d9c879b21529e1717e96e51..5f62728d5275484b88e62d9aafc99f33403e1b2d 100755 --- a/test/simple_decoder.sh +++ b/test/simple_decoder.sh @@ -19,7 +19,7 @@ # $VP8_IVF_FILE and $VP9_IVF_FILE are required. simple_decoder_verify_environment() { if [ ! -e "${VP8_IVF_FILE}" ] || [ ! -e "${VP9_IVF_FILE}" ]; then - echo "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi } diff --git a/test/simple_encoder.sh b/test/simple_encoder.sh index 21937a7e15b38b841f41257555c6203830a52ff8..e3a9864ecf61a72433d497da7752f2bcd08bc7ca 100755 --- a/test/simple_encoder.sh +++ b/test/simple_encoder.sh @@ -18,7 +18,7 @@ # Environment check: $YUV_RAW_INPUT is required. simple_encoder_verify_environment() { if [ ! -e "${YUV_RAW_INPUT}" ]; then - echo "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi } diff --git a/test/subtract_test.cc b/test/subtract_test.cc index fd51e2a9a96fd222abe124d2247d6bc6437ebeeb..b23b9ab833d70a817759689697c1bfa699a3a9be 100644 --- a/test/subtract_test.cc +++ b/test/subtract_test.cc @@ -11,13 +11,13 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "./av1_rtcd.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" #include "av1/common/blockd.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" typedef void (*SubtractFunc)(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, @@ -42,11 +42,11 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) { const int block_width = 4 * num_4x4_blocks_wide_lookup[bsize]; const int block_height = 4 * num_4x4_blocks_high_lookup[bsize]; int16_t *diff = reinterpret_cast<int16_t *>( - vpx_memalign(16, sizeof(*diff) * block_width * block_height * 2)); + aom_memalign(16, sizeof(*diff) * block_width * block_height * 2)); uint8_t *pred = reinterpret_cast<uint8_t *>( - vpx_memalign(16, block_width * block_height * 2)); + aom_memalign(16, block_width * block_height * 2)); uint8_t *src = reinterpret_cast<uint8_t *>( - vpx_memalign(16, block_width * block_height * 2)); + aom_memalign(16, block_width * block_height * 2)); for (int n = 0; n < 100; n++) { for (int r = 0; r < block_height; ++r) { @@ -79,26 +79,26 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) { } } } - vpx_free(diff); - vpx_free(pred); - vpx_free(src); + aom_free(diff); + aom_free(pred); + aom_free(src); } } INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest, - ::testing::Values(vpx_subtract_block_c)); + ::testing::Values(aom_subtract_block_c)); #if HAVE_SSE2 && CONFIG_USE_X86INC INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest, - ::testing::Values(vpx_subtract_block_sse2)); + ::testing::Values(aom_subtract_block_sse2)); #endif #if HAVE_NEON INSTANTIATE_TEST_CASE_P(NEON, VP9SubtractBlockTest, - ::testing::Values(vpx_subtract_block_neon)); + ::testing::Values(aom_subtract_block_neon)); #endif #if HAVE_MSA INSTANTIATE_TEST_CASE_P(MSA, VP9SubtractBlockTest, - ::testing::Values(vpx_subtract_block_msa)); + ::testing::Values(aom_subtract_block_msa)); #endif } // namespace vp9 diff --git a/test/superframe_test.cc b/test/superframe_test.cc index d2e422df147c34ede8481580919812d8e37dd5d7..40d4f6f8cc3668adcf0ef031e2621e5122250ddd 100644 --- a/test/superframe_test.cc +++ b/test/superframe_test.cc @@ -49,8 +49,8 @@ class SuperframeTest } } - virtual const vpx_codec_cx_pkt_t *MutateEncoderOutputHook( - const vpx_codec_cx_pkt_t *pkt) { + virtual const aom_codec_cx_pkt_t *MutateEncoderOutputHook( + const aom_codec_cx_pkt_t *pkt) { if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) return pkt; const uint8_t *buffer = reinterpret_cast<uint8_t *>(pkt->data.frame.buf); @@ -83,9 +83,9 @@ class SuperframeTest int is_vp10_style_superframe_; int sf_count_; int sf_count_max_; - vpx_codec_cx_pkt_t modified_pkt_; + aom_codec_cx_pkt_t modified_pkt_; uint8_t *modified_buf_; - vpx_codec_pts_t last_sf_pts_; + aom_codec_pts_t last_sf_pts_; }; TEST_P(SuperframeTest, TestSuperframeIndexIsOptional) { diff --git a/test/svc_test.cc b/test/svc_test.cc index 2778f7a361bf1504298731d8945cd50c3a5373bd..dc5ec68267316abc0a39a6811a088e193c22d0e3 100644 --- a/test/svc_test.cc +++ b/test/svc_test.cc @@ -18,7 +18,7 @@ #include "aom/svc_context.h" #include "aom/vp8cx.h" -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" namespace { @@ -46,9 +46,9 @@ class SvcTest : public ::testing::Test { svc_.log_level = SVC_LOG_DEBUG; svc_.log_print = 0; - codec_iface_ = vpx_codec_vp9_cx(); - const vpx_codec_err_t res = - vpx_codec_enc_config_default(codec_iface_, &codec_enc_, 0); + codec_iface_ = aom_codec_vp9_cx(); + const aom_codec_err_t res = + aom_codec_enc_config_default(codec_iface_, &codec_enc_, 0); EXPECT_EQ(VPX_CODEC_OK, res); codec_enc_.g_w = kWidth; @@ -58,7 +58,7 @@ class SvcTest : public ::testing::Test { codec_enc_.kf_min_dist = 100; codec_enc_.kf_max_dist = 100; - vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t(); + aom_codec_dec_cfg_t dec_cfg = aom_codec_dec_cfg_t(); VP9CodecFactory codec_factory; decoder_ = codec_factory.CreateDecoder(dec_cfg, 0); @@ -72,26 +72,26 @@ class SvcTest : public ::testing::Test { } void InitializeEncoder() { - const vpx_codec_err_t res = - vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + const aom_codec_err_t res = + aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_OK, res); - vpx_codec_control(&codec_, VP8E_SET_CPUUSED, 4); // Make the test faster - vpx_codec_control(&codec_, VP9E_SET_TILE_COLUMNS, tile_columns_); - vpx_codec_control(&codec_, VP9E_SET_TILE_ROWS, tile_rows_); + aom_codec_control(&codec_, VP8E_SET_CPUUSED, 4); // Make the test faster + aom_codec_control(&codec_, VP9E_SET_TILE_COLUMNS, tile_columns_); + aom_codec_control(&codec_, VP9E_SET_TILE_ROWS, tile_rows_); codec_initialized_ = true; } void ReleaseEncoder() { - vpx_svc_release(&svc_); - if (codec_initialized_) vpx_codec_destroy(&codec_); + aom_svc_release(&svc_); + if (codec_initialized_) aom_codec_destroy(&codec_); codec_initialized_ = false; } void GetStatsData(std::string *const stats_buf) { - vpx_codec_iter_t iter = NULL; - const vpx_codec_cx_pkt_t *cx_pkt; + aom_codec_iter_t iter = NULL; + const aom_codec_cx_pkt_t *cx_pkt; - while ((cx_pkt = vpx_codec_get_cx_data(&codec_, &iter)) != NULL) { + while ((cx_pkt = aom_codec_get_cx_data(&codec_, &iter)) != NULL) { if (cx_pkt->kind == VPX_CODEC_STATS_PKT) { EXPECT_GT(cx_pkt->data.twopass_stats.sz, 0U); ASSERT_TRUE(cx_pkt->data.twopass_stats.buf != NULL); @@ -103,7 +103,7 @@ class SvcTest : public ::testing::Test { void Pass1EncodeNFrames(const int n, const int layers, std::string *const stats_buf) { - vpx_codec_err_t res; + aom_codec_err_t res; ASSERT_GT(n, 0); ASSERT_GT(layers, 0); @@ -117,7 +117,7 @@ class SvcTest : public ::testing::Test { video.Begin(); for (int i = 0; i < n; ++i) { - res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(), + res = aom_svc_encode(&svc_, &codec_, video.img(), video.pts(), video.duration(), VPX_DL_GOOD_QUALITY); ASSERT_EQ(VPX_CODEC_OK, res); GetStatsData(stats_buf); @@ -125,7 +125,7 @@ class SvcTest : public ::testing::Test { } // Flush encoder and test EOS packet. - res = vpx_svc_encode(&svc_, &codec_, NULL, video.pts(), video.duration(), + res = aom_svc_encode(&svc_, &codec_, NULL, video.pts(), video.duration(), VPX_DL_GOOD_QUALITY); ASSERT_EQ(VPX_CODEC_OK, res); GetStatsData(stats_buf); @@ -134,12 +134,12 @@ class SvcTest : public ::testing::Test { } void StoreFrames(const size_t max_frame_received, - struct vpx_fixed_buf *const outputs, + struct aom_fixed_buf *const outputs, size_t *const frame_received) { - vpx_codec_iter_t iter = NULL; - const vpx_codec_cx_pkt_t *cx_pkt; + aom_codec_iter_t iter = NULL; + const aom_codec_cx_pkt_t *cx_pkt; - while ((cx_pkt = vpx_codec_get_cx_data(&codec_, &iter)) != NULL) { + while ((cx_pkt = aom_codec_get_cx_data(&codec_, &iter)) != NULL) { if (cx_pkt->kind == VPX_CODEC_CX_FRAME_PKT) { const size_t frame_size = cx_pkt->data.frame.sz; @@ -162,8 +162,8 @@ class SvcTest : public ::testing::Test { void Pass2EncodeNFrames(std::string *const stats_buf, const int n, const int layers, - struct vpx_fixed_buf *const outputs) { - vpx_codec_err_t res; + struct aom_fixed_buf *const outputs) { + aom_codec_err_t res; size_t frame_received = 0; ASSERT_TRUE(outputs != NULL); @@ -185,7 +185,7 @@ class SvcTest : public ::testing::Test { video.Begin(); for (int i = 0; i < n; ++i) { - res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(), + res = aom_svc_encode(&svc_, &codec_, video.img(), video.pts(), video.duration(), VPX_DL_GOOD_QUALITY); ASSERT_EQ(VPX_CODEC_OK, res); StoreFrames(n, outputs, &frame_received); @@ -193,7 +193,7 @@ class SvcTest : public ::testing::Test { } // Flush encoder. - res = vpx_svc_encode(&svc_, &codec_, NULL, 0, video.duration(), + res = aom_svc_encode(&svc_, &codec_, NULL, 0, video.duration(), VPX_DL_GOOD_QUALITY); EXPECT_EQ(VPX_CODEC_OK, res); StoreFrames(n, outputs, &frame_received); @@ -203,7 +203,7 @@ class SvcTest : public ::testing::Test { ReleaseEncoder(); } - void DecodeNFrames(const struct vpx_fixed_buf *const inputs, const int n) { + void DecodeNFrames(const struct aom_fixed_buf *const inputs, const int n) { int decoded_frames = 0; int received_frames = 0; @@ -213,7 +213,7 @@ class SvcTest : public ::testing::Test { for (int i = 0; i < n; ++i) { ASSERT_TRUE(inputs[i].buf != NULL); ASSERT_GT(inputs[i].sz, 0U); - const vpx_codec_err_t res_dec = decoder_->DecodeFrame( + const aom_codec_err_t res_dec = decoder_->DecodeFrame( static_cast<const uint8_t *>(inputs[i].buf), inputs[i].sz); ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder_->DecodeError(); ++decoded_frames; @@ -227,7 +227,7 @@ class SvcTest : public ::testing::Test { EXPECT_EQ(received_frames, n); } - void DropEnhancementLayers(struct vpx_fixed_buf *const inputs, + void DropEnhancementLayers(struct aom_fixed_buf *const inputs, const int num_super_frames, const int remained_spatial_layers) { ASSERT_TRUE(inputs != NULL); @@ -242,7 +242,7 @@ class SvcTest : public ::testing::Test { ASSERT_TRUE(inputs[i].buf != NULL); ASSERT_GT(inputs[i].sz, 0U); - vpx_codec_err_t res = vp9_parse_superframe_index( + aom_codec_err_t res = vp9_parse_superframe_index( static_cast<const uint8_t *>(inputs[i].buf), inputs[i].sz, frame_sizes, &frame_count, NULL, NULL); ASSERT_EQ(VPX_CODEC_OK, res); @@ -292,7 +292,7 @@ class SvcTest : public ::testing::Test { } } - void FreeBitstreamBuffers(struct vpx_fixed_buf *const inputs, const int n) { + void FreeBitstreamBuffers(struct aom_fixed_buf *const inputs, const int n) { ASSERT_TRUE(inputs != NULL); ASSERT_GT(n, 0); @@ -304,9 +304,9 @@ class SvcTest : public ::testing::Test { } SvcContext svc_; - vpx_codec_ctx_t codec_; - struct vpx_codec_enc_cfg codec_enc_; - vpx_codec_iface_t *codec_iface_; + aom_codec_ctx_t codec_; + struct aom_codec_enc_cfg codec_enc_; + aom_codec_iface_t *codec_iface_; std::string test_file_name_; bool codec_initialized_; Decoder *decoder_; @@ -316,18 +316,18 @@ class SvcTest : public ::testing::Test { TEST_F(SvcTest, SvcInit) { // test missing parameters - vpx_codec_err_t res = vpx_svc_init(NULL, &codec_, codec_iface_, &codec_enc_); + aom_codec_err_t res = aom_svc_init(NULL, &codec_, codec_iface_, &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_init(&svc_, NULL, codec_iface_, &codec_enc_); + res = aom_svc_init(&svc_, NULL, codec_iface_, &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_init(&svc_, &codec_, NULL, &codec_enc_); + res = aom_svc_init(&svc_, &codec_, NULL, &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_init(&svc_, &codec_, codec_iface_, NULL); + res = aom_svc_init(&svc_, &codec_, codec_iface_, NULL); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); svc_.spatial_layers = 6; // too many layers - res = vpx_svc_init(&svc_, &codec_, codec_iface_, &codec_enc_); + res = aom_svc_init(&svc_, &codec_, codec_iface_, &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); svc_.spatial_layers = 0; // use default layers @@ -341,25 +341,25 @@ TEST_F(SvcTest, InitTwoLayers) { } TEST_F(SvcTest, InvalidOptions) { - vpx_codec_err_t res = vpx_svc_set_options(&svc_, NULL); + aom_codec_err_t res = aom_svc_set_options(&svc_, NULL); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_set_options(&svc_, "not-an-option=1"); + res = aom_svc_set_options(&svc_, "not-an-option=1"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); } TEST_F(SvcTest, SetLayersOption) { - vpx_codec_err_t res = vpx_svc_set_options(&svc_, "spatial-layers=3"); + aom_codec_err_t res = aom_svc_set_options(&svc_, "spatial-layers=3"); EXPECT_EQ(VPX_CODEC_OK, res); InitializeEncoder(); EXPECT_EQ(3, svc_.spatial_layers); } TEST_F(SvcTest, SetMultipleOptions) { - vpx_codec_err_t res = - vpx_svc_set_options(&svc_, "spatial-layers=2 scale-factors=1/3,2/3"); + aom_codec_err_t res = + aom_svc_set_options(&svc_, "spatial-layers=2 scale-factors=1/3,2/3"); EXPECT_EQ(VPX_CODEC_OK, res); InitializeEncoder(); EXPECT_EQ(2, svc_.spatial_layers); @@ -367,78 +367,78 @@ TEST_F(SvcTest, SetMultipleOptions) { TEST_F(SvcTest, SetScaleFactorsOption) { svc_.spatial_layers = 2; - vpx_codec_err_t res = - vpx_svc_set_options(&svc_, "scale-factors=not-scale-factors"); + aom_codec_err_t res = + aom_svc_set_options(&svc_, "scale-factors=not-scale-factors"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_set_options(&svc_, "scale-factors=1/3, 3*3"); + res = aom_svc_set_options(&svc_, "scale-factors=1/3, 3*3"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_set_options(&svc_, "scale-factors=1/3"); + res = aom_svc_set_options(&svc_, "scale-factors=1/3"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_set_options(&svc_, "scale-factors=1/3,2/3"); + res = aom_svc_set_options(&svc_, "scale-factors=1/3,2/3"); EXPECT_EQ(VPX_CODEC_OK, res); InitializeEncoder(); } TEST_F(SvcTest, SetQuantizersOption) { svc_.spatial_layers = 2; - vpx_codec_err_t res = vpx_svc_set_options(&svc_, "max-quantizers=nothing"); + aom_codec_err_t res = aom_svc_set_options(&svc_, "max-quantizers=nothing"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_set_options(&svc_, "min-quantizers=nothing"); + res = aom_svc_set_options(&svc_, "min-quantizers=nothing"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_set_options(&svc_, "max-quantizers=40"); + res = aom_svc_set_options(&svc_, "max-quantizers=40"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_set_options(&svc_, "min-quantizers=40"); + res = aom_svc_set_options(&svc_, "min-quantizers=40"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_set_options(&svc_, "max-quantizers=30,30 min-quantizers=40,40"); + res = aom_svc_set_options(&svc_, "max-quantizers=30,30 min-quantizers=40,40"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_set_options(&svc_, "max-quantizers=40,40 min-quantizers=30,30"); + res = aom_svc_set_options(&svc_, "max-quantizers=40,40 min-quantizers=30,30"); InitializeEncoder(); } TEST_F(SvcTest, SetAutoAltRefOption) { svc_.spatial_layers = 5; - vpx_codec_err_t res = vpx_svc_set_options(&svc_, "auto-alt-refs=none"); + aom_codec_err_t res = aom_svc_set_options(&svc_, "auto-alt-refs=none"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - res = vpx_svc_set_options(&svc_, "auto-alt-refs=1,1,1,1,0"); + res = aom_svc_set_options(&svc_, "auto-alt-refs=1,1,1,1,0"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); - vpx_svc_set_options(&svc_, "auto-alt-refs=0,1,1,1,0"); + aom_svc_set_options(&svc_, "auto-alt-refs=0,1,1,1,0"); InitializeEncoder(); } // Test that decoder can handle an SVC frame as the first frame in a sequence. TEST_F(SvcTest, OnePassEncodeOneFrame) { codec_enc_.g_pass = VPX_RC_ONE_PASS; - vpx_fixed_buf output = { 0 }; + aom_fixed_buf output = { 0 }; Pass2EncodeNFrames(NULL, 1, 2, &output); DecodeNFrames(&output, 1); FreeBitstreamBuffers(&output, 1); @@ -447,7 +447,7 @@ TEST_F(SvcTest, OnePassEncodeOneFrame) { TEST_F(SvcTest, OnePassEncodeThreeFrames) { codec_enc_.g_pass = VPX_RC_ONE_PASS; codec_enc_.g_lag_in_frames = 0; - vpx_fixed_buf outputs[3]; + aom_fixed_buf outputs[3]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(NULL, 3, 2, &outputs[0]); DecodeNFrames(&outputs[0], 3); @@ -461,7 +461,7 @@ TEST_F(SvcTest, TwoPassEncode10Frames) { // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; - vpx_fixed_buf outputs[10]; + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 2, &outputs[0]); DecodeNFrames(&outputs[0], 10); @@ -475,8 +475,8 @@ TEST_F(SvcTest, TwoPassEncode20FramesWithAltRef) { // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; - vpx_svc_set_options(&svc_, "auto-alt-refs=1,1"); - vpx_fixed_buf outputs[20]; + aom_svc_set_options(&svc_, "auto-alt-refs=1,1"); + aom_fixed_buf outputs[20]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 20, 2, &outputs[0]); DecodeNFrames(&outputs[0], 20); @@ -490,8 +490,8 @@ TEST_F(SvcTest, TwoPassEncode2SpatialLayersDecodeBaseLayerOnly) { // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; - vpx_svc_set_options(&svc_, "auto-alt-refs=1,1"); - vpx_fixed_buf outputs[10]; + aom_svc_set_options(&svc_, "auto-alt-refs=1,1"); + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 2, &outputs[0]); DropEnhancementLayers(&outputs[0], 10, 1); @@ -506,8 +506,8 @@ TEST_F(SvcTest, TwoPassEncode5SpatialLayersDecode54321Layers) { // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; - vpx_svc_set_options(&svc_, "auto-alt-refs=0,1,1,1,0"); - vpx_fixed_buf outputs[10]; + aom_svc_set_options(&svc_, "auto-alt-refs=0,1,1,1,0"); + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 5, &outputs[0]); @@ -527,13 +527,13 @@ TEST_F(SvcTest, TwoPassEncode5SpatialLayersDecode54321Layers) { TEST_F(SvcTest, TwoPassEncode2SNRLayers) { // First pass encode std::string stats_buf; - vpx_svc_set_options(&svc_, "scale-factors=1/1,1/1"); + aom_svc_set_options(&svc_, "scale-factors=1/1,1/1"); Pass1EncodeNFrames(20, 2, &stats_buf); // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; - vpx_svc_set_options(&svc_, "auto-alt-refs=1,1 scale-factors=1/1,1/1"); - vpx_fixed_buf outputs[20]; + aom_svc_set_options(&svc_, "auto-alt-refs=1,1 scale-factors=1/1,1/1"); + aom_fixed_buf outputs[20]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 20, 2, &outputs[0]); DecodeNFrames(&outputs[0], 20); @@ -543,13 +543,13 @@ TEST_F(SvcTest, TwoPassEncode2SNRLayers) { TEST_F(SvcTest, TwoPassEncode3SNRLayersDecode321Layers) { // First pass encode std::string stats_buf; - vpx_svc_set_options(&svc_, "scale-factors=1/1,1/1,1/1"); + aom_svc_set_options(&svc_, "scale-factors=1/1,1/1,1/1"); Pass1EncodeNFrames(20, 3, &stats_buf); // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; - vpx_svc_set_options(&svc_, "auto-alt-refs=1,1,1 scale-factors=1/1,1/1,1/1"); - vpx_fixed_buf outputs[20]; + aom_svc_set_options(&svc_, "auto-alt-refs=1,1,1 scale-factors=1/1,1/1,1/1"); + aom_fixed_buf outputs[20]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 20, 3, &outputs[0]); DecodeNFrames(&outputs[0], 20); @@ -563,13 +563,13 @@ TEST_F(SvcTest, TwoPassEncode3SNRLayersDecode321Layers) { TEST_F(SvcTest, SetMultipleFrameContextsOption) { svc_.spatial_layers = 5; - vpx_codec_err_t res = vpx_svc_set_options(&svc_, "multi-frame-contexts=1"); + aom_codec_err_t res = aom_svc_set_options(&svc_, "multi-frame-contexts=1"); EXPECT_EQ(VPX_CODEC_OK, res); - res = vpx_svc_init(&svc_, &codec_, vpx_codec_vp9_cx(), &codec_enc_); + res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_); EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res); svc_.spatial_layers = 2; - res = vpx_svc_set_options(&svc_, "multi-frame-contexts=1"); + res = aom_svc_set_options(&svc_, "multi-frame-contexts=1"); InitializeEncoder(); } @@ -581,8 +581,8 @@ TEST_F(SvcTest, TwoPassEncode2SpatialLayersWithMultipleFrameContexts) { // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; codec_enc_.g_error_resilient = 0; - vpx_svc_set_options(&svc_, "auto-alt-refs=1,1 multi-frame-contexts=1"); - vpx_fixed_buf outputs[10]; + aom_svc_set_options(&svc_, "auto-alt-refs=1,1 multi-frame-contexts=1"); + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 2, &outputs[0]); DecodeNFrames(&outputs[0], 10); @@ -598,8 +598,8 @@ TEST_F(SvcTest, // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; codec_enc_.g_error_resilient = 0; - vpx_svc_set_options(&svc_, "auto-alt-refs=1,1 multi-frame-contexts=1"); - vpx_fixed_buf outputs[10]; + aom_svc_set_options(&svc_, "auto-alt-refs=1,1 multi-frame-contexts=1"); + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 2, &outputs[0]); DropEnhancementLayers(&outputs[0], 10, 1); @@ -610,16 +610,16 @@ TEST_F(SvcTest, TEST_F(SvcTest, TwoPassEncode2SNRLayersWithMultipleFrameContexts) { // First pass encode std::string stats_buf; - vpx_svc_set_options(&svc_, "scale-factors=1/1,1/1"); + aom_svc_set_options(&svc_, "scale-factors=1/1,1/1"); Pass1EncodeNFrames(10, 2, &stats_buf); // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; codec_enc_.g_error_resilient = 0; - vpx_svc_set_options(&svc_, + aom_svc_set_options(&svc_, "auto-alt-refs=1,1 scale-factors=1/1,1/1 " "multi-frame-contexts=1"); - vpx_fixed_buf outputs[10]; + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 2, &outputs[0]); DecodeNFrames(&outputs[0], 10); @@ -630,16 +630,16 @@ TEST_F(SvcTest, TwoPassEncode3SNRLayersWithMultipleFrameContextsDecode321Layer) { // First pass encode std::string stats_buf; - vpx_svc_set_options(&svc_, "scale-factors=1/1,1/1,1/1"); + aom_svc_set_options(&svc_, "scale-factors=1/1,1/1,1/1"); Pass1EncodeNFrames(10, 3, &stats_buf); // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; codec_enc_.g_error_resilient = 0; - vpx_svc_set_options(&svc_, + aom_svc_set_options(&svc_, "auto-alt-refs=1,1,1 scale-factors=1/1,1/1,1/1 " "multi-frame-contexts=1"); - vpx_fixed_buf outputs[10]; + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 3, &outputs[0]); @@ -655,15 +655,15 @@ TEST_F(SvcTest, TEST_F(SvcTest, TwoPassEncode2TemporalLayers) { // First pass encode std::string stats_buf; - vpx_svc_set_options(&svc_, "scale-factors=1/1"); + aom_svc_set_options(&svc_, "scale-factors=1/1"); svc_.temporal_layers = 2; Pass1EncodeNFrames(10, 1, &stats_buf); // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; svc_.temporal_layers = 2; - vpx_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1"); - vpx_fixed_buf outputs[10]; + aom_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1"); + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 1, &outputs[0]); DecodeNFrames(&outputs[0], 10); @@ -673,7 +673,7 @@ TEST_F(SvcTest, TwoPassEncode2TemporalLayers) { TEST_F(SvcTest, TwoPassEncode2TemporalLayersWithMultipleFrameContexts) { // First pass encode std::string stats_buf; - vpx_svc_set_options(&svc_, "scale-factors=1/1"); + aom_svc_set_options(&svc_, "scale-factors=1/1"); svc_.temporal_layers = 2; Pass1EncodeNFrames(10, 1, &stats_buf); @@ -681,10 +681,10 @@ TEST_F(SvcTest, TwoPassEncode2TemporalLayersWithMultipleFrameContexts) { codec_enc_.g_pass = VPX_RC_LAST_PASS; svc_.temporal_layers = 2; codec_enc_.g_error_resilient = 0; - vpx_svc_set_options(&svc_, + aom_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1 " "multi-frame-contexts=1"); - vpx_fixed_buf outputs[10]; + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 1, &outputs[0]); DecodeNFrames(&outputs[0], 10); @@ -694,19 +694,19 @@ TEST_F(SvcTest, TwoPassEncode2TemporalLayersWithMultipleFrameContexts) { TEST_F(SvcTest, TwoPassEncode2TemporalLayersDecodeBaseLayer) { // First pass encode std::string stats_buf; - vpx_svc_set_options(&svc_, "scale-factors=1/1"); + aom_svc_set_options(&svc_, "scale-factors=1/1"); svc_.temporal_layers = 2; Pass1EncodeNFrames(10, 1, &stats_buf); // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; svc_.temporal_layers = 2; - vpx_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1"); - vpx_fixed_buf outputs[10]; + aom_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1"); + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 1, &outputs[0]); - vpx_fixed_buf base_layer[5]; + aom_fixed_buf base_layer[5]; for (int i = 0; i < 5; ++i) base_layer[i] = outputs[i * 2]; DecodeNFrames(&base_layer[0], 5); @@ -717,7 +717,7 @@ TEST_F(SvcTest, TwoPassEncode2TemporalLayersWithMultipleFrameContextsDecodeBaseLayer) { // First pass encode std::string stats_buf; - vpx_svc_set_options(&svc_, "scale-factors=1/1"); + aom_svc_set_options(&svc_, "scale-factors=1/1"); svc_.temporal_layers = 2; Pass1EncodeNFrames(10, 1, &stats_buf); @@ -725,14 +725,14 @@ TEST_F(SvcTest, codec_enc_.g_pass = VPX_RC_LAST_PASS; svc_.temporal_layers = 2; codec_enc_.g_error_resilient = 0; - vpx_svc_set_options(&svc_, + aom_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1 " "multi-frame-contexts=1"); - vpx_fixed_buf outputs[10]; + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 1, &outputs[0]); - vpx_fixed_buf base_layer[5]; + aom_fixed_buf base_layer[5]; for (int i = 0; i < 5; ++i) base_layer[i] = outputs[i * 2]; DecodeNFrames(&base_layer[0], 5); @@ -742,19 +742,19 @@ TEST_F(SvcTest, TEST_F(SvcTest, TwoPassEncode2TemporalLayersWithTiles) { // First pass encode std::string stats_buf; - vpx_svc_set_options(&svc_, "scale-factors=1/1"); + aom_svc_set_options(&svc_, "scale-factors=1/1"); svc_.temporal_layers = 2; Pass1EncodeNFrames(10, 1, &stats_buf); // Second pass encode codec_enc_.g_pass = VPX_RC_LAST_PASS; svc_.temporal_layers = 2; - vpx_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1"); + aom_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1"); codec_enc_.g_w = 704; codec_enc_.g_h = 144; tile_columns_ = 1; tile_rows_ = 1; - vpx_fixed_buf outputs[10]; + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 1, &outputs[0]); DecodeNFrames(&outputs[0], 10); @@ -764,7 +764,7 @@ TEST_F(SvcTest, TwoPassEncode2TemporalLayersWithTiles) { TEST_F(SvcTest, TwoPassEncode2TemporalLayersWithMultipleFrameContextsAndTiles) { // First pass encode std::string stats_buf; - vpx_svc_set_options(&svc_, "scale-factors=1/1"); + aom_svc_set_options(&svc_, "scale-factors=1/1"); svc_.temporal_layers = 2; Pass1EncodeNFrames(10, 1, &stats_buf); @@ -776,10 +776,10 @@ TEST_F(SvcTest, TwoPassEncode2TemporalLayersWithMultipleFrameContextsAndTiles) { codec_enc_.g_h = 144; tile_columns_ = 1; tile_rows_ = 1; - vpx_svc_set_options(&svc_, + aom_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1 " "multi-frame-contexts=1"); - vpx_fixed_buf outputs[10]; + aom_fixed_buf outputs[10]; memset(&outputs[0], 0, sizeof(outputs)); Pass2EncodeNFrames(&stats_buf, 10, 1, &outputs[0]); DecodeNFrames(&outputs[0], 10); diff --git a/test/test_intra_pred_speed.cc b/test/test_intra_pred_speed.cc index 30ae6cbe682fc687828836e94ef615a904b29418..a38b4918793383f1cf80c75320ac956cf86fb569 100644 --- a/test/test_intra_pred_speed.cc +++ b/test/test_intra_pred_speed.cc @@ -14,13 +14,13 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/md5_helper.h" -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "aom_ports/mem.h" -#include "aom_ports/vpx_timer.h" +#include "aom_ports/aom_timer.h" // ----------------------------------------------------------------------------- @@ -62,15 +62,15 @@ void TestIntraPred(const char name[], VpxPredFunc const *pred_funcs, for (int k = 0; k < num_funcs; ++k) { if (pred_funcs[k] == NULL) continue; memcpy(src, ref_src, sizeof(src)); - vpx_usec_timer timer; - vpx_usec_timer_start(&timer); + aom_usec_timer timer; + aom_usec_timer_start(&timer); for (int num_tests = 0; num_tests < kNumTests; ++num_tests) { pred_funcs[k](src, kBPS, above, left); } libaom_test::ClearSystemState(); - vpx_usec_timer_mark(&timer); + aom_usec_timer_mark(&timer); const int elapsed_time = - static_cast<int>(vpx_usec_timer_elapsed(&timer) / 1000); + static_cast<int>(aom_usec_timer_elapsed(&timer) / 1000); libaom_test::MD5 md5; md5.Add(src, sizeof(src)); printf("Mode %s[%12s]: %5d ms MD5: %s\n", name, pred_func_names[k], @@ -146,202 +146,202 @@ void TestIntraPred32(VpxPredFunc const *pred_funcs) { #define INTRA_PRED_TEST(arch, test_func, dc, dc_left, dc_top, dc_128, v, h, \ d45, d135, d117, d153, d207, d63, tm) \ TEST(arch, test_func) { \ - static const VpxPredFunc vpx_intra_pred[] = { \ + static const VpxPredFunc aom_intra_pred[] = { \ dc, dc_left, dc_top, dc_128, v, h, d45, d135, d117, d153, d207, d63, tm \ }; \ - test_func(vpx_intra_pred); \ + test_func(aom_intra_pred); \ } // ----------------------------------------------------------------------------- // 4x4 -INTRA_PRED_TEST(C, TestIntraPred4, vpx_dc_predictor_4x4_c, - vpx_dc_left_predictor_4x4_c, vpx_dc_top_predictor_4x4_c, - vpx_dc_128_predictor_4x4_c, vpx_v_predictor_4x4_c, - vpx_h_predictor_4x4_c, vpx_d45_predictor_4x4_c, - vpx_d135_predictor_4x4_c, vpx_d117_predictor_4x4_c, - vpx_d153_predictor_4x4_c, vpx_d207_predictor_4x4_c, - vpx_d63_predictor_4x4_c, vpx_tm_predictor_4x4_c) +INTRA_PRED_TEST(C, TestIntraPred4, aom_dc_predictor_4x4_c, + aom_dc_left_predictor_4x4_c, aom_dc_top_predictor_4x4_c, + aom_dc_128_predictor_4x4_c, aom_v_predictor_4x4_c, + aom_h_predictor_4x4_c, aom_d45_predictor_4x4_c, + aom_d135_predictor_4x4_c, aom_d117_predictor_4x4_c, + aom_d153_predictor_4x4_c, aom_d207_predictor_4x4_c, + aom_d63_predictor_4x4_c, aom_tm_predictor_4x4_c) #if HAVE_SSE2 && CONFIG_USE_X86INC -INTRA_PRED_TEST(SSE2, TestIntraPred4, vpx_dc_predictor_4x4_sse2, - vpx_dc_left_predictor_4x4_sse2, vpx_dc_top_predictor_4x4_sse2, - vpx_dc_128_predictor_4x4_sse2, vpx_v_predictor_4x4_sse2, - vpx_h_predictor_4x4_sse2, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_tm_predictor_4x4_sse2) +INTRA_PRED_TEST(SSE2, TestIntraPred4, aom_dc_predictor_4x4_sse2, + aom_dc_left_predictor_4x4_sse2, aom_dc_top_predictor_4x4_sse2, + aom_dc_128_predictor_4x4_sse2, aom_v_predictor_4x4_sse2, + aom_h_predictor_4x4_sse2, NULL, NULL, NULL, NULL, NULL, NULL, + aom_tm_predictor_4x4_sse2) #endif // HAVE_SSE2 && CONFIG_USE_X86INC #if HAVE_SSSE3 && CONFIG_USE_X86INC INTRA_PRED_TEST(SSSE3, TestIntraPred4, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_d45_predictor_4x4_ssse3, NULL, NULL, - vpx_d153_predictor_4x4_ssse3, vpx_d207_predictor_4x4_ssse3, - vpx_d63_predictor_4x4_ssse3, NULL) + aom_d45_predictor_4x4_ssse3, NULL, NULL, + aom_d153_predictor_4x4_ssse3, aom_d207_predictor_4x4_ssse3, + aom_d63_predictor_4x4_ssse3, NULL) #endif // HAVE_SSSE3 && CONFIG_USE_X86INC #if HAVE_DSPR2 -INTRA_PRED_TEST(DSPR2, TestIntraPred4, vpx_dc_predictor_4x4_dspr2, NULL, NULL, - NULL, NULL, vpx_h_predictor_4x4_dspr2, NULL, NULL, NULL, NULL, - NULL, NULL, vpx_tm_predictor_4x4_dspr2) +INTRA_PRED_TEST(DSPR2, TestIntraPred4, aom_dc_predictor_4x4_dspr2, NULL, NULL, + NULL, NULL, aom_h_predictor_4x4_dspr2, NULL, NULL, NULL, NULL, + NULL, NULL, aom_tm_predictor_4x4_dspr2) #endif // HAVE_DSPR2 #if HAVE_NEON -INTRA_PRED_TEST(NEON, TestIntraPred4, vpx_dc_predictor_4x4_neon, - vpx_dc_left_predictor_4x4_neon, vpx_dc_top_predictor_4x4_neon, - vpx_dc_128_predictor_4x4_neon, vpx_v_predictor_4x4_neon, - vpx_h_predictor_4x4_neon, vpx_d45_predictor_4x4_neon, - vpx_d135_predictor_4x4_neon, NULL, NULL, NULL, NULL, - vpx_tm_predictor_4x4_neon) +INTRA_PRED_TEST(NEON, TestIntraPred4, aom_dc_predictor_4x4_neon, + aom_dc_left_predictor_4x4_neon, aom_dc_top_predictor_4x4_neon, + aom_dc_128_predictor_4x4_neon, aom_v_predictor_4x4_neon, + aom_h_predictor_4x4_neon, aom_d45_predictor_4x4_neon, + aom_d135_predictor_4x4_neon, NULL, NULL, NULL, NULL, + aom_tm_predictor_4x4_neon) #endif // HAVE_NEON #if HAVE_MSA -INTRA_PRED_TEST(MSA, TestIntraPred4, vpx_dc_predictor_4x4_msa, - vpx_dc_left_predictor_4x4_msa, vpx_dc_top_predictor_4x4_msa, - vpx_dc_128_predictor_4x4_msa, vpx_v_predictor_4x4_msa, - vpx_h_predictor_4x4_msa, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_tm_predictor_4x4_msa) +INTRA_PRED_TEST(MSA, TestIntraPred4, aom_dc_predictor_4x4_msa, + aom_dc_left_predictor_4x4_msa, aom_dc_top_predictor_4x4_msa, + aom_dc_128_predictor_4x4_msa, aom_v_predictor_4x4_msa, + aom_h_predictor_4x4_msa, NULL, NULL, NULL, NULL, NULL, NULL, + aom_tm_predictor_4x4_msa) #endif // HAVE_MSA // ----------------------------------------------------------------------------- // 8x8 -INTRA_PRED_TEST(C, TestIntraPred8, vpx_dc_predictor_8x8_c, - vpx_dc_left_predictor_8x8_c, vpx_dc_top_predictor_8x8_c, - vpx_dc_128_predictor_8x8_c, vpx_v_predictor_8x8_c, - vpx_h_predictor_8x8_c, vpx_d45_predictor_8x8_c, - vpx_d135_predictor_8x8_c, vpx_d117_predictor_8x8_c, - vpx_d153_predictor_8x8_c, vpx_d207_predictor_8x8_c, - vpx_d63_predictor_8x8_c, vpx_tm_predictor_8x8_c) +INTRA_PRED_TEST(C, TestIntraPred8, aom_dc_predictor_8x8_c, + aom_dc_left_predictor_8x8_c, aom_dc_top_predictor_8x8_c, + aom_dc_128_predictor_8x8_c, aom_v_predictor_8x8_c, + aom_h_predictor_8x8_c, aom_d45_predictor_8x8_c, + aom_d135_predictor_8x8_c, aom_d117_predictor_8x8_c, + aom_d153_predictor_8x8_c, aom_d207_predictor_8x8_c, + aom_d63_predictor_8x8_c, aom_tm_predictor_8x8_c) #if HAVE_SSE2 && CONFIG_USE_X86INC -INTRA_PRED_TEST(SSE2, TestIntraPred8, vpx_dc_predictor_8x8_sse2, - vpx_dc_left_predictor_8x8_sse2, vpx_dc_top_predictor_8x8_sse2, - vpx_dc_128_predictor_8x8_sse2, vpx_v_predictor_8x8_sse2, - vpx_h_predictor_8x8_sse2, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_tm_predictor_8x8_sse2) +INTRA_PRED_TEST(SSE2, TestIntraPred8, aom_dc_predictor_8x8_sse2, + aom_dc_left_predictor_8x8_sse2, aom_dc_top_predictor_8x8_sse2, + aom_dc_128_predictor_8x8_sse2, aom_v_predictor_8x8_sse2, + aom_h_predictor_8x8_sse2, NULL, NULL, NULL, NULL, NULL, NULL, + aom_tm_predictor_8x8_sse2) #endif // HAVE_SSE2 && CONFIG_USE_X86INC #if HAVE_SSSE3 && CONFIG_USE_X86INC INTRA_PRED_TEST(SSSE3, TestIntraPred8, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_d45_predictor_8x8_ssse3, NULL, NULL, - vpx_d153_predictor_8x8_ssse3, vpx_d207_predictor_8x8_ssse3, - vpx_d63_predictor_8x8_ssse3, NULL) + aom_d45_predictor_8x8_ssse3, NULL, NULL, + aom_d153_predictor_8x8_ssse3, aom_d207_predictor_8x8_ssse3, + aom_d63_predictor_8x8_ssse3, NULL) #endif // HAVE_SSSE3 && CONFIG_USE_X86INC #if HAVE_DSPR2 -INTRA_PRED_TEST(DSPR2, TestIntraPred8, vpx_dc_predictor_8x8_dspr2, NULL, NULL, - NULL, NULL, vpx_h_predictor_8x8_dspr2, NULL, NULL, NULL, NULL, - NULL, NULL, vpx_tm_predictor_8x8_c) +INTRA_PRED_TEST(DSPR2, TestIntraPred8, aom_dc_predictor_8x8_dspr2, NULL, NULL, + NULL, NULL, aom_h_predictor_8x8_dspr2, NULL, NULL, NULL, NULL, + NULL, NULL, aom_tm_predictor_8x8_c) #endif // HAVE_DSPR2 #if HAVE_NEON -INTRA_PRED_TEST(NEON, TestIntraPred8, vpx_dc_predictor_8x8_neon, - vpx_dc_left_predictor_8x8_neon, vpx_dc_top_predictor_8x8_neon, - vpx_dc_128_predictor_8x8_neon, vpx_v_predictor_8x8_neon, - vpx_h_predictor_8x8_neon, vpx_d45_predictor_8x8_neon, NULL, - NULL, NULL, NULL, NULL, vpx_tm_predictor_8x8_neon) +INTRA_PRED_TEST(NEON, TestIntraPred8, aom_dc_predictor_8x8_neon, + aom_dc_left_predictor_8x8_neon, aom_dc_top_predictor_8x8_neon, + aom_dc_128_predictor_8x8_neon, aom_v_predictor_8x8_neon, + aom_h_predictor_8x8_neon, aom_d45_predictor_8x8_neon, NULL, + NULL, NULL, NULL, NULL, aom_tm_predictor_8x8_neon) #endif // HAVE_NEON #if HAVE_MSA -INTRA_PRED_TEST(MSA, TestIntraPred8, vpx_dc_predictor_8x8_msa, - vpx_dc_left_predictor_8x8_msa, vpx_dc_top_predictor_8x8_msa, - vpx_dc_128_predictor_8x8_msa, vpx_v_predictor_8x8_msa, - vpx_h_predictor_8x8_msa, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_tm_predictor_8x8_msa) +INTRA_PRED_TEST(MSA, TestIntraPred8, aom_dc_predictor_8x8_msa, + aom_dc_left_predictor_8x8_msa, aom_dc_top_predictor_8x8_msa, + aom_dc_128_predictor_8x8_msa, aom_v_predictor_8x8_msa, + aom_h_predictor_8x8_msa, NULL, NULL, NULL, NULL, NULL, NULL, + aom_tm_predictor_8x8_msa) #endif // HAVE_MSA // ----------------------------------------------------------------------------- // 16x16 -INTRA_PRED_TEST(C, TestIntraPred16, vpx_dc_predictor_16x16_c, - vpx_dc_left_predictor_16x16_c, vpx_dc_top_predictor_16x16_c, - vpx_dc_128_predictor_16x16_c, vpx_v_predictor_16x16_c, - vpx_h_predictor_16x16_c, vpx_d45_predictor_16x16_c, - vpx_d135_predictor_16x16_c, vpx_d117_predictor_16x16_c, - vpx_d153_predictor_16x16_c, vpx_d207_predictor_16x16_c, - vpx_d63_predictor_16x16_c, vpx_tm_predictor_16x16_c) +INTRA_PRED_TEST(C, TestIntraPred16, aom_dc_predictor_16x16_c, + aom_dc_left_predictor_16x16_c, aom_dc_top_predictor_16x16_c, + aom_dc_128_predictor_16x16_c, aom_v_predictor_16x16_c, + aom_h_predictor_16x16_c, aom_d45_predictor_16x16_c, + aom_d135_predictor_16x16_c, aom_d117_predictor_16x16_c, + aom_d153_predictor_16x16_c, aom_d207_predictor_16x16_c, + aom_d63_predictor_16x16_c, aom_tm_predictor_16x16_c) #if HAVE_SSE2 && CONFIG_USE_X86INC -INTRA_PRED_TEST(SSE2, TestIntraPred16, vpx_dc_predictor_16x16_sse2, - vpx_dc_left_predictor_16x16_sse2, - vpx_dc_top_predictor_16x16_sse2, - vpx_dc_128_predictor_16x16_sse2, vpx_v_predictor_16x16_sse2, - vpx_h_predictor_16x16_sse2, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_tm_predictor_16x16_sse2) +INTRA_PRED_TEST(SSE2, TestIntraPred16, aom_dc_predictor_16x16_sse2, + aom_dc_left_predictor_16x16_sse2, + aom_dc_top_predictor_16x16_sse2, + aom_dc_128_predictor_16x16_sse2, aom_v_predictor_16x16_sse2, + aom_h_predictor_16x16_sse2, NULL, NULL, NULL, NULL, NULL, NULL, + aom_tm_predictor_16x16_sse2) #endif // HAVE_SSE2 && CONFIG_USE_X86INC #if HAVE_SSSE3 && CONFIG_USE_X86INC INTRA_PRED_TEST(SSSE3, TestIntraPred16, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_d45_predictor_16x16_ssse3, NULL, NULL, - vpx_d153_predictor_16x16_ssse3, vpx_d207_predictor_16x16_ssse3, - vpx_d63_predictor_16x16_ssse3, NULL) + aom_d45_predictor_16x16_ssse3, NULL, NULL, + aom_d153_predictor_16x16_ssse3, aom_d207_predictor_16x16_ssse3, + aom_d63_predictor_16x16_ssse3, NULL) #endif // HAVE_SSSE3 && CONFIG_USE_X86INC #if HAVE_DSPR2 -INTRA_PRED_TEST(DSPR2, TestIntraPred16, vpx_dc_predictor_16x16_dspr2, NULL, - NULL, NULL, NULL, vpx_h_predictor_16x16_dspr2, NULL, NULL, NULL, +INTRA_PRED_TEST(DSPR2, TestIntraPred16, aom_dc_predictor_16x16_dspr2, NULL, + NULL, NULL, NULL, aom_h_predictor_16x16_dspr2, NULL, NULL, NULL, NULL, NULL, NULL, NULL) #endif // HAVE_DSPR2 #if HAVE_NEON -INTRA_PRED_TEST(NEON, TestIntraPred16, vpx_dc_predictor_16x16_neon, - vpx_dc_left_predictor_16x16_neon, - vpx_dc_top_predictor_16x16_neon, - vpx_dc_128_predictor_16x16_neon, vpx_v_predictor_16x16_neon, - vpx_h_predictor_16x16_neon, vpx_d45_predictor_16x16_neon, NULL, - NULL, NULL, NULL, NULL, vpx_tm_predictor_16x16_neon) +INTRA_PRED_TEST(NEON, TestIntraPred16, aom_dc_predictor_16x16_neon, + aom_dc_left_predictor_16x16_neon, + aom_dc_top_predictor_16x16_neon, + aom_dc_128_predictor_16x16_neon, aom_v_predictor_16x16_neon, + aom_h_predictor_16x16_neon, aom_d45_predictor_16x16_neon, NULL, + NULL, NULL, NULL, NULL, aom_tm_predictor_16x16_neon) #endif // HAVE_NEON #if HAVE_MSA -INTRA_PRED_TEST(MSA, TestIntraPred16, vpx_dc_predictor_16x16_msa, - vpx_dc_left_predictor_16x16_msa, vpx_dc_top_predictor_16x16_msa, - vpx_dc_128_predictor_16x16_msa, vpx_v_predictor_16x16_msa, - vpx_h_predictor_16x16_msa, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_tm_predictor_16x16_msa) +INTRA_PRED_TEST(MSA, TestIntraPred16, aom_dc_predictor_16x16_msa, + aom_dc_left_predictor_16x16_msa, aom_dc_top_predictor_16x16_msa, + aom_dc_128_predictor_16x16_msa, aom_v_predictor_16x16_msa, + aom_h_predictor_16x16_msa, NULL, NULL, NULL, NULL, NULL, NULL, + aom_tm_predictor_16x16_msa) #endif // HAVE_MSA // ----------------------------------------------------------------------------- // 32x32 -INTRA_PRED_TEST(C, TestIntraPred32, vpx_dc_predictor_32x32_c, - vpx_dc_left_predictor_32x32_c, vpx_dc_top_predictor_32x32_c, - vpx_dc_128_predictor_32x32_c, vpx_v_predictor_32x32_c, - vpx_h_predictor_32x32_c, vpx_d45_predictor_32x32_c, - vpx_d135_predictor_32x32_c, vpx_d117_predictor_32x32_c, - vpx_d153_predictor_32x32_c, vpx_d207_predictor_32x32_c, - vpx_d63_predictor_32x32_c, vpx_tm_predictor_32x32_c) +INTRA_PRED_TEST(C, TestIntraPred32, aom_dc_predictor_32x32_c, + aom_dc_left_predictor_32x32_c, aom_dc_top_predictor_32x32_c, + aom_dc_128_predictor_32x32_c, aom_v_predictor_32x32_c, + aom_h_predictor_32x32_c, aom_d45_predictor_32x32_c, + aom_d135_predictor_32x32_c, aom_d117_predictor_32x32_c, + aom_d153_predictor_32x32_c, aom_d207_predictor_32x32_c, + aom_d63_predictor_32x32_c, aom_tm_predictor_32x32_c) #if HAVE_SSE2 && CONFIG_USE_X86INC -INTRA_PRED_TEST(SSE2, TestIntraPred32, vpx_dc_predictor_32x32_sse2, - vpx_dc_left_predictor_32x32_sse2, - vpx_dc_top_predictor_32x32_sse2, - vpx_dc_128_predictor_32x32_sse2, vpx_v_predictor_32x32_sse2, - vpx_h_predictor_32x32_sse2, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_tm_predictor_32x32_sse2) +INTRA_PRED_TEST(SSE2, TestIntraPred32, aom_dc_predictor_32x32_sse2, + aom_dc_left_predictor_32x32_sse2, + aom_dc_top_predictor_32x32_sse2, + aom_dc_128_predictor_32x32_sse2, aom_v_predictor_32x32_sse2, + aom_h_predictor_32x32_sse2, NULL, NULL, NULL, NULL, NULL, NULL, + aom_tm_predictor_32x32_sse2) #endif // HAVE_SSE2 && CONFIG_USE_X86INC #if HAVE_SSSE3 && CONFIG_USE_X86INC INTRA_PRED_TEST(SSSE3, TestIntraPred32, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_d45_predictor_32x32_ssse3, NULL, NULL, - vpx_d153_predictor_32x32_ssse3, vpx_d207_predictor_32x32_ssse3, - vpx_d63_predictor_32x32_ssse3, NULL) + aom_d45_predictor_32x32_ssse3, NULL, NULL, + aom_d153_predictor_32x32_ssse3, aom_d207_predictor_32x32_ssse3, + aom_d63_predictor_32x32_ssse3, NULL) #endif // HAVE_SSSE3 && CONFIG_USE_X86INC #if HAVE_NEON -INTRA_PRED_TEST(NEON, TestIntraPred32, vpx_dc_predictor_32x32_neon, - vpx_dc_left_predictor_32x32_neon, - vpx_dc_top_predictor_32x32_neon, - vpx_dc_128_predictor_32x32_neon, vpx_v_predictor_32x32_neon, - vpx_h_predictor_32x32_neon, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_tm_predictor_32x32_neon) +INTRA_PRED_TEST(NEON, TestIntraPred32, aom_dc_predictor_32x32_neon, + aom_dc_left_predictor_32x32_neon, + aom_dc_top_predictor_32x32_neon, + aom_dc_128_predictor_32x32_neon, aom_v_predictor_32x32_neon, + aom_h_predictor_32x32_neon, NULL, NULL, NULL, NULL, NULL, NULL, + aom_tm_predictor_32x32_neon) #endif // HAVE_NEON #if HAVE_MSA -INTRA_PRED_TEST(MSA, TestIntraPred32, vpx_dc_predictor_32x32_msa, - vpx_dc_left_predictor_32x32_msa, vpx_dc_top_predictor_32x32_msa, - vpx_dc_128_predictor_32x32_msa, vpx_v_predictor_32x32_msa, - vpx_h_predictor_32x32_msa, NULL, NULL, NULL, NULL, NULL, NULL, - vpx_tm_predictor_32x32_msa) +INTRA_PRED_TEST(MSA, TestIntraPred32, aom_dc_predictor_32x32_msa, + aom_dc_left_predictor_32x32_msa, aom_dc_top_predictor_32x32_msa, + aom_dc_128_predictor_32x32_msa, aom_v_predictor_32x32_msa, + aom_h_predictor_32x32_msa, NULL, NULL, NULL, NULL, NULL, NULL, + aom_tm_predictor_32x32_msa) #endif // HAVE_MSA #include "test/test_libaom.cc" diff --git a/test/test_libaom.cc b/test/test_libaom.cc index 031807c691a1e7fb82d424b4cd88e2138bbd9bbd..cfbb188b7e2c34182fa79660829901e73cad87aa 100644 --- a/test/test_libaom.cc +++ b/test/test_libaom.cc @@ -11,7 +11,7 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" +#include "./aom_config.h" #if ARCH_X86 || ARCH_X86_64 #include "aom_ports/x86.h" #endif @@ -19,8 +19,8 @@ extern "C" { #if CONFIG_VP10 extern void av1_rtcd(); #endif // CONFIG_VP10 -extern void vpx_dsp_rtcd(); -extern void vpx_scale_rtcd(); +extern void aom_dsp_rtcd(); +extern void aom_scale_rtcd(); } #if ARCH_X86 || ARCH_X86_64 @@ -57,8 +57,8 @@ int main(int argc, char **argv) { #if CONFIG_VP10 av1_rtcd(); #endif // CONFIG_VP10 - vpx_dsp_rtcd(); - vpx_scale_rtcd(); + aom_dsp_rtcd(); + aom_scale_rtcd(); #endif // !CONFIG_SHARED return RUN_ALL_TESTS(); diff --git a/test/tile_independence_test.cc b/test/tile_independence_test.cc index d0a2c935eb016109e8ecb4e6e571051f1e5605c1..b5d929f47441eb9b379e7f56ee1106a08302a9e9 100644 --- a/test/tile_independence_test.cc +++ b/test/tile_independence_test.cc @@ -17,7 +17,7 @@ #include "test/i420_video_source.h" #include "test/util.h" #include "test/md5_helper.h" -#include "aom_mem/vpx_mem.h" +#include "aom_mem/aom_mem.h" namespace { class TileIndependenceTest : public ::libaom_test::EncoderTest, @@ -27,7 +27,7 @@ class TileIndependenceTest : public ::libaom_test::EncoderTest, : EncoderTest(GET_PARAM(0)), md5_fw_order_(), md5_inv_order_(), n_tiles_(GET_PARAM(1)) { init_flags_ = VPX_CODEC_USE_PSNR; - vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t(); + aom_codec_dec_cfg_t cfg = aom_codec_dec_cfg_t(); cfg.w = 704; cfg.h = 144; cfg.threads = 1; @@ -53,19 +53,19 @@ class TileIndependenceTest : public ::libaom_test::EncoderTest, } } - void UpdateMD5(::libaom_test::Decoder *dec, const vpx_codec_cx_pkt_t *pkt, + void UpdateMD5(::libaom_test::Decoder *dec, const aom_codec_cx_pkt_t *pkt, ::libaom_test::MD5 *md5) { - const vpx_codec_err_t res = dec->DecodeFrame( + const aom_codec_err_t res = dec->DecodeFrame( reinterpret_cast<uint8_t *>(pkt->data.frame.buf), pkt->data.frame.sz); if (res != VPX_CODEC_OK) { abort_ = true; ASSERT_EQ(VPX_CODEC_OK, res); } - const vpx_image_t *img = dec->GetDxData().Next(); + const aom_image_t *img = dec->GetDxData().Next(); md5->Add(img); } - virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) { + virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) { UpdateMD5(fw_dec_, pkt, &md5_fw_order_); UpdateMD5(inv_dec_, pkt, &md5_inv_order_); } @@ -81,7 +81,7 @@ class TileIndependenceTest : public ::libaom_test::EncoderTest, // inverted tile ordering. Ensure that the MD5 of the output in both cases // is identical. If so, tiles are considered independent and the test passes. TEST_P(TileIndependenceTest, MD5Match) { - const vpx_rational timebase = { 33333333, 1000000000 }; + const aom_rational timebase = { 33333333, 1000000000 }; cfg_.g_timebase = timebase; cfg_.rc_target_bitrate = 500; cfg_.g_lag_in_frames = 25; diff --git a/test/tools_common.sh b/test/tools_common.sh index aa7f9a488a5ef4ea30a1714f92ff7cadf6d8373f..e79df8e90e1269f702fc81640cddbe73e7c70d47 100755 --- a/test/tools_common.sh +++ b/test/tools_common.sh @@ -47,11 +47,11 @@ test_end() { # Echoes the target configuration being tested. test_configuration_target() { - vpx_config_mk="${LIBAOM_CONFIG_PATH}/config.mk" + aom_config_mk="${LIBAOM_CONFIG_PATH}/config.mk" # Find the TOOLCHAIN line, split it using ':=' as the field separator, and # print the last field to get the value. Then pipe the value to tr to consume # any leading/trailing spaces while allowing tr to echo the output to stdout. - awk -F ':=' '/TOOLCHAIN/ { print $NF }' "${vpx_config_mk}" | tr -d ' ' + awk -F ':=' '/TOOLCHAIN/ { print $NF }' "${aom_config_mk}" | tr -d ' ' } # Trap function used for failure reports and tool output directory removal. @@ -70,17 +70,17 @@ cleanup() { # $LIBAOM_CONFIG_PATH/config.mk to stdout, or the version number string when # no git hash is contained in VERSION_STRING. config_hash() { - vpx_config_mk="${LIBAOM_CONFIG_PATH}/config.mk" + aom_config_mk="${LIBAOM_CONFIG_PATH}/config.mk" # Find VERSION_STRING line, split it with "-g" and print the last field to # output the git hash to stdout. - vpx_version=$(awk -F -g '/VERSION_STRING/ {print $NF}' "${vpx_config_mk}") + aom_version=$(awk -F -g '/VERSION_STRING/ {print $NF}' "${aom_config_mk}") # Handle two situations here: - # 1. The default case: $vpx_version is a git hash, so echo it unchanged. + # 1. The default case: $aom_version is a git hash, so echo it unchanged. # 2. When being run a non-dev tree, the -g portion is not present in the # version string: It's only the version number. - # In this case $vpx_version is something like 'VERSION_STRING=v1.3.0', so + # In this case $aom_version is something like 'VERSION_STRING=v1.3.0', so # we echo only what is after the '='. - echo "${vpx_version##*=}" + echo "${aom_version##*=}" } # Echoes the short form of the current git hash. @@ -95,7 +95,7 @@ current_hash() { fi } -# Echoes warnings to stdout when git hash in vpx_config.h does not match the +# Echoes warnings to stdout when git hash in aom_config.h does not match the # current git hash. check_git_hashes() { hash_at_configure_time=$(config_hash) @@ -120,19 +120,19 @@ test_env_var_dir() { # This script requires that the LIBAOM_BIN_PATH, LIBAOM_CONFIG_PATH, and # LIBAOM_TEST_DATA_PATH variables are in the environment: Confirm that # the variables are set and that they all evaluate to directory paths. -verify_vpx_test_environment() { +verify_aom_test_environment() { test_env_var_dir "LIBAOM_BIN_PATH" \ && test_env_var_dir "LIBAOM_CONFIG_PATH" \ && test_env_var_dir "LIBAOM_TEST_DATA_PATH" } -# Greps vpx_config.h in LIBAOM_CONFIG_PATH for positional parameter one, which +# Greps aom_config.h in LIBAOM_CONFIG_PATH for positional parameter one, which # should be a LIBAOM preprocessor flag. Echoes yes to stdout when the feature # is available. -vpx_config_option_enabled() { - vpx_config_option="${1}" - vpx_config_file="${LIBAOM_CONFIG_PATH}/vpx_config.h" - config_line=$(grep "${vpx_config_option}" "${vpx_config_file}") +aom_config_option_enabled() { + aom_config_option="${1}" + aom_config_file="${LIBAOM_CONFIG_PATH}/aom_config.h" + config_line=$(grep "${aom_config_option}" "${aom_config_file}") if echo "${config_line}" | egrep -q '1$'; then echo yes fi @@ -149,7 +149,7 @@ is_windows_target() { # Echoes path to $1 when it's executable and exists in ${LIBAOM_BIN_PATH}, or an # empty string. Caller is responsible for testing the string once the function # returns. -vpx_tool_path() { +aom_tool_path() { local readonly tool_name="$1" local tool_path="${LIBAOM_BIN_PATH}/${tool_name}${VPX_TEST_EXE_SUFFIX}" if [ ! -x "${tool_path}" ]; then @@ -166,26 +166,26 @@ vpx_tool_path() { # Echoes yes to stdout when the file named by positional parameter one exists # in LIBAOM_BIN_PATH, and is executable. -vpx_tool_available() { +aom_tool_available() { local tool_name="$1" local tool="${LIBAOM_BIN_PATH}/${tool_name}${VPX_TEST_EXE_SUFFIX}" [ -x "${tool}" ] && echo yes } -# Echoes yes to stdout when vpx_config_option_enabled() reports yes for +# Echoes yes to stdout when aom_config_option_enabled() reports yes for # CONFIG_VP10_DECODER. vp10_decode_available() { - [ "$(vpx_config_option_enabled CONFIG_VP10_DECODER)" = "yes" ] && echo yes + [ "$(aom_config_option_enabled CONFIG_VP10_DECODER)" = "yes" ] && echo yes } -# Echoes yes to stdout when vpx_config_option_enabled() reports yes for +# Echoes yes to stdout when aom_config_option_enabled() reports yes for # CONFIG_VP10_ENCODER. vp10_encode_available() { - [ "$(vpx_config_option_enabled CONFIG_VP10_ENCODER)" = "yes" ] && echo yes + [ "$(aom_config_option_enabled CONFIG_VP10_ENCODER)" = "yes" ] && echo yes } # CONFIG_WEBM_IO. webm_io_available() { - [ "$(vpx_config_option_enabled CONFIG_WEBM_IO)" = "yes" ] && echo yes + [ "$(aom_config_option_enabled CONFIG_WEBM_IO)" = "yes" ] && echo yes } # Filters strings from $1 using the filter specified by $2. Filter behavior @@ -221,9 +221,9 @@ filter_strings() { # Runs user test functions passed via positional parameters one and two. # Functions in positional parameter one are treated as environment verification # functions and are run unconditionally. Functions in positional parameter two -# are run according to the rules specified in vpx_test_usage(). +# are run according to the rules specified in aom_test_usage(). run_tests() { - local env_tests="verify_vpx_test_environment $1" + local env_tests="verify_aom_test_environment $1" local tests_to_filter="$2" local test_name="${VPX_TEST_NAME}" @@ -270,7 +270,7 @@ run_tests() { echo "${test_name}: Done, all tests pass for ${tested_config}." } -vpx_test_usage() { +aom_test_usage() { cat << EOF Usage: ${0##*/} [arguments] --bin-path <path to libaom binaries directory> @@ -299,7 +299,7 @@ EOF # Returns non-zero (failure) when required environment variables are empty # strings. -vpx_test_check_environment() { +aom_test_check_environment() { if [ -z "${LIBAOM_BIN_PATH}" ] || \ [ -z "${LIBAOM_CONFIG_PATH}" ] || \ [ -z "${LIBAOM_TEST_DATA_PATH}" ]; then @@ -326,7 +326,7 @@ while [ -n "$1" ]; do VPX_TEST_RUN_DISABLED_TESTS=yes ;; --help) - vpx_test_usage + aom_test_usage exit ;; --test-data-path) @@ -347,7 +347,7 @@ while [ -n "$1" ]; do VPX_TEST_LIST_TESTS=yes ;; *) - vpx_test_usage + aom_test_usage exit 1 ;; esac @@ -369,7 +369,7 @@ else VPX_TEST_TEMP_ROOT=/tmp fi -VPX_TEST_OUTPUT_DIR="${VPX_TEST_TEMP_ROOT}/vpx_test_$$" +VPX_TEST_OUTPUT_DIR="${VPX_TEST_TEMP_ROOT}/aom_test_$$" if ! mkdir -p "${VPX_TEST_OUTPUT_DIR}" || \ [ ! -d "${VPX_TEST_OUTPUT_DIR}" ]; then diff --git a/test/twopass_encoder.sh b/test/twopass_encoder.sh index 0edb6eb81233b0235fac7643dbcd68d072113fdb..3b4eb5c151d40905c1b12b3683f227c601ab8f84 100755 --- a/test/twopass_encoder.sh +++ b/test/twopass_encoder.sh @@ -18,7 +18,7 @@ # Environment check: $YUV_RAW_INPUT is required. twopass_encoder_verify_environment() { if [ ! -e "${YUV_RAW_INPUT}" ]; then - echo "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi } diff --git a/test/util.h b/test/util.h index c704a38562de3f7cb7323e2d537854e8447039ef..28e5cf0b038590a1393db7216bcba5d907cbc66a 100644 --- a/test/util.h +++ b/test/util.h @@ -15,12 +15,12 @@ #include <stdio.h> #include <math.h> #include "third_party/googletest/src/include/gtest/gtest.h" -#include "aom/vpx_image.h" +#include "aom/aom_image.h" // Macros #define GET_PARAM(k) std::tr1::get<k>(GetParam()) -inline double compute_psnr(const vpx_image_t *img1, const vpx_image_t *img2) { +inline double compute_psnr(const aom_image_t *img1, const aom_image_t *img2) { assert((img1->fmt == img2->fmt) && (img1->d_w == img2->d_w) && (img1->d_h == img2->d_h)); diff --git a/test/variance_test.cc b/test/variance_test.cc index a704906f15e40e0df3a7f6e21cc9dc25cf0b383a..02c061ab0d3156283debfe98580a7d1a5815a535 100644 --- a/test/variance_test.cc +++ b/test/variance_test.cc @@ -13,14 +13,14 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" -#include "./vpx_dsp_rtcd.h" +#include "./aom_config.h" +#include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "test/clear_system_state.h" #include "test/register_state_check.h" -#include "aom/vpx_codec.h" -#include "aom/vpx_integer.h" -#include "aom_mem/vpx_mem.h" +#include "aom/aom_codec.h" +#include "aom/aom_integer.h" +#include "aom_mem/aom_mem.h" #include "aom_ports/mem.h" namespace { @@ -76,7 +76,7 @@ static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref, int l2w, int l2h, int src_stride_coeff, int ref_stride_coeff, uint32_t *sse_ptr, bool use_high_bit_depth_, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int64_t se = 0; uint64_t sse = 0; const int w = 1 << l2w; @@ -114,7 +114,7 @@ static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref, int l2w, static uint32_t subpel_variance_ref(const uint8_t *ref, const uint8_t *src, int l2w, int l2h, int xoff, int yoff, uint32_t *sse_ptr, bool use_high_bit_depth_, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int64_t se = 0; uint64_t sse = 0; const int w = 1 << l2w; @@ -213,7 +213,7 @@ class VarianceTest : public ::testing::TestWithParam< height_ = 1 << log2height_; variance_ = get<2>(params); if (get<3>(params)) { - bit_depth_ = static_cast<vpx_bit_depth_t>(get<3>(params)); + bit_depth_ = static_cast<aom_bit_depth_t>(get<3>(params)); use_high_bit_depth_ = true; } else { bit_depth_ = VPX_BITS_8; @@ -224,12 +224,12 @@ class VarianceTest : public ::testing::TestWithParam< rnd_.Reset(ACMRandom::DeterministicSeed()); block_size_ = width_ * height_; if (!use_high_bit_depth_) { - src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_ * 2)); + src_ = reinterpret_cast<uint8_t *>(aom_memalign(16, block_size_ * 2)); ref_ = new uint8_t[block_size_ * 2]; #if CONFIG_VPX_HIGHBITDEPTH } else { src_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>( - vpx_memalign(16, block_size_ * 2 * sizeof(uint16_t)))); + aom_memalign(16, block_size_ * 2 * sizeof(uint16_t)))); ref_ = CONVERT_TO_BYTEPTR(new uint16_t[block_size_ * 2]); #endif // CONFIG_VPX_HIGHBITDEPTH } @@ -239,11 +239,11 @@ class VarianceTest : public ::testing::TestWithParam< virtual void TearDown() { if (!use_high_bit_depth_) { - vpx_free(src_); + aom_free(src_); delete[] ref_; #if CONFIG_VPX_HIGHBITDEPTH } else { - vpx_free(CONVERT_TO_SHORTPTR(src_)); + aom_free(CONVERT_TO_SHORTPTR(src_)); delete[] CONVERT_TO_SHORTPTR(ref_); #endif // CONFIG_VPX_HIGHBITDEPTH } @@ -261,7 +261,7 @@ class VarianceTest : public ::testing::TestWithParam< uint8_t *ref_; int width_, log2width_; int height_, log2height_; - vpx_bit_depth_t bit_depth_; + aom_bit_depth_t bit_depth_; int mask_; bool use_high_bit_depth_; int block_size_; @@ -275,7 +275,7 @@ void VarianceTest<VarianceFunctionType>::ZeroTest() { memset(src_, i, block_size_); #if CONFIG_VPX_HIGHBITDEPTH } else { - vpx_memset16(CONVERT_TO_SHORTPTR(src_), i << (bit_depth_ - 8), + aom_memset16(CONVERT_TO_SHORTPTR(src_), i << (bit_depth_ - 8), block_size_); #endif // CONFIG_VPX_HIGHBITDEPTH } @@ -284,7 +284,7 @@ void VarianceTest<VarianceFunctionType>::ZeroTest() { memset(ref_, j, block_size_); #if CONFIG_VPX_HIGHBITDEPTH } else { - vpx_memset16(CONVERT_TO_SHORTPTR(ref_), j << (bit_depth_ - 8), + aom_memset16(CONVERT_TO_SHORTPTR(ref_), j << (bit_depth_ - 8), block_size_); #endif // CONFIG_VPX_HIGHBITDEPTH } @@ -365,10 +365,10 @@ void VarianceTest<VarianceFunctionType>::OneQuarterTest() { memset(ref_ + half, 0, half); #if CONFIG_VPX_HIGHBITDEPTH } else { - vpx_memset16(CONVERT_TO_SHORTPTR(src_), 255 << (bit_depth_ - 8), + aom_memset16(CONVERT_TO_SHORTPTR(src_), 255 << (bit_depth_ - 8), block_size_); - vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 255 << (bit_depth_ - 8), half); - vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, 0, half); + aom_memset16(CONVERT_TO_SHORTPTR(ref_), 255 << (bit_depth_ - 8), half); + aom_memset16(CONVERT_TO_SHORTPTR(ref_) + half, 0, half); #endif // CONFIG_VPX_HIGHBITDEPTH } unsigned int sse; @@ -392,14 +392,14 @@ class MseTest rnd(ACMRandom::DeterministicSeed()); block_size_ = width_ * height_; - src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_)); + src_ = reinterpret_cast<uint8_t *>(aom_memalign(16, block_size_)); ref_ = new uint8_t[block_size_]; ASSERT_TRUE(src_ != NULL); ASSERT_TRUE(ref_ != NULL); } virtual void TearDown() { - vpx_free(src_); + aom_free(src_); delete[] ref_; libaom_test::ClearSystemState(); } @@ -477,7 +477,7 @@ static uint32_t subpel_avg_variance_ref(const uint8_t *ref, const uint8_t *src, int l2h, int xoff, int yoff, uint32_t *sse_ptr, bool use_high_bit_depth, - vpx_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int64_t se = 0; uint64_t sse = 0; const int w = 1 << l2w; @@ -540,7 +540,7 @@ class SubpelVarianceTest height_ = 1 << log2height_; subpel_variance_ = get<2>(params); if (get<3>(params)) { - bit_depth_ = (vpx_bit_depth_t)get<3>(params); + bit_depth_ = (aom_bit_depth_t)get<3>(params); use_high_bit_depth_ = true; } else { bit_depth_ = VPX_BITS_8; @@ -551,15 +551,15 @@ class SubpelVarianceTest rnd_.Reset(ACMRandom::DeterministicSeed()); block_size_ = width_ * height_; if (!use_high_bit_depth_) { - src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_)); - sec_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_)); + src_ = reinterpret_cast<uint8_t *>(aom_memalign(16, block_size_)); + sec_ = reinterpret_cast<uint8_t *>(aom_memalign(16, block_size_)); ref_ = new uint8_t[block_size_ + width_ + height_ + 1]; #if CONFIG_VPX_HIGHBITDEPTH } else { src_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>( - vpx_memalign(16, block_size_ * sizeof(uint16_t)))); + aom_memalign(16, block_size_ * sizeof(uint16_t)))); sec_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>( - vpx_memalign(16, block_size_ * sizeof(uint16_t)))); + aom_memalign(16, block_size_ * sizeof(uint16_t)))); ref_ = CONVERT_TO_BYTEPTR(new uint16_t[block_size_ + width_ + height_ + 1]); #endif // CONFIG_VPX_HIGHBITDEPTH @@ -571,14 +571,14 @@ class SubpelVarianceTest virtual void TearDown() { if (!use_high_bit_depth_) { - vpx_free(src_); + aom_free(src_); delete[] ref_; - vpx_free(sec_); + aom_free(sec_); #if CONFIG_VPX_HIGHBITDEPTH } else { - vpx_free(CONVERT_TO_SHORTPTR(src_)); + aom_free(CONVERT_TO_SHORTPTR(src_)); delete[] CONVERT_TO_SHORTPTR(ref_); - vpx_free(CONVERT_TO_SHORTPTR(sec_)); + aom_free(CONVERT_TO_SHORTPTR(sec_)); #endif // CONFIG_VPX_HIGHBITDEPTH } libaom_test::ClearSystemState(); @@ -593,7 +593,7 @@ class SubpelVarianceTest uint8_t *ref_; uint8_t *sec_; bool use_high_bit_depth_; - vpx_bit_depth_t bit_depth_; + aom_bit_depth_t bit_depth_; int width_, log2width_; int height_, log2height_; int block_size_, mask_; @@ -649,10 +649,10 @@ void SubpelVarianceTest<SubpelVarianceFunctionType>::ExtremeRefTest() { memset(ref_ + half, 0, half + width_ + height_ + 1); #if CONFIG_VPX_HIGHBITDEPTH } else { - vpx_memset16(CONVERT_TO_SHORTPTR(src_), mask_, half); - vpx_memset16(CONVERT_TO_SHORTPTR(src_) + half, 0, half); - vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 0, half); - vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, mask_, + aom_memset16(CONVERT_TO_SHORTPTR(src_), mask_, half); + aom_memset16(CONVERT_TO_SHORTPTR(src_) + half, 0, half); + aom_memset16(CONVERT_TO_SHORTPTR(ref_), 0, half); + aom_memset16(CONVERT_TO_SHORTPTR(ref_) + half, mask_, half + width_ + height_ + 1); #endif // CONFIG_VPX_HIGHBITDEPTH } @@ -727,65 +727,65 @@ TEST_P(VpxSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); } TEST_P(VpxSubpelAvgVarianceTest, Ref) { RefTest(); } INSTANTIATE_TEST_CASE_P(C, SumOfSquaresTest, - ::testing::Values(vpx_get_mb_ss_c)); + ::testing::Values(aom_get_mb_ss_c)); INSTANTIATE_TEST_CASE_P(C, VpxSseTest, ::testing::Values(make_tuple(2, 2, - &vpx_get4x4sse_cs_c))); + &aom_get4x4sse_cs_c))); INSTANTIATE_TEST_CASE_P(C, VpxMseTest, - ::testing::Values(make_tuple(4, 4, &vpx_mse16x16_c), - make_tuple(4, 3, &vpx_mse16x8_c), - make_tuple(3, 4, &vpx_mse8x16_c), - make_tuple(3, 3, &vpx_mse8x8_c))); + ::testing::Values(make_tuple(4, 4, &aom_mse16x16_c), + make_tuple(4, 3, &aom_mse16x8_c), + make_tuple(3, 4, &aom_mse8x16_c), + make_tuple(3, 3, &aom_mse8x8_c))); INSTANTIATE_TEST_CASE_P( C, VpxVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_variance64x64_c, 0), - make_tuple(6, 5, &vpx_variance64x32_c, 0), - make_tuple(5, 6, &vpx_variance32x64_c, 0), - make_tuple(5, 5, &vpx_variance32x32_c, 0), - make_tuple(5, 4, &vpx_variance32x16_c, 0), - make_tuple(4, 5, &vpx_variance16x32_c, 0), - make_tuple(4, 4, &vpx_variance16x16_c, 0), - make_tuple(4, 3, &vpx_variance16x8_c, 0), - make_tuple(3, 4, &vpx_variance8x16_c, 0), - make_tuple(3, 3, &vpx_variance8x8_c, 0), - make_tuple(3, 2, &vpx_variance8x4_c, 0), - make_tuple(2, 3, &vpx_variance4x8_c, 0), - make_tuple(2, 2, &vpx_variance4x4_c, 0))); + ::testing::Values(make_tuple(6, 6, &aom_variance64x64_c, 0), + make_tuple(6, 5, &aom_variance64x32_c, 0), + make_tuple(5, 6, &aom_variance32x64_c, 0), + make_tuple(5, 5, &aom_variance32x32_c, 0), + make_tuple(5, 4, &aom_variance32x16_c, 0), + make_tuple(4, 5, &aom_variance16x32_c, 0), + make_tuple(4, 4, &aom_variance16x16_c, 0), + make_tuple(4, 3, &aom_variance16x8_c, 0), + make_tuple(3, 4, &aom_variance8x16_c, 0), + make_tuple(3, 3, &aom_variance8x8_c, 0), + make_tuple(3, 2, &aom_variance8x4_c, 0), + make_tuple(2, 3, &aom_variance4x8_c, 0), + make_tuple(2, 2, &aom_variance4x4_c, 0))); INSTANTIATE_TEST_CASE_P( C, VpxSubpelVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_sub_pixel_variance64x64_c, 0), - make_tuple(6, 5, &vpx_sub_pixel_variance64x32_c, 0), - make_tuple(5, 6, &vpx_sub_pixel_variance32x64_c, 0), - make_tuple(5, 5, &vpx_sub_pixel_variance32x32_c, 0), - make_tuple(5, 4, &vpx_sub_pixel_variance32x16_c, 0), - make_tuple(4, 5, &vpx_sub_pixel_variance16x32_c, 0), - make_tuple(4, 4, &vpx_sub_pixel_variance16x16_c, 0), - make_tuple(4, 3, &vpx_sub_pixel_variance16x8_c, 0), - make_tuple(3, 4, &vpx_sub_pixel_variance8x16_c, 0), - make_tuple(3, 3, &vpx_sub_pixel_variance8x8_c, 0), - make_tuple(3, 2, &vpx_sub_pixel_variance8x4_c, 0), - make_tuple(2, 3, &vpx_sub_pixel_variance4x8_c, 0), - make_tuple(2, 2, &vpx_sub_pixel_variance4x4_c, 0))); + ::testing::Values(make_tuple(6, 6, &aom_sub_pixel_variance64x64_c, 0), + make_tuple(6, 5, &aom_sub_pixel_variance64x32_c, 0), + make_tuple(5, 6, &aom_sub_pixel_variance32x64_c, 0), + make_tuple(5, 5, &aom_sub_pixel_variance32x32_c, 0), + make_tuple(5, 4, &aom_sub_pixel_variance32x16_c, 0), + make_tuple(4, 5, &aom_sub_pixel_variance16x32_c, 0), + make_tuple(4, 4, &aom_sub_pixel_variance16x16_c, 0), + make_tuple(4, 3, &aom_sub_pixel_variance16x8_c, 0), + make_tuple(3, 4, &aom_sub_pixel_variance8x16_c, 0), + make_tuple(3, 3, &aom_sub_pixel_variance8x8_c, 0), + make_tuple(3, 2, &aom_sub_pixel_variance8x4_c, 0), + make_tuple(2, 3, &aom_sub_pixel_variance4x8_c, 0), + make_tuple(2, 2, &aom_sub_pixel_variance4x4_c, 0))); INSTANTIATE_TEST_CASE_P( C, VpxSubpelAvgVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_sub_pixel_avg_variance64x64_c, 0), - make_tuple(6, 5, &vpx_sub_pixel_avg_variance64x32_c, 0), - make_tuple(5, 6, &vpx_sub_pixel_avg_variance32x64_c, 0), - make_tuple(5, 5, &vpx_sub_pixel_avg_variance32x32_c, 0), - make_tuple(5, 4, &vpx_sub_pixel_avg_variance32x16_c, 0), - make_tuple(4, 5, &vpx_sub_pixel_avg_variance16x32_c, 0), - make_tuple(4, 4, &vpx_sub_pixel_avg_variance16x16_c, 0), - make_tuple(4, 3, &vpx_sub_pixel_avg_variance16x8_c, 0), - make_tuple(3, 4, &vpx_sub_pixel_avg_variance8x16_c, 0), - make_tuple(3, 3, &vpx_sub_pixel_avg_variance8x8_c, 0), - make_tuple(3, 2, &vpx_sub_pixel_avg_variance8x4_c, 0), - make_tuple(2, 3, &vpx_sub_pixel_avg_variance4x8_c, 0), - make_tuple(2, 2, &vpx_sub_pixel_avg_variance4x4_c, 0))); + ::testing::Values(make_tuple(6, 6, &aom_sub_pixel_avg_variance64x64_c, 0), + make_tuple(6, 5, &aom_sub_pixel_avg_variance64x32_c, 0), + make_tuple(5, 6, &aom_sub_pixel_avg_variance32x64_c, 0), + make_tuple(5, 5, &aom_sub_pixel_avg_variance32x32_c, 0), + make_tuple(5, 4, &aom_sub_pixel_avg_variance32x16_c, 0), + make_tuple(4, 5, &aom_sub_pixel_avg_variance16x32_c, 0), + make_tuple(4, 4, &aom_sub_pixel_avg_variance16x16_c, 0), + make_tuple(4, 3, &aom_sub_pixel_avg_variance16x8_c, 0), + make_tuple(3, 4, &aom_sub_pixel_avg_variance8x16_c, 0), + make_tuple(3, 3, &aom_sub_pixel_avg_variance8x8_c, 0), + make_tuple(3, 2, &aom_sub_pixel_avg_variance8x4_c, 0), + make_tuple(2, 3, &aom_sub_pixel_avg_variance4x8_c, 0), + make_tuple(2, 2, &aom_sub_pixel_avg_variance4x4_c, 0))); #if CONFIG_VPX_HIGHBITDEPTH typedef MseTest<VarianceMxNFunc> VpxHBDMseTest; @@ -806,359 +806,359 @@ TEST_P(VpxHBDSubpelAvgVarianceTest, Ref) { RefTest(); } /* TODO(debargha): This test does not support the highbd version INSTANTIATE_TEST_CASE_P( C, VpxHBDMseTest, - ::testing::Values(make_tuple(4, 4, &vpx_highbd_12_mse16x16_c), - make_tuple(4, 4, &vpx_highbd_12_mse16x8_c), - make_tuple(4, 4, &vpx_highbd_12_mse8x16_c), - make_tuple(4, 4, &vpx_highbd_12_mse8x8_c), - make_tuple(4, 4, &vpx_highbd_10_mse16x16_c), - make_tuple(4, 4, &vpx_highbd_10_mse16x8_c), - make_tuple(4, 4, &vpx_highbd_10_mse8x16_c), - make_tuple(4, 4, &vpx_highbd_10_mse8x8_c), - make_tuple(4, 4, &vpx_highbd_8_mse16x16_c), - make_tuple(4, 4, &vpx_highbd_8_mse16x8_c), - make_tuple(4, 4, &vpx_highbd_8_mse8x16_c), - make_tuple(4, 4, &vpx_highbd_8_mse8x8_c))); + ::testing::Values(make_tuple(4, 4, &aom_highbd_12_mse16x16_c), + make_tuple(4, 4, &aom_highbd_12_mse16x8_c), + make_tuple(4, 4, &aom_highbd_12_mse8x16_c), + make_tuple(4, 4, &aom_highbd_12_mse8x8_c), + make_tuple(4, 4, &aom_highbd_10_mse16x16_c), + make_tuple(4, 4, &aom_highbd_10_mse16x8_c), + make_tuple(4, 4, &aom_highbd_10_mse8x16_c), + make_tuple(4, 4, &aom_highbd_10_mse8x8_c), + make_tuple(4, 4, &aom_highbd_8_mse16x16_c), + make_tuple(4, 4, &aom_highbd_8_mse16x8_c), + make_tuple(4, 4, &aom_highbd_8_mse8x16_c), + make_tuple(4, 4, &aom_highbd_8_mse8x8_c))); */ INSTANTIATE_TEST_CASE_P( C, VpxHBDVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_highbd_12_variance64x64_c, 12), - make_tuple(6, 5, &vpx_highbd_12_variance64x32_c, 12), - make_tuple(5, 6, &vpx_highbd_12_variance32x64_c, 12), - make_tuple(5, 5, &vpx_highbd_12_variance32x32_c, 12), - make_tuple(5, 4, &vpx_highbd_12_variance32x16_c, 12), - make_tuple(4, 5, &vpx_highbd_12_variance16x32_c, 12), - make_tuple(4, 4, &vpx_highbd_12_variance16x16_c, 12), - make_tuple(4, 3, &vpx_highbd_12_variance16x8_c, 12), - make_tuple(3, 4, &vpx_highbd_12_variance8x16_c, 12), - make_tuple(3, 3, &vpx_highbd_12_variance8x8_c, 12), - make_tuple(3, 2, &vpx_highbd_12_variance8x4_c, 12), - make_tuple(2, 3, &vpx_highbd_12_variance4x8_c, 12), - make_tuple(2, 2, &vpx_highbd_12_variance4x4_c, 12), - make_tuple(6, 6, &vpx_highbd_10_variance64x64_c, 10), - make_tuple(6, 5, &vpx_highbd_10_variance64x32_c, 10), - make_tuple(5, 6, &vpx_highbd_10_variance32x64_c, 10), - make_tuple(5, 5, &vpx_highbd_10_variance32x32_c, 10), - make_tuple(5, 4, &vpx_highbd_10_variance32x16_c, 10), - make_tuple(4, 5, &vpx_highbd_10_variance16x32_c, 10), - make_tuple(4, 4, &vpx_highbd_10_variance16x16_c, 10), - make_tuple(4, 3, &vpx_highbd_10_variance16x8_c, 10), - make_tuple(3, 4, &vpx_highbd_10_variance8x16_c, 10), - make_tuple(3, 3, &vpx_highbd_10_variance8x8_c, 10), - make_tuple(3, 2, &vpx_highbd_10_variance8x4_c, 10), - make_tuple(2, 3, &vpx_highbd_10_variance4x8_c, 10), - make_tuple(2, 2, &vpx_highbd_10_variance4x4_c, 10), - make_tuple(6, 6, &vpx_highbd_8_variance64x64_c, 8), - make_tuple(6, 5, &vpx_highbd_8_variance64x32_c, 8), - make_tuple(5, 6, &vpx_highbd_8_variance32x64_c, 8), - make_tuple(5, 5, &vpx_highbd_8_variance32x32_c, 8), - make_tuple(5, 4, &vpx_highbd_8_variance32x16_c, 8), - make_tuple(4, 5, &vpx_highbd_8_variance16x32_c, 8), - make_tuple(4, 4, &vpx_highbd_8_variance16x16_c, 8), - make_tuple(4, 3, &vpx_highbd_8_variance16x8_c, 8), - make_tuple(3, 4, &vpx_highbd_8_variance8x16_c, 8), - make_tuple(3, 3, &vpx_highbd_8_variance8x8_c, 8), - make_tuple(3, 2, &vpx_highbd_8_variance8x4_c, 8), - make_tuple(2, 3, &vpx_highbd_8_variance4x8_c, 8), - make_tuple(2, 2, &vpx_highbd_8_variance4x4_c, 8))); + ::testing::Values(make_tuple(6, 6, &aom_highbd_12_variance64x64_c, 12), + make_tuple(6, 5, &aom_highbd_12_variance64x32_c, 12), + make_tuple(5, 6, &aom_highbd_12_variance32x64_c, 12), + make_tuple(5, 5, &aom_highbd_12_variance32x32_c, 12), + make_tuple(5, 4, &aom_highbd_12_variance32x16_c, 12), + make_tuple(4, 5, &aom_highbd_12_variance16x32_c, 12), + make_tuple(4, 4, &aom_highbd_12_variance16x16_c, 12), + make_tuple(4, 3, &aom_highbd_12_variance16x8_c, 12), + make_tuple(3, 4, &aom_highbd_12_variance8x16_c, 12), + make_tuple(3, 3, &aom_highbd_12_variance8x8_c, 12), + make_tuple(3, 2, &aom_highbd_12_variance8x4_c, 12), + make_tuple(2, 3, &aom_highbd_12_variance4x8_c, 12), + make_tuple(2, 2, &aom_highbd_12_variance4x4_c, 12), + make_tuple(6, 6, &aom_highbd_10_variance64x64_c, 10), + make_tuple(6, 5, &aom_highbd_10_variance64x32_c, 10), + make_tuple(5, 6, &aom_highbd_10_variance32x64_c, 10), + make_tuple(5, 5, &aom_highbd_10_variance32x32_c, 10), + make_tuple(5, 4, &aom_highbd_10_variance32x16_c, 10), + make_tuple(4, 5, &aom_highbd_10_variance16x32_c, 10), + make_tuple(4, 4, &aom_highbd_10_variance16x16_c, 10), + make_tuple(4, 3, &aom_highbd_10_variance16x8_c, 10), + make_tuple(3, 4, &aom_highbd_10_variance8x16_c, 10), + make_tuple(3, 3, &aom_highbd_10_variance8x8_c, 10), + make_tuple(3, 2, &aom_highbd_10_variance8x4_c, 10), + make_tuple(2, 3, &aom_highbd_10_variance4x8_c, 10), + make_tuple(2, 2, &aom_highbd_10_variance4x4_c, 10), + make_tuple(6, 6, &aom_highbd_8_variance64x64_c, 8), + make_tuple(6, 5, &aom_highbd_8_variance64x32_c, 8), + make_tuple(5, 6, &aom_highbd_8_variance32x64_c, 8), + make_tuple(5, 5, &aom_highbd_8_variance32x32_c, 8), + make_tuple(5, 4, &aom_highbd_8_variance32x16_c, 8), + make_tuple(4, 5, &aom_highbd_8_variance16x32_c, 8), + make_tuple(4, 4, &aom_highbd_8_variance16x16_c, 8), + make_tuple(4, 3, &aom_highbd_8_variance16x8_c, 8), + make_tuple(3, 4, &aom_highbd_8_variance8x16_c, 8), + make_tuple(3, 3, &aom_highbd_8_variance8x8_c, 8), + make_tuple(3, 2, &aom_highbd_8_variance8x4_c, 8), + make_tuple(2, 3, &aom_highbd_8_variance4x8_c, 8), + make_tuple(2, 2, &aom_highbd_8_variance4x4_c, 8))); INSTANTIATE_TEST_CASE_P( C, VpxHBDSubpelVarianceTest, ::testing::Values( - make_tuple(6, 6, &vpx_highbd_8_sub_pixel_variance64x64_c, 8), - make_tuple(6, 5, &vpx_highbd_8_sub_pixel_variance64x32_c, 8), - make_tuple(5, 6, &vpx_highbd_8_sub_pixel_variance32x64_c, 8), - make_tuple(5, 5, &vpx_highbd_8_sub_pixel_variance32x32_c, 8), - make_tuple(5, 4, &vpx_highbd_8_sub_pixel_variance32x16_c, 8), - make_tuple(4, 5, &vpx_highbd_8_sub_pixel_variance16x32_c, 8), - make_tuple(4, 4, &vpx_highbd_8_sub_pixel_variance16x16_c, 8), - make_tuple(4, 3, &vpx_highbd_8_sub_pixel_variance16x8_c, 8), - make_tuple(3, 4, &vpx_highbd_8_sub_pixel_variance8x16_c, 8), - make_tuple(3, 3, &vpx_highbd_8_sub_pixel_variance8x8_c, 8), - make_tuple(3, 2, &vpx_highbd_8_sub_pixel_variance8x4_c, 8), - make_tuple(2, 3, &vpx_highbd_8_sub_pixel_variance4x8_c, 8), - make_tuple(2, 2, &vpx_highbd_8_sub_pixel_variance4x4_c, 8), - make_tuple(6, 6, &vpx_highbd_10_sub_pixel_variance64x64_c, 10), - make_tuple(6, 5, &vpx_highbd_10_sub_pixel_variance64x32_c, 10), - make_tuple(5, 6, &vpx_highbd_10_sub_pixel_variance32x64_c, 10), - make_tuple(5, 5, &vpx_highbd_10_sub_pixel_variance32x32_c, 10), - make_tuple(5, 4, &vpx_highbd_10_sub_pixel_variance32x16_c, 10), - make_tuple(4, 5, &vpx_highbd_10_sub_pixel_variance16x32_c, 10), - make_tuple(4, 4, &vpx_highbd_10_sub_pixel_variance16x16_c, 10), - make_tuple(4, 3, &vpx_highbd_10_sub_pixel_variance16x8_c, 10), - make_tuple(3, 4, &vpx_highbd_10_sub_pixel_variance8x16_c, 10), - make_tuple(3, 3, &vpx_highbd_10_sub_pixel_variance8x8_c, 10), - make_tuple(3, 2, &vpx_highbd_10_sub_pixel_variance8x4_c, 10), - make_tuple(2, 3, &vpx_highbd_10_sub_pixel_variance4x8_c, 10), - make_tuple(2, 2, &vpx_highbd_10_sub_pixel_variance4x4_c, 10), - make_tuple(6, 6, &vpx_highbd_12_sub_pixel_variance64x64_c, 12), - make_tuple(6, 5, &vpx_highbd_12_sub_pixel_variance64x32_c, 12), - make_tuple(5, 6, &vpx_highbd_12_sub_pixel_variance32x64_c, 12), - make_tuple(5, 5, &vpx_highbd_12_sub_pixel_variance32x32_c, 12), - make_tuple(5, 4, &vpx_highbd_12_sub_pixel_variance32x16_c, 12), - make_tuple(4, 5, &vpx_highbd_12_sub_pixel_variance16x32_c, 12), - make_tuple(4, 4, &vpx_highbd_12_sub_pixel_variance16x16_c, 12), - make_tuple(4, 3, &vpx_highbd_12_sub_pixel_variance16x8_c, 12), - make_tuple(3, 4, &vpx_highbd_12_sub_pixel_variance8x16_c, 12), - make_tuple(3, 3, &vpx_highbd_12_sub_pixel_variance8x8_c, 12), - make_tuple(3, 2, &vpx_highbd_12_sub_pixel_variance8x4_c, 12), - make_tuple(2, 3, &vpx_highbd_12_sub_pixel_variance4x8_c, 12), - make_tuple(2, 2, &vpx_highbd_12_sub_pixel_variance4x4_c, 12))); + make_tuple(6, 6, &aom_highbd_8_sub_pixel_variance64x64_c, 8), + make_tuple(6, 5, &aom_highbd_8_sub_pixel_variance64x32_c, 8), + make_tuple(5, 6, &aom_highbd_8_sub_pixel_variance32x64_c, 8), + make_tuple(5, 5, &aom_highbd_8_sub_pixel_variance32x32_c, 8), + make_tuple(5, 4, &aom_highbd_8_sub_pixel_variance32x16_c, 8), + make_tuple(4, 5, &aom_highbd_8_sub_pixel_variance16x32_c, 8), + make_tuple(4, 4, &aom_highbd_8_sub_pixel_variance16x16_c, 8), + make_tuple(4, 3, &aom_highbd_8_sub_pixel_variance16x8_c, 8), + make_tuple(3, 4, &aom_highbd_8_sub_pixel_variance8x16_c, 8), + make_tuple(3, 3, &aom_highbd_8_sub_pixel_variance8x8_c, 8), + make_tuple(3, 2, &aom_highbd_8_sub_pixel_variance8x4_c, 8), + make_tuple(2, 3, &aom_highbd_8_sub_pixel_variance4x8_c, 8), + make_tuple(2, 2, &aom_highbd_8_sub_pixel_variance4x4_c, 8), + make_tuple(6, 6, &aom_highbd_10_sub_pixel_variance64x64_c, 10), + make_tuple(6, 5, &aom_highbd_10_sub_pixel_variance64x32_c, 10), + make_tuple(5, 6, &aom_highbd_10_sub_pixel_variance32x64_c, 10), + make_tuple(5, 5, &aom_highbd_10_sub_pixel_variance32x32_c, 10), + make_tuple(5, 4, &aom_highbd_10_sub_pixel_variance32x16_c, 10), + make_tuple(4, 5, &aom_highbd_10_sub_pixel_variance16x32_c, 10), + make_tuple(4, 4, &aom_highbd_10_sub_pixel_variance16x16_c, 10), + make_tuple(4, 3, &aom_highbd_10_sub_pixel_variance16x8_c, 10), + make_tuple(3, 4, &aom_highbd_10_sub_pixel_variance8x16_c, 10), + make_tuple(3, 3, &aom_highbd_10_sub_pixel_variance8x8_c, 10), + make_tuple(3, 2, &aom_highbd_10_sub_pixel_variance8x4_c, 10), + make_tuple(2, 3, &aom_highbd_10_sub_pixel_variance4x8_c, 10), + make_tuple(2, 2, &aom_highbd_10_sub_pixel_variance4x4_c, 10), + make_tuple(6, 6, &aom_highbd_12_sub_pixel_variance64x64_c, 12), + make_tuple(6, 5, &aom_highbd_12_sub_pixel_variance64x32_c, 12), + make_tuple(5, 6, &aom_highbd_12_sub_pixel_variance32x64_c, 12), + make_tuple(5, 5, &aom_highbd_12_sub_pixel_variance32x32_c, 12), + make_tuple(5, 4, &aom_highbd_12_sub_pixel_variance32x16_c, 12), + make_tuple(4, 5, &aom_highbd_12_sub_pixel_variance16x32_c, 12), + make_tuple(4, 4, &aom_highbd_12_sub_pixel_variance16x16_c, 12), + make_tuple(4, 3, &aom_highbd_12_sub_pixel_variance16x8_c, 12), + make_tuple(3, 4, &aom_highbd_12_sub_pixel_variance8x16_c, 12), + make_tuple(3, 3, &aom_highbd_12_sub_pixel_variance8x8_c, 12), + make_tuple(3, 2, &aom_highbd_12_sub_pixel_variance8x4_c, 12), + make_tuple(2, 3, &aom_highbd_12_sub_pixel_variance4x8_c, 12), + make_tuple(2, 2, &aom_highbd_12_sub_pixel_variance4x4_c, 12))); INSTANTIATE_TEST_CASE_P( C, VpxHBDSubpelAvgVarianceTest, ::testing::Values( - make_tuple(6, 6, &vpx_highbd_8_sub_pixel_avg_variance64x64_c, 8), - make_tuple(6, 5, &vpx_highbd_8_sub_pixel_avg_variance64x32_c, 8), - make_tuple(5, 6, &vpx_highbd_8_sub_pixel_avg_variance32x64_c, 8), - make_tuple(5, 5, &vpx_highbd_8_sub_pixel_avg_variance32x32_c, 8), - make_tuple(5, 4, &vpx_highbd_8_sub_pixel_avg_variance32x16_c, 8), - make_tuple(4, 5, &vpx_highbd_8_sub_pixel_avg_variance16x32_c, 8), - make_tuple(4, 4, &vpx_highbd_8_sub_pixel_avg_variance16x16_c, 8), - make_tuple(4, 3, &vpx_highbd_8_sub_pixel_avg_variance16x8_c, 8), - make_tuple(3, 4, &vpx_highbd_8_sub_pixel_avg_variance8x16_c, 8), - make_tuple(3, 3, &vpx_highbd_8_sub_pixel_avg_variance8x8_c, 8), - make_tuple(3, 2, &vpx_highbd_8_sub_pixel_avg_variance8x4_c, 8), - make_tuple(2, 3, &vpx_highbd_8_sub_pixel_avg_variance4x8_c, 8), - make_tuple(2, 2, &vpx_highbd_8_sub_pixel_avg_variance4x4_c, 8), - make_tuple(6, 6, &vpx_highbd_10_sub_pixel_avg_variance64x64_c, 10), - make_tuple(6, 5, &vpx_highbd_10_sub_pixel_avg_variance64x32_c, 10), - make_tuple(5, 6, &vpx_highbd_10_sub_pixel_avg_variance32x64_c, 10), - make_tuple(5, 5, &vpx_highbd_10_sub_pixel_avg_variance32x32_c, 10), - make_tuple(5, 4, &vpx_highbd_10_sub_pixel_avg_variance32x16_c, 10), - make_tuple(4, 5, &vpx_highbd_10_sub_pixel_avg_variance16x32_c, 10), - make_tuple(4, 4, &vpx_highbd_10_sub_pixel_avg_variance16x16_c, 10), - make_tuple(4, 3, &vpx_highbd_10_sub_pixel_avg_variance16x8_c, 10), - make_tuple(3, 4, &vpx_highbd_10_sub_pixel_avg_variance8x16_c, 10), - make_tuple(3, 3, &vpx_highbd_10_sub_pixel_avg_variance8x8_c, 10), - make_tuple(3, 2, &vpx_highbd_10_sub_pixel_avg_variance8x4_c, 10), - make_tuple(2, 3, &vpx_highbd_10_sub_pixel_avg_variance4x8_c, 10), - make_tuple(2, 2, &vpx_highbd_10_sub_pixel_avg_variance4x4_c, 10), - make_tuple(6, 6, &vpx_highbd_12_sub_pixel_avg_variance64x64_c, 12), - make_tuple(6, 5, &vpx_highbd_12_sub_pixel_avg_variance64x32_c, 12), - make_tuple(5, 6, &vpx_highbd_12_sub_pixel_avg_variance32x64_c, 12), - make_tuple(5, 5, &vpx_highbd_12_sub_pixel_avg_variance32x32_c, 12), - make_tuple(5, 4, &vpx_highbd_12_sub_pixel_avg_variance32x16_c, 12), - make_tuple(4, 5, &vpx_highbd_12_sub_pixel_avg_variance16x32_c, 12), - make_tuple(4, 4, &vpx_highbd_12_sub_pixel_avg_variance16x16_c, 12), - make_tuple(4, 3, &vpx_highbd_12_sub_pixel_avg_variance16x8_c, 12), - make_tuple(3, 4, &vpx_highbd_12_sub_pixel_avg_variance8x16_c, 12), - make_tuple(3, 3, &vpx_highbd_12_sub_pixel_avg_variance8x8_c, 12), - make_tuple(3, 2, &vpx_highbd_12_sub_pixel_avg_variance8x4_c, 12), - make_tuple(2, 3, &vpx_highbd_12_sub_pixel_avg_variance4x8_c, 12), - make_tuple(2, 2, &vpx_highbd_12_sub_pixel_avg_variance4x4_c, 12))); + make_tuple(6, 6, &aom_highbd_8_sub_pixel_avg_variance64x64_c, 8), + make_tuple(6, 5, &aom_highbd_8_sub_pixel_avg_variance64x32_c, 8), + make_tuple(5, 6, &aom_highbd_8_sub_pixel_avg_variance32x64_c, 8), + make_tuple(5, 5, &aom_highbd_8_sub_pixel_avg_variance32x32_c, 8), + make_tuple(5, 4, &aom_highbd_8_sub_pixel_avg_variance32x16_c, 8), + make_tuple(4, 5, &aom_highbd_8_sub_pixel_avg_variance16x32_c, 8), + make_tuple(4, 4, &aom_highbd_8_sub_pixel_avg_variance16x16_c, 8), + make_tuple(4, 3, &aom_highbd_8_sub_pixel_avg_variance16x8_c, 8), + make_tuple(3, 4, &aom_highbd_8_sub_pixel_avg_variance8x16_c, 8), + make_tuple(3, 3, &aom_highbd_8_sub_pixel_avg_variance8x8_c, 8), + make_tuple(3, 2, &aom_highbd_8_sub_pixel_avg_variance8x4_c, 8), + make_tuple(2, 3, &aom_highbd_8_sub_pixel_avg_variance4x8_c, 8), + make_tuple(2, 2, &aom_highbd_8_sub_pixel_avg_variance4x4_c, 8), + make_tuple(6, 6, &aom_highbd_10_sub_pixel_avg_variance64x64_c, 10), + make_tuple(6, 5, &aom_highbd_10_sub_pixel_avg_variance64x32_c, 10), + make_tuple(5, 6, &aom_highbd_10_sub_pixel_avg_variance32x64_c, 10), + make_tuple(5, 5, &aom_highbd_10_sub_pixel_avg_variance32x32_c, 10), + make_tuple(5, 4, &aom_highbd_10_sub_pixel_avg_variance32x16_c, 10), + make_tuple(4, 5, &aom_highbd_10_sub_pixel_avg_variance16x32_c, 10), + make_tuple(4, 4, &aom_highbd_10_sub_pixel_avg_variance16x16_c, 10), + make_tuple(4, 3, &aom_highbd_10_sub_pixel_avg_variance16x8_c, 10), + make_tuple(3, 4, &aom_highbd_10_sub_pixel_avg_variance8x16_c, 10), + make_tuple(3, 3, &aom_highbd_10_sub_pixel_avg_variance8x8_c, 10), + make_tuple(3, 2, &aom_highbd_10_sub_pixel_avg_variance8x4_c, 10), + make_tuple(2, 3, &aom_highbd_10_sub_pixel_avg_variance4x8_c, 10), + make_tuple(2, 2, &aom_highbd_10_sub_pixel_avg_variance4x4_c, 10), + make_tuple(6, 6, &aom_highbd_12_sub_pixel_avg_variance64x64_c, 12), + make_tuple(6, 5, &aom_highbd_12_sub_pixel_avg_variance64x32_c, 12), + make_tuple(5, 6, &aom_highbd_12_sub_pixel_avg_variance32x64_c, 12), + make_tuple(5, 5, &aom_highbd_12_sub_pixel_avg_variance32x32_c, 12), + make_tuple(5, 4, &aom_highbd_12_sub_pixel_avg_variance32x16_c, 12), + make_tuple(4, 5, &aom_highbd_12_sub_pixel_avg_variance16x32_c, 12), + make_tuple(4, 4, &aom_highbd_12_sub_pixel_avg_variance16x16_c, 12), + make_tuple(4, 3, &aom_highbd_12_sub_pixel_avg_variance16x8_c, 12), + make_tuple(3, 4, &aom_highbd_12_sub_pixel_avg_variance8x16_c, 12), + make_tuple(3, 3, &aom_highbd_12_sub_pixel_avg_variance8x8_c, 12), + make_tuple(3, 2, &aom_highbd_12_sub_pixel_avg_variance8x4_c, 12), + make_tuple(2, 3, &aom_highbd_12_sub_pixel_avg_variance4x8_c, 12), + make_tuple(2, 2, &aom_highbd_12_sub_pixel_avg_variance4x4_c, 12))); #endif // CONFIG_VPX_HIGHBITDEPTH #if HAVE_MMX INSTANTIATE_TEST_CASE_P(MMX, VpxMseTest, - ::testing::Values(make_tuple(4, 4, &vpx_mse16x16_mmx))); + ::testing::Values(make_tuple(4, 4, &aom_mse16x16_mmx))); INSTANTIATE_TEST_CASE_P(MMX, SumOfSquaresTest, - ::testing::Values(vpx_get_mb_ss_mmx)); + ::testing::Values(aom_get_mb_ss_mmx)); INSTANTIATE_TEST_CASE_P( MMX, VpxVarianceTest, - ::testing::Values(make_tuple(4, 4, &vpx_variance16x16_mmx, 0), - make_tuple(4, 3, &vpx_variance16x8_mmx, 0), - make_tuple(3, 4, &vpx_variance8x16_mmx, 0), - make_tuple(3, 3, &vpx_variance8x8_mmx, 0), - make_tuple(2, 2, &vpx_variance4x4_mmx, 0))); + ::testing::Values(make_tuple(4, 4, &aom_variance16x16_mmx, 0), + make_tuple(4, 3, &aom_variance16x8_mmx, 0), + make_tuple(3, 4, &aom_variance8x16_mmx, 0), + make_tuple(3, 3, &aom_variance8x8_mmx, 0), + make_tuple(2, 2, &aom_variance4x4_mmx, 0))); INSTANTIATE_TEST_CASE_P( MMX, VpxSubpelVarianceTest, - ::testing::Values(make_tuple(4, 4, &vpx_sub_pixel_variance16x16_mmx, 0), - make_tuple(4, 3, &vpx_sub_pixel_variance16x8_mmx, 0), - make_tuple(3, 4, &vpx_sub_pixel_variance8x16_mmx, 0), - make_tuple(3, 3, &vpx_sub_pixel_variance8x8_mmx, 0), - make_tuple(2, 2, &vpx_sub_pixel_variance4x4_mmx, 0))); + ::testing::Values(make_tuple(4, 4, &aom_sub_pixel_variance16x16_mmx, 0), + make_tuple(4, 3, &aom_sub_pixel_variance16x8_mmx, 0), + make_tuple(3, 4, &aom_sub_pixel_variance8x16_mmx, 0), + make_tuple(3, 3, &aom_sub_pixel_variance8x8_mmx, 0), + make_tuple(2, 2, &aom_sub_pixel_variance4x4_mmx, 0))); #endif // HAVE_MMX #if HAVE_SSE2 INSTANTIATE_TEST_CASE_P(SSE2, SumOfSquaresTest, - ::testing::Values(vpx_get_mb_ss_sse2)); + ::testing::Values(aom_get_mb_ss_sse2)); INSTANTIATE_TEST_CASE_P(SSE2, VpxMseTest, - ::testing::Values(make_tuple(4, 4, &vpx_mse16x16_sse2), - make_tuple(4, 3, &vpx_mse16x8_sse2), - make_tuple(3, 4, &vpx_mse8x16_sse2), - make_tuple(3, 3, &vpx_mse8x8_sse2))); + ::testing::Values(make_tuple(4, 4, &aom_mse16x16_sse2), + make_tuple(4, 3, &aom_mse16x8_sse2), + make_tuple(3, 4, &aom_mse8x16_sse2), + make_tuple(3, 3, &aom_mse8x8_sse2))); INSTANTIATE_TEST_CASE_P( SSE2, VpxVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_variance64x64_sse2, 0), - make_tuple(6, 5, &vpx_variance64x32_sse2, 0), - make_tuple(5, 6, &vpx_variance32x64_sse2, 0), - make_tuple(5, 5, &vpx_variance32x32_sse2, 0), - make_tuple(5, 4, &vpx_variance32x16_sse2, 0), - make_tuple(4, 5, &vpx_variance16x32_sse2, 0), - make_tuple(4, 4, &vpx_variance16x16_sse2, 0), - make_tuple(4, 3, &vpx_variance16x8_sse2, 0), - make_tuple(3, 4, &vpx_variance8x16_sse2, 0), - make_tuple(3, 3, &vpx_variance8x8_sse2, 0), - make_tuple(3, 2, &vpx_variance8x4_sse2, 0), - make_tuple(2, 3, &vpx_variance4x8_sse2, 0), - make_tuple(2, 2, &vpx_variance4x4_sse2, 0))); + ::testing::Values(make_tuple(6, 6, &aom_variance64x64_sse2, 0), + make_tuple(6, 5, &aom_variance64x32_sse2, 0), + make_tuple(5, 6, &aom_variance32x64_sse2, 0), + make_tuple(5, 5, &aom_variance32x32_sse2, 0), + make_tuple(5, 4, &aom_variance32x16_sse2, 0), + make_tuple(4, 5, &aom_variance16x32_sse2, 0), + make_tuple(4, 4, &aom_variance16x16_sse2, 0), + make_tuple(4, 3, &aom_variance16x8_sse2, 0), + make_tuple(3, 4, &aom_variance8x16_sse2, 0), + make_tuple(3, 3, &aom_variance8x8_sse2, 0), + make_tuple(3, 2, &aom_variance8x4_sse2, 0), + make_tuple(2, 3, &aom_variance4x8_sse2, 0), + make_tuple(2, 2, &aom_variance4x4_sse2, 0))); #if CONFIG_USE_X86INC INSTANTIATE_TEST_CASE_P( SSE2, VpxSubpelVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_sub_pixel_variance64x64_sse2, 0), - make_tuple(6, 5, &vpx_sub_pixel_variance64x32_sse2, 0), - make_tuple(5, 6, &vpx_sub_pixel_variance32x64_sse2, 0), - make_tuple(5, 5, &vpx_sub_pixel_variance32x32_sse2, 0), - make_tuple(5, 4, &vpx_sub_pixel_variance32x16_sse2, 0), - make_tuple(4, 5, &vpx_sub_pixel_variance16x32_sse2, 0), - make_tuple(4, 4, &vpx_sub_pixel_variance16x16_sse2, 0), - make_tuple(4, 3, &vpx_sub_pixel_variance16x8_sse2, 0), - make_tuple(3, 4, &vpx_sub_pixel_variance8x16_sse2, 0), - make_tuple(3, 3, &vpx_sub_pixel_variance8x8_sse2, 0), - make_tuple(3, 2, &vpx_sub_pixel_variance8x4_sse2, 0), - make_tuple(2, 3, &vpx_sub_pixel_variance4x8_sse, 0), - make_tuple(2, 2, &vpx_sub_pixel_variance4x4_sse, 0))); + ::testing::Values(make_tuple(6, 6, &aom_sub_pixel_variance64x64_sse2, 0), + make_tuple(6, 5, &aom_sub_pixel_variance64x32_sse2, 0), + make_tuple(5, 6, &aom_sub_pixel_variance32x64_sse2, 0), + make_tuple(5, 5, &aom_sub_pixel_variance32x32_sse2, 0), + make_tuple(5, 4, &aom_sub_pixel_variance32x16_sse2, 0), + make_tuple(4, 5, &aom_sub_pixel_variance16x32_sse2, 0), + make_tuple(4, 4, &aom_sub_pixel_variance16x16_sse2, 0), + make_tuple(4, 3, &aom_sub_pixel_variance16x8_sse2, 0), + make_tuple(3, 4, &aom_sub_pixel_variance8x16_sse2, 0), + make_tuple(3, 3, &aom_sub_pixel_variance8x8_sse2, 0), + make_tuple(3, 2, &aom_sub_pixel_variance8x4_sse2, 0), + make_tuple(2, 3, &aom_sub_pixel_variance4x8_sse, 0), + make_tuple(2, 2, &aom_sub_pixel_variance4x4_sse, 0))); INSTANTIATE_TEST_CASE_P( SSE2, VpxSubpelAvgVarianceTest, ::testing::Values( - make_tuple(6, 6, &vpx_sub_pixel_avg_variance64x64_sse2, 0), - make_tuple(6, 5, &vpx_sub_pixel_avg_variance64x32_sse2, 0), - make_tuple(5, 6, &vpx_sub_pixel_avg_variance32x64_sse2, 0), - make_tuple(5, 5, &vpx_sub_pixel_avg_variance32x32_sse2, 0), - make_tuple(5, 4, &vpx_sub_pixel_avg_variance32x16_sse2, 0), - make_tuple(4, 5, &vpx_sub_pixel_avg_variance16x32_sse2, 0), - make_tuple(4, 4, &vpx_sub_pixel_avg_variance16x16_sse2, 0), - make_tuple(4, 3, &vpx_sub_pixel_avg_variance16x8_sse2, 0), - make_tuple(3, 4, &vpx_sub_pixel_avg_variance8x16_sse2, 0), - make_tuple(3, 3, &vpx_sub_pixel_avg_variance8x8_sse2, 0), - make_tuple(3, 2, &vpx_sub_pixel_avg_variance8x4_sse2, 0), - make_tuple(2, 3, &vpx_sub_pixel_avg_variance4x8_sse, 0), - make_tuple(2, 2, &vpx_sub_pixel_avg_variance4x4_sse, 0))); + make_tuple(6, 6, &aom_sub_pixel_avg_variance64x64_sse2, 0), + make_tuple(6, 5, &aom_sub_pixel_avg_variance64x32_sse2, 0), + make_tuple(5, 6, &aom_sub_pixel_avg_variance32x64_sse2, 0), + make_tuple(5, 5, &aom_sub_pixel_avg_variance32x32_sse2, 0), + make_tuple(5, 4, &aom_sub_pixel_avg_variance32x16_sse2, 0), + make_tuple(4, 5, &aom_sub_pixel_avg_variance16x32_sse2, 0), + make_tuple(4, 4, &aom_sub_pixel_avg_variance16x16_sse2, 0), + make_tuple(4, 3, &aom_sub_pixel_avg_variance16x8_sse2, 0), + make_tuple(3, 4, &aom_sub_pixel_avg_variance8x16_sse2, 0), + make_tuple(3, 3, &aom_sub_pixel_avg_variance8x8_sse2, 0), + make_tuple(3, 2, &aom_sub_pixel_avg_variance8x4_sse2, 0), + make_tuple(2, 3, &aom_sub_pixel_avg_variance4x8_sse, 0), + make_tuple(2, 2, &aom_sub_pixel_avg_variance4x4_sse, 0))); #endif // CONFIG_USE_X86INC #if CONFIG_VPX_HIGHBITDEPTH /* TODO(debargha): This test does not support the highbd version INSTANTIATE_TEST_CASE_P( SSE2, VpxHBDMseTest, - ::testing::Values(make_tuple(4, 4, &vpx_highbd_12_mse16x16_sse2), - make_tuple(4, 3, &vpx_highbd_12_mse16x8_sse2), - make_tuple(3, 4, &vpx_highbd_12_mse8x16_sse2), - make_tuple(3, 3, &vpx_highbd_12_mse8x8_sse2), - make_tuple(4, 4, &vpx_highbd_10_mse16x16_sse2), - make_tuple(4, 3, &vpx_highbd_10_mse16x8_sse2), - make_tuple(3, 4, &vpx_highbd_10_mse8x16_sse2), - make_tuple(3, 3, &vpx_highbd_10_mse8x8_sse2), - make_tuple(4, 4, &vpx_highbd_8_mse16x16_sse2), - make_tuple(4, 3, &vpx_highbd_8_mse16x8_sse2), - make_tuple(3, 4, &vpx_highbd_8_mse8x16_sse2), - make_tuple(3, 3, &vpx_highbd_8_mse8x8_sse2))); + ::testing::Values(make_tuple(4, 4, &aom_highbd_12_mse16x16_sse2), + make_tuple(4, 3, &aom_highbd_12_mse16x8_sse2), + make_tuple(3, 4, &aom_highbd_12_mse8x16_sse2), + make_tuple(3, 3, &aom_highbd_12_mse8x8_sse2), + make_tuple(4, 4, &aom_highbd_10_mse16x16_sse2), + make_tuple(4, 3, &aom_highbd_10_mse16x8_sse2), + make_tuple(3, 4, &aom_highbd_10_mse8x16_sse2), + make_tuple(3, 3, &aom_highbd_10_mse8x8_sse2), + make_tuple(4, 4, &aom_highbd_8_mse16x16_sse2), + make_tuple(4, 3, &aom_highbd_8_mse16x8_sse2), + make_tuple(3, 4, &aom_highbd_8_mse8x16_sse2), + make_tuple(3, 3, &aom_highbd_8_mse8x8_sse2))); */ INSTANTIATE_TEST_CASE_P( SSE2, VpxHBDVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_highbd_12_variance64x64_sse2, 12), - make_tuple(6, 5, &vpx_highbd_12_variance64x32_sse2, 12), - make_tuple(5, 6, &vpx_highbd_12_variance32x64_sse2, 12), - make_tuple(5, 5, &vpx_highbd_12_variance32x32_sse2, 12), - make_tuple(5, 4, &vpx_highbd_12_variance32x16_sse2, 12), - make_tuple(4, 5, &vpx_highbd_12_variance16x32_sse2, 12), - make_tuple(4, 4, &vpx_highbd_12_variance16x16_sse2, 12), - make_tuple(4, 3, &vpx_highbd_12_variance16x8_sse2, 12), - make_tuple(3, 4, &vpx_highbd_12_variance8x16_sse2, 12), - make_tuple(3, 3, &vpx_highbd_12_variance8x8_sse2, 12), - make_tuple(6, 6, &vpx_highbd_10_variance64x64_sse2, 10), - make_tuple(6, 5, &vpx_highbd_10_variance64x32_sse2, 10), - make_tuple(5, 6, &vpx_highbd_10_variance32x64_sse2, 10), - make_tuple(5, 5, &vpx_highbd_10_variance32x32_sse2, 10), - make_tuple(5, 4, &vpx_highbd_10_variance32x16_sse2, 10), - make_tuple(4, 5, &vpx_highbd_10_variance16x32_sse2, 10), - make_tuple(4, 4, &vpx_highbd_10_variance16x16_sse2, 10), - make_tuple(4, 3, &vpx_highbd_10_variance16x8_sse2, 10), - make_tuple(3, 4, &vpx_highbd_10_variance8x16_sse2, 10), - make_tuple(3, 3, &vpx_highbd_10_variance8x8_sse2, 10), - make_tuple(6, 6, &vpx_highbd_8_variance64x64_sse2, 8), - make_tuple(6, 5, &vpx_highbd_8_variance64x32_sse2, 8), - make_tuple(5, 6, &vpx_highbd_8_variance32x64_sse2, 8), - make_tuple(5, 5, &vpx_highbd_8_variance32x32_sse2, 8), - make_tuple(5, 4, &vpx_highbd_8_variance32x16_sse2, 8), - make_tuple(4, 5, &vpx_highbd_8_variance16x32_sse2, 8), - make_tuple(4, 4, &vpx_highbd_8_variance16x16_sse2, 8), - make_tuple(4, 3, &vpx_highbd_8_variance16x8_sse2, 8), - make_tuple(3, 4, &vpx_highbd_8_variance8x16_sse2, 8), - make_tuple(3, 3, &vpx_highbd_8_variance8x8_sse2, 8))); + ::testing::Values(make_tuple(6, 6, &aom_highbd_12_variance64x64_sse2, 12), + make_tuple(6, 5, &aom_highbd_12_variance64x32_sse2, 12), + make_tuple(5, 6, &aom_highbd_12_variance32x64_sse2, 12), + make_tuple(5, 5, &aom_highbd_12_variance32x32_sse2, 12), + make_tuple(5, 4, &aom_highbd_12_variance32x16_sse2, 12), + make_tuple(4, 5, &aom_highbd_12_variance16x32_sse2, 12), + make_tuple(4, 4, &aom_highbd_12_variance16x16_sse2, 12), + make_tuple(4, 3, &aom_highbd_12_variance16x8_sse2, 12), + make_tuple(3, 4, &aom_highbd_12_variance8x16_sse2, 12), + make_tuple(3, 3, &aom_highbd_12_variance8x8_sse2, 12), + make_tuple(6, 6, &aom_highbd_10_variance64x64_sse2, 10), + make_tuple(6, 5, &aom_highbd_10_variance64x32_sse2, 10), + make_tuple(5, 6, &aom_highbd_10_variance32x64_sse2, 10), + make_tuple(5, 5, &aom_highbd_10_variance32x32_sse2, 10), + make_tuple(5, 4, &aom_highbd_10_variance32x16_sse2, 10), + make_tuple(4, 5, &aom_highbd_10_variance16x32_sse2, 10), + make_tuple(4, 4, &aom_highbd_10_variance16x16_sse2, 10), + make_tuple(4, 3, &aom_highbd_10_variance16x8_sse2, 10), + make_tuple(3, 4, &aom_highbd_10_variance8x16_sse2, 10), + make_tuple(3, 3, &aom_highbd_10_variance8x8_sse2, 10), + make_tuple(6, 6, &aom_highbd_8_variance64x64_sse2, 8), + make_tuple(6, 5, &aom_highbd_8_variance64x32_sse2, 8), + make_tuple(5, 6, &aom_highbd_8_variance32x64_sse2, 8), + make_tuple(5, 5, &aom_highbd_8_variance32x32_sse2, 8), + make_tuple(5, 4, &aom_highbd_8_variance32x16_sse2, 8), + make_tuple(4, 5, &aom_highbd_8_variance16x32_sse2, 8), + make_tuple(4, 4, &aom_highbd_8_variance16x16_sse2, 8), + make_tuple(4, 3, &aom_highbd_8_variance16x8_sse2, 8), + make_tuple(3, 4, &aom_highbd_8_variance8x16_sse2, 8), + make_tuple(3, 3, &aom_highbd_8_variance8x8_sse2, 8))); #if CONFIG_USE_X86INC INSTANTIATE_TEST_CASE_P( SSE2, VpxHBDSubpelVarianceTest, ::testing::Values( - make_tuple(6, 6, &vpx_highbd_12_sub_pixel_variance64x64_sse2, 12), - make_tuple(6, 5, &vpx_highbd_12_sub_pixel_variance64x32_sse2, 12), - make_tuple(5, 6, &vpx_highbd_12_sub_pixel_variance32x64_sse2, 12), - make_tuple(5, 5, &vpx_highbd_12_sub_pixel_variance32x32_sse2, 12), - make_tuple(5, 4, &vpx_highbd_12_sub_pixel_variance32x16_sse2, 12), - make_tuple(4, 5, &vpx_highbd_12_sub_pixel_variance16x32_sse2, 12), - make_tuple(4, 4, &vpx_highbd_12_sub_pixel_variance16x16_sse2, 12), - make_tuple(4, 3, &vpx_highbd_12_sub_pixel_variance16x8_sse2, 12), - make_tuple(3, 4, &vpx_highbd_12_sub_pixel_variance8x16_sse2, 12), - make_tuple(3, 3, &vpx_highbd_12_sub_pixel_variance8x8_sse2, 12), - make_tuple(3, 2, &vpx_highbd_12_sub_pixel_variance8x4_sse2, 12), - make_tuple(6, 6, &vpx_highbd_10_sub_pixel_variance64x64_sse2, 10), - make_tuple(6, 5, &vpx_highbd_10_sub_pixel_variance64x32_sse2, 10), - make_tuple(5, 6, &vpx_highbd_10_sub_pixel_variance32x64_sse2, 10), - make_tuple(5, 5, &vpx_highbd_10_sub_pixel_variance32x32_sse2, 10), - make_tuple(5, 4, &vpx_highbd_10_sub_pixel_variance32x16_sse2, 10), - make_tuple(4, 5, &vpx_highbd_10_sub_pixel_variance16x32_sse2, 10), - make_tuple(4, 4, &vpx_highbd_10_sub_pixel_variance16x16_sse2, 10), - make_tuple(4, 3, &vpx_highbd_10_sub_pixel_variance16x8_sse2, 10), - make_tuple(3, 4, &vpx_highbd_10_sub_pixel_variance8x16_sse2, 10), - make_tuple(3, 3, &vpx_highbd_10_sub_pixel_variance8x8_sse2, 10), - make_tuple(3, 2, &vpx_highbd_10_sub_pixel_variance8x4_sse2, 10), - make_tuple(6, 6, &vpx_highbd_8_sub_pixel_variance64x64_sse2, 8), - make_tuple(6, 5, &vpx_highbd_8_sub_pixel_variance64x32_sse2, 8), - make_tuple(5, 6, &vpx_highbd_8_sub_pixel_variance32x64_sse2, 8), - make_tuple(5, 5, &vpx_highbd_8_sub_pixel_variance32x32_sse2, 8), - make_tuple(5, 4, &vpx_highbd_8_sub_pixel_variance32x16_sse2, 8), - make_tuple(4, 5, &vpx_highbd_8_sub_pixel_variance16x32_sse2, 8), - make_tuple(4, 4, &vpx_highbd_8_sub_pixel_variance16x16_sse2, 8), - make_tuple(4, 3, &vpx_highbd_8_sub_pixel_variance16x8_sse2, 8), - make_tuple(3, 4, &vpx_highbd_8_sub_pixel_variance8x16_sse2, 8), - make_tuple(3, 3, &vpx_highbd_8_sub_pixel_variance8x8_sse2, 8), - make_tuple(3, 2, &vpx_highbd_8_sub_pixel_variance8x4_sse2, 8))); + make_tuple(6, 6, &aom_highbd_12_sub_pixel_variance64x64_sse2, 12), + make_tuple(6, 5, &aom_highbd_12_sub_pixel_variance64x32_sse2, 12), + make_tuple(5, 6, &aom_highbd_12_sub_pixel_variance32x64_sse2, 12), + make_tuple(5, 5, &aom_highbd_12_sub_pixel_variance32x32_sse2, 12), + make_tuple(5, 4, &aom_highbd_12_sub_pixel_variance32x16_sse2, 12), + make_tuple(4, 5, &aom_highbd_12_sub_pixel_variance16x32_sse2, 12), + make_tuple(4, 4, &aom_highbd_12_sub_pixel_variance16x16_sse2, 12), + make_tuple(4, 3, &aom_highbd_12_sub_pixel_variance16x8_sse2, 12), + make_tuple(3, 4, &aom_highbd_12_sub_pixel_variance8x16_sse2, 12), + make_tuple(3, 3, &aom_highbd_12_sub_pixel_variance8x8_sse2, 12), + make_tuple(3, 2, &aom_highbd_12_sub_pixel_variance8x4_sse2, 12), + make_tuple(6, 6, &aom_highbd_10_sub_pixel_variance64x64_sse2, 10), + make_tuple(6, 5, &aom_highbd_10_sub_pixel_variance64x32_sse2, 10), + make_tuple(5, 6, &aom_highbd_10_sub_pixel_variance32x64_sse2, 10), + make_tuple(5, 5, &aom_highbd_10_sub_pixel_variance32x32_sse2, 10), + make_tuple(5, 4, &aom_highbd_10_sub_pixel_variance32x16_sse2, 10), + make_tuple(4, 5, &aom_highbd_10_sub_pixel_variance16x32_sse2, 10), + make_tuple(4, 4, &aom_highbd_10_sub_pixel_variance16x16_sse2, 10), + make_tuple(4, 3, &aom_highbd_10_sub_pixel_variance16x8_sse2, 10), + make_tuple(3, 4, &aom_highbd_10_sub_pixel_variance8x16_sse2, 10), + make_tuple(3, 3, &aom_highbd_10_sub_pixel_variance8x8_sse2, 10), + make_tuple(3, 2, &aom_highbd_10_sub_pixel_variance8x4_sse2, 10), + make_tuple(6, 6, &aom_highbd_8_sub_pixel_variance64x64_sse2, 8), + make_tuple(6, 5, &aom_highbd_8_sub_pixel_variance64x32_sse2, 8), + make_tuple(5, 6, &aom_highbd_8_sub_pixel_variance32x64_sse2, 8), + make_tuple(5, 5, &aom_highbd_8_sub_pixel_variance32x32_sse2, 8), + make_tuple(5, 4, &aom_highbd_8_sub_pixel_variance32x16_sse2, 8), + make_tuple(4, 5, &aom_highbd_8_sub_pixel_variance16x32_sse2, 8), + make_tuple(4, 4, &aom_highbd_8_sub_pixel_variance16x16_sse2, 8), + make_tuple(4, 3, &aom_highbd_8_sub_pixel_variance16x8_sse2, 8), + make_tuple(3, 4, &aom_highbd_8_sub_pixel_variance8x16_sse2, 8), + make_tuple(3, 3, &aom_highbd_8_sub_pixel_variance8x8_sse2, 8), + make_tuple(3, 2, &aom_highbd_8_sub_pixel_variance8x4_sse2, 8))); INSTANTIATE_TEST_CASE_P( SSE2, VpxHBDSubpelAvgVarianceTest, ::testing::Values( - make_tuple(6, 6, &vpx_highbd_12_sub_pixel_avg_variance64x64_sse2, 12), - make_tuple(6, 5, &vpx_highbd_12_sub_pixel_avg_variance64x32_sse2, 12), - make_tuple(5, 6, &vpx_highbd_12_sub_pixel_avg_variance32x64_sse2, 12), - make_tuple(5, 5, &vpx_highbd_12_sub_pixel_avg_variance32x32_sse2, 12), - make_tuple(5, 4, &vpx_highbd_12_sub_pixel_avg_variance32x16_sse2, 12), - make_tuple(4, 5, &vpx_highbd_12_sub_pixel_avg_variance16x32_sse2, 12), - make_tuple(4, 4, &vpx_highbd_12_sub_pixel_avg_variance16x16_sse2, 12), - make_tuple(4, 3, &vpx_highbd_12_sub_pixel_avg_variance16x8_sse2, 12), - make_tuple(3, 4, &vpx_highbd_12_sub_pixel_avg_variance8x16_sse2, 12), - make_tuple(3, 3, &vpx_highbd_12_sub_pixel_avg_variance8x8_sse2, 12), - make_tuple(3, 2, &vpx_highbd_12_sub_pixel_avg_variance8x4_sse2, 12), - make_tuple(6, 6, &vpx_highbd_10_sub_pixel_avg_variance64x64_sse2, 10), - make_tuple(6, 5, &vpx_highbd_10_sub_pixel_avg_variance64x32_sse2, 10), - make_tuple(5, 6, &vpx_highbd_10_sub_pixel_avg_variance32x64_sse2, 10), - make_tuple(5, 5, &vpx_highbd_10_sub_pixel_avg_variance32x32_sse2, 10), - make_tuple(5, 4, &vpx_highbd_10_sub_pixel_avg_variance32x16_sse2, 10), - make_tuple(4, 5, &vpx_highbd_10_sub_pixel_avg_variance16x32_sse2, 10), - make_tuple(4, 4, &vpx_highbd_10_sub_pixel_avg_variance16x16_sse2, 10), - make_tuple(4, 3, &vpx_highbd_10_sub_pixel_avg_variance16x8_sse2, 10), - make_tuple(3, 4, &vpx_highbd_10_sub_pixel_avg_variance8x16_sse2, 10), - make_tuple(3, 3, &vpx_highbd_10_sub_pixel_avg_variance8x8_sse2, 10), - make_tuple(3, 2, &vpx_highbd_10_sub_pixel_avg_variance8x4_sse2, 10), - make_tuple(6, 6, &vpx_highbd_8_sub_pixel_avg_variance64x64_sse2, 8), - make_tuple(6, 5, &vpx_highbd_8_sub_pixel_avg_variance64x32_sse2, 8), - make_tuple(5, 6, &vpx_highbd_8_sub_pixel_avg_variance32x64_sse2, 8), - make_tuple(5, 5, &vpx_highbd_8_sub_pixel_avg_variance32x32_sse2, 8), - make_tuple(5, 4, &vpx_highbd_8_sub_pixel_avg_variance32x16_sse2, 8), - make_tuple(4, 5, &vpx_highbd_8_sub_pixel_avg_variance16x32_sse2, 8), - make_tuple(4, 4, &vpx_highbd_8_sub_pixel_avg_variance16x16_sse2, 8), - make_tuple(4, 3, &vpx_highbd_8_sub_pixel_avg_variance16x8_sse2, 8), - make_tuple(3, 4, &vpx_highbd_8_sub_pixel_avg_variance8x16_sse2, 8), - make_tuple(3, 3, &vpx_highbd_8_sub_pixel_avg_variance8x8_sse2, 8), - make_tuple(3, 2, &vpx_highbd_8_sub_pixel_avg_variance8x4_sse2, 8))); + make_tuple(6, 6, &aom_highbd_12_sub_pixel_avg_variance64x64_sse2, 12), + make_tuple(6, 5, &aom_highbd_12_sub_pixel_avg_variance64x32_sse2, 12), + make_tuple(5, 6, &aom_highbd_12_sub_pixel_avg_variance32x64_sse2, 12), + make_tuple(5, 5, &aom_highbd_12_sub_pixel_avg_variance32x32_sse2, 12), + make_tuple(5, 4, &aom_highbd_12_sub_pixel_avg_variance32x16_sse2, 12), + make_tuple(4, 5, &aom_highbd_12_sub_pixel_avg_variance16x32_sse2, 12), + make_tuple(4, 4, &aom_highbd_12_sub_pixel_avg_variance16x16_sse2, 12), + make_tuple(4, 3, &aom_highbd_12_sub_pixel_avg_variance16x8_sse2, 12), + make_tuple(3, 4, &aom_highbd_12_sub_pixel_avg_variance8x16_sse2, 12), + make_tuple(3, 3, &aom_highbd_12_sub_pixel_avg_variance8x8_sse2, 12), + make_tuple(3, 2, &aom_highbd_12_sub_pixel_avg_variance8x4_sse2, 12), + make_tuple(6, 6, &aom_highbd_10_sub_pixel_avg_variance64x64_sse2, 10), + make_tuple(6, 5, &aom_highbd_10_sub_pixel_avg_variance64x32_sse2, 10), + make_tuple(5, 6, &aom_highbd_10_sub_pixel_avg_variance32x64_sse2, 10), + make_tuple(5, 5, &aom_highbd_10_sub_pixel_avg_variance32x32_sse2, 10), + make_tuple(5, 4, &aom_highbd_10_sub_pixel_avg_variance32x16_sse2, 10), + make_tuple(4, 5, &aom_highbd_10_sub_pixel_avg_variance16x32_sse2, 10), + make_tuple(4, 4, &aom_highbd_10_sub_pixel_avg_variance16x16_sse2, 10), + make_tuple(4, 3, &aom_highbd_10_sub_pixel_avg_variance16x8_sse2, 10), + make_tuple(3, 4, &aom_highbd_10_sub_pixel_avg_variance8x16_sse2, 10), + make_tuple(3, 3, &aom_highbd_10_sub_pixel_avg_variance8x8_sse2, 10), + make_tuple(3, 2, &aom_highbd_10_sub_pixel_avg_variance8x4_sse2, 10), + make_tuple(6, 6, &aom_highbd_8_sub_pixel_avg_variance64x64_sse2, 8), + make_tuple(6, 5, &aom_highbd_8_sub_pixel_avg_variance64x32_sse2, 8), + make_tuple(5, 6, &aom_highbd_8_sub_pixel_avg_variance32x64_sse2, 8), + make_tuple(5, 5, &aom_highbd_8_sub_pixel_avg_variance32x32_sse2, 8), + make_tuple(5, 4, &aom_highbd_8_sub_pixel_avg_variance32x16_sse2, 8), + make_tuple(4, 5, &aom_highbd_8_sub_pixel_avg_variance16x32_sse2, 8), + make_tuple(4, 4, &aom_highbd_8_sub_pixel_avg_variance16x16_sse2, 8), + make_tuple(4, 3, &aom_highbd_8_sub_pixel_avg_variance16x8_sse2, 8), + make_tuple(3, 4, &aom_highbd_8_sub_pixel_avg_variance8x16_sse2, 8), + make_tuple(3, 3, &aom_highbd_8_sub_pixel_avg_variance8x8_sse2, 8), + make_tuple(3, 2, &aom_highbd_8_sub_pixel_avg_variance8x4_sse2, 8))); #endif // CONFIG_USE_X86INC #endif // CONFIG_VPX_HIGHBITDEPTH #endif // HAVE_SSE2 @@ -1167,168 +1167,168 @@ INSTANTIATE_TEST_CASE_P( #if CONFIG_USE_X86INC INSTANTIATE_TEST_CASE_P( SSSE3, VpxSubpelVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_sub_pixel_variance64x64_ssse3, 0), - make_tuple(6, 5, &vpx_sub_pixel_variance64x32_ssse3, 0), - make_tuple(5, 6, &vpx_sub_pixel_variance32x64_ssse3, 0), - make_tuple(5, 5, &vpx_sub_pixel_variance32x32_ssse3, 0), - make_tuple(5, 4, &vpx_sub_pixel_variance32x16_ssse3, 0), - make_tuple(4, 5, &vpx_sub_pixel_variance16x32_ssse3, 0), - make_tuple(4, 4, &vpx_sub_pixel_variance16x16_ssse3, 0), - make_tuple(4, 3, &vpx_sub_pixel_variance16x8_ssse3, 0), - make_tuple(3, 4, &vpx_sub_pixel_variance8x16_ssse3, 0), - make_tuple(3, 3, &vpx_sub_pixel_variance8x8_ssse3, 0), - make_tuple(3, 2, &vpx_sub_pixel_variance8x4_ssse3, 0), - make_tuple(2, 3, &vpx_sub_pixel_variance4x8_ssse3, 0), - make_tuple(2, 2, &vpx_sub_pixel_variance4x4_ssse3, 0))); + ::testing::Values(make_tuple(6, 6, &aom_sub_pixel_variance64x64_ssse3, 0), + make_tuple(6, 5, &aom_sub_pixel_variance64x32_ssse3, 0), + make_tuple(5, 6, &aom_sub_pixel_variance32x64_ssse3, 0), + make_tuple(5, 5, &aom_sub_pixel_variance32x32_ssse3, 0), + make_tuple(5, 4, &aom_sub_pixel_variance32x16_ssse3, 0), + make_tuple(4, 5, &aom_sub_pixel_variance16x32_ssse3, 0), + make_tuple(4, 4, &aom_sub_pixel_variance16x16_ssse3, 0), + make_tuple(4, 3, &aom_sub_pixel_variance16x8_ssse3, 0), + make_tuple(3, 4, &aom_sub_pixel_variance8x16_ssse3, 0), + make_tuple(3, 3, &aom_sub_pixel_variance8x8_ssse3, 0), + make_tuple(3, 2, &aom_sub_pixel_variance8x4_ssse3, 0), + make_tuple(2, 3, &aom_sub_pixel_variance4x8_ssse3, 0), + make_tuple(2, 2, &aom_sub_pixel_variance4x4_ssse3, 0))); INSTANTIATE_TEST_CASE_P( SSSE3, VpxSubpelAvgVarianceTest, ::testing::Values( - make_tuple(6, 6, &vpx_sub_pixel_avg_variance64x64_ssse3, 0), - make_tuple(6, 5, &vpx_sub_pixel_avg_variance64x32_ssse3, 0), - make_tuple(5, 6, &vpx_sub_pixel_avg_variance32x64_ssse3, 0), - make_tuple(5, 5, &vpx_sub_pixel_avg_variance32x32_ssse3, 0), - make_tuple(5, 4, &vpx_sub_pixel_avg_variance32x16_ssse3, 0), - make_tuple(4, 5, &vpx_sub_pixel_avg_variance16x32_ssse3, 0), - make_tuple(4, 4, &vpx_sub_pixel_avg_variance16x16_ssse3, 0), - make_tuple(4, 3, &vpx_sub_pixel_avg_variance16x8_ssse3, 0), - make_tuple(3, 4, &vpx_sub_pixel_avg_variance8x16_ssse3, 0), - make_tuple(3, 3, &vpx_sub_pixel_avg_variance8x8_ssse3, 0), - make_tuple(3, 2, &vpx_sub_pixel_avg_variance8x4_ssse3, 0), - make_tuple(2, 3, &vpx_sub_pixel_avg_variance4x8_ssse3, 0), - make_tuple(2, 2, &vpx_sub_pixel_avg_variance4x4_ssse3, 0))); + make_tuple(6, 6, &aom_sub_pixel_avg_variance64x64_ssse3, 0), + make_tuple(6, 5, &aom_sub_pixel_avg_variance64x32_ssse3, 0), + make_tuple(5, 6, &aom_sub_pixel_avg_variance32x64_ssse3, 0), + make_tuple(5, 5, &aom_sub_pixel_avg_variance32x32_ssse3, 0), + make_tuple(5, 4, &aom_sub_pixel_avg_variance32x16_ssse3, 0), + make_tuple(4, 5, &aom_sub_pixel_avg_variance16x32_ssse3, 0), + make_tuple(4, 4, &aom_sub_pixel_avg_variance16x16_ssse3, 0), + make_tuple(4, 3, &aom_sub_pixel_avg_variance16x8_ssse3, 0), + make_tuple(3, 4, &aom_sub_pixel_avg_variance8x16_ssse3, 0), + make_tuple(3, 3, &aom_sub_pixel_avg_variance8x8_ssse3, 0), + make_tuple(3, 2, &aom_sub_pixel_avg_variance8x4_ssse3, 0), + make_tuple(2, 3, &aom_sub_pixel_avg_variance4x8_ssse3, 0), + make_tuple(2, 2, &aom_sub_pixel_avg_variance4x4_ssse3, 0))); #endif // CONFIG_USE_X86INC #endif // HAVE_SSSE3 #if HAVE_AVX2 INSTANTIATE_TEST_CASE_P(AVX2, VpxMseTest, ::testing::Values(make_tuple(4, 4, - &vpx_mse16x16_avx2))); + &aom_mse16x16_avx2))); INSTANTIATE_TEST_CASE_P( AVX2, VpxVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_variance64x64_avx2, 0), - make_tuple(6, 5, &vpx_variance64x32_avx2, 0), - make_tuple(5, 5, &vpx_variance32x32_avx2, 0), - make_tuple(5, 4, &vpx_variance32x16_avx2, 0), - make_tuple(4, 4, &vpx_variance16x16_avx2, 0))); + ::testing::Values(make_tuple(6, 6, &aom_variance64x64_avx2, 0), + make_tuple(6, 5, &aom_variance64x32_avx2, 0), + make_tuple(5, 5, &aom_variance32x32_avx2, 0), + make_tuple(5, 4, &aom_variance32x16_avx2, 0), + make_tuple(4, 4, &aom_variance16x16_avx2, 0))); INSTANTIATE_TEST_CASE_P( AVX2, VpxSubpelVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_sub_pixel_variance64x64_avx2, 0), - make_tuple(5, 5, &vpx_sub_pixel_variance32x32_avx2, 0))); + ::testing::Values(make_tuple(6, 6, &aom_sub_pixel_variance64x64_avx2, 0), + make_tuple(5, 5, &aom_sub_pixel_variance32x32_avx2, 0))); INSTANTIATE_TEST_CASE_P( AVX2, VpxSubpelAvgVarianceTest, ::testing::Values( - make_tuple(6, 6, &vpx_sub_pixel_avg_variance64x64_avx2, 0), - make_tuple(5, 5, &vpx_sub_pixel_avg_variance32x32_avx2, 0))); + make_tuple(6, 6, &aom_sub_pixel_avg_variance64x64_avx2, 0), + make_tuple(5, 5, &aom_sub_pixel_avg_variance32x32_avx2, 0))); #endif // HAVE_AVX2 #if HAVE_MEDIA INSTANTIATE_TEST_CASE_P(MEDIA, VpxMseTest, ::testing::Values(make_tuple(4, 4, - &vpx_mse16x16_media))); + &aom_mse16x16_media))); INSTANTIATE_TEST_CASE_P( MEDIA, VpxVarianceTest, - ::testing::Values(make_tuple(4, 4, &vpx_variance16x16_media, 0), - make_tuple(3, 3, &vpx_variance8x8_media, 0))); + ::testing::Values(make_tuple(4, 4, &aom_variance16x16_media, 0), + make_tuple(3, 3, &aom_variance8x8_media, 0))); INSTANTIATE_TEST_CASE_P( MEDIA, VpxSubpelVarianceTest, - ::testing::Values(make_tuple(4, 4, &vpx_sub_pixel_variance16x16_media, 0), - make_tuple(3, 3, &vpx_sub_pixel_variance8x8_media, 0))); + ::testing::Values(make_tuple(4, 4, &aom_sub_pixel_variance16x16_media, 0), + make_tuple(3, 3, &aom_sub_pixel_variance8x8_media, 0))); #endif // HAVE_MEDIA #if HAVE_NEON INSTANTIATE_TEST_CASE_P(NEON, VpxSseTest, ::testing::Values(make_tuple(2, 2, - &vpx_get4x4sse_cs_neon))); + &aom_get4x4sse_cs_neon))); INSTANTIATE_TEST_CASE_P(NEON, VpxMseTest, ::testing::Values(make_tuple(4, 4, - &vpx_mse16x16_neon))); + &aom_mse16x16_neon))); INSTANTIATE_TEST_CASE_P( NEON, VpxVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_variance64x64_neon, 0), - make_tuple(6, 5, &vpx_variance64x32_neon, 0), - make_tuple(5, 6, &vpx_variance32x64_neon, 0), - make_tuple(5, 5, &vpx_variance32x32_neon, 0), - make_tuple(4, 4, &vpx_variance16x16_neon, 0), - make_tuple(4, 3, &vpx_variance16x8_neon, 0), - make_tuple(3, 4, &vpx_variance8x16_neon, 0), - make_tuple(3, 3, &vpx_variance8x8_neon, 0))); + ::testing::Values(make_tuple(6, 6, &aom_variance64x64_neon, 0), + make_tuple(6, 5, &aom_variance64x32_neon, 0), + make_tuple(5, 6, &aom_variance32x64_neon, 0), + make_tuple(5, 5, &aom_variance32x32_neon, 0), + make_tuple(4, 4, &aom_variance16x16_neon, 0), + make_tuple(4, 3, &aom_variance16x8_neon, 0), + make_tuple(3, 4, &aom_variance8x16_neon, 0), + make_tuple(3, 3, &aom_variance8x8_neon, 0))); INSTANTIATE_TEST_CASE_P( NEON, VpxSubpelVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_sub_pixel_variance64x64_neon, 0), - make_tuple(5, 5, &vpx_sub_pixel_variance32x32_neon, 0), - make_tuple(4, 4, &vpx_sub_pixel_variance16x16_neon, 0), - make_tuple(3, 3, &vpx_sub_pixel_variance8x8_neon, 0))); + ::testing::Values(make_tuple(6, 6, &aom_sub_pixel_variance64x64_neon, 0), + make_tuple(5, 5, &aom_sub_pixel_variance32x32_neon, 0), + make_tuple(4, 4, &aom_sub_pixel_variance16x16_neon, 0), + make_tuple(3, 3, &aom_sub_pixel_variance8x8_neon, 0))); #endif // HAVE_NEON #if HAVE_MSA INSTANTIATE_TEST_CASE_P(MSA, SumOfSquaresTest, - ::testing::Values(vpx_get_mb_ss_msa)); + ::testing::Values(aom_get_mb_ss_msa)); INSTANTIATE_TEST_CASE_P(MSA, VpxSseTest, ::testing::Values(make_tuple(2, 2, - &vpx_get4x4sse_cs_msa))); + &aom_get4x4sse_cs_msa))); INSTANTIATE_TEST_CASE_P(MSA, VpxMseTest, - ::testing::Values(make_tuple(4, 4, &vpx_mse16x16_msa), - make_tuple(4, 3, &vpx_mse16x8_msa), - make_tuple(3, 4, &vpx_mse8x16_msa), - make_tuple(3, 3, &vpx_mse8x8_msa))); + ::testing::Values(make_tuple(4, 4, &aom_mse16x16_msa), + make_tuple(4, 3, &aom_mse16x8_msa), + make_tuple(3, 4, &aom_mse8x16_msa), + make_tuple(3, 3, &aom_mse8x8_msa))); INSTANTIATE_TEST_CASE_P( MSA, VpxVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_variance64x64_msa, 0), - make_tuple(6, 5, &vpx_variance64x32_msa, 0), - make_tuple(5, 6, &vpx_variance32x64_msa, 0), - make_tuple(5, 5, &vpx_variance32x32_msa, 0), - make_tuple(5, 4, &vpx_variance32x16_msa, 0), - make_tuple(4, 5, &vpx_variance16x32_msa, 0), - make_tuple(4, 4, &vpx_variance16x16_msa, 0), - make_tuple(4, 3, &vpx_variance16x8_msa, 0), - make_tuple(3, 4, &vpx_variance8x16_msa, 0), - make_tuple(3, 3, &vpx_variance8x8_msa, 0), - make_tuple(3, 2, &vpx_variance8x4_msa, 0), - make_tuple(2, 3, &vpx_variance4x8_msa, 0), - make_tuple(2, 2, &vpx_variance4x4_msa, 0))); + ::testing::Values(make_tuple(6, 6, &aom_variance64x64_msa, 0), + make_tuple(6, 5, &aom_variance64x32_msa, 0), + make_tuple(5, 6, &aom_variance32x64_msa, 0), + make_tuple(5, 5, &aom_variance32x32_msa, 0), + make_tuple(5, 4, &aom_variance32x16_msa, 0), + make_tuple(4, 5, &aom_variance16x32_msa, 0), + make_tuple(4, 4, &aom_variance16x16_msa, 0), + make_tuple(4, 3, &aom_variance16x8_msa, 0), + make_tuple(3, 4, &aom_variance8x16_msa, 0), + make_tuple(3, 3, &aom_variance8x8_msa, 0), + make_tuple(3, 2, &aom_variance8x4_msa, 0), + make_tuple(2, 3, &aom_variance4x8_msa, 0), + make_tuple(2, 2, &aom_variance4x4_msa, 0))); INSTANTIATE_TEST_CASE_P( MSA, VpxSubpelVarianceTest, - ::testing::Values(make_tuple(2, 2, &vpx_sub_pixel_variance4x4_msa, 0), - make_tuple(2, 3, &vpx_sub_pixel_variance4x8_msa, 0), - make_tuple(3, 2, &vpx_sub_pixel_variance8x4_msa, 0), - make_tuple(3, 3, &vpx_sub_pixel_variance8x8_msa, 0), - make_tuple(3, 4, &vpx_sub_pixel_variance8x16_msa, 0), - make_tuple(4, 3, &vpx_sub_pixel_variance16x8_msa, 0), - make_tuple(4, 4, &vpx_sub_pixel_variance16x16_msa, 0), - make_tuple(4, 5, &vpx_sub_pixel_variance16x32_msa, 0), - make_tuple(5, 4, &vpx_sub_pixel_variance32x16_msa, 0), - make_tuple(5, 5, &vpx_sub_pixel_variance32x32_msa, 0), - make_tuple(5, 6, &vpx_sub_pixel_variance32x64_msa, 0), - make_tuple(6, 5, &vpx_sub_pixel_variance64x32_msa, 0), - make_tuple(6, 6, &vpx_sub_pixel_variance64x64_msa, 0))); + ::testing::Values(make_tuple(2, 2, &aom_sub_pixel_variance4x4_msa, 0), + make_tuple(2, 3, &aom_sub_pixel_variance4x8_msa, 0), + make_tuple(3, 2, &aom_sub_pixel_variance8x4_msa, 0), + make_tuple(3, 3, &aom_sub_pixel_variance8x8_msa, 0), + make_tuple(3, 4, &aom_sub_pixel_variance8x16_msa, 0), + make_tuple(4, 3, &aom_sub_pixel_variance16x8_msa, 0), + make_tuple(4, 4, &aom_sub_pixel_variance16x16_msa, 0), + make_tuple(4, 5, &aom_sub_pixel_variance16x32_msa, 0), + make_tuple(5, 4, &aom_sub_pixel_variance32x16_msa, 0), + make_tuple(5, 5, &aom_sub_pixel_variance32x32_msa, 0), + make_tuple(5, 6, &aom_sub_pixel_variance32x64_msa, 0), + make_tuple(6, 5, &aom_sub_pixel_variance64x32_msa, 0), + make_tuple(6, 6, &aom_sub_pixel_variance64x64_msa, 0))); INSTANTIATE_TEST_CASE_P( MSA, VpxSubpelAvgVarianceTest, - ::testing::Values(make_tuple(6, 6, &vpx_sub_pixel_avg_variance64x64_msa, 0), - make_tuple(6, 5, &vpx_sub_pixel_avg_variance64x32_msa, 0), - make_tuple(5, 6, &vpx_sub_pixel_avg_variance32x64_msa, 0), - make_tuple(5, 5, &vpx_sub_pixel_avg_variance32x32_msa, 0), - make_tuple(5, 4, &vpx_sub_pixel_avg_variance32x16_msa, 0), - make_tuple(4, 5, &vpx_sub_pixel_avg_variance16x32_msa, 0), - make_tuple(4, 4, &vpx_sub_pixel_avg_variance16x16_msa, 0), - make_tuple(4, 3, &vpx_sub_pixel_avg_variance16x8_msa, 0), - make_tuple(3, 4, &vpx_sub_pixel_avg_variance8x16_msa, 0), - make_tuple(3, 3, &vpx_sub_pixel_avg_variance8x8_msa, 0), - make_tuple(3, 2, &vpx_sub_pixel_avg_variance8x4_msa, 0), - make_tuple(2, 3, &vpx_sub_pixel_avg_variance4x8_msa, 0), - make_tuple(2, 2, &vpx_sub_pixel_avg_variance4x4_msa, 0))); + ::testing::Values(make_tuple(6, 6, &aom_sub_pixel_avg_variance64x64_msa, 0), + make_tuple(6, 5, &aom_sub_pixel_avg_variance64x32_msa, 0), + make_tuple(5, 6, &aom_sub_pixel_avg_variance32x64_msa, 0), + make_tuple(5, 5, &aom_sub_pixel_avg_variance32x32_msa, 0), + make_tuple(5, 4, &aom_sub_pixel_avg_variance32x16_msa, 0), + make_tuple(4, 5, &aom_sub_pixel_avg_variance16x32_msa, 0), + make_tuple(4, 4, &aom_sub_pixel_avg_variance16x16_msa, 0), + make_tuple(4, 3, &aom_sub_pixel_avg_variance16x8_msa, 0), + make_tuple(3, 4, &aom_sub_pixel_avg_variance8x16_msa, 0), + make_tuple(3, 3, &aom_sub_pixel_avg_variance8x8_msa, 0), + make_tuple(3, 2, &aom_sub_pixel_avg_variance8x4_msa, 0), + make_tuple(2, 3, &aom_sub_pixel_avg_variance4x8_msa, 0), + make_tuple(2, 2, &aom_sub_pixel_avg_variance4x4_msa, 0))); #endif // HAVE_MSA } // namespace diff --git a/test/video_source.h b/test/video_source.h index 63e6affa3cacfb27ee6a00c57de7a4ac7b1bfceb..2cd575374fae0071cc77dccc375798eeaef9478e 100644 --- a/test/video_source.h +++ b/test/video_source.h @@ -21,7 +21,7 @@ #include <cstdlib> #include <string> #include "test/acm_random.h" -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" namespace libaom_test { @@ -99,7 +99,7 @@ class TempOutFile { }; // Abstract base class for test video sources, which provide a stream of -// vpx_image_t images with associated timestamps and duration. +// aom_image_t images with associated timestamps and duration. class VideoSource { public: virtual ~VideoSource() {} @@ -111,16 +111,16 @@ class VideoSource { virtual void Next() = 0; // Get the current video frame, or NULL on End-Of-Stream. - virtual vpx_image_t *img() const = 0; + virtual aom_image_t *img() const = 0; // Get the presentation timestamp of the current frame. - virtual vpx_codec_pts_t pts() const = 0; + virtual aom_codec_pts_t pts() const = 0; // Get the current frame's duration virtual unsigned long duration() const = 0; // Get the timebase for the stream - virtual vpx_rational_t timebase() const = 0; + virtual aom_rational_t timebase() const = 0; // Get the current frame counter, starting at 0. virtual unsigned int frame() const = 0; @@ -137,7 +137,7 @@ class DummyVideoSource : public VideoSource { ReallocImage(); } - virtual ~DummyVideoSource() { vpx_img_free(img_); } + virtual ~DummyVideoSource() { aom_img_free(img_); } virtual void Begin() { frame_ = 0; @@ -149,15 +149,15 @@ class DummyVideoSource : public VideoSource { FillFrame(); } - virtual vpx_image_t *img() const { return (frame_ < limit_) ? img_ : NULL; } + virtual aom_image_t *img() const { return (frame_ < limit_) ? img_ : NULL; } // Models a stream where Timebase = 1/FPS, so pts == frame. - virtual vpx_codec_pts_t pts() const { return frame_; } + virtual aom_codec_pts_t pts() const { return frame_; } virtual unsigned long duration() const { return 1; } - virtual vpx_rational_t timebase() const { - const vpx_rational_t t = { 1, 30 }; + virtual aom_rational_t timebase() const { + const aom_rational_t t = { 1, 30 }; return t; } @@ -175,7 +175,7 @@ class DummyVideoSource : public VideoSource { } } - void SetImageFormat(vpx_img_fmt_t format) { + void SetImageFormat(aom_img_fmt_t format) { if (format_ != format) { format_ = format; ReallocImage(); @@ -188,18 +188,18 @@ class DummyVideoSource : public VideoSource { } void ReallocImage() { - vpx_img_free(img_); - img_ = vpx_img_alloc(NULL, format_, width_, height_, 32); + aom_img_free(img_); + img_ = aom_img_alloc(NULL, format_, width_, height_, 32); raw_sz_ = ((img_->w + 31) & ~31) * img_->h * img_->bps / 8; } - vpx_image_t *img_; + aom_image_t *img_; size_t raw_sz_; unsigned int limit_; unsigned int frame_; unsigned int width_; unsigned int height_; - vpx_img_fmt_t format_; + aom_img_fmt_t format_; }; class RandomVideoSource : public DummyVideoSource { diff --git a/test/vp8_multi_resolution_encoder.sh b/test/vp8_multi_resolution_encoder.sh index 0a14fce3bb1180831e7435fcc4c44a3005096343..fbe61a4a3e550a4f25095e8e33affee469108c40 100755 --- a/test/vp8_multi_resolution_encoder.sh +++ b/test/vp8_multi_resolution_encoder.sh @@ -17,13 +17,13 @@ # Environment check: $YUV_RAW_INPUT is required. vp8_multi_resolution_encoder_verify_environment() { - if [ "$(vpx_config_option_enabled CONFIG_MULTI_RES_ENCODING)" = "yes" ]; then + if [ "$(aom_config_option_enabled CONFIG_MULTI_RES_ENCODING)" = "yes" ]; then if [ ! -e "${YUV_RAW_INPUT}" ]; then - elog "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + elog "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi local readonly app="vp8_multi_resolution_encoder" - if [ -z "$(vpx_tool_path "${app}")" ]; then + if [ -z "$(aom_tool_path "${app}")" ]; then elog "${app} not found. It must exist in LIBAOM_BIN_PATH or its parent." return 1 fi @@ -33,7 +33,7 @@ vp8_multi_resolution_encoder_verify_environment() { # Runs vp8_multi_resolution_encoder. Simply forwards all arguments to # vp8_multi_resolution_encoder after building path to the executable. vp8_mre() { - local readonly encoder="$(vpx_tool_path vp8_multi_resolution_encoder)" + local readonly encoder="$(aom_tool_path vp8_multi_resolution_encoder)" if [ ! -x "${encoder}" ]; then elog "${encoder} does not exist or is not executable." return 1 @@ -47,7 +47,7 @@ vp8_multi_resolution_encoder_three_formats() { ${VPX_TEST_OUTPUT_DIR}/vp8_mre_1.ivf ${VPX_TEST_OUTPUT_DIR}/vp8_mre_2.ivf" - if [ "$(vpx_config_option_enabled CONFIG_MULTI_RES_ENCODING)" = "yes" ]; then + if [ "$(aom_config_option_enabled CONFIG_MULTI_RES_ENCODING)" = "yes" ]; then if [ "$(vp8_encode_available)" = "yes" ]; then # Param order: # Input width diff --git a/test/vp8cx_set_ref.sh b/test/vp8cx_set_ref.sh index 21230cb7424af81e30c18f423f8623639dcdaf28..fa30ffb911bc17d56a3097f7bcafda485da82c31 100755 --- a/test/vp8cx_set_ref.sh +++ b/test/vp8cx_set_ref.sh @@ -18,7 +18,7 @@ # Environment check: $YUV_RAW_INPUT is required. vp8cx_set_ref_verify_environment() { if [ ! -e "${YUV_RAW_INPUT}" ]; then - echo "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi } @@ -28,7 +28,7 @@ vp8cx_set_ref_verify_environment() { # currently used only to name the output file. # TODO(tomfinegan): Pass the codec param once the example is updated to support # VP9. -vpx_set_ref() { +aom_set_ref() { local encoder="${LIBAOM_BIN_PATH}/vp8cx_set_ref${VPX_TEST_EXE_SUFFIX}" local codec="$1" local output_file="${VPX_TEST_OUTPUT_DIR}/vp8cx_set_ref_${codec}.ivf" @@ -48,7 +48,7 @@ vpx_set_ref() { vp8cx_set_ref_vp8() { if [ "$(vp8_encode_available)" = "yes" ]; then - vpx_set_ref vp8 || return 1 + aom_set_ref vp8 || return 1 fi } diff --git a/test/vp9_spatial_svc_encoder.sh b/test/vp9_spatial_svc_encoder.sh index 4502bc47509b2a15e53784b43fb199f8fc9420bc..94ea43ca0e8ef1d34142ec818d7b11fe6a08e517 100755 --- a/test/vp9_spatial_svc_encoder.sh +++ b/test/vp9_spatial_svc_encoder.sh @@ -18,7 +18,7 @@ # Environment check: $YUV_RAW_INPUT is required. vp9_spatial_svc_encoder_verify_environment() { if [ ! -e "${YUV_RAW_INPUT}" ]; then - echo "Libvpx test data must exist in LIBAOM_TEST_DATA_PATH." + echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH." return 1 fi } @@ -65,7 +65,7 @@ readonly vp9_spatial_svc_tests="DISABLED_vp9_spatial_svc_mode_i DISABLED_vp9_spatial_svc_mode_gf vp9_spatial_svc" -if [ "$(vpx_config_option_enabled CONFIG_SPATIAL_SVC)" = "yes" ]; then +if [ "$(aom_config_option_enabled CONFIG_SPATIAL_SVC)" = "yes" ]; then run_tests \ vp9_spatial_svc_encoder_verify_environment \ "${vp9_spatial_svc_tests}" diff --git a/test/webm_video_source.h b/test/webm_video_source.h index a0c731cdbfb0875aae979870da9e836bd4b03ef1..6036b3adcc4c2d644fc9bc3e62e0366d69d10dd4 100644 --- a/test/webm_video_source.h +++ b/test/webm_video_source.h @@ -26,25 +26,25 @@ namespace libaom_test { class WebMVideoSource : public CompressedVideoSource { public: explicit WebMVideoSource(const std::string &file_name) - : file_name_(file_name), vpx_ctx_(new VpxInputContext()), + : file_name_(file_name), aom_ctx_(new VpxInputContext()), webm_ctx_(new WebmInputContext()), buf_(NULL), buf_sz_(0), frame_(0), end_of_file_(false) {} virtual ~WebMVideoSource() { - if (vpx_ctx_->file != NULL) fclose(vpx_ctx_->file); + if (aom_ctx_->file != NULL) fclose(aom_ctx_->file); webm_free(webm_ctx_); - delete vpx_ctx_; + delete aom_ctx_; delete webm_ctx_; } virtual void Init() {} virtual void Begin() { - vpx_ctx_->file = OpenTestDataFile(file_name_); - ASSERT_TRUE(vpx_ctx_->file != NULL) << "Input file open failed. Filename: " + aom_ctx_->file = OpenTestDataFile(file_name_); + ASSERT_TRUE(aom_ctx_->file != NULL) << "Input file open failed. Filename: " << file_name_; - ASSERT_EQ(file_is_webm(webm_ctx_, vpx_ctx_), 1) << "file is not WebM"; + ASSERT_EQ(file_is_webm(webm_ctx_, aom_ctx_), 1) << "file is not WebM"; FillFrame(); } @@ -55,7 +55,7 @@ class WebMVideoSource : public CompressedVideoSource { } void FillFrame() { - ASSERT_TRUE(vpx_ctx_->file != NULL); + ASSERT_TRUE(aom_ctx_->file != NULL); const int status = webm_read_frame(webm_ctx_, &buf_, &buf_sz_, &buf_sz_); ASSERT_GE(status, 0) << "webm_read_frame failed"; if (status == 1) { @@ -64,7 +64,7 @@ class WebMVideoSource : public CompressedVideoSource { } void SeekToNextKeyFrame() { - ASSERT_TRUE(vpx_ctx_->file != NULL); + ASSERT_TRUE(aom_ctx_->file != NULL); do { const int status = webm_read_frame(webm_ctx_, &buf_, &buf_sz_, &buf_sz_); ASSERT_GE(status, 0) << "webm_read_frame failed"; @@ -81,7 +81,7 @@ class WebMVideoSource : public CompressedVideoSource { protected: std::string file_name_; - VpxInputContext *vpx_ctx_; + VpxInputContext *aom_ctx_; WebmInputContext *webm_ctx_; uint8_t *buf_; size_t buf_sz_; diff --git a/test/y4m_test.cc b/test/y4m_test.cc index 4295378d06a2e13bc0fc15edb585e11d4201cd86..095e231356fa8822e6731b93d977373714d044a4 100644 --- a/test/y4m_test.cc +++ b/test/y4m_test.cc @@ -12,7 +12,7 @@ #include "third_party/googletest/src/include/gtest/gtest.h" -#include "./vpx_config.h" +#include "./aom_config.h" #include "./y4menc.h" #include "test/md5_helper.h" #include "test/util.h" @@ -29,7 +29,7 @@ static const unsigned int kFrames = 10; struct Y4mTestParam { const char *filename; unsigned int bit_depth; - vpx_img_fmt format; + aom_img_fmt format; const char *md5raw; }; @@ -54,7 +54,7 @@ const Y4mTestParam kY4mTestVectors[] = { "5a6481a550821dab6d0192f5c63845e9" }, }; -static void write_image_file(const vpx_image_t *img, FILE *file) { +static void write_image_file(const aom_image_t *img, FILE *file) { int plane, y; for (plane = 0; plane < 3; ++plane) { const unsigned char *buf = img->planes[plane]; @@ -89,14 +89,14 @@ class Y4mVideoSourceTest : public ::testing::TestWithParam<Y4mTestParam>, } // Checks y4m header information - void HeaderChecks(unsigned int bit_depth, vpx_img_fmt_t fmt) { + void HeaderChecks(unsigned int bit_depth, aom_img_fmt_t fmt) { ASSERT_TRUE(input_file_ != NULL); ASSERT_EQ(y4m_.pic_w, (int)kWidth); ASSERT_EQ(y4m_.pic_h, (int)kHeight); ASSERT_EQ(img()->d_w, kWidth); ASSERT_EQ(img()->d_h, kHeight); ASSERT_EQ(y4m_.bit_depth, bit_depth); - ASSERT_EQ(y4m_.vpx_fmt, fmt); + ASSERT_EQ(y4m_.aom_fmt, fmt); if (fmt == VPX_IMG_FMT_I420 || fmt == VPX_IMG_FMT_I42016) { ASSERT_EQ(y4m_.bps, (int)y4m_.bit_depth * 3 / 2); ASSERT_EQ(img()->x_chroma_shift, 1U); @@ -161,7 +161,7 @@ class Y4mVideoWriteTest : public Y4mVideoSourceTest { tmpfile_ = new libaom_test::TempOutFile; ASSERT_TRUE(tmpfile_->file() != NULL); y4m_write_file_header(buf, sizeof(buf), kWidth, kHeight, &framerate, - y4m_.vpx_fmt, y4m_.bit_depth); + y4m_.aom_fmt, y4m_.bit_depth); fputs(buf, tmpfile_->file()); for (unsigned int i = start_; i < limit_; i++) { y4m_write_frame_header(buf, sizeof(buf)); diff --git a/test/y4m_video_source.h b/test/y4m_video_source.h index 546e27202843558d73c302e795dbb5bd5d03a848..2279d7970e3021b809f308351db3e3da6b3311ac 100644 --- a/test/y4m_video_source.h +++ b/test/y4m_video_source.h @@ -23,12 +23,12 @@ namespace libaom_test { class Y4mVideoSource : public VideoSource { public: Y4mVideoSource(const std::string &file_name, unsigned int start, int limit) - : file_name_(file_name), input_file_(NULL), img_(new vpx_image_t()), + : file_name_(file_name), input_file_(NULL), img_(new aom_image_t()), start_(start), limit_(limit), frame_(0), framerate_numerator_(0), framerate_denominator_(0), y4m_() {} virtual ~Y4mVideoSource() { - vpx_img_free(img_.get()); + aom_img_free(img_.get()); CloseSource(); } @@ -61,17 +61,17 @@ class Y4mVideoSource : public VideoSource { FillFrame(); } - virtual vpx_image_t *img() const { + virtual aom_image_t *img() const { return (frame_ < limit_) ? img_.get() : NULL; } // Models a stream where Timebase = 1/FPS, so pts == frame. - virtual vpx_codec_pts_t pts() const { return frame_; } + virtual aom_codec_pts_t pts() const { return frame_; } virtual unsigned long duration() const { return 1; } - virtual vpx_rational_t timebase() const { - const vpx_rational_t t = { framerate_denominator_, framerate_numerator_ }; + virtual aom_rational_t timebase() const { + const aom_rational_t t = { framerate_denominator_, framerate_numerator_ }; return t; } @@ -87,11 +87,11 @@ class Y4mVideoSource : public VideoSource { // Swap buffers with another y4m source. This allows reading a new frame // while keeping the old frame around. A whole Y4mSource is required and - // not just a vpx_image_t because of how the y4m reader manipulates - // vpx_image_t internals, + // not just a aom_image_t because of how the y4m reader manipulates + // aom_image_t internals, void SwapBuffers(Y4mVideoSource *other) { std::swap(other->y4m_.dst_buf, y4m_.dst_buf); - vpx_image_t *tmp; + aom_image_t *tmp; tmp = other->img_.release(); other->img_.reset(img_.release()); img_.reset(tmp); @@ -109,7 +109,7 @@ class Y4mVideoSource : public VideoSource { std::string file_name_; FILE *input_file_; - testing::internal::scoped_ptr<vpx_image_t> img_; + testing::internal::scoped_ptr<aom_image_t> img_; unsigned int start_; unsigned int limit_; unsigned int frame_; diff --git a/test/yuv_video_source.h b/test/yuv_video_source.h index 9f4410cb3b1f7e34382eea684bf3ebb8cad28aae..c24c1ba9d4ffb4763b41397f4393a4ffc42f4d1b 100644 --- a/test/yuv_video_source.h +++ b/test/yuv_video_source.h @@ -16,7 +16,7 @@ #include <string> #include "test/video_source.h" -#include "aom/vpx_image.h" +#include "aom/aom_image.h" namespace libaom_test { @@ -25,7 +25,7 @@ namespace libaom_test { // do actual file encodes. class YUVVideoSource : public VideoSource { public: - YUVVideoSource(const std::string &file_name, vpx_img_fmt format, + YUVVideoSource(const std::string &file_name, aom_img_fmt format, unsigned int width, unsigned int height, int rate_numerator, int rate_denominator, unsigned int start, int limit) : file_name_(file_name), input_file_(NULL), img_(NULL), start_(start), @@ -37,7 +37,7 @@ class YUVVideoSource : public VideoSource { } virtual ~YUVVideoSource() { - vpx_img_free(img_); + aom_img_free(img_); if (input_file_) fclose(input_file_); } @@ -58,15 +58,15 @@ class YUVVideoSource : public VideoSource { FillFrame(); } - virtual vpx_image_t *img() const { return (frame_ < limit_) ? img_ : NULL; } + virtual aom_image_t *img() const { return (frame_ < limit_) ? img_ : NULL; } // Models a stream where Timebase = 1/FPS, so pts == frame. - virtual vpx_codec_pts_t pts() const { return frame_; } + virtual aom_codec_pts_t pts() const { return frame_; } virtual unsigned long duration() const { return 1; } - virtual vpx_rational_t timebase() const { - const vpx_rational_t t = { framerate_denominator_, framerate_numerator_ }; + virtual aom_rational_t timebase() const { + const aom_rational_t t = { framerate_denominator_, framerate_numerator_ }; return t; } @@ -75,10 +75,10 @@ class YUVVideoSource : public VideoSource { virtual unsigned int limit() const { return limit_; } virtual void SetSize(unsigned int width, unsigned int height, - vpx_img_fmt format) { + aom_img_fmt format) { if (width != width_ || height != height_ || format != format_) { - vpx_img_free(img_); - img_ = vpx_img_alloc(NULL, format, width, height, 1); + aom_img_free(img_); + img_ = aom_img_alloc(NULL, format, width, height, 1); ASSERT_TRUE(img_ != NULL); width_ = width; height_ = height; @@ -108,14 +108,14 @@ class YUVVideoSource : public VideoSource { protected: std::string file_name_; FILE *input_file_; - vpx_image_t *img_; + aom_image_t *img_; size_t raw_size_; unsigned int start_; unsigned int limit_; unsigned int frame_; unsigned int width_; unsigned int height_; - vpx_img_fmt format_; + aom_img_fmt format_; int framerate_numerator_; int framerate_denominator_; }; diff --git a/third_party/googletest/README.libvpx b/third_party/googletest/README.libaom similarity index 100% rename from third_party/googletest/README.libvpx rename to third_party/googletest/README.libaom diff --git a/third_party/libwebm/README.libvpx b/third_party/libwebm/README.libaom similarity index 100% rename from third_party/libwebm/README.libvpx rename to third_party/libwebm/README.libaom diff --git a/third_party/libyuv/README.libvpx b/third_party/libyuv/README.libaom similarity index 100% rename from third_party/libyuv/README.libvpx rename to third_party/libyuv/README.libaom diff --git a/third_party/libyuv/source/compare_win.cc b/third_party/libyuv/source/compare_win.cc index 19806f275095391d480282416040d981471a258b..5e1e97b61af0d73b1b3715e3272192a42512767b 100644 --- a/third_party/libyuv/source/compare_win.cc +++ b/third_party/libyuv/source/compare_win.cc @@ -67,8 +67,8 @@ uint32 SumSquareError_AVX2(const uint8* src_a, const uint8* src_b, int count) { mov eax, [esp + 4] // src_a mov edx, [esp + 8] // src_b mov ecx, [esp + 12] // count - vpxor ymm0, ymm0, ymm0 // sum - vpxor ymm5, ymm5, ymm5 // constant 0 for unpck + aomor ymm0, ymm0, ymm0 // sum + aomor ymm5, ymm5, ymm5 // constant 0 for unpck sub edx, eax wloop: diff --git a/third_party/libyuv/source/row_win.cc b/third_party/libyuv/source/row_win.cc index 71be268b47fbb5d5b2fc486cd754253927ac3d67..1e6033fd42e44b68677fd535f0683a8909aa8ad0 100644 --- a/third_party/libyuv/source/row_win.cc +++ b/third_party/libyuv/source/row_win.cc @@ -4855,7 +4855,7 @@ void ARGBMultiplyRow_AVX2(const uint8* src_argb0, const uint8* src_argb1, mov esi, [esp + 4 + 8] // src_argb1 mov edx, [esp + 4 + 12] // dst_argb mov ecx, [esp + 4 + 16] // width - vpxor ymm5, ymm5, ymm5 // constant 0 + aomor ymm5, ymm5, ymm5 // constant 0 convertloop: vmovdqu ymm1, [eax] // read 8 pixels from src_argb0 @@ -5535,7 +5535,7 @@ void InterpolateRow_AVX2(uint8* dst_ptr, const uint8* src_ptr, vmovd xmm5, eax // low fraction 128..1 vpunpcklbw xmm5, xmm5, xmm0 vpunpcklwd xmm5, xmm5, xmm5 - vpxor ymm0, ymm0, ymm0 + aomor ymm0, ymm0, ymm0 vpermd ymm5, ymm0, ymm5 xloop: diff --git a/third_party/libyuv/source/scale_win.cc b/third_party/libyuv/source/scale_win.cc index c3896ebad2fd89869118c088f90bfe4c36dd9046..74def62f2b7500f8b09a3d73556ed3812bdaa617 100644 --- a/third_party/libyuv/source/scale_win.cc +++ b/third_party/libyuv/source/scale_win.cc @@ -240,7 +240,7 @@ void ScaleRowDown2Linear_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, vpcmpeqb ymm4, ymm4, ymm4 // '1' constant, 8b vpsrlw ymm4, ymm4, 15 vpackuswb ymm4, ymm4, ymm4 - vpxor ymm5, ymm5, ymm5 // constant 0 + aomor ymm5, ymm5, ymm5 // constant 0 wloop: vmovdqu ymm0, [eax] @@ -278,7 +278,7 @@ void ScaleRowDown2Box_AVX2(const uint8* src_ptr, ptrdiff_t src_stride, vpcmpeqb ymm4, ymm4, ymm4 // '1' constant, 8b vpsrlw ymm4, ymm4, 15 vpackuswb ymm4, ymm4, ymm4 - vpxor ymm5, ymm5, ymm5 // constant 0 + aomor ymm5, ymm5, ymm5 // constant 0 wloop: vmovdqu ymm0, [eax] // average rows @@ -834,7 +834,7 @@ void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width) { mov eax, [esp + 4] // src_ptr mov edx, [esp + 8] // dst_ptr mov ecx, [esp + 12] // src_width - vpxor ymm5, ymm5, ymm5 + aomor ymm5, ymm5, ymm5 // sum rows xloop: diff --git a/third_party/x86inc/README.libvpx b/third_party/x86inc/README.libaom similarity index 83% rename from third_party/x86inc/README.libvpx rename to third_party/x86inc/README.libaom index e91e305a281b30b10e2a647103b59a172d94f7d5..258358813d487c929e86fce54952fe6f58bc7739 100644 --- a/third_party/x86inc/README.libvpx +++ b/third_party/x86inc/README.libaom @@ -8,11 +8,11 @@ x264/libav's framework for x86 assembly. Contains a variety of macros and defines that help automatically allow assembly to work cross-platform. Local Modifications: -Get configuration from vpx_config.asm. -Prefix functions with vpx by default. +Get configuration from aom_config.asm. +Prefix functions with aom by default. Manage name mangling (prefixing with '_') manually because 'PREFIX' does not - exist in libvpx. -Expand PIC default to macho64 and respect CONFIG_PIC from libvpx + exist in libaom. +Expand PIC default to macho64 and respect CONFIG_PIC from libaom Catch all elf formats for 'hidden' status and SECTION notes. Avoid 'amdnop' when building with nasm. Set 'private_extern' visibility for macho targets. diff --git a/third_party/x86inc/x86inc.asm b/third_party/x86inc/x86inc.asm index a70ab686ddd682b46567db3a5aea03e82e2c9613..a6e149f8679c8e77d6bb670c888ed6444f63d658 100644 --- a/third_party/x86inc/x86inc.asm +++ b/third_party/x86inc/x86inc.asm @@ -34,10 +34,10 @@ ; as this feature might be useful for others as well. Send patches or ideas ; to x264-devel@videolan.org . -%include "vpx_config.asm" +%include "aom_config.asm" %ifndef private_prefix - %define private_prefix vpx + %define private_prefix aom %endif %ifndef public_prefix @@ -102,7 +102,7 @@ %endif %endmacro -; PIC macros are copied from vpx_ports/x86_abi_support.asm. The "define PIC" +; PIC macros are copied from aom_ports/x86_abi_support.asm. The "define PIC" ; from original code is added in for 64bit. %ifidn __OUTPUT_FORMAT__,elf32 %define ABI_IS_32BIT 1 diff --git a/tools/vpx-astyle.sh b/tools/aom-astyle.sh similarity index 100% rename from tools/vpx-astyle.sh rename to tools/aom-astyle.sh diff --git a/tools/ftfy.sh b/tools/ftfy.sh index 29ae95e9ba5820a6919c30f84caf9f91c79298de..004ccc20326ef054f7448c800f3394aa314400cd 100755 --- a/tools/ftfy.sh +++ b/tools/ftfy.sh @@ -28,11 +28,11 @@ log() { } -vpx_style() { +aom_style() { for f; do case "$f" in *.h|*.c|*.cc) - "${dirname_self}"/vpx-astyle.sh "$f" + "${dirname_self}"/aom-astyle.sh "$f" ;; esac done @@ -124,7 +124,7 @@ for f in $(git diff HEAD^ --name-only -M90 --diff-filter=AM); do case "$f" in third_party/*) continue;; esac - vpx_style "$f" + aom_style "$f" done git diff --no-color --no-ext-diff > "${MODIFIED_DIFF}" diff --git a/tools_common.c b/tools_common.c index 966557cd0ed9a36b42e17164c334bad393323df7..dcec1ab30cc20a710aed29b3f89207c15d864a05 100644 --- a/tools_common.c +++ b/tools_common.c @@ -67,15 +67,15 @@ void fatal(const char *fmt, ...) { void warn(const char *fmt, ...) { LOG_ERROR("Warning"); } -void die_codec(vpx_codec_ctx_t *ctx, const char *s) { - const char *detail = vpx_codec_error_detail(ctx); +void die_codec(aom_codec_ctx_t *ctx, const char *s) { + const char *detail = aom_codec_error_detail(ctx); - printf("%s: %s\n", s, vpx_codec_error(ctx)); + printf("%s: %s\n", s, aom_codec_error(ctx)); if (detail) printf(" %s\n", detail); exit(EXIT_FAILURE); } -int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame) { +int read_yuv_frame(struct VpxInputContext *input_ctx, aom_image_t *yuv_frame) { FILE *f = input_ctx->file; struct FileTypeDetectionBuffer *detect = &input_ctx->detect; int plane = 0; @@ -84,8 +84,8 @@ int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame) { for (plane = 0; plane < 3; ++plane) { uint8_t *ptr; - const int w = vpx_img_plane_width(yuv_frame, plane); - const int h = vpx_img_plane_height(yuv_frame, plane); + const int w = aom_img_plane_width(yuv_frame, plane); + const int h = aom_img_plane_height(yuv_frame, plane); int r; /* Determine the correct plane based on the image format. The for-loop @@ -130,23 +130,23 @@ int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame) { #if CONFIG_ENCODERS -static const VpxInterface vpx_encoders[] = { +static const VpxInterface aom_encoders[] = { #if CONFIG_VP10_ENCODER - { "vp10", VP10_FOURCC, &vpx_codec_vp10_cx }, + { "vp10", VP10_FOURCC, &aom_codec_vp10_cx }, #endif }; -int get_vpx_encoder_count(void) { - return sizeof(vpx_encoders) / sizeof(vpx_encoders[0]); +int get_aom_encoder_count(void) { + return sizeof(aom_encoders) / sizeof(aom_encoders[0]); } -const VpxInterface *get_vpx_encoder_by_index(int i) { return &vpx_encoders[i]; } +const VpxInterface *get_aom_encoder_by_index(int i) { return &aom_encoders[i]; } -const VpxInterface *get_vpx_encoder_by_name(const char *name) { +const VpxInterface *get_aom_encoder_by_name(const char *name) { int i; - for (i = 0; i < get_vpx_encoder_count(); ++i) { - const VpxInterface *encoder = get_vpx_encoder_by_index(i); + for (i = 0; i < get_aom_encoder_count(); ++i) { + const VpxInterface *encoder = get_aom_encoder_by_index(i); if (strcmp(encoder->name, name) == 0) return encoder; } @@ -157,34 +157,34 @@ const VpxInterface *get_vpx_encoder_by_name(const char *name) { #if CONFIG_DECODERS -static const VpxInterface vpx_decoders[] = { +static const VpxInterface aom_decoders[] = { #if CONFIG_VP10_DECODER - { "vp10", VP10_FOURCC, &vpx_codec_vp10_dx }, + { "vp10", VP10_FOURCC, &aom_codec_vp10_dx }, #endif }; -int get_vpx_decoder_count(void) { - return sizeof(vpx_decoders) / sizeof(vpx_decoders[0]); +int get_aom_decoder_count(void) { + return sizeof(aom_decoders) / sizeof(aom_decoders[0]); } -const VpxInterface *get_vpx_decoder_by_index(int i) { return &vpx_decoders[i]; } +const VpxInterface *get_aom_decoder_by_index(int i) { return &aom_decoders[i]; } -const VpxInterface *get_vpx_decoder_by_name(const char *name) { +const VpxInterface *get_aom_decoder_by_name(const char *name) { int i; - for (i = 0; i < get_vpx_decoder_count(); ++i) { - const VpxInterface *const decoder = get_vpx_decoder_by_index(i); + for (i = 0; i < get_aom_decoder_count(); ++i) { + const VpxInterface *const decoder = get_aom_decoder_by_index(i); if (strcmp(decoder->name, name) == 0) return decoder; } return NULL; } -const VpxInterface *get_vpx_decoder_by_fourcc(uint32_t fourcc) { +const VpxInterface *get_aom_decoder_by_fourcc(uint32_t fourcc) { int i; - for (i = 0; i < get_vpx_decoder_count(); ++i) { - const VpxInterface *const decoder = get_vpx_decoder_by_index(i); + for (i = 0; i < get_aom_decoder_count(); ++i) { + const VpxInterface *const decoder = get_aom_decoder_by_index(i); if (decoder->fourcc == fourcc) return decoder; } @@ -193,31 +193,31 @@ const VpxInterface *get_vpx_decoder_by_fourcc(uint32_t fourcc) { #endif // CONFIG_DECODERS -// TODO(dkovalev): move this function to vpx_image.{c, h}, so it will be part -// of vpx_image_t support -int vpx_img_plane_width(const vpx_image_t *img, int plane) { +// TODO(dkovalev): move this function to aom_image.{c, h}, so it will be part +// of aom_image_t support +int aom_img_plane_width(const aom_image_t *img, int plane) { if (plane > 0 && img->x_chroma_shift > 0) return (img->d_w + 1) >> img->x_chroma_shift; else return img->d_w; } -int vpx_img_plane_height(const vpx_image_t *img, int plane) { +int aom_img_plane_height(const aom_image_t *img, int plane) { if (plane > 0 && img->y_chroma_shift > 0) return (img->d_h + 1) >> img->y_chroma_shift; else return img->d_h; } -void vpx_img_write(const vpx_image_t *img, FILE *file) { +void aom_img_write(const aom_image_t *img, FILE *file) { int plane; for (plane = 0; plane < 3; ++plane) { const unsigned char *buf = img->planes[plane]; const int stride = img->stride[plane]; - const int w = vpx_img_plane_width(img, plane) * + const int w = aom_img_plane_width(img, plane) * ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1); - const int h = vpx_img_plane_height(img, plane); + const int h = aom_img_plane_height(img, plane); int y; for (y = 0; y < h; ++y) { @@ -227,15 +227,15 @@ void vpx_img_write(const vpx_image_t *img, FILE *file) { } } -int vpx_img_read(vpx_image_t *img, FILE *file) { +int aom_img_read(aom_image_t *img, FILE *file) { int plane; for (plane = 0; plane < 3; ++plane) { unsigned char *buf = img->planes[plane]; const int stride = img->stride[plane]; - const int w = vpx_img_plane_width(img, plane) * + const int w = aom_img_plane_width(img, plane) * ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1); - const int h = vpx_img_plane_height(img, plane); + const int h = aom_img_plane_height(img, plane); int y; for (y = 0; y < h; ++y) { @@ -261,7 +261,7 @@ double sse_to_psnr(double samples, double peak, double sse) { // TODO(debargha): Consolidate the functions below into a separate file. #if CONFIG_VPX_HIGHBITDEPTH -static void highbd_img_upshift(vpx_image_t *dst, vpx_image_t *src, +static void highbd_img_upshift(aom_image_t *dst, aom_image_t *src, int input_shift) { // Note the offset is 1 less than half. const int offset = input_shift > 0 ? (1 << (input_shift - 1)) - 1 : 0; @@ -297,7 +297,7 @@ static void highbd_img_upshift(vpx_image_t *dst, vpx_image_t *src, } } -static void lowbd_img_upshift(vpx_image_t *dst, vpx_image_t *src, +static void lowbd_img_upshift(aom_image_t *dst, aom_image_t *src, int input_shift) { // Note the offset is 1 less than half. const int offset = input_shift > 0 ? (1 << (input_shift - 1)) - 1 : 0; @@ -334,7 +334,7 @@ static void lowbd_img_upshift(vpx_image_t *dst, vpx_image_t *src, } } -void vpx_img_upshift(vpx_image_t *dst, vpx_image_t *src, int input_shift) { +void aom_img_upshift(aom_image_t *dst, aom_image_t *src, int input_shift) { if (src->fmt & VPX_IMG_FMT_HIGHBITDEPTH) { highbd_img_upshift(dst, src, input_shift); } else { @@ -342,7 +342,7 @@ void vpx_img_upshift(vpx_image_t *dst, vpx_image_t *src, int input_shift) { } } -void vpx_img_truncate_16_to_8(vpx_image_t *dst, vpx_image_t *src) { +void aom_img_truncate_16_to_8(aom_image_t *dst, aom_image_t *src) { int plane; if (dst->fmt + VPX_IMG_FMT_HIGHBITDEPTH != src->fmt || dst->d_w != src->d_w || dst->d_h != src->d_h || dst->x_chroma_shift != src->x_chroma_shift || @@ -375,7 +375,7 @@ void vpx_img_truncate_16_to_8(vpx_image_t *dst, vpx_image_t *src) { } } -static void highbd_img_downshift(vpx_image_t *dst, vpx_image_t *src, +static void highbd_img_downshift(aom_image_t *dst, aom_image_t *src, int down_shift) { int plane; if (dst->d_w != src->d_w || dst->d_h != src->d_h || @@ -409,7 +409,7 @@ static void highbd_img_downshift(vpx_image_t *dst, vpx_image_t *src, } } -static void lowbd_img_downshift(vpx_image_t *dst, vpx_image_t *src, +static void lowbd_img_downshift(aom_image_t *dst, aom_image_t *src, int down_shift) { int plane; if (dst->d_w != src->d_w || dst->d_h != src->d_h || @@ -444,7 +444,7 @@ static void lowbd_img_downshift(vpx_image_t *dst, vpx_image_t *src, } } -void vpx_img_downshift(vpx_image_t *dst, vpx_image_t *src, int down_shift) { +void aom_img_downshift(aom_image_t *dst, aom_image_t *src, int down_shift) { if (dst->fmt & VPX_IMG_FMT_HIGHBITDEPTH) { highbd_img_downshift(dst, src, down_shift); } else { diff --git a/tools_common.h b/tools_common.h index fb6c0621a29fdaa10141970753cc38e2fd978cd0..4e7ef070edaa9032bc1de0a85e65aae5a01dc0de 100644 --- a/tools_common.h +++ b/tools_common.h @@ -13,10 +13,10 @@ #include <stdio.h> -#include "./vpx_config.h" -#include "aom/vpx_codec.h" -#include "aom/vpx_image.h" -#include "aom/vpx_integer.h" +#include "./aom_config.h" +#include "aom/aom_codec.h" +#include "aom/aom_image.h" +#include "aom/aom_integer.h" #include "aom_ports/msvc.h" #if CONFIG_ENCODERS @@ -92,8 +92,8 @@ struct VpxInputContext { uint32_t width; uint32_t height; struct VpxRational pixel_aspect_ratio; - vpx_img_fmt_t fmt; - vpx_bit_depth_t bit_depth; + aom_img_fmt_t fmt; + aom_bit_depth_t bit_depth; int only_i420; uint32_t fourcc; struct VpxRational framerate; @@ -119,43 +119,43 @@ void die(const char *fmt, ...) VPX_NO_RETURN; void fatal(const char *fmt, ...) VPX_NO_RETURN; void warn(const char *fmt, ...); -void die_codec(vpx_codec_ctx_t *ctx, const char *s) VPX_NO_RETURN; +void die_codec(aom_codec_ctx_t *ctx, const char *s) VPX_NO_RETURN; /* The tool including this file must define usage_exit() */ void usage_exit(void) VPX_NO_RETURN; #undef VPX_NO_RETURN -int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame); +int read_yuv_frame(struct VpxInputContext *input_ctx, aom_image_t *yuv_frame); typedef struct VpxInterface { const char *const name; const uint32_t fourcc; - vpx_codec_iface_t *(*const codec_interface)(); + aom_codec_iface_t *(*const codec_interface)(); } VpxInterface; -int get_vpx_encoder_count(void); -const VpxInterface *get_vpx_encoder_by_index(int i); -const VpxInterface *get_vpx_encoder_by_name(const char *name); +int get_aom_encoder_count(void); +const VpxInterface *get_aom_encoder_by_index(int i); +const VpxInterface *get_aom_encoder_by_name(const char *name); -int get_vpx_decoder_count(void); -const VpxInterface *get_vpx_decoder_by_index(int i); -const VpxInterface *get_vpx_decoder_by_name(const char *name); -const VpxInterface *get_vpx_decoder_by_fourcc(uint32_t fourcc); +int get_aom_decoder_count(void); +const VpxInterface *get_aom_decoder_by_index(int i); +const VpxInterface *get_aom_decoder_by_name(const char *name); +const VpxInterface *get_aom_decoder_by_fourcc(uint32_t fourcc); -// TODO(dkovalev): move this function to vpx_image.{c, h}, so it will be part -// of vpx_image_t support -int vpx_img_plane_width(const vpx_image_t *img, int plane); -int vpx_img_plane_height(const vpx_image_t *img, int plane); -void vpx_img_write(const vpx_image_t *img, FILE *file); -int vpx_img_read(vpx_image_t *img, FILE *file); +// TODO(dkovalev): move this function to aom_image.{c, h}, so it will be part +// of aom_image_t support +int aom_img_plane_width(const aom_image_t *img, int plane); +int aom_img_plane_height(const aom_image_t *img, int plane); +void aom_img_write(const aom_image_t *img, FILE *file); +int aom_img_read(aom_image_t *img, FILE *file); double sse_to_psnr(double samples, double peak, double mse); #if CONFIG_VPX_HIGHBITDEPTH -void vpx_img_upshift(vpx_image_t *dst, vpx_image_t *src, int input_shift); -void vpx_img_downshift(vpx_image_t *dst, vpx_image_t *src, int down_shift); -void vpx_img_truncate_16_to_8(vpx_image_t *dst, vpx_image_t *src); +void aom_img_upshift(aom_image_t *dst, aom_image_t *src, int input_shift); +void aom_img_downshift(aom_image_t *dst, aom_image_t *src, int down_shift); +void aom_img_truncate_16_to_8(aom_image_t *dst, aom_image_t *src); #endif #ifdef __cplusplus diff --git a/usage.dox b/usage.dox index 2b0874b7f4d5b678166bb5eeb8c5e90cd16ce9e6..7e6d4c873212e0268015fbadec31c9ac94515911 100644 --- a/usage.dox +++ b/usage.dox @@ -1,6 +1,6 @@ /*!\page usage Usage - The vpx multi-format codec SDK provides a unified interface amongst its + The aom multi-format codec SDK provides a unified interface amongst its supported codecs. This abstraction allows applications using this SDK to easily support multiple video formats with minimal code duplication or "special casing." This section describes the interface common to all codecs. @@ -34,7 +34,7 @@ Most operations require an initialized codec context. Codec context instances are codec specific. That is, the codec to be used for the encoded - video must be known at initialization time. See #vpx_codec_ctx_t for further + video must be known at initialization time. See #aom_codec_ctx_t for further information. \subsection usage_ifaces Interfaces @@ -46,7 +46,7 @@ Each supported codec will expose an interface structure to the application as an <code>extern</code> reference to a structure of the incomplete type - #vpx_codec_iface_t. + #aom_codec_iface_t. \section usage_features Features Several "features" are defined that are optionally implemented by codec @@ -54,7 +54,7 @@ different platforms. The purpose of defining these features is that when they are implemented, they conform to a common interface. The features, or capabilities, of an algorithm can be queried from it's interface by using - the vpx_codec_get_caps() method. Attempts to invoke features not supported + the aom_codec_get_caps() method. Attempts to invoke features not supported by an algorithm will generally result in #VPX_CODEC_INCAPABLE. \if decoder @@ -80,33 +80,33 @@ The available initialization methods are: \if encoder - \li #vpx_codec_enc_init (calls vpx_codec_enc_init_ver()) - \li #vpx_codec_enc_init_multi (calls vpx_codec_enc_init_multi_ver()) + \li #aom_codec_enc_init (calls aom_codec_enc_init_ver()) + \li #aom_codec_enc_init_multi (calls aom_codec_enc_init_multi_ver()) \endif \if decoder - \li #vpx_codec_dec_init (calls vpx_codec_dec_init_ver()) + \li #aom_codec_dec_init (calls aom_codec_dec_init_ver()) \endif \section usage_errors Error Handling - Almost all codec functions return an error status of type #vpx_codec_err_t. + Almost all codec functions return an error status of type #aom_codec_err_t. The semantics of how each error condition should be processed is clearly defined in the definitions of each enumerated value. Error values can be - converted into ASCII strings with the vpx_codec_error() and - vpx_codec_err_to_string() methods. The difference between these two methods is - that vpx_codec_error() returns the error state from an initialized context, - whereas vpx_codec_err_to_string() can be used in cases where an error occurs + converted into ASCII strings with the aom_codec_error() and + aom_codec_err_to_string() methods. The difference between these two methods is + that aom_codec_error() returns the error state from an initialized context, + whereas aom_codec_err_to_string() can be used in cases where an error occurs outside any context. The enumerated value returned from the last call can be retrieved from the <code>err</code> member of the decoder context as well. Finally, more detailed error information may be able to be obtained by using - the vpx_codec_error_detail() method. Not all errors produce detailed error + the aom_codec_error_detail() method. Not all errors produce detailed error information. In addition to error information, the codec library's build configuration is available at runtime on some platforms. This information can be returned - by calling vpx_codec_build_config(), and is formatted as a base64 coded string + by calling aom_codec_build_config(), and is formatted as a base64 coded string (comprised of characters in the set [a-z_a-Z0-9+/]). This information is not - useful to an application at runtime, but may be of use to vpx for support. + useful to an application at runtime, but may be of use to aom for support. \section usage_deadline Deadline @@ -116,7 +116,7 @@ returning. This is a soft deadline -- that is, the semantics of the requested operation take precedence over meeting the deadline. If, for example, an application sets a <code>deadline</code> of 1000us, and the - frame takes 2000us to decode, the call to vpx_codec_decode() will return + frame takes 2000us to decode, the call to aom_codec_decode() will return after 2000us. In this case the deadline is not met, but the semantics of the function are preserved. If, for the same frame, an application instead sets a <code>deadline</code> of 5000us, the decoder will see that it has 3000us diff --git a/usage_cx.dox b/usage_cx.dox index 92b0d34ef4d59197684f96e7649368c9b59320b2..dcf267ce4353c049d33c0e1c327f1d7403b18194 100644 --- a/usage_cx.dox +++ b/usage_cx.dox @@ -1,6 +1,6 @@ /*! \page usage_encode Encoding - The vpx_codec_encode() function is at the core of the encode loop. It + The aom_codec_encode() function is at the core of the encode loop. It processes raw images passed by the application, producing packets of compressed data. The <code>deadline</code> parameter controls the amount of time in microseconds the encoder should spend working on the frame. For diff --git a/usage_dx.dox b/usage_dx.dox index 883ce24926f0cc8dbfeb71adb189c1943ddf0b61..6b76bf7b00113d20ea7f69fdf71e6f5e424fc41a 100644 --- a/usage_dx.dox +++ b/usage_dx.dox @@ -1,6 +1,6 @@ /*! \page usage_decode Decoding - The vpx_codec_decode() function is at the core of the decode loop. It + The aom_codec_decode() function is at the core of the decode loop. It processes packets of compressed data passed by the application, producing decoded images. The decoder expects packets to comprise exactly one image frame of data. Packets \ref MUST be passed in decode order. If the @@ -20,11 +20,11 @@ that allow the application to register a callback to be invoked by the decoder when decoded data becomes available. Decoders are not required to support this feature, however. Like all \ref usage_features, support can be - determined by calling vpx_codec_get_caps(). Callbacks are available in both + determined by calling aom_codec_get_caps(). Callbacks are available in both frame-based and slice-based variants. Frame based callbacks conform to the - signature of #vpx_codec_put_frame_cb_fn_t and are invoked once the entire + signature of #aom_codec_put_frame_cb_fn_t and are invoked once the entire frame has been decoded. Slice based callbacks conform to the signature of - #vpx_codec_put_slice_cb_fn_t and are invoked after a subsection of the frame + #aom_codec_put_slice_cb_fn_t and are invoked after a subsection of the frame is decoded. For example, a slice callback could be issued for each macroblock row. However, the number and size of slices to return is implementation specific. Also, the image data passed in a slice callback is @@ -39,9 +39,9 @@ \section usage_frame_iter Frame Iterator Based Decoding If the codec does not support callback based decoding, or the application chooses not to make use of that feature, decoded frames are made available - through the vpx_codec_get_frame() iterator. The application initializes the - iterator storage (of type #vpx_codec_iter_t) to NULL, then calls - vpx_codec_get_frame repeatedly until it returns NULL, indicating that all + through the aom_codec_get_frame() iterator. The application initializes the + iterator storage (of type #aom_codec_iter_t) to NULL, then calls + aom_codec_get_frame repeatedly until it returns NULL, indicating that all images have been returned. This process may result in zero, one, or many frames that are ready for display, depending on the codec. diff --git a/video_reader.c b/video_reader.c index 8cc0063a8d52a8abe0eed6d15b7a0c4c450e7be6..97db04ee53b86c3d28a01c12263451513309953a 100644 --- a/video_reader.c +++ b/video_reader.c @@ -27,7 +27,7 @@ struct VpxVideoReaderStruct { size_t frame_size; }; -VpxVideoReader *vpx_video_reader_open(const char *filename) { +VpxVideoReader *aom_video_reader_open(const char *filename) { char header[32]; VpxVideoReader *reader = NULL; FILE *const file = fopen(filename, "rb"); @@ -53,7 +53,7 @@ VpxVideoReader *vpx_video_reader_open(const char *filename) { return reader; } -void vpx_video_reader_close(VpxVideoReader *reader) { +void aom_video_reader_close(VpxVideoReader *reader) { if (reader) { fclose(reader->file); free(reader->buffer); @@ -61,18 +61,18 @@ void vpx_video_reader_close(VpxVideoReader *reader) { } } -int vpx_video_reader_read_frame(VpxVideoReader *reader) { +int aom_video_reader_read_frame(VpxVideoReader *reader) { return !ivf_read_frame(reader->file, &reader->buffer, &reader->frame_size, &reader->buffer_size); } -const uint8_t *vpx_video_reader_get_frame(VpxVideoReader *reader, +const uint8_t *aom_video_reader_get_frame(VpxVideoReader *reader, size_t *size) { if (size) *size = reader->frame_size; return reader->buffer; } -const VpxVideoInfo *vpx_video_reader_get_info(VpxVideoReader *reader) { +const VpxVideoInfo *aom_video_reader_get_info(VpxVideoReader *reader) { return &reader->info; } diff --git a/video_reader.h b/video_reader.h index ab04b254b176382c37431d9ead284d940d2b2efb..e85e5bd023d077c105f854cbb6e862ee6ddd38fb 100644 --- a/video_reader.h +++ b/video_reader.h @@ -17,7 +17,7 @@ // The following code is work in progress. It is going to support transparent // reading of input files. Right now only IVF format is supported for // simplicity. The main goal the API is to be simple and easy to use in example -// code and in vpxenc/vpxdec later. All low-level details like memory +// code and in aomenc/aomdec later. All low-level details like memory // buffer management are hidden from API users. struct VpxVideoReaderStruct; typedef struct VpxVideoReaderStruct VpxVideoReader; @@ -29,21 +29,21 @@ extern "C" { // Opens the input file for reading and inspects it to determine file type. // Returns an opaque VpxVideoReader* upon success, or NULL upon failure. // Right now only IVF format is supported. -VpxVideoReader *vpx_video_reader_open(const char *filename); +VpxVideoReader *aom_video_reader_open(const char *filename); // Frees all resources associated with VpxVideoReader* returned from -// vpx_video_reader_open() call. -void vpx_video_reader_close(VpxVideoReader *reader); +// aom_video_reader_open() call. +void aom_video_reader_close(VpxVideoReader *reader); // Reads frame from the file and stores it in internal buffer. -int vpx_video_reader_read_frame(VpxVideoReader *reader); +int aom_video_reader_read_frame(VpxVideoReader *reader); // Returns the pointer to memory buffer with frame data read by last call to -// vpx_video_reader_read_frame(). -const uint8_t *vpx_video_reader_get_frame(VpxVideoReader *reader, size_t *size); +// aom_video_reader_read_frame(). +const uint8_t *aom_video_reader_get_frame(VpxVideoReader *reader, size_t *size); // Fills VpxVideoInfo with information from opened video file. -const VpxVideoInfo *vpx_video_reader_get_info(VpxVideoReader *reader); +const VpxVideoInfo *aom_video_reader_get_info(VpxVideoReader *reader); #ifdef __cplusplus } // extern "C" diff --git a/video_writer.c b/video_writer.c index 8a11972364c42fa21459a040d8e49c659d65143d..77bea1ccddc4d6c346e8e908eb69109ccb25cc0e 100644 --- a/video_writer.c +++ b/video_writer.c @@ -13,7 +13,7 @@ #include "./ivfenc.h" #include "./video_writer.h" -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" struct VpxVideoWriterStruct { VpxVideoInfo info; @@ -23,7 +23,7 @@ struct VpxVideoWriterStruct { static void write_header(FILE *file, const VpxVideoInfo *info, int frame_count) { - struct vpx_codec_enc_cfg cfg; + struct aom_codec_enc_cfg cfg; cfg.g_w = info->frame_width; cfg.g_h = info->frame_height; cfg.g_timebase.num = info->time_base.numerator; @@ -32,7 +32,7 @@ static void write_header(FILE *file, const VpxVideoInfo *info, ivf_write_file_header(file, &cfg, info->codec_fourcc, frame_count); } -VpxVideoWriter *vpx_video_writer_open(const char *filename, +VpxVideoWriter *aom_video_writer_open(const char *filename, VpxContainer container, const VpxVideoInfo *info) { if (container == kContainerIVF) { @@ -55,7 +55,7 @@ VpxVideoWriter *vpx_video_writer_open(const char *filename, return NULL; } -void vpx_video_writer_close(VpxVideoWriter *writer) { +void aom_video_writer_close(VpxVideoWriter *writer) { if (writer) { // Rewriting frame header with real frame count rewind(writer->file); @@ -66,7 +66,7 @@ void vpx_video_writer_close(VpxVideoWriter *writer) { } } -int vpx_video_writer_write_frame(VpxVideoWriter *writer, const uint8_t *buffer, +int aom_video_writer_write_frame(VpxVideoWriter *writer, const uint8_t *buffer, size_t size, int64_t pts) { ivf_write_frame_header(writer->file, pts, size); if (fwrite(buffer, 1, size, writer->file) != size) return 0; diff --git a/video_writer.h b/video_writer.h index 8d4a507ed7d86376baaba89a5782c3e921c0b39f..6172ef596732ba0fd3afecbe10bc6a4e006bf964 100644 --- a/video_writer.h +++ b/video_writer.h @@ -26,16 +26,16 @@ extern "C" { // Finds and opens writer for specified container format. // Returns an opaque VpxVideoWriter* upon success, or NULL upon failure. // Right now only IVF format is supported. -VpxVideoWriter *vpx_video_writer_open(const char *filename, +VpxVideoWriter *aom_video_writer_open(const char *filename, VpxContainer container, const VpxVideoInfo *info); // Frees all resources associated with VpxVideoWriter* returned from -// vpx_video_writer_open() call. -void vpx_video_writer_close(VpxVideoWriter *writer); +// aom_video_writer_open() call. +void aom_video_writer_close(VpxVideoWriter *writer); // Writes frame bytes to the file. -int vpx_video_writer_write_frame(VpxVideoWriter *writer, const uint8_t *buffer, +int aom_video_writer_write_frame(VpxVideoWriter *writer, const uint8_t *buffer, size_t size, int64_t pts); #ifdef __cplusplus diff --git a/warnings.c b/warnings.c index c0e016901595754b29757cdcb5340bb7991fe4ba..db7bd51f43caf6bb4b76df3377643ac4f4a7d242 100644 --- a/warnings.c +++ b/warnings.c @@ -16,10 +16,10 @@ #include <stdlib.h> #include <string.h> -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #include "./tools_common.h" -#include "./vpxenc.h" +#include "./aomenc.h" static const char quantizer_warning_string[] = "Bad quantizer values. Quantizer values should not be equal, and should " @@ -85,7 +85,7 @@ static void check_lag_in_frames_realtime_deadline( void check_encoder_config(int disable_prompt, const struct VpxEncoderConfig *global_config, - const struct vpx_codec_enc_cfg *stream_config) { + const struct aom_codec_enc_cfg *stream_config) { int num_warnings = 0; struct WarningListNode *warning = NULL; struct WarningList warning_list = { 0 }; diff --git a/warnings.h b/warnings.h index d76626664a889cf00f20b1fd2d004f9cdbbd1e25..e47822e7d6e28f85a586ddc3a9d1b1abdc4e89a5 100644 --- a/warnings.h +++ b/warnings.h @@ -15,7 +15,7 @@ extern "C" { #endif -struct vpx_codec_enc_cfg; +struct aom_codec_enc_cfg; struct VpxEncoderConfig; /* @@ -25,7 +25,7 @@ struct VpxEncoderConfig; */ void check_encoder_config(int disable_prompt, const struct VpxEncoderConfig *global_config, - const struct vpx_codec_enc_cfg *stream_config); + const struct aom_codec_enc_cfg *stream_config); #ifdef __cplusplus } // extern "C" diff --git a/webmdec.cc b/webmdec.cc index 92f61fcdec128af2670de440fcae2d1a31e0ac63..87c29a49e4f45a5d6d8298167d58e82b61d4e777 100644 --- a/webmdec.cc +++ b/webmdec.cc @@ -52,34 +52,34 @@ void get_first_cluster(struct WebmInputContext *const webm_ctx) { } void rewind_and_reset(struct WebmInputContext *const webm_ctx, - struct VpxInputContext *const vpx_ctx) { - rewind(vpx_ctx->file); + struct VpxInputContext *const aom_ctx) { + rewind(aom_ctx->file); reset(webm_ctx); } } // namespace int file_is_webm(struct WebmInputContext *webm_ctx, - struct VpxInputContext *vpx_ctx) { - mkvparser::MkvReader *const reader = new mkvparser::MkvReader(vpx_ctx->file); + struct VpxInputContext *aom_ctx) { + mkvparser::MkvReader *const reader = new mkvparser::MkvReader(aom_ctx->file); webm_ctx->reader = reader; webm_ctx->reached_eos = 0; mkvparser::EBMLHeader header; long long pos = 0; if (header.Parse(reader, pos) < 0) { - rewind_and_reset(webm_ctx, vpx_ctx); + rewind_and_reset(webm_ctx, aom_ctx); return 0; } mkvparser::Segment *segment; if (mkvparser::Segment::CreateInstance(reader, pos, segment)) { - rewind_and_reset(webm_ctx, vpx_ctx); + rewind_and_reset(webm_ctx, aom_ctx); return 0; } webm_ctx->segment = segment; if (segment->Load() < 0) { - rewind_and_reset(webm_ctx, vpx_ctx); + rewind_and_reset(webm_ctx, aom_ctx); return 0; } @@ -95,25 +95,25 @@ int file_is_webm(struct WebmInputContext *webm_ctx, } if (video_track == NULL || video_track->GetCodecId() == NULL) { - rewind_and_reset(webm_ctx, vpx_ctx); + rewind_and_reset(webm_ctx, aom_ctx); return 0; } if (!strncmp(video_track->GetCodecId(), "V_VP8", 5)) { - vpx_ctx->fourcc = VP8_FOURCC; + aom_ctx->fourcc = VP8_FOURCC; } else if (!strncmp(video_track->GetCodecId(), "V_VP9", 5)) { - vpx_ctx->fourcc = VP9_FOURCC; + aom_ctx->fourcc = VP9_FOURCC; } else if (!strncmp(video_track->GetCodecId(), "V_VP10", 6)) { - vpx_ctx->fourcc = VP10_FOURCC; + aom_ctx->fourcc = VP10_FOURCC; } else { - rewind_and_reset(webm_ctx, vpx_ctx); + rewind_and_reset(webm_ctx, aom_ctx); return 0; } - vpx_ctx->framerate.denominator = 0; - vpx_ctx->framerate.numerator = 0; - vpx_ctx->width = static_cast<uint32_t>(video_track->GetWidth()); - vpx_ctx->height = static_cast<uint32_t>(video_track->GetHeight()); + aom_ctx->framerate.denominator = 0; + aom_ctx->framerate.numerator = 0; + aom_ctx->width = static_cast<uint32_t>(video_track->GetWidth()); + aom_ctx->height = static_cast<uint32_t>(video_track->GetHeight()); get_first_cluster(webm_ctx); @@ -198,7 +198,7 @@ int webm_read_frame(struct WebmInputContext *webm_ctx, uint8_t **buffer, } int webm_guess_framerate(struct WebmInputContext *webm_ctx, - struct VpxInputContext *vpx_ctx) { + struct VpxInputContext *aom_ctx) { uint32_t i = 0; uint8_t *buffer = NULL; size_t bytes_in_buffer = 0; @@ -209,8 +209,8 @@ int webm_guess_framerate(struct WebmInputContext *webm_ctx, } ++i; } - vpx_ctx->framerate.numerator = (i - 1) * 1000000; - vpx_ctx->framerate.denominator = + aom_ctx->framerate.numerator = (i - 1) * 1000000; + aom_ctx->framerate.denominator = static_cast<int>(webm_ctx->timestamp_ns / 1000); delete[] buffer; diff --git a/webmdec.h b/webmdec.h index 481a202a2c6f86836fad450477845f88fa244e9e..fce057f2078a737b62e25ea959ebc78543085046 100644 --- a/webmdec.h +++ b/webmdec.h @@ -39,7 +39,7 @@ struct WebmInputContext { // TODO(vigneshv): Refactor this function into two smaller functions specific // to their task. int file_is_webm(struct WebmInputContext *webm_ctx, - struct VpxInputContext *vpx_ctx); + struct VpxInputContext *aom_ctx); // Reads a WebM Video Frame. Memory for the buffer is created, owned and managed // by this function. For the first call, |buffer| should be NULL and @@ -61,7 +61,7 @@ int webm_read_frame(struct WebmInputContext *webm_ctx, uint8_t **buffer, // Guesses the frame rate of the input file based on the container timestamps. int webm_guess_framerate(struct WebmInputContext *webm_ctx, - struct VpxInputContext *vpx_ctx); + struct VpxInputContext *aom_ctx); // Resets the WebMInputContext. void webm_free(struct WebmInputContext *webm_ctx); diff --git a/webmenc.cc b/webmenc.cc index c86999d33a2b83eecf764e73045569c2899a3707..3b475bb9892ce4b6a6e2cb41081422db75c5e2a9 100644 --- a/webmenc.cc +++ b/webmenc.cc @@ -21,8 +21,8 @@ const int kVideoTrackNumber = 1; } // namespace void write_webm_file_header(struct EbmlGlobal *glob, - const vpx_codec_enc_cfg_t *cfg, - const struct vpx_rational *fps, + const aom_codec_enc_cfg_t *cfg, + const struct aom_rational *fps, stereo_format_t stereo_fmt, unsigned int fourcc, const struct VpxRational *par) { mkvmuxer::MkvWriter *const writer = new mkvmuxer::MkvWriter(glob->stream); @@ -34,9 +34,9 @@ void write_webm_file_header(struct EbmlGlobal *glob, mkvmuxer::SegmentInfo *const info = segment->GetSegmentInfo(); const uint64_t kTimecodeScale = 1000000; info->set_timecode_scale(kTimecodeScale); - std::string version = "vpxenc"; + std::string version = "aomenc"; if (!glob->debug) { - version.append(std::string(" ") + vpx_codec_version_str()); + version.append(std::string(" ") + aom_codec_version_str()); } info->set_writing_app(version.c_str()); @@ -69,8 +69,8 @@ void write_webm_file_header(struct EbmlGlobal *glob, glob->segment = segment; } -void write_webm_block(struct EbmlGlobal *glob, const vpx_codec_enc_cfg_t *cfg, - const vpx_codec_cx_pkt_t *pkt) { +void write_webm_block(struct EbmlGlobal *glob, const aom_codec_enc_cfg_t *cfg, + const aom_codec_cx_pkt_t *pkt) { mkvmuxer::Segment *const segment = reinterpret_cast<mkvmuxer::Segment *>(glob->segment); int64_t pts_ns = pkt->data.frame.pts * 1000000000ll * cfg->g_timebase.num / diff --git a/webmenc.h b/webmenc.h index 63b50624963a28fd190ae53e0851097526db53a6..be649d9948ab1c8eac9138e77ba3ee513a2a154c 100644 --- a/webmenc.h +++ b/webmenc.h @@ -15,7 +15,7 @@ #include <stdlib.h> #include "tools_common.h" -#include "aom/vpx_encoder.h" +#include "aom/aom_encoder.h" #ifdef __cplusplus extern "C" { @@ -40,13 +40,13 @@ typedef enum stereo_format { } stereo_format_t; void write_webm_file_header(struct EbmlGlobal *glob, - const vpx_codec_enc_cfg_t *cfg, - const struct vpx_rational *fps, + const aom_codec_enc_cfg_t *cfg, + const struct aom_rational *fps, stereo_format_t stereo_fmt, unsigned int fourcc, const struct VpxRational *par); -void write_webm_block(struct EbmlGlobal *glob, const vpx_codec_enc_cfg_t *cfg, - const vpx_codec_cx_pkt_t *pkt); +void write_webm_block(struct EbmlGlobal *glob, const aom_codec_enc_cfg_t *cfg, + const aom_codec_cx_pkt_t *pkt); void write_webm_file_footer(struct EbmlGlobal *glob); diff --git a/y4menc.c b/y4menc.c index cc7e4783ca6cff757e54fa7f41b9d5fa4b4f7825..ffa8dc612e398c7be17de9159258a89a48641726 100644 --- a/y4menc.c +++ b/y4menc.c @@ -14,7 +14,7 @@ int y4m_write_file_header(char *buf, size_t len, int width, int height, const struct VpxRational *framerate, - vpx_img_fmt_t fmt, unsigned int bit_depth) { + aom_img_fmt_t fmt, unsigned int bit_depth) { const char *color; switch (bit_depth) { case 8: diff --git a/y4menc.h b/y4menc.h index a4127c945170a0d1d889249536f9b00f5631220b..7b5aff184bbbac949d8415e66cf86dfd81a40c57 100644 --- a/y4menc.h +++ b/y4menc.h @@ -14,7 +14,7 @@ #include "./tools_common.h" -#include "aom/vpx_decoder.h" +#include "aom/aom_decoder.h" #ifdef __cplusplus extern "C" { @@ -24,7 +24,7 @@ extern "C" { int y4m_write_file_header(char *buf, size_t len, int width, int height, const struct VpxRational *framerate, - vpx_img_fmt_t fmt, unsigned int bit_depth); + aom_img_fmt_t fmt, unsigned int bit_depth); int y4m_write_frame_header(char *buf, size_t len); #ifdef __cplusplus diff --git a/y4minput.c b/y4minput.c index 41a22cf9792cdf6e3640ccb0fce4c27b49644c09..f7ff3d5c894bbb5703237e41a0a94cdb003ef3b7 100644 --- a/y4minput.c +++ b/y4minput.c @@ -15,7 +15,7 @@ #include <stdlib.h> #include <string.h> -#include "aom/vpx_integer.h" +#include "aom/aom_integer.h" #include "y4minput.h" // Reads 'size' bytes from 'file' into 'buf' with some fault tolerance. @@ -806,7 +806,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, "Only progressive scan handled.\n"); return -1; } - _y4m->vpx_fmt = VPX_IMG_FMT_I420; + _y4m->aom_fmt = VPX_IMG_FMT_I420; _y4m->bps = 12; _y4m->bit_depth = 8; if (strcmp(_y4m->chroma_type, "420") == 0 || @@ -832,7 +832,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, _y4m->convert = y4m_convert_null; _y4m->bit_depth = 10; _y4m->bps = 15; - _y4m->vpx_fmt = VPX_IMG_FMT_I42016; + _y4m->aom_fmt = VPX_IMG_FMT_I42016; if (only_420) { fprintf(stderr, "Unsupported conversion from 420p10 to 420jpeg\n"); return -1; @@ -850,7 +850,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, _y4m->convert = y4m_convert_null; _y4m->bit_depth = 12; _y4m->bps = 18; - _y4m->vpx_fmt = VPX_IMG_FMT_I42016; + _y4m->aom_fmt = VPX_IMG_FMT_I42016; if (only_420) { fprintf(stderr, "Unsupported conversion from 420p12 to 420jpeg\n"); return -1; @@ -898,7 +898,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, _y4m->aux_buf_read_sz + ((_y4m->pic_w + 1) / 2) * _y4m->pic_h; _y4m->convert = y4m_convert_422_420jpeg; } else { - _y4m->vpx_fmt = VPX_IMG_FMT_I422; + _y4m->aom_fmt = VPX_IMG_FMT_I422; _y4m->bps = 16; _y4m->dst_c_dec_h = _y4m->src_c_dec_h; _y4m->dst_c_dec_v = _y4m->src_c_dec_v; @@ -911,7 +911,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, } else if (strcmp(_y4m->chroma_type, "422p10") == 0) { _y4m->src_c_dec_h = 2; _y4m->src_c_dec_v = 1; - _y4m->vpx_fmt = VPX_IMG_FMT_I42216; + _y4m->aom_fmt = VPX_IMG_FMT_I42216; _y4m->bps = 20; _y4m->bit_depth = 10; _y4m->dst_c_dec_h = _y4m->src_c_dec_h; @@ -927,7 +927,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, } else if (strcmp(_y4m->chroma_type, "422p12") == 0) { _y4m->src_c_dec_h = 2; _y4m->src_c_dec_v = 1; - _y4m->vpx_fmt = VPX_IMG_FMT_I42216; + _y4m->aom_fmt = VPX_IMG_FMT_I42216; _y4m->bps = 24; _y4m->bit_depth = 12; _y4m->dst_c_dec_h = _y4m->src_c_dec_h; @@ -968,7 +968,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, _y4m->aux_buf_read_sz + ((_y4m->pic_w + 1) / 2) * _y4m->pic_h; _y4m->convert = y4m_convert_444_420jpeg; } else { - _y4m->vpx_fmt = VPX_IMG_FMT_I444; + _y4m->aom_fmt = VPX_IMG_FMT_I444; _y4m->bps = 24; _y4m->dst_c_dec_h = _y4m->src_c_dec_h; _y4m->dst_c_dec_v = _y4m->src_c_dec_v; @@ -980,7 +980,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, } else if (strcmp(_y4m->chroma_type, "444p10") == 0) { _y4m->src_c_dec_h = 1; _y4m->src_c_dec_v = 1; - _y4m->vpx_fmt = VPX_IMG_FMT_I44416; + _y4m->aom_fmt = VPX_IMG_FMT_I44416; _y4m->bps = 30; _y4m->bit_depth = 10; _y4m->dst_c_dec_h = _y4m->src_c_dec_h; @@ -995,7 +995,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, } else if (strcmp(_y4m->chroma_type, "444p12") == 0) { _y4m->src_c_dec_h = 1; _y4m->src_c_dec_v = 1; - _y4m->vpx_fmt = VPX_IMG_FMT_I44416; + _y4m->aom_fmt = VPX_IMG_FMT_I44416; _y4m->bps = 36; _y4m->bit_depth = 12; _y4m->dst_c_dec_h = _y4m->src_c_dec_h; @@ -1022,7 +1022,7 @@ int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, _y4m->aux_buf_sz = _y4m->aux_buf_read_sz = 3 * _y4m->pic_w * _y4m->pic_h; _y4m->convert = y4m_convert_444_420jpeg; } else { - _y4m->vpx_fmt = VPX_IMG_FMT_444A; + _y4m->aom_fmt = VPX_IMG_FMT_444A; _y4m->bps = 32; _y4m->dst_c_dec_h = _y4m->src_c_dec_h; _y4m->dst_c_dec_v = _y4m->src_c_dec_v; @@ -1063,7 +1063,7 @@ void y4m_input_close(y4m_input *_y4m) { free(_y4m->aux_buf); } -int y4m_input_fetch_frame(y4m_input *_y4m, FILE *_fin, vpx_image_t *_img) { +int y4m_input_fetch_frame(y4m_input *_y4m, FILE *_fin, aom_image_t *_img) { char frame[6]; int pic_sz; int c_w; @@ -1099,11 +1099,11 @@ int y4m_input_fetch_frame(y4m_input *_y4m, FILE *_fin, vpx_image_t *_img) { /*Now convert the just read frame.*/ (*_y4m->convert)(_y4m, _y4m->dst_buf, _y4m->aux_buf); /*Fill in the frame buffer pointers. - We don't use vpx_img_wrap() because it forces padding for odd picture + We don't use aom_img_wrap() because it forces padding for odd picture sizes, which would require a separate fread call for every row.*/ memset(_img, 0, sizeof(*_img)); /*Y4M has the planes in Y'CbCr order, which libaom calls Y, U, and V.*/ - _img->fmt = _y4m->vpx_fmt; + _img->fmt = _y4m->aom_fmt; _img->w = _img->d_w = _y4m->pic_w; _img->h = _img->d_h = _y4m->pic_h; _img->x_chroma_shift = _y4m->dst_c_dec_h >> 1; diff --git a/y4minput.h b/y4minput.h index 492a13088ec0d823adb9ad62f6479bc584be6705..db20190db63c639e8835089048b9c7a1df6e91b5 100644 --- a/y4minput.h +++ b/y4minput.h @@ -16,7 +16,7 @@ #define Y4MINPUT_H_ #include <stdio.h> -#include "aom/vpx_image.h" +#include "aom/aom_image.h" #ifdef __cplusplus extern "C" { @@ -52,7 +52,7 @@ struct y4m_input { y4m_convert_func convert; unsigned char *dst_buf; unsigned char *aux_buf; - enum vpx_img_fmt vpx_fmt; + enum aom_img_fmt aom_fmt; int bps; unsigned int bit_depth; }; @@ -60,7 +60,7 @@ struct y4m_input { int y4m_input_open(y4m_input *_y4m, FILE *_fin, char *_skip, int _nskip, int only_420); void y4m_input_close(y4m_input *_y4m); -int y4m_input_fetch_frame(y4m_input *_y4m, FILE *_fin, vpx_image_t *img); +int y4m_input_fetch_frame(y4m_input *_y4m, FILE *_fin, aom_image_t *img); #ifdef __cplusplus } // extern "C"