Change "VPX" to "AOM"
Change-Id: I6593a44de3b571193c2a4c8787ddf3b2fc24a268
diff --git a/CHANGELOG b/CHANGELOG
index 4f233d5..3f44f6c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -20,7 +20,7 @@
- Upgrading:
This release is ABI incompatible with 1.3.0. It drops the compatibility
- layer, requiring VPX_IMG_FMT_* instead of IMG_FMT_*, and adds several codec
+ layer, requiring AOM_IMG_FMT_* instead of IMG_FMT_*, and adds several codec
controls for VP9.
- Enhancements:
@@ -302,7 +302,7 @@
aomdec: test for frame corruption
aomenc: add quantizer histogram display
aomenc: add rate histogram display
- Set VPX_FRAME_IS_DROPPABLE
+ Set AOM_FRAME_IS_DROPPABLE
update configure for ios sdk 4.3
Avoid text relocations in ARM vp8 decoder
Generate a aom.pc file for pkg-config.
diff --git a/aom/aom_codec.h b/aom/aom_codec.h
index 385c590..e1c48ec 100644
--- a/aom/aom_codec.h
+++ b/aom/aom_codec.h
@@ -36,8 +36,8 @@
* Once initialized, the instance is manged using other functions from
* the aom_codec_* family.
*/
-#ifndef VPX_VPX_CODEC_H_
-#define VPX_VPX_CODEC_H_
+#ifndef AOM_AOM_CODEC_H_
+#define AOM_AOM_CODEC_H_
#ifdef __cplusplus
extern "C" {
@@ -84,31 +84,31 @@
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures
*/
-#define VPX_CODEC_ABI_VERSION (3 + VPX_IMAGE_ABI_VERSION) /**<\hideinitializer*/
+#define AOM_CODEC_ABI_VERSION (3 + AOM_IMAGE_ABI_VERSION) /**<\hideinitializer*/
/*!\brief Algorithm return codes */
typedef enum {
/*!\brief Operation completed without error */
- VPX_CODEC_OK,
+ AOM_CODEC_OK,
/*!\brief Unspecified error */
- VPX_CODEC_ERROR,
+ AOM_CODEC_ERROR,
/*!\brief Memory operation failed */
- VPX_CODEC_MEM_ERROR,
+ AOM_CODEC_MEM_ERROR,
/*!\brief ABI version mismatch */
- VPX_CODEC_ABI_MISMATCH,
+ AOM_CODEC_ABI_MISMATCH,
/*!\brief Algorithm does not have required capability */
- VPX_CODEC_INCAPABLE,
+ AOM_CODEC_INCAPABLE,
/*!\brief The given bitstream is not supported.
*
* The bitstream was unable to be parsed at the highest level. The decoder
* is unable to proceed. This error \ref SHOULD be treated as fatal to the
* stream. */
- VPX_CODEC_UNSUP_BITSTREAM,
+ AOM_CODEC_UNSUP_BITSTREAM,
/*!\brief Encoded bitstream uses an unsupported feature
*
@@ -117,7 +117,7 @@
* pictures from being properly decoded. This error \ref MAY be treated as
* fatal to the stream or \ref MAY be treated as fatal to the current GOP.
*/
- VPX_CODEC_UNSUP_FEATURE,
+ AOM_CODEC_UNSUP_FEATURE,
/*!\brief The coded data for this stream is corrupt or incomplete
*
@@ -127,17 +127,17 @@
* stream or \ref MAY be treated as fatal to the current GOP. If decoding
* is continued for the current GOP, artifacts may be present.
*/
- VPX_CODEC_CORRUPT_FRAME,
+ AOM_CODEC_CORRUPT_FRAME,
/*!\brief An application-supplied parameter is not valid.
*
*/
- VPX_CODEC_INVALID_PARAM,
+ AOM_CODEC_INVALID_PARAM,
/*!\brief An iterator reached the end of list.
*
*/
- VPX_CODEC_LIST_END
+ AOM_CODEC_LIST_END
} aom_codec_err_t;
@@ -147,18 +147,18 @@
* ::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.
+ * The available flags are specified by AOM_CODEC_CAP_* defines.
*/
typedef long aom_codec_caps_t;
-#define VPX_CODEC_CAP_DECODER 0x1 /**< Is a decoder */
-#define VPX_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */
+#define AOM_CODEC_CAP_DECODER 0x1 /**< Is a decoder */
+#define AOM_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */
/*! \brief Initialization-time Feature Enabling
*
* Certain codec features must be known at initialization time, to allow for
* proper memory allocation.
*
- * The available flags are specified by VPX_CODEC_USE_* defines.
+ * The available flags are specified by AOM_CODEC_USE_* defines.
*/
typedef long aom_codec_flags_t;
@@ -211,9 +211,9 @@
* This enumeration determines the bit depth of the codec.
*/
typedef enum aom_bit_depth {
- VPX_BITS_8 = 8, /**< 8 bits */
- VPX_BITS_10 = 10, /**< 10 bits */
- VPX_BITS_12 = 12, /**< 12 bits */
+ AOM_BITS_8 = 8, /**< 8 bits */
+ AOM_BITS_10 = 10, /**< 10 bits */
+ AOM_BITS_12 = 12, /**< 12 bits */
} aom_bit_depth_t;
/*
@@ -236,11 +236,11 @@
*
*/
int aom_codec_version(void);
-#define VPX_VERSION_MAJOR(v) \
+#define AOM_VERSION_MAJOR(v) \
((v >> 16) & 0xff) /**< extract major from packed version */
-#define VPX_VERSION_MINOR(v) \
+#define AOM_VERSION_MINOR(v) \
((v >> 8) & 0xff) /**< extract minor from packed version */
-#define VPX_VERSION_PATCH(v) \
+#define AOM_VERSION_PATCH(v) \
((v >> 0) & 0xff) /**< extract patch from packed version */
/*!\brief Return the version major number */
@@ -337,9 +337,9 @@
*
* \param[in] ctx Pointer to this instance's context
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* The codec algorithm initialized.
- * \retval #VPX_CODEC_MEM_ERROR
+ * \retval #AOM_CODEC_MEM_ERROR
* Memory allocation failed.
*/
aom_codec_err_t aom_codec_destroy(aom_codec_ctx_t *ctx);
@@ -361,7 +361,7 @@
*
* This wrapper function dispatches the request to the helper function
* associated with the given ctrl_id. It tries to call this function
- * transparently, but will return #VPX_CODEC_ERROR if the request could not
+ * transparently, but will return #AOM_CODEC_ERROR if the request could not
* be dispatched.
*
* Note that this function should not be used directly. Call the
@@ -370,19 +370,19 @@
* \param[in] ctx Pointer to this instance's context
* \param[in] ctrl_id Algorithm specific control identifier
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* The control request was processed.
- * \retval #VPX_CODEC_ERROR
+ * \retval #AOM_CODEC_ERROR
* The control request was not processed.
- * \retval #VPX_CODEC_INVALID_PARAM
+ * \retval #AOM_CODEC_INVALID_PARAM
* The data was not valid.
*/
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
+#if defined(AOM_DISABLE_CTRL_TYPECHECKS) && AOM_DISABLE_CTRL_TYPECHECKS
#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)
+#define AOM_CTRL_USE_TYPE(id, typ)
+#define AOM_CTRL_USE_TYPE_DEPRECATED(id, typ)
+#define AOM_CTRL_VOID(id, typ)
#else
/*!\brief aom_codec_control wrapper macro
@@ -408,7 +408,7 @@
* the correctly typed arguments as a wrapper to the type-unsafe internal
* function.
*/
-#define VPX_CTRL_USE_TYPE(id, typ) \
+#define AOM_CTRL_USE_TYPE(id, typ) \
static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *, int, typ) \
UNUSED; \
\
@@ -419,7 +419,7 @@
/*!\brief aom_codec_control deprecated type definition macro
*
- * Like #VPX_CTRL_USE_TYPE, but indicates that the specified control is
+ * Like #AOM_CTRL_USE_TYPE, but indicates that the specified control is
* deprecated and should not be used. Consult the documentation for your
* codec for more information.
*
@@ -427,7 +427,7 @@
* It defines a static function with the correctly typed arguments as a
* wrapper to the type-unsafe internal function.
*/
-#define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \
+#define AOM_CTRL_USE_TYPE_DEPRECATED(id, typ) \
DECLSPEC_DEPRECATED static aom_codec_err_t aom_codec_control_##id( \
aom_codec_ctx_t *, int, typ) DEPRECATED UNUSED; \
\
@@ -446,7 +446,7 @@
* It defines a static function without a data argument as a wrapper to the
* type-unsafe internal function.
*/
-#define VPX_CTRL_VOID(id) \
+#define AOM_CTRL_VOID(id) \
static aom_codec_err_t aom_codec_control_##id(aom_codec_ctx_t *, int) \
UNUSED; \
\
@@ -461,4 +461,4 @@
#ifdef __cplusplus
}
#endif
-#endif // VPX_VPX_CODEC_H_
+#endif // AOM_AOM_CODEC_H_
diff --git a/aom/aom_decoder.h b/aom/aom_decoder.h
index d718054..89844aa 100644
--- a/aom/aom_decoder.h
+++ b/aom/aom_decoder.h
@@ -8,8 +8,8 @@
* 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.
*/
-#ifndef VPX_VPX_DECODER_H_
-#define VPX_VPX_DECODER_H_
+#ifndef AOM_AOM_DECODER_H_
+#define AOM_AOM_DECODER_H_
/*!\defgroup decoder Decoder Algorithm Interface
* \ingroup codec
@@ -41,8 +41,8 @@
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures
*/
-#define VPX_DECODER_ABI_VERSION \
- (3 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/
+#define AOM_DECODER_ABI_VERSION \
+ (3 + AOM_CODEC_ABI_VERSION) /**<\hideinitializer*/
/*! \brief Decoder capabilities bitfield
*
@@ -50,14 +50,14 @@
* ::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.
+ * The available flags are specified by AOM_CODEC_CAP_* defines.
*/
-#define VPX_CODEC_CAP_PUT_SLICE 0x10000 /**< Will issue put_slice callbacks */
-#define VPX_CODEC_CAP_PUT_FRAME 0x20000 /**< Will issue put_frame callbacks */
-#define VPX_CODEC_CAP_POSTPROC 0x40000 /**< Can postprocess decoded frame */
-#define VPX_CODEC_CAP_ERROR_CONCEALMENT 0x80000
+#define AOM_CODEC_CAP_PUT_SLICE 0x10000 /**< Will issue put_slice callbacks */
+#define AOM_CODEC_CAP_PUT_FRAME 0x20000 /**< Will issue put_frame callbacks */
+#define AOM_CODEC_CAP_POSTPROC 0x40000 /**< Can postprocess decoded frame */
+#define AOM_CODEC_CAP_ERROR_CONCEALMENT 0x80000
/**< Can conceal errors due to packet loss */
-#define VPX_CODEC_CAP_INPUT_FRAGMENTS 0x100000
+#define AOM_CODEC_CAP_INPUT_FRAGMENTS 0x100000
/**< Can receive encoded frames one fragment at a time */
/*! \brief Initialization-time Feature Enabling
@@ -65,19 +65,19 @@
* Certain codec features must be known at initialization time, to allow for
* proper memory allocation.
*
- * The available flags are specified by VPX_CODEC_USE_* defines.
+ * The available flags are specified by AOM_CODEC_USE_* defines.
*/
-#define VPX_CODEC_CAP_FRAME_THREADING 0x200000
+#define AOM_CODEC_CAP_FRAME_THREADING 0x200000
/**< Can support frame-based multi-threading */
-#define VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER 0x400000
+#define AOM_CODEC_CAP_EXTERNAL_FRAME_BUFFER 0x400000
/**< Can support external frame buffers */
-#define VPX_CODEC_USE_POSTPROC 0x10000 /**< Postprocess decoded frame */
-#define VPX_CODEC_USE_ERROR_CONCEALMENT 0x20000
+#define AOM_CODEC_USE_POSTPROC 0x10000 /**< Postprocess decoded frame */
+#define AOM_CODEC_USE_ERROR_CONCEALMENT 0x20000
/**< Conceal errors in decoded frames */
-#define VPX_CODEC_USE_INPUT_FRAGMENTS 0x40000
+#define AOM_CODEC_USE_INPUT_FRAGMENTS 0x40000
/**< The input frame should be passed to the decoder one fragment at a time */
-#define VPX_CODEC_USE_FRAME_THREADING 0x80000
+#define AOM_CODEC_USE_FRAME_THREADING 0x80000
/**< Enable frame-based multi-threading */
/*!\brief Stream properties
@@ -124,12 +124,12 @@
* \param[in] ctx Pointer to this instance's context.
* \param[in] iface Pointer to the algorithm interface to use.
* \param[in] cfg Configuration to use, if known. May be NULL.
- * \param[in] flags Bitfield of VPX_CODEC_USE_* flags
+ * \param[in] flags Bitfield of AOM_CODEC_USE_* flags
* \param[in] ver ABI version number. Must be set to
- * VPX_DECODER_ABI_VERSION
- * \retval #VPX_CODEC_OK
+ * AOM_DECODER_ABI_VERSION
+ * \retval #AOM_CODEC_OK
* The decoder algorithm initialized.
- * \retval #VPX_CODEC_MEM_ERROR
+ * \retval #AOM_CODEC_MEM_ERROR
* Memory allocation failed.
*/
aom_codec_err_t aom_codec_dec_init_ver(aom_codec_ctx_t *ctx,
@@ -142,7 +142,7 @@
* Ensures the ABI version parameter is properly set.
*/
#define aom_codec_dec_init(ctx, iface, cfg, flags) \
- aom_codec_dec_init_ver(ctx, iface, cfg, flags, VPX_DECODER_ABI_VERSION)
+ aom_codec_dec_init_ver(ctx, iface, cfg, flags, AOM_DECODER_ABI_VERSION)
/*!\brief Parse stream info from a buffer
*
@@ -158,7 +158,7 @@
* clobbered by the algorithm. This parameter \ref MAY
* be NULL.
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* Bitstream is parsable and stream information updated
*/
aom_codec_err_t aom_codec_peek_stream_info(aom_codec_iface_t *iface,
@@ -176,7 +176,7 @@
* clobbered by the algorithm. This parameter \ref MAY
* be NULL.
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* Bitstream is parsable and stream information updated
*/
aom_codec_err_t aom_codec_get_stream_info(aom_codec_ctx_t *ctx,
@@ -189,7 +189,7 @@
* generated, as appropriate. Encoded data \ref MUST be passed in DTS (decode
* time stamp) order. Frames produced will always be in PTS (presentation
* time stamp) order.
- * If the decoder is configured with VPX_CODEC_USE_INPUT_FRAGMENTS enabled,
+ * If the decoder is configured with AOM_CODEC_USE_INPUT_FRAGMENTS enabled,
* data and data_sz can contain a fragment of the encoded frame. Fragment
* \#n must contain at least partition \#n, but can also contain subsequent
* partitions (\#n+1 - \#n+i), and if so, fragments \#n+1, .., \#n+i must
@@ -199,7 +199,7 @@
*
* \param[in] ctx Pointer to this instance's context
* \param[in] data Pointer to this block of new coded data. If
- * NULL, a VPX_CODEC_CB_PUT_FRAME event is posted
+ * NULL, a AOM_CODEC_CB_PUT_FRAME event is posted
* for the previously decoded frame.
* \param[in] data_sz Size of the coded data, in bytes.
* \param[in] user_priv Application specific data to associate with
@@ -207,7 +207,7 @@
* \param[in] deadline Soft deadline the decoder should attempt to meet,
* in us. Set to zero for unlimited.
*
- * \return Returns #VPX_CODEC_OK if the coded data was processed completely
+ * \return Returns #AOM_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 ::aom_codec_err_t
* for recoverability capabilities.
@@ -237,10 +237,10 @@
/*!\defgroup cap_put_frame Frame-Based Decoding Functions
*
* The following functions are required to be implemented for all decoders
- * that advertise the VPX_CODEC_CAP_PUT_FRAME capability. Calling these
+ * that advertise the AOM_CODEC_CAP_PUT_FRAME capability. Calling these
* functions
* for codecs that don't advertise this capability will result in an error
- * code being returned, usually VPX_CODEC_ERROR
+ * code being returned, usually AOM_CODEC_ERROR
* @{
*/
@@ -261,9 +261,9 @@
* \param[in] cb Pointer to the callback function
* \param[in] user_priv User's private data
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* Callback successfully registered.
- * \retval #VPX_CODEC_ERROR
+ * \retval #AOM_CODEC_ERROR
* Decoder context not initialized, or algorithm not capable of
* posting slice completion.
*/
@@ -276,10 +276,10 @@
/*!\defgroup cap_put_slice Slice-Based Decoding Functions
*
* The following functions are required to be implemented for all decoders
- * that advertise the VPX_CODEC_CAP_PUT_SLICE capability. Calling these
+ * that advertise the AOM_CODEC_CAP_PUT_SLICE capability. Calling these
* functions
* for codecs that don't advertise this capability will result in an error
- * code being returned, usually VPX_CODEC_ERROR
+ * code being returned, usually AOM_CODEC_ERROR
* @{
*/
@@ -302,9 +302,9 @@
* \param[in] cb Pointer to the callback function
* \param[in] user_priv User's private data
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* Callback successfully registered.
- * \retval #VPX_CODEC_ERROR
+ * \retval #AOM_CODEC_ERROR
* Decoder context not initialized, or algorithm not capable of
* posting slice completion.
*/
@@ -317,9 +317,9 @@
/*!\defgroup cap_external_frame_buffer External Frame Buffer Functions
*
* The following section is required to be implemented for all decoders
- * that advertise the VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER capability.
+ * that advertise the AOM_CODEC_CAP_EXTERNAL_FRAME_BUFFER capability.
* Calling this function for codecs that don't advertise this capability
- * will result in an error code being returned, usually VPX_CODEC_ERROR.
+ * will result in an error code being returned, usually AOM_CODEC_ERROR.
*
* \note
* Currently this only works with VP9.
@@ -339,17 +339,17 @@
* \param[in] cb_release Pointer to the release callback function
* \param[in] cb_priv Callback's private data
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* External frame buffers will be used by libaom.
- * \retval #VPX_CODEC_INVALID_PARAM
+ * \retval #AOM_CODEC_INVALID_PARAM
* One or more of the callbacks were NULL.
- * \retval #VPX_CODEC_ERROR
+ * \retval #AOM_CODEC_ERROR
* Decoder context not initialized, or algorithm not capable of
* using external frame buffers.
*
* \note
* When decoding VP9, the application may be required to pass in at least
- * #VPX_MAXIMUM_WORK_BUFFERS external frame
+ * #AOM_MAXIMUM_WORK_BUFFERS external frame
* buffers.
*/
aom_codec_err_t aom_codec_set_frame_buffer_functions(
@@ -362,4 +362,4 @@
#ifdef __cplusplus
}
#endif
-#endif // VPX_VPX_DECODER_H_
+#endif // AOM_AOM_DECODER_H_
diff --git a/aom/aom_encoder.h b/aom/aom_encoder.h
index 8b44c4e..3f1101d 100644
--- a/aom/aom_encoder.h
+++ b/aom/aom_encoder.h
@@ -8,8 +8,8 @@
* 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.
*/
-#ifndef VPX_VPX_ENCODER_H_
-#define VPX_VPX_ENCODER_H_
+#ifndef AOM_AOM_ENCODER_H_
+#define AOM_AOM_ENCODER_H_
/*!\defgroup encoder Encoder Algorithm Interface
* \ingroup codec
@@ -35,25 +35,25 @@
/*! Temporal Scalability: Maximum length of the sequence defining frame
* layer membership
*/
-#define VPX_TS_MAX_PERIODICITY 16
+#define AOM_TS_MAX_PERIODICITY 16
/*! Temporal Scalability: Maximum number of coding layers */
-#define VPX_TS_MAX_LAYERS 5
+#define AOM_TS_MAX_LAYERS 5
-/*!\deprecated Use #VPX_TS_MAX_PERIODICITY instead. */
-#define MAX_PERIODICITY VPX_TS_MAX_PERIODICITY
+/*!\deprecated Use #AOM_TS_MAX_PERIODICITY instead. */
+#define MAX_PERIODICITY AOM_TS_MAX_PERIODICITY
/*! Temporal+Spatial Scalability: Maximum number of coding layers */
-#define VPX_MAX_LAYERS 12 // 3 temporal + 4 spatial layers are allowed.
+#define AOM_MAX_LAYERS 12 // 3 temporal + 4 spatial layers are allowed.
-/*!\deprecated Use #VPX_MAX_LAYERS instead. */
-#define MAX_LAYERS VPX_MAX_LAYERS // 3 temporal + 4 spatial layers allowed.
+/*!\deprecated Use #AOM_MAX_LAYERS instead. */
+#define MAX_LAYERS AOM_MAX_LAYERS // 3 temporal + 4 spatial layers allowed.
/*! Spatial Scalability: Maximum number of coding layers */
-#define VPX_SS_MAX_LAYERS 5
+#define AOM_SS_MAX_LAYERS 5
/*! Spatial Scalability: Default number of coding layers */
-#define VPX_SS_DEFAULT_LAYERS 1
+#define AOM_SS_DEFAULT_LAYERS 1
/*!\brief Current ABI version number
*
@@ -63,8 +63,8 @@
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures
*/
-#define VPX_ENCODER_ABI_VERSION \
- (5 + VPX_CODEC_ABI_VERSION) /**<\hideinitializer*/
+#define AOM_ENCODER_ABI_VERSION \
+ (5 + AOM_CODEC_ABI_VERSION) /**<\hideinitializer*/
/*! \brief Encoder capabilities bitfield
*
@@ -73,32 +73,32 @@
* interfaces or functionality, and are not required to be supported
* by an encoder.
*
- * The available flags are specified by VPX_CODEC_CAP_* defines.
+ * The available flags are specified by AOM_CODEC_CAP_* defines.
*/
-#define VPX_CODEC_CAP_PSNR 0x10000 /**< Can issue PSNR packets */
+#define AOM_CODEC_CAP_PSNR 0x10000 /**< Can issue PSNR packets */
/*! Can output one partition at a time. Each partition is returned in its
- * own VPX_CODEC_CX_FRAME_PKT, with the FRAME_IS_FRAGMENT flag set for
+ * own AOM_CODEC_CX_FRAME_PKT, with the FRAME_IS_FRAGMENT flag set for
* every partition but the last. In this mode all frames are always
* returned partition by partition.
*/
-#define VPX_CODEC_CAP_OUTPUT_PARTITION 0x20000
+#define AOM_CODEC_CAP_OUTPUT_PARTITION 0x20000
/*! Can support input images at greater than 8 bitdepth.
*/
-#define VPX_CODEC_CAP_HIGHBITDEPTH 0x40000
+#define AOM_CODEC_CAP_HIGHBITDEPTH 0x40000
/*! \brief Initialization-time Feature Enabling
*
* Certain codec features must be known at initialization time, to allow
* for proper memory allocation.
*
- * The available flags are specified by VPX_CODEC_USE_* defines.
+ * The available flags are specified by AOM_CODEC_USE_* defines.
*/
-#define VPX_CODEC_USE_PSNR 0x10000 /**< Calculate PSNR on each frame */
-#define VPX_CODEC_USE_OUTPUT_PARTITION 0x20000
+#define AOM_CODEC_USE_PSNR 0x10000 /**< Calculate PSNR on each frame */
+#define AOM_CODEC_USE_OUTPUT_PARTITION 0x20000
/**< Make the encoder output one partition at a time. */
-#define VPX_CODEC_USE_HIGHBITDEPTH 0x40000 /**< Use high bitdepth */
+#define AOM_CODEC_USE_HIGHBITDEPTH 0x40000 /**< Use high bitdepth */
/*!\brief Generic fixed size buffer structure
*
@@ -124,13 +124,13 @@
* support frame types that are codec specific (MPEG-1 D-frames for example)
*/
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
+#define AOM_FRAME_IS_KEY 0x1 /**< frame is the start of a GOP */
+#define AOM_FRAME_IS_DROPPABLE 0x2
/**< frame can be dropped without affecting the stream (no future frame depends
* on this one) */
-#define VPX_FRAME_IS_INVISIBLE 0x4
+#define AOM_FRAME_IS_INVISIBLE 0x4
/**< frame should be decoded but will not be shown */
-#define VPX_FRAME_IS_FRAGMENT 0x8
+#define AOM_FRAME_IS_FRAGMENT 0x8
/**< this is a fragment of the encoded frame */
/*!\brief Error Resilient flags
@@ -140,9 +140,9 @@
* aom_codec_enc_cfg::g_error_resilient variable.
*/
typedef uint32_t aom_codec_er_flags_t;
-#define VPX_ERROR_RESILIENT_DEFAULT 0x1
+#define AOM_ERROR_RESILIENT_DEFAULT 0x1
/**< Improve resiliency against losses of whole frames */
-#define VPX_ERROR_RESILIENT_PARTITIONS 0x2
+#define AOM_ERROR_RESILIENT_PARTITIONS 0x2
/**< The frame partitions are independently decodable by the bool decoder,
* meaning that partitions can be decoded even though earlier partitions have
* been lost. Note that intra prediction is still done over the partition
@@ -155,17 +155,17 @@
* extend this list to provide additional functionality.
*/
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 */
- VPX_CODEC_PSNR_PKT, /**< PSNR statistics for this frame */
+ AOM_CODEC_CX_FRAME_PKT, /**< Compressed video frame */
+ AOM_CODEC_STATS_PKT, /**< Two-pass statistics for this frame */
+ AOM_CODEC_FPMB_STATS_PKT, /**< first pass mb statistics for this frame */
+ AOM_CODEC_PSNR_PKT, /**< PSNR statistics for this frame */
// Spatial SVC is still experimental and may be removed before the next ABI
// bump.
-#if VPX_ENCODER_ABI_VERSION > (5 + VPX_CODEC_ABI_VERSION)
- VPX_CODEC_SPATIAL_SVC_LAYER_SIZES, /**< Sizes for each layer in this frame*/
- VPX_CODEC_SPATIAL_SVC_LAYER_PSNR, /**< PSNR for each layer in this frame*/
+#if AOM_ENCODER_ABI_VERSION > (5 + AOM_CODEC_ABI_VERSION)
+ AOM_CODEC_SPATIAL_SVC_LAYER_SIZES, /**< Sizes for each layer in this frame*/
+ AOM_CODEC_SPATIAL_SVC_LAYER_PSNR, /**< PSNR for each layer in this frame*/
#endif
- VPX_CODEC_CUSTOM_PKT = 256 /**< Algorithm extensions */
+ AOM_CODEC_CUSTOM_PKT = 256 /**< Algorithm extensions */
};
/*!\brief Encoder output packet
@@ -201,9 +201,9 @@
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 aom_psnr_pkt layer_psnr[VPX_SS_MAX_LAYERS];
+#if AOM_ENCODER_ABI_VERSION > (5 + AOM_CODEC_ABI_VERSION)
+ size_t layer_sizes[AOM_SS_MAX_LAYERS];
+ struct aom_psnr_pkt layer_psnr[AOM_SS_MAX_LAYERS];
#endif
/* This packet size is fixed to allow codecs to extend this
@@ -242,42 +242,42 @@
/*!\brief Multi-pass Encoding 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 */
+ AOM_RC_ONE_PASS, /**< Single pass mode */
+ AOM_RC_FIRST_PASS, /**< First pass of multi-pass mode */
+ AOM_RC_LAST_PASS /**< Final pass of multi-pass mode */
};
/*!\brief Rate control 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 */
- VPX_Q, /**< Constant Quality (Q) mode */
+ AOM_VBR, /**< Variable Bit Rate (VBR) mode */
+ AOM_CBR, /**< Constant Bit Rate (CBR) mode */
+ AOM_CQ, /**< Constrained Quality (CQ) mode */
+ AOM_Q, /**< Constant Quality (Q) mode */
};
/*!\brief Keyframe placement mode.
*
* This enumeration determines whether keyframes are placed automatically by
* the encoder or whether this behavior is disabled. Older releases of this
- * SDK were implemented such that VPX_KF_FIXED meant keyframes were disabled.
+ * SDK were implemented such that AOM_KF_FIXED meant keyframes were disabled.
* This name is confusing for this behavior, so the new symbols to be used
- * are VPX_KF_AUTO and VPX_KF_DISABLED.
+ * are AOM_KF_AUTO and AOM_KF_DISABLED.
*/
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. */
+ AOM_KF_FIXED, /**< deprecated, implies AOM_KF_DISABLED */
+ AOM_KF_AUTO, /**< Encoder determines optimal placement automatically */
+ AOM_KF_DISABLED = 0 /**< Encoder does not place keyframes. */
};
/*!\brief Encoded Frame Flags
*
* 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
+ * named AOM_EFLAG_*, and bits specific to an algorithm will be named
* /algo/_eflag_*. The lower order 16 bits are reserved for common use.
*/
typedef long aom_enc_frame_flags_t;
-#define VPX_EFLAG_FORCE_KF (1 << 0) /**< Force this frame to be a keyframe */
+#define AOM_EFLAG_FORCE_KF (1 << 0) /**< Force this frame to be a keyframe */
/*!\brief Encoder configuration structure
*
@@ -376,7 +376,7 @@
/*!\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.
+ * For single pass, set to #AOM_RC_ONE_PASS.
*/
enum aom_enc_pass g_pass;
@@ -644,14 +644,14 @@
* These values specify if auto alt reference frame is enabled for each
* spatial layer.
*/
- int ss_enable_auto_alt_ref[VPX_SS_MAX_LAYERS];
+ int ss_enable_auto_alt_ref[AOM_SS_MAX_LAYERS];
/*!\brief Target bitrate for each spatial layer.
*
* These values specify the target coding bitrate to be used for each
* spatial layer.
*/
- unsigned int ss_target_bitrate[VPX_SS_MAX_LAYERS];
+ unsigned int ss_target_bitrate[AOM_SS_MAX_LAYERS];
/*!\brief Number of temporal coding layers.
*
@@ -664,14 +664,14 @@
* These values specify the target coding bitrate to be used for each
* temporal layer.
*/
- unsigned int ts_target_bitrate[VPX_TS_MAX_LAYERS];
+ unsigned int ts_target_bitrate[AOM_TS_MAX_LAYERS];
/*!\brief Frame rate decimation factor for each temporal layer.
*
* These values specify the frame rate decimation factors to apply
* to each temporal layer.
*/
- unsigned int ts_rate_decimator[VPX_TS_MAX_LAYERS];
+ unsigned int ts_rate_decimator[AOM_TS_MAX_LAYERS];
/*!\brief Length of the sequence defining frame temporal layer membership.
*
@@ -689,7 +689,7 @@
* layer (0) and odd numbered frames to a second temporal layer (1) with
* ts_periodicity=8, then ts_layer_id = (0,1,0,1,0,1,0,1).
*/
- unsigned int ts_layer_id[VPX_TS_MAX_PERIODICITY];
+ unsigned int ts_layer_id[AOM_TS_MAX_PERIODICITY];
/*!\brief Target bitrate for each spatial/temporal layer.
*
@@ -697,7 +697,7 @@
* spatial/temporal layer.
*
*/
- unsigned int layer_target_bitrate[VPX_MAX_LAYERS];
+ unsigned int layer_target_bitrate[AOM_MAX_LAYERS];
/*!\brief Temporal layering mode indicating which temporal layering scheme to
* use.
@@ -715,10 +715,10 @@
*
*/
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 max_quantizers[AOM_MAX_LAYERS]; /**< Max Q for each layer */
+ int min_quantizers[AOM_MAX_LAYERS]; /**< Min Q for each layer */
+ int scaling_factor_num[AOM_MAX_LAYERS]; /**< Scaling factor-numerator */
+ int scaling_factor_den[AOM_MAX_LAYERS]; /**< Scaling factor-denominator */
int temporal_layering_mode; /**< Temporal layering mode */
} aom_svc_extra_cfg_t;
@@ -736,12 +736,12 @@
* \param[in] ctx Pointer to this instance's context.
* \param[in] iface Pointer to the algorithm interface to use.
* \param[in] cfg Configuration to use, if known. May be NULL.
- * \param[in] flags Bitfield of VPX_CODEC_USE_* flags
+ * \param[in] flags Bitfield of AOM_CODEC_USE_* flags
* \param[in] ver ABI version number. Must be set to
- * VPX_ENCODER_ABI_VERSION
- * \retval #VPX_CODEC_OK
+ * AOM_ENCODER_ABI_VERSION
+ * \retval #AOM_CODEC_OK
* The decoder algorithm initialized.
- * \retval #VPX_CODEC_MEM_ERROR
+ * \retval #AOM_CODEC_MEM_ERROR
* Memory allocation failed.
*/
aom_codec_err_t aom_codec_enc_init_ver(aom_codec_ctx_t *ctx,
@@ -754,7 +754,7 @@
* Ensures the ABI version parameter is properly set.
*/
#define aom_codec_enc_init(ctx, iface, cfg, flags) \
- aom_codec_enc_init_ver(ctx, iface, cfg, flags, VPX_ENCODER_ABI_VERSION)
+ aom_codec_enc_init_ver(ctx, iface, cfg, flags, AOM_ENCODER_ABI_VERSION)
/*!\brief Initialize multi-encoder instance
*
@@ -767,13 +767,13 @@
* \param[in] iface Pointer to the algorithm interface to use.
* \param[in] cfg Configuration to use, if known. May be NULL.
* \param[in] num_enc Total number of encoders.
- * \param[in] flags Bitfield of VPX_CODEC_USE_* flags
+ * \param[in] flags Bitfield of AOM_CODEC_USE_* flags
* \param[in] dsf Pointer to down-sampling factors.
* \param[in] ver ABI version number. Must be set to
- * VPX_ENCODER_ABI_VERSION
- * \retval #VPX_CODEC_OK
+ * AOM_ENCODER_ABI_VERSION
+ * \retval #AOM_CODEC_OK
* The decoder algorithm initialized.
- * \retval #VPX_CODEC_MEM_ERROR
+ * \retval #AOM_CODEC_MEM_ERROR
* Memory allocation failed.
*/
aom_codec_err_t aom_codec_enc_init_multi_ver(
@@ -786,7 +786,7 @@
*/
#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)
+ AOM_ENCODER_ABI_VERSION)
/*!\brief Get a default configuration
*
@@ -800,11 +800,11 @@
* \param[out] cfg Configuration buffer to populate.
* \param[in] reserved Must set to 0 for VP8 and VP9.
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* The configuration was populated.
- * \retval #VPX_CODEC_INCAPABLE
+ * \retval #AOM_CODEC_INCAPABLE
* Interface is not an encoder interface.
- * \retval #VPX_CODEC_INVALID_PARAM
+ * \retval #AOM_CODEC_INVALID_PARAM
* A parameter was NULL, or the usage value was not recognized.
*/
aom_codec_err_t aom_codec_enc_config_default(aom_codec_iface_t *iface,
@@ -818,11 +818,11 @@
* \param[in] ctx Pointer to this instance's context
* \param[in] cfg Configuration buffer to use
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* The configuration was populated.
- * \retval #VPX_CODEC_INCAPABLE
+ * \retval #AOM_CODEC_INCAPABLE
* Interface is not an encoder interface.
- * \retval #VPX_CODEC_INVALID_PARAM
+ * \retval #AOM_CODEC_INVALID_PARAM
* A parameter was NULL, or the usage value was not recognized.
*/
aom_codec_err_t aom_codec_enc_config_set(aom_codec_ctx_t *ctx,
@@ -841,11 +841,11 @@
*/
aom_fixed_buf_t *aom_codec_get_global_headers(aom_codec_ctx_t *ctx);
-#define VPX_DL_REALTIME (1)
+#define AOM_DL_REALTIME (1)
/**< deadline parameter analogous to VPx REALTIME mode. */
-#define VPX_DL_GOOD_QUALITY (1000000)
+#define AOM_DL_GOOD_QUALITY (1000000)
/**< deadline parameter analogous to VPx GOOD QUALITY mode. */
-#define VPX_DL_BEST_QUALITY (0)
+#define AOM_DL_BEST_QUALITY (0)
/**< deadline parameter analogous to VPx BEST QUALITY mode. */
/*!\brief Encode a frame
*
@@ -860,8 +860,8 @@
* best possible frame by specifying a deadline of '0'. This deadline
* supercedes the VPx notion of "best quality, good quality, realtime".
* Applications that wish to map these former settings to the new deadline
- * based system can use the symbols #VPX_DL_REALTIME, #VPX_DL_GOOD_QUALITY,
- * and #VPX_DL_BEST_QUALITY.
+ * based system can use the symbols #AOM_DL_REALTIME, #AOM_DL_GOOD_QUALITY,
+ * and #AOM_DL_BEST_QUALITY.
*
* 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
@@ -876,11 +876,11 @@
* \param[in] flags Flags to use for encoding this frame.
* \param[in] deadline Time to spend encoding, in microseconds. (0=infinite)
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* The configuration was populated.
- * \retval #VPX_CODEC_INCAPABLE
+ * \retval #AOM_CODEC_INCAPABLE
* Interface is not an encoder interface.
- * \retval #VPX_CODEC_INVALID_PARAM
+ * \retval #AOM_CODEC_INVALID_PARAM
* A parameter was NULL, the image format is unsupported, etc.
*/
aom_codec_err_t aom_codec_encode(aom_codec_ctx_t *ctx, const aom_image_t *img,
@@ -892,7 +892,7 @@
*
* Sets the buffer that the codec should output the compressed data
* into. This call effectively sets the buffer pointer returned in the
- * next VPX_CODEC_CX_FRAME_PKT packet. Subsequent packets will be
+ * next AOM_CODEC_CX_FRAME_PKT packet. Subsequent packets will be
* appended into this buffer. The buffer is preserved across frames,
* so applications must periodically call this function after flushing
* the accumulated compressed data to disk or to the network to reset
@@ -926,9 +926,9 @@
* \param[in] pad_before Bytes to skip before writing compressed data
* \param[in] pad_after Bytes to skip after writing compressed data
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* The buffer was set successfully.
- * \retval #VPX_CODEC_INVALID_PARAM
+ * \retval #AOM_CODEC_INVALID_PARAM
* A parameter was NULL, the image format is unsupported, etc.
*/
aom_codec_err_t aom_codec_set_cx_data_buf(aom_codec_ctx_t *ctx,
@@ -942,9 +942,9 @@
* application. The different kinds of packets available are enumerated in
* #aom_codec_cx_pkt_kind.
*
- * #VPX_CODEC_CX_FRAME_PKT packets should be passed to the application's
+ * #AOM_CODEC_CX_FRAME_PKT packets should be passed to the application's
* muxer. Multiple compressed frames may be in the list.
- * #VPX_CODEC_STATS_PKT packets should be appended to a global buffer.
+ * #AOM_CODEC_STATS_PKT packets should be appended to a global buffer.
*
* The application \ref MUST silently ignore any packet kinds that it does
* not recognize or support.
@@ -980,4 +980,4 @@
#ifdef __cplusplus
}
#endif
-#endif // VPX_VPX_ENCODER_H_
+#endif // AOM_AOM_ENCODER_H_
diff --git a/aom/aom_frame_buffer.h b/aom/aom_frame_buffer.h
index ce4d64a..6c0cc93 100644
--- a/aom/aom_frame_buffer.h
+++ b/aom/aom_frame_buffer.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_VPX_FRAME_BUFFER_H_
-#define VPX_VPX_FRAME_BUFFER_H_
+#ifndef AOM_AOM_FRAME_BUFFER_H_
+#define AOM_AOM_FRAME_BUFFER_H_
/*!\file
* \brief Describes the decoder external frame buffer interface.
@@ -27,11 +27,11 @@
* Each thread will use one work buffer.
* TODO(hkuang): Add support to set number of worker threads dynamically.
*/
-#define VPX_MAXIMUM_WORK_BUFFERS 8
+#define AOM_MAXIMUM_WORK_BUFFERS 8
/*!\brief The maximum number of reference buffers that a VP9 encoder may use.
*/
-#define VPX_MAXIMUM_REF_BUFFERS 8
+#define AOM_MAXIMUM_REF_BUFFERS 8
/*!\brief External frame buffer
*
@@ -81,4 +81,4 @@
} // extern "C"
#endif
-#endif // VPX_VPX_FRAME_BUFFER_H_
+#endif // AOM_AOM_FRAME_BUFFER_H_
diff --git a/aom/aom_image.h b/aom/aom_image.h
index 16c1c30..1a3d111 100644
--- a/aom/aom_image.h
+++ b/aom/aom_image.h
@@ -13,8 +13,8 @@
* \brief Describes the aom image descriptor and associated operations
*
*/
-#ifndef VPX_VPX_IMAGE_H_
-#define VPX_VPX_IMAGE_H_
+#ifndef AOM_AOM_IMAGE_H_
+#define AOM_AOM_IMAGE_H_
#ifdef __cplusplus
extern "C" {
@@ -28,61 +28,61 @@
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures
*/
-#define VPX_IMAGE_ABI_VERSION (4) /**<\hideinitializer*/
+#define AOM_IMAGE_ABI_VERSION (4) /**<\hideinitializer*/
-#define VPX_IMG_FMT_PLANAR 0x100 /**< Image is a planar format. */
-#define VPX_IMG_FMT_UV_FLIP 0x200 /**< V plane precedes U in memory. */
-#define VPX_IMG_FMT_HAS_ALPHA 0x400 /**< Image has an alpha channel. */
-#define VPX_IMG_FMT_HIGHBITDEPTH 0x800 /**< Image uses 16bit framebuffer. */
+#define AOM_IMG_FMT_PLANAR 0x100 /**< Image is a planar format. */
+#define AOM_IMG_FMT_UV_FLIP 0x200 /**< V plane precedes U in memory. */
+#define AOM_IMG_FMT_HAS_ALPHA 0x400 /**< Image has an alpha channel. */
+#define AOM_IMG_FMT_HIGHBITDEPTH 0x800 /**< Image uses 16bit framebuffer. */
/*!\brief List of supported image formats */
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 */
- VPX_IMG_FMT_RGB565, /**< 16 bit per pixel, 565 */
- VPX_IMG_FMT_RGB555, /**< 16 bit per pixel, 555 */
- VPX_IMG_FMT_UYVY, /**< UYVY packed YUV */
- VPX_IMG_FMT_YUY2, /**< YUYV packed YUV */
- VPX_IMG_FMT_YVYU, /**< YVYU packed YUV */
- VPX_IMG_FMT_BGR24, /**< 24 bit per pixel packed BGR */
- VPX_IMG_FMT_RGB32_LE, /**< 32 bit packed BGR0 */
- VPX_IMG_FMT_ARGB, /**< 32 bit packed ARGB, alpha=255 */
- VPX_IMG_FMT_ARGB_LE, /**< 32 bit packed BGRA, alpha=255 */
- VPX_IMG_FMT_RGB565_LE, /**< 16 bit per pixel, gggbbbbb rrrrrggg */
- VPX_IMG_FMT_RGB555_LE, /**< 16 bit per pixel, gggbbbbb 0rrrrrgg */
- VPX_IMG_FMT_YV12 =
- 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 |
+ AOM_IMG_FMT_NONE,
+ AOM_IMG_FMT_RGB24, /**< 24 bit per pixel packed RGB */
+ AOM_IMG_FMT_RGB32, /**< 32 bit per pixel packed 0RGB */
+ AOM_IMG_FMT_RGB565, /**< 16 bit per pixel, 565 */
+ AOM_IMG_FMT_RGB555, /**< 16 bit per pixel, 555 */
+ AOM_IMG_FMT_UYVY, /**< UYVY packed YUV */
+ AOM_IMG_FMT_YUY2, /**< YUYV packed YUV */
+ AOM_IMG_FMT_YVYU, /**< YVYU packed YUV */
+ AOM_IMG_FMT_BGR24, /**< 24 bit per pixel packed BGR */
+ AOM_IMG_FMT_RGB32_LE, /**< 32 bit packed BGR0 */
+ AOM_IMG_FMT_ARGB, /**< 32 bit packed ARGB, alpha=255 */
+ AOM_IMG_FMT_ARGB_LE, /**< 32 bit packed BGRA, alpha=255 */
+ AOM_IMG_FMT_RGB565_LE, /**< 16 bit per pixel, gggbbbbb rrrrrggg */
+ AOM_IMG_FMT_RGB555_LE, /**< 16 bit per pixel, gggbbbbb 0rrrrrgg */
+ AOM_IMG_FMT_YV12 =
+ AOM_IMG_FMT_PLANAR | AOM_IMG_FMT_UV_FLIP | 1, /**< planar YVU */
+ AOM_IMG_FMT_I420 = AOM_IMG_FMT_PLANAR | 2,
+ AOM_IMG_FMT_AOMYV12 = AOM_IMG_FMT_PLANAR | AOM_IMG_FMT_UV_FLIP |
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,
- VPX_IMG_FMT_I440 = VPX_IMG_FMT_PLANAR | 7,
- VPX_IMG_FMT_444A = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_HAS_ALPHA | 6,
- VPX_IMG_FMT_I42016 = VPX_IMG_FMT_I420 | VPX_IMG_FMT_HIGHBITDEPTH,
- 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
+ AOM_IMG_FMT_AOMI420 = AOM_IMG_FMT_PLANAR | 4,
+ AOM_IMG_FMT_I422 = AOM_IMG_FMT_PLANAR | 5,
+ AOM_IMG_FMT_I444 = AOM_IMG_FMT_PLANAR | 6,
+ AOM_IMG_FMT_I440 = AOM_IMG_FMT_PLANAR | 7,
+ AOM_IMG_FMT_444A = AOM_IMG_FMT_PLANAR | AOM_IMG_FMT_HAS_ALPHA | 6,
+ AOM_IMG_FMT_I42016 = AOM_IMG_FMT_I420 | AOM_IMG_FMT_HIGHBITDEPTH,
+ AOM_IMG_FMT_I42216 = AOM_IMG_FMT_I422 | AOM_IMG_FMT_HIGHBITDEPTH,
+ AOM_IMG_FMT_I44416 = AOM_IMG_FMT_I444 | AOM_IMG_FMT_HIGHBITDEPTH,
+ AOM_IMG_FMT_I44016 = AOM_IMG_FMT_I440 | AOM_IMG_FMT_HIGHBITDEPTH
} aom_img_fmt_t; /**< alias for enum aom_img_fmt */
/*!\brief List of supported color spaces */
typedef enum aom_color_space {
- VPX_CS_UNKNOWN = 0, /**< Unknown */
- VPX_CS_BT_601 = 1, /**< BT.601 */
- VPX_CS_BT_709 = 2, /**< BT.709 */
- VPX_CS_SMPTE_170 = 3, /**< SMPTE.170 */
- VPX_CS_SMPTE_240 = 4, /**< SMPTE.240 */
- VPX_CS_BT_2020 = 5, /**< BT.2020 */
- VPX_CS_RESERVED = 6, /**< Reserved */
- VPX_CS_SRGB = 7 /**< sRGB */
+ AOM_CS_UNKNOWN = 0, /**< Unknown */
+ AOM_CS_BT_601 = 1, /**< BT.601 */
+ AOM_CS_BT_709 = 2, /**< BT.709 */
+ AOM_CS_SMPTE_170 = 3, /**< SMPTE.170 */
+ AOM_CS_SMPTE_240 = 4, /**< SMPTE.240 */
+ AOM_CS_BT_2020 = 5, /**< BT.2020 */
+ AOM_CS_RESERVED = 6, /**< Reserved */
+ AOM_CS_SRGB = 7 /**< sRGB */
} aom_color_space_t; /**< alias for enum aom_color_space */
/*!\brief List of supported 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] */
+ AOM_CR_STUDIO_RANGE = 0, /**< Y [16..235], UV [16..240] */
+ AOM_CR_FULL_RANGE = 1 /**< YUV/RGB [0..255] */
} aom_color_range_t; /**< alias for enum aom_color_range */
/**\brief Image Descriptor */
@@ -109,11 +109,11 @@
unsigned int y_chroma_shift; /**< subsampling order, Y */
/* Image data pointers. */
-#define VPX_PLANE_PACKED 0 /**< To be used for all packed formats */
-#define VPX_PLANE_Y 0 /**< Y (Luminance) plane */
-#define VPX_PLANE_U 1 /**< U (Chroma) plane */
-#define VPX_PLANE_V 2 /**< V (Chroma) plane */
-#define VPX_PLANE_ALPHA 3 /**< A (Transparency) plane */
+#define AOM_PLANE_PACKED 0 /**< To be used for all packed formats */
+#define AOM_PLANE_Y 0 /**< Y (Luminance) plane */
+#define AOM_PLANE_U 1 /**< U (Chroma) plane */
+#define AOM_PLANE_V 2 /**< V (Chroma) plane */
+#define AOM_PLANE_ALPHA 3 /**< A (Transparency) plane */
unsigned char *planes[4]; /**< pointer to the top left pixel for each plane */
int stride[4]; /**< stride between rows for each plane */
@@ -223,4 +223,4 @@
} // extern "C"
#endif
-#endif // VPX_VPX_IMAGE_H_
+#endif // AOM_AOM_IMAGE_H_
diff --git a/aom/aom_integer.h b/aom/aom_integer.h
index c5070af..0ae1d8f 100644
--- a/aom/aom_integer.h
+++ b/aom/aom_integer.h
@@ -9,22 +9,22 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_VPX_INTEGER_H_
-#define VPX_VPX_INTEGER_H_
+#ifndef AOM_AOM_INTEGER_H_
+#define AOM_AOM_INTEGER_H_
/* get ptrdiff_t, size_t, wchar_t, NULL */
#include <stddef.h>
#if defined(_MSC_VER)
-#define VPX_FORCE_INLINE __forceinline
-#define VPX_INLINE __inline
+#define AOM_FORCE_INLINE __forceinline
+#define AOM_INLINE __inline
#else
-#define VPX_FORCE_INLINE __inline__ __attribute__(always_inline)
+#define AOM_FORCE_INLINE __inline__ __attribute__(always_inline)
// TODO(jbb): Allow a way to force inline off for older compilers.
-#define VPX_INLINE inline
+#define AOM_INLINE inline
#endif
-#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(VPX_EMULATE_INTTYPES)
+#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || defined(AOM_EMULATE_INTTYPES)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
@@ -71,4 +71,4 @@
#include <inttypes.h>
#endif
-#endif // VPX_VPX_INTEGER_H_
+#endif // AOM_AOM_INTEGER_H_
diff --git a/aom/internal/aom_codec_internal.h b/aom/internal/aom_codec_internal.h
index 5744088..456d202 100644
--- a/aom/internal/aom_codec_internal.h
+++ b/aom/internal/aom_codec_internal.h
@@ -22,7 +22,7 @@
* my_codec.c:
* aom_codec_iface_t my_codec = {
* "My Codec v1.0",
- * VPX_CODEC_ALG_ABI_VERSION,
+ * AOM_CODEC_ALG_ABI_VERSION,
* ...
* };
* </pre>
@@ -41,8 +41,8 @@
* Once initialized, the instance is manged using other functions from
* the aom_codec_* family.
*/
-#ifndef VPX_INTERNAL_VPX_CODEC_INTERNAL_H_
-#define VPX_INTERNAL_VPX_CODEC_INTERNAL_H_
+#ifndef AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
+#define AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
#include "../aom_decoder.h"
#include "../aom_encoder.h"
#include <stdarg.h>
@@ -59,7 +59,7 @@
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures
*/
-#define VPX_CODEC_INTERNAL_ABI_VERSION (5) /**<\hideinitializer*/
+#define AOM_CODEC_INTERNAL_ABI_VERSION (5) /**<\hideinitializer*/
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;
@@ -72,9 +72,9 @@
* properly initialized.
*
* \param[in] ctx Pointer to this instance's context
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* The input stream was recognized and decoder initialized.
- * \retval #VPX_CODEC_MEM_ERROR
+ * \retval #AOM_CODEC_MEM_ERROR
* Memory operation failed.
*/
typedef aom_codec_err_t (*aom_codec_init_fn_t)(
@@ -88,9 +88,9 @@
* to be properly initialized.
*
* \param[in] ctx Pointer to this instance's context
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* The input stream was recognized and decoder initialized.
- * \retval #VPX_CODEC_MEM_ERROR
+ * \retval #AOM_CODEC_MEM_ERROR
* Memory operation failed.
*/
typedef aom_codec_err_t (*aom_codec_destroy_fn_t)(aom_codec_alg_priv_t *ctx);
@@ -109,7 +109,7 @@
* clobbered by the algorithm. This parameter \ref MAY
* be NULL.
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* Bitstream is parsable and stream information updated
*/
typedef aom_codec_err_t (*aom_codec_peek_si_fn_t)(const uint8_t *data,
@@ -126,7 +126,7 @@
* clobbered by the algorithm. This parameter \ref MAY
* be NULL.
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* Bitstream is parsable and stream information updated
*/
typedef aom_codec_err_t (*aom_codec_get_si_fn_t)(aom_codec_alg_priv_t *ctx,
@@ -151,7 +151,7 @@
* \param[in] ctrl_id Algorithm specific control identifier
* \param[in,out] data Data to exchange with algorithm instance.
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* The internal state data was deserialized.
*/
typedef aom_codec_err_t (*aom_codec_control_fn_t)(aom_codec_alg_priv_t *ctx,
@@ -176,19 +176,19 @@
/*!\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
+ * decoded frame becoming available, #AOM_CODEC_CB_PUT_SLICE and
+ * #AOM_CODEC_CB_PUT_FRAME events are generated as appropriate. This
* 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.
*
* \param[in] ctx Pointer to this instance's context
* \param[in] data Pointer to this block of new coded data. If
- * NULL, a #VPX_CODEC_CB_PUT_FRAME event is posted
+ * NULL, a #AOM_CODEC_CB_PUT_FRAME event is posted
* for the previously decoded frame.
* \param[in] data_sz Size of the coded data, in bytes.
*
- * \return Returns #VPX_CODEC_OK if the coded data was processed completely
+ * \return Returns #AOM_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 ::aom_codec_err_t
* for recoverability capabilities.
@@ -231,17 +231,17 @@
* \param[in] cb_release Pointer to the release callback function
* \param[in] cb_priv Callback's private data
*
- * \retval #VPX_CODEC_OK
+ * \retval #AOM_CODEC_OK
* External frame buffers will be used by libaom.
- * \retval #VPX_CODEC_INVALID_PARAM
+ * \retval #AOM_CODEC_INVALID_PARAM
* One or more of the callbacks were NULL.
- * \retval #VPX_CODEC_ERROR
+ * \retval #AOM_CODEC_ERROR
* Decoder context not initialized, or algorithm not capable of
* using external frame buffers.
*
* \note
* When decoding VP9, the application may be required to pass in at least
- * #VPX_MAXIMUM_WORK_BUFFERS external frame
+ * #AOM_MAXIMUM_WORK_BUFFERS external frame
* buffers.
*/
typedef aom_codec_err_t (*aom_codec_set_fb_fn_t)(
@@ -363,13 +363,13 @@
void *mr_low_res_mode_info;
};
-#undef VPX_CTRL_USE_TYPE
-#define VPX_CTRL_USE_TYPE(id, typ) \
- static VPX_INLINE typ id##__value(va_list args) { return va_arg(args, typ); }
+#undef AOM_CTRL_USE_TYPE
+#define AOM_CTRL_USE_TYPE(id, typ) \
+ static AOM_INLINE typ id##__value(va_list args) { return va_arg(args, typ); }
-#undef VPX_CTRL_USE_TYPE_DEPRECATED
-#define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \
- static VPX_INLINE typ id##__value(va_list args) { return va_arg(args, typ); }
+#undef AOM_CTRL_USE_TYPE_DEPRECATED
+#define AOM_CTRL_USE_TYPE_DEPRECATED(id, typ) \
+ static AOM_INLINE typ id##__value(va_list args) { return va_arg(args, typ); }
#define CAST(id, arg) id##__value(arg)
@@ -443,4 +443,4 @@
} // extern "C"
#endif
-#endif // VPX_INTERNAL_VPX_CODEC_INTERNAL_H_
+#endif // AOM_INTERNAL_AOM_CODEC_INTERNAL_H_
diff --git a/aom/internal/aom_psnr.h b/aom/internal/aom_psnr.h
index b42b55d..df959c3 100644
--- a/aom/internal/aom_psnr.h
+++ b/aom/internal/aom_psnr.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_INTERNAL_VPX_PSNR_H_
-#define VPX_INTERNAL_VPX_PSNR_H_
+#ifndef AOM_INTERNAL_AOM_PSNR_H_
+#define AOM_INTERNAL_AOM_PSNR_H_
#ifdef __cplusplus
extern "C" {
@@ -32,4 +32,4 @@
} // extern "C"
#endif
-#endif // VPX_INTERNAL_VPX_PSNR_H_
+#endif // AOM_INTERNAL_AOM_PSNR_H_
diff --git a/aom/src/aom_codec.c b/aom/src/aom_codec.c
index 119bd1d..48168b7 100644
--- a/aom/src/aom_codec.c
+++ b/aom/src/aom_codec.c
@@ -33,19 +33,19 @@
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";
- case VPX_CODEC_MEM_ERROR: return "Memory allocation error";
- case VPX_CODEC_ABI_MISMATCH: return "ABI version mismatch";
- case VPX_CODEC_INCAPABLE:
+ case AOM_CODEC_OK: return "Success";
+ case AOM_CODEC_ERROR: return "Unspecified internal error";
+ case AOM_CODEC_MEM_ERROR: return "Memory allocation error";
+ case AOM_CODEC_ABI_MISMATCH: return "ABI version mismatch";
+ case AOM_CODEC_INCAPABLE:
return "Codec does not implement requested capability";
- case VPX_CODEC_UNSUP_BITSTREAM:
+ case AOM_CODEC_UNSUP_BITSTREAM:
return "Bitstream not supported by this decoder";
- case VPX_CODEC_UNSUP_FEATURE:
+ case AOM_CODEC_UNSUP_FEATURE:
return "Bitstream required feature not supported by this decoder";
- case VPX_CODEC_CORRUPT_FRAME: return "Corrupt frame detected";
- case VPX_CODEC_INVALID_PARAM: return "Invalid parameter";
- case VPX_CODEC_LIST_END: return "End of iterated list";
+ case AOM_CODEC_CORRUPT_FRAME: return "Corrupt frame detected";
+ case AOM_CODEC_INVALID_PARAM: return "Invalid parameter";
+ case AOM_CODEC_LIST_END: return "End of iterated list";
}
return "Unrecognized error code";
@@ -53,7 +53,7 @@
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);
+ : aom_codec_err_to_string(AOM_CODEC_INVALID_PARAM);
}
const char *aom_codec_error_detail(aom_codec_ctx_t *ctx) {
@@ -67,16 +67,16 @@
aom_codec_err_t res;
if (!ctx)
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv)
- res = VPX_CODEC_ERROR;
+ res = AOM_CODEC_ERROR;
else {
ctx->iface->destroy((aom_codec_alg_priv_t *)ctx->priv);
ctx->iface = NULL;
ctx->name = NULL;
ctx->priv = NULL;
- res = VPX_CODEC_OK;
+ res = AOM_CODEC_OK;
}
return SAVE_STATUS(ctx, res);
@@ -90,13 +90,13 @@
aom_codec_err_t res;
if (!ctx || !ctrl_id)
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv || !ctx->iface->ctrl_maps)
- res = VPX_CODEC_ERROR;
+ res = AOM_CODEC_ERROR;
else {
aom_codec_ctrl_fn_map_t *entry;
- res = VPX_CODEC_ERROR;
+ res = AOM_CODEC_ERROR;
for (entry = ctx->iface->ctrl_maps; entry && entry->fn; entry++) {
if (!entry->ctrl_id || entry->ctrl_id == ctrl_id) {
diff --git a/aom/src/aom_decoder.c b/aom/src/aom_decoder.c
index 8356ee9..c6cec6d 100644
--- a/aom/src/aom_decoder.c
+++ b/aom/src/aom_decoder.c
@@ -28,23 +28,23 @@
aom_codec_flags_t flags, int ver) {
aom_codec_err_t res;
- if (ver != VPX_DECODER_ABI_VERSION)
- res = VPX_CODEC_ABI_MISMATCH;
+ if (ver != AOM_DECODER_ABI_VERSION)
+ res = AOM_CODEC_ABI_MISMATCH;
else if (!ctx || !iface)
- res = VPX_CODEC_INVALID_PARAM;
- else if (iface->abi_version != VPX_CODEC_INTERNAL_ABI_VERSION)
- res = VPX_CODEC_ABI_MISMATCH;
- else if ((flags & VPX_CODEC_USE_POSTPROC) &&
- !(iface->caps & VPX_CODEC_CAP_POSTPROC))
- res = VPX_CODEC_INCAPABLE;
- else if ((flags & VPX_CODEC_USE_ERROR_CONCEALMENT) &&
- !(iface->caps & VPX_CODEC_CAP_ERROR_CONCEALMENT))
- res = VPX_CODEC_INCAPABLE;
- else if ((flags & VPX_CODEC_USE_INPUT_FRAGMENTS) &&
- !(iface->caps & VPX_CODEC_CAP_INPUT_FRAGMENTS))
- res = VPX_CODEC_INCAPABLE;
- else if (!(iface->caps & VPX_CODEC_CAP_DECODER))
- res = VPX_CODEC_INCAPABLE;
+ res = AOM_CODEC_INVALID_PARAM;
+ else if (iface->abi_version != AOM_CODEC_INTERNAL_ABI_VERSION)
+ res = AOM_CODEC_ABI_MISMATCH;
+ else if ((flags & AOM_CODEC_USE_POSTPROC) &&
+ !(iface->caps & AOM_CODEC_CAP_POSTPROC))
+ res = AOM_CODEC_INCAPABLE;
+ else if ((flags & AOM_CODEC_USE_ERROR_CONCEALMENT) &&
+ !(iface->caps & AOM_CODEC_CAP_ERROR_CONCEALMENT))
+ res = AOM_CODEC_INCAPABLE;
+ else if ((flags & AOM_CODEC_USE_INPUT_FRAGMENTS) &&
+ !(iface->caps & AOM_CODEC_CAP_INPUT_FRAGMENTS))
+ res = AOM_CODEC_INCAPABLE;
+ else if (!(iface->caps & AOM_CODEC_CAP_DECODER))
+ res = AOM_CODEC_INCAPABLE;
else {
memset(ctx, 0, sizeof(*ctx));
ctx->iface = iface;
@@ -71,7 +71,7 @@
if (!iface || !data || !data_sz || !si ||
si->sz < sizeof(aom_codec_stream_info_t))
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
else {
/* Set default/unknown values */
si->w = 0;
@@ -88,9 +88,9 @@
aom_codec_err_t res;
if (!ctx || !si || si->sz < sizeof(aom_codec_stream_info_t))
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv)
- res = VPX_CODEC_ERROR;
+ res = AOM_CODEC_ERROR;
else {
/* Set default/unknown values */
si->w = 0;
@@ -110,9 +110,9 @@
/* Sanity checks */
/* NULL data ptr allowed if data_sz is 0 too */
if (!ctx || (!data && data_sz) || (data && !data_sz))
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv)
- res = VPX_CODEC_ERROR;
+ res = AOM_CODEC_ERROR;
else {
res = ctx->iface->dec.decode(get_alg_priv(ctx), data, data_sz, user_priv,
deadline);
@@ -138,14 +138,14 @@
aom_codec_err_t res;
if (!ctx || !cb)
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv ||
- !(ctx->iface->caps & VPX_CODEC_CAP_PUT_FRAME))
- res = VPX_CODEC_ERROR;
+ !(ctx->iface->caps & AOM_CODEC_CAP_PUT_FRAME))
+ res = AOM_CODEC_ERROR;
else {
ctx->priv->dec.put_frame_cb.u.put_frame = cb;
ctx->priv->dec.put_frame_cb.user_priv = user_priv;
- res = VPX_CODEC_OK;
+ res = AOM_CODEC_OK;
}
return SAVE_STATUS(ctx, res);
@@ -157,14 +157,14 @@
aom_codec_err_t res;
if (!ctx || !cb)
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv ||
- !(ctx->iface->caps & VPX_CODEC_CAP_PUT_SLICE))
- res = VPX_CODEC_ERROR;
+ !(ctx->iface->caps & AOM_CODEC_CAP_PUT_SLICE))
+ res = AOM_CODEC_ERROR;
else {
ctx->priv->dec.put_slice_cb.u.put_slice = cb;
ctx->priv->dec.put_slice_cb.user_priv = user_priv;
- res = VPX_CODEC_OK;
+ res = AOM_CODEC_OK;
}
return SAVE_STATUS(ctx, res);
@@ -176,10 +176,10 @@
aom_codec_err_t res;
if (!ctx || !cb_get || !cb_release) {
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
} else if (!ctx->iface || !ctx->priv ||
- !(ctx->iface->caps & VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER)) {
- res = VPX_CODEC_ERROR;
+ !(ctx->iface->caps & AOM_CODEC_CAP_EXTERNAL_FRAME_BUFFER)) {
+ res = AOM_CODEC_ERROR;
} else {
res = ctx->iface->dec.set_fb_fn(get_alg_priv(ctx), cb_get, cb_release,
cb_priv);
diff --git a/aom/src/aom_encoder.c b/aom/src/aom_encoder.c
index 5ac56cc..41c70ef 100644
--- a/aom/src/aom_encoder.c
+++ b/aom/src/aom_encoder.c
@@ -30,19 +30,19 @@
aom_codec_flags_t flags, int ver) {
aom_codec_err_t res;
- if (ver != VPX_ENCODER_ABI_VERSION)
- res = VPX_CODEC_ABI_MISMATCH;
+ if (ver != AOM_ENCODER_ABI_VERSION)
+ res = AOM_CODEC_ABI_MISMATCH;
else if (!ctx || !iface || !cfg)
- res = VPX_CODEC_INVALID_PARAM;
- else if (iface->abi_version != VPX_CODEC_INTERNAL_ABI_VERSION)
- res = VPX_CODEC_ABI_MISMATCH;
- else if (!(iface->caps & VPX_CODEC_CAP_ENCODER))
- res = VPX_CODEC_INCAPABLE;
- else if ((flags & VPX_CODEC_USE_PSNR) && !(iface->caps & VPX_CODEC_CAP_PSNR))
- res = VPX_CODEC_INCAPABLE;
- else if ((flags & VPX_CODEC_USE_OUTPUT_PARTITION) &&
- !(iface->caps & VPX_CODEC_CAP_OUTPUT_PARTITION))
- res = VPX_CODEC_INCAPABLE;
+ res = AOM_CODEC_INVALID_PARAM;
+ else if (iface->abi_version != AOM_CODEC_INTERNAL_ABI_VERSION)
+ res = AOM_CODEC_ABI_MISMATCH;
+ else if (!(iface->caps & AOM_CODEC_CAP_ENCODER))
+ res = AOM_CODEC_INCAPABLE;
+ else if ((flags & AOM_CODEC_USE_PSNR) && !(iface->caps & AOM_CODEC_CAP_PSNR))
+ res = AOM_CODEC_INCAPABLE;
+ else if ((flags & AOM_CODEC_USE_OUTPUT_PARTITION) &&
+ !(iface->caps & AOM_CODEC_CAP_OUTPUT_PARTITION))
+ res = AOM_CODEC_INCAPABLE;
else {
ctx->iface = iface;
ctx->name = iface->name;
@@ -63,21 +63,21 @@
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;
+ aom_codec_err_t res = AOM_CODEC_OK;
- if (ver != VPX_ENCODER_ABI_VERSION)
- res = VPX_CODEC_ABI_MISMATCH;
+ if (ver != AOM_ENCODER_ABI_VERSION)
+ res = AOM_CODEC_ABI_MISMATCH;
else if (!ctx || !iface || !cfg || (num_enc > 16 || num_enc < 1))
- res = VPX_CODEC_INVALID_PARAM;
- else if (iface->abi_version != VPX_CODEC_INTERNAL_ABI_VERSION)
- res = VPX_CODEC_ABI_MISMATCH;
- else if (!(iface->caps & VPX_CODEC_CAP_ENCODER))
- res = VPX_CODEC_INCAPABLE;
- else if ((flags & VPX_CODEC_USE_PSNR) && !(iface->caps & VPX_CODEC_CAP_PSNR))
- res = VPX_CODEC_INCAPABLE;
- else if ((flags & VPX_CODEC_USE_OUTPUT_PARTITION) &&
- !(iface->caps & VPX_CODEC_CAP_OUTPUT_PARTITION))
- res = VPX_CODEC_INCAPABLE;
+ res = AOM_CODEC_INVALID_PARAM;
+ else if (iface->abi_version != AOM_CODEC_INTERNAL_ABI_VERSION)
+ res = AOM_CODEC_ABI_MISMATCH;
+ else if (!(iface->caps & AOM_CODEC_CAP_ENCODER))
+ res = AOM_CODEC_INCAPABLE;
+ else if ((flags & AOM_CODEC_USE_PSNR) && !(iface->caps & AOM_CODEC_CAP_PSNR))
+ res = AOM_CODEC_INCAPABLE;
+ else if ((flags & AOM_CODEC_USE_OUTPUT_PARTITION) &&
+ !(iface->caps & AOM_CODEC_CAP_OUTPUT_PARTITION))
+ res = AOM_CODEC_INCAPABLE;
else {
int i;
void *mem_loc = NULL;
@@ -89,7 +89,7 @@
/* Validate down-sampling factor. */
if (dsf->num < 1 || dsf->num > 4096 || dsf->den < 1 ||
dsf->den > dsf->num) {
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
break;
}
@@ -103,7 +103,7 @@
* resolution always use the same frame_type chosen by the
* lowest-resolution encoder.
*/
- if (mr_cfg.mr_encoder_id) cfg->kf_mode = VPX_KF_DISABLED;
+ if (mr_cfg.mr_encoder_id) cfg->kf_mode = AOM_KF_DISABLED;
ctx->iface = iface;
ctx->name = iface->name;
@@ -148,18 +148,18 @@
int i;
if (!iface || !cfg || usage > INT_MAX)
- res = VPX_CODEC_INVALID_PARAM;
- else if (!(iface->caps & VPX_CODEC_CAP_ENCODER))
- res = VPX_CODEC_INCAPABLE;
+ res = AOM_CODEC_INVALID_PARAM;
+ else if (!(iface->caps & AOM_CODEC_CAP_ENCODER))
+ res = AOM_CODEC_INCAPABLE;
else {
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
for (i = 0; i < iface->enc.cfg_map_count; ++i) {
map = iface->enc.cfg_maps + i;
if (map->usage == (int)usage) {
*cfg = map->cfg;
cfg->g_usage = usage;
- res = VPX_CODEC_OK;
+ res = AOM_CODEC_OK;
break;
}
}
@@ -190,14 +190,14 @@
aom_codec_pts_t pts, unsigned long duration,
aom_enc_frame_flags_t flags,
unsigned long deadline) {
- aom_codec_err_t res = VPX_CODEC_OK;
+ aom_codec_err_t res = AOM_CODEC_OK;
if (!ctx || (img && !duration))
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv)
- res = VPX_CODEC_ERROR;
- else if (!(ctx->iface->caps & VPX_CODEC_CAP_ENCODER))
- res = VPX_CODEC_INCAPABLE;
+ res = AOM_CODEC_ERROR;
+ else if (!(ctx->iface->caps & AOM_CODEC_CAP_ENCODER))
+ res = AOM_CODEC_INCAPABLE;
else {
unsigned int num_enc = ctx->priv->enc.total_encoders;
@@ -243,16 +243,16 @@
if (ctx) {
if (!iter)
- ctx->err = VPX_CODEC_INVALID_PARAM;
+ ctx->err = AOM_CODEC_INVALID_PARAM;
else if (!ctx->iface || !ctx->priv)
- ctx->err = VPX_CODEC_ERROR;
- else if (!(ctx->iface->caps & VPX_CODEC_CAP_ENCODER))
- ctx->err = VPX_CODEC_INCAPABLE;
+ ctx->err = AOM_CODEC_ERROR;
+ else if (!(ctx->iface->caps & AOM_CODEC_CAP_ENCODER))
+ ctx->err = AOM_CODEC_INCAPABLE;
else
pkt = ctx->iface->enc.get_cx_data(get_alg_priv(ctx), iter);
}
- if (pkt && pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
+ if (pkt && pkt->kind == AOM_CODEC_CX_FRAME_PKT) {
// 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.
@@ -287,7 +287,7 @@
const aom_fixed_buf_t *buf,
unsigned int pad_before,
unsigned int pad_after) {
- if (!ctx || !ctx->priv) return VPX_CODEC_INVALID_PARAM;
+ if (!ctx || !ctx->priv) return AOM_CODEC_INVALID_PARAM;
if (buf) {
ctx->priv->enc.cx_data_dst_buf = *buf;
@@ -300,7 +300,7 @@
ctx->priv->enc.cx_data_pad_after = 0;
}
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
const aom_image_t *aom_codec_get_preview_frame(aom_codec_ctx_t *ctx) {
@@ -308,11 +308,11 @@
if (ctx) {
if (!ctx->iface || !ctx->priv)
- ctx->err = VPX_CODEC_ERROR;
- else if (!(ctx->iface->caps & VPX_CODEC_CAP_ENCODER))
- ctx->err = VPX_CODEC_INCAPABLE;
+ ctx->err = AOM_CODEC_ERROR;
+ else if (!(ctx->iface->caps & AOM_CODEC_CAP_ENCODER))
+ ctx->err = AOM_CODEC_INCAPABLE;
else if (!ctx->iface->enc.get_preview)
- ctx->err = VPX_CODEC_INCAPABLE;
+ ctx->err = AOM_CODEC_INCAPABLE;
else
img = ctx->iface->enc.get_preview(get_alg_priv(ctx));
}
@@ -325,11 +325,11 @@
if (ctx) {
if (!ctx->iface || !ctx->priv)
- ctx->err = VPX_CODEC_ERROR;
- else if (!(ctx->iface->caps & VPX_CODEC_CAP_ENCODER))
- ctx->err = VPX_CODEC_INCAPABLE;
+ ctx->err = AOM_CODEC_ERROR;
+ else if (!(ctx->iface->caps & AOM_CODEC_CAP_ENCODER))
+ ctx->err = AOM_CODEC_INCAPABLE;
else if (!ctx->iface->enc.get_glob_hdrs)
- ctx->err = VPX_CODEC_INCAPABLE;
+ ctx->err = AOM_CODEC_INCAPABLE;
else
buf = ctx->iface->enc.get_glob_hdrs(get_alg_priv(ctx));
}
@@ -342,9 +342,9 @@
aom_codec_err_t res;
if (!ctx || !ctx->iface || !ctx->priv || !cfg)
- res = VPX_CODEC_INVALID_PARAM;
- else if (!(ctx->iface->caps & VPX_CODEC_CAP_ENCODER))
- res = VPX_CODEC_INCAPABLE;
+ res = AOM_CODEC_INVALID_PARAM;
+ else if (!(ctx->iface->caps & AOM_CODEC_CAP_ENCODER))
+ res = AOM_CODEC_INCAPABLE;
else
res = ctx->iface->enc.cfg_set(get_alg_priv(ctx), cfg);
diff --git a/aom/src/aom_image.c b/aom/src/aom_image.c
index 5ef51d1..0d54fd4 100644
--- a/aom/src/aom_image.c
+++ b/aom/src/aom_image.c
@@ -39,53 +39,53 @@
/* Get sample size for this format */
switch (fmt) {
- case VPX_IMG_FMT_RGB32:
- case VPX_IMG_FMT_RGB32_LE:
- case VPX_IMG_FMT_ARGB:
- case VPX_IMG_FMT_ARGB_LE: bps = 32; break;
- case VPX_IMG_FMT_RGB24:
- case VPX_IMG_FMT_BGR24: bps = 24; break;
- case VPX_IMG_FMT_RGB565:
- case VPX_IMG_FMT_RGB565_LE:
- case VPX_IMG_FMT_RGB555:
- case VPX_IMG_FMT_RGB555_LE:
- case VPX_IMG_FMT_UYVY:
- case VPX_IMG_FMT_YUY2:
- case VPX_IMG_FMT_YVYU: bps = 16; break;
- case VPX_IMG_FMT_I420:
- case VPX_IMG_FMT_YV12:
- case VPX_IMG_FMT_VPXI420:
- case VPX_IMG_FMT_VPXYV12: bps = 12; break;
- case VPX_IMG_FMT_I422:
- case VPX_IMG_FMT_I440: bps = 16; break;
- case VPX_IMG_FMT_I444: bps = 24; break;
- case VPX_IMG_FMT_I42016: bps = 24; break;
- case VPX_IMG_FMT_I42216:
- case VPX_IMG_FMT_I44016: bps = 32; break;
- case VPX_IMG_FMT_I44416: bps = 48; break;
+ case AOM_IMG_FMT_RGB32:
+ case AOM_IMG_FMT_RGB32_LE:
+ case AOM_IMG_FMT_ARGB:
+ case AOM_IMG_FMT_ARGB_LE: bps = 32; break;
+ case AOM_IMG_FMT_RGB24:
+ case AOM_IMG_FMT_BGR24: bps = 24; break;
+ case AOM_IMG_FMT_RGB565:
+ case AOM_IMG_FMT_RGB565_LE:
+ case AOM_IMG_FMT_RGB555:
+ case AOM_IMG_FMT_RGB555_LE:
+ case AOM_IMG_FMT_UYVY:
+ case AOM_IMG_FMT_YUY2:
+ case AOM_IMG_FMT_YVYU: bps = 16; break;
+ case AOM_IMG_FMT_I420:
+ case AOM_IMG_FMT_YV12:
+ case AOM_IMG_FMT_AOMI420:
+ case AOM_IMG_FMT_AOMYV12: bps = 12; break;
+ case AOM_IMG_FMT_I422:
+ case AOM_IMG_FMT_I440: bps = 16; break;
+ case AOM_IMG_FMT_I444: bps = 24; break;
+ case AOM_IMG_FMT_I42016: bps = 24; break;
+ case AOM_IMG_FMT_I42216:
+ case AOM_IMG_FMT_I44016: bps = 32; break;
+ case AOM_IMG_FMT_I44416: bps = 48; break;
default: bps = 16; break;
}
/* Get chroma shift values for this format */
switch (fmt) {
- case VPX_IMG_FMT_I420:
- case VPX_IMG_FMT_YV12:
- case VPX_IMG_FMT_VPXI420:
- case VPX_IMG_FMT_VPXYV12:
- case VPX_IMG_FMT_I422:
- case VPX_IMG_FMT_I42016:
- case VPX_IMG_FMT_I42216: xcs = 1; break;
+ case AOM_IMG_FMT_I420:
+ case AOM_IMG_FMT_YV12:
+ case AOM_IMG_FMT_AOMI420:
+ case AOM_IMG_FMT_AOMYV12:
+ case AOM_IMG_FMT_I422:
+ case AOM_IMG_FMT_I42016:
+ case AOM_IMG_FMT_I42216: xcs = 1; break;
default: xcs = 0; break;
}
switch (fmt) {
- case VPX_IMG_FMT_I420:
- case VPX_IMG_FMT_I440:
- case VPX_IMG_FMT_YV12:
- case VPX_IMG_FMT_VPXI420:
- case VPX_IMG_FMT_VPXYV12:
- case VPX_IMG_FMT_I42016:
- case VPX_IMG_FMT_I44016: ycs = 1; break;
+ case AOM_IMG_FMT_I420:
+ case AOM_IMG_FMT_I440:
+ case AOM_IMG_FMT_YV12:
+ case AOM_IMG_FMT_AOMI420:
+ case AOM_IMG_FMT_AOMYV12:
+ case AOM_IMG_FMT_I42016:
+ case AOM_IMG_FMT_I44016: ycs = 1; break;
default: ycs = 0; break;
}
@@ -94,9 +94,9 @@
w = (d_w + align) & ~align;
align = (1 << ycs) - 1;
h = (d_h + align) & ~align;
- s = (fmt & VPX_IMG_FMT_PLANAR) ? w : bps * w / 8;
+ s = (fmt & AOM_IMG_FMT_PLANAR) ? w : bps * w / 8;
s = (s + stride_align - 1) & ~(stride_align - 1);
- stride_in_bytes = (fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? s * 2 : s;
+ stride_in_bytes = (fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? s * 2 : s;
/* Allocate the new image */
if (!img) {
@@ -112,7 +112,7 @@
img->img_data = img_data;
if (!img_data) {
- const uint64_t alloc_size = (fmt & VPX_IMG_FMT_PLANAR)
+ const uint64_t alloc_size = (fmt & AOM_IMG_FMT_PLANAR)
? (uint64_t)h * s * bps / 8
: (uint64_t)h * s;
@@ -125,7 +125,7 @@
if (!img->img_data) goto fail;
img->fmt = fmt;
- img->bit_depth = (fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 16 : 8;
+ img->bit_depth = (fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 16 : 8;
img->w = w;
img->h = h;
img->x_chroma_shift = xcs;
@@ -133,8 +133,8 @@
img->bps = bps;
/* Calculate strides */
- img->stride[VPX_PLANE_Y] = img->stride[VPX_PLANE_ALPHA] = stride_in_bytes;
- img->stride[VPX_PLANE_U] = img->stride[VPX_PLANE_V] = stride_in_bytes >> xcs;
+ img->stride[AOM_PLANE_Y] = img->stride[AOM_PLANE_ALPHA] = stride_in_bytes;
+ img->stride[AOM_PLANE_U] = img->stride[AOM_PLANE_V] = stride_in_bytes >> xcs;
/* Default viewport to entire image */
if (!aom_img_set_rect(img, 0, 0, d_w, d_h)) return img;
@@ -167,40 +167,40 @@
img->d_h = h;
/* Calculate plane pointers */
- if (!(img->fmt & VPX_IMG_FMT_PLANAR)) {
- img->planes[VPX_PLANE_PACKED] =
- img->img_data + x * img->bps / 8 + y * img->stride[VPX_PLANE_PACKED];
+ if (!(img->fmt & AOM_IMG_FMT_PLANAR)) {
+ img->planes[AOM_PLANE_PACKED] =
+ img->img_data + x * img->bps / 8 + y * img->stride[AOM_PLANE_PACKED];
} else {
const int bytes_per_sample =
- (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1;
+ (img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 2 : 1;
data = img->img_data;
- if (img->fmt & VPX_IMG_FMT_HAS_ALPHA) {
- img->planes[VPX_PLANE_ALPHA] =
- data + x * bytes_per_sample + y * img->stride[VPX_PLANE_ALPHA];
- data += img->h * img->stride[VPX_PLANE_ALPHA];
+ if (img->fmt & AOM_IMG_FMT_HAS_ALPHA) {
+ img->planes[AOM_PLANE_ALPHA] =
+ data + x * bytes_per_sample + y * img->stride[AOM_PLANE_ALPHA];
+ data += img->h * img->stride[AOM_PLANE_ALPHA];
}
- img->planes[VPX_PLANE_Y] =
- data + x * bytes_per_sample + y * img->stride[VPX_PLANE_Y];
- data += img->h * img->stride[VPX_PLANE_Y];
+ img->planes[AOM_PLANE_Y] =
+ data + x * bytes_per_sample + y * img->stride[AOM_PLANE_Y];
+ data += img->h * img->stride[AOM_PLANE_Y];
- if (!(img->fmt & VPX_IMG_FMT_UV_FLIP)) {
- img->planes[VPX_PLANE_U] =
+ if (!(img->fmt & AOM_IMG_FMT_UV_FLIP)) {
+ img->planes[AOM_PLANE_U] =
data + (x >> img->x_chroma_shift) * bytes_per_sample +
- (y >> img->y_chroma_shift) * img->stride[VPX_PLANE_U];
- data += (img->h >> img->y_chroma_shift) * img->stride[VPX_PLANE_U];
- img->planes[VPX_PLANE_V] =
+ (y >> img->y_chroma_shift) * img->stride[AOM_PLANE_U];
+ data += (img->h >> img->y_chroma_shift) * img->stride[AOM_PLANE_U];
+ img->planes[AOM_PLANE_V] =
data + (x >> img->x_chroma_shift) * bytes_per_sample +
- (y >> img->y_chroma_shift) * img->stride[VPX_PLANE_V];
+ (y >> img->y_chroma_shift) * img->stride[AOM_PLANE_V];
} else {
- img->planes[VPX_PLANE_V] =
+ img->planes[AOM_PLANE_V] =
data + (x >> img->x_chroma_shift) * bytes_per_sample +
- (y >> img->y_chroma_shift) * img->stride[VPX_PLANE_V];
- data += (img->h >> img->y_chroma_shift) * img->stride[VPX_PLANE_V];
- img->planes[VPX_PLANE_U] =
+ (y >> img->y_chroma_shift) * img->stride[AOM_PLANE_V];
+ data += (img->h >> img->y_chroma_shift) * img->stride[AOM_PLANE_V];
+ img->planes[AOM_PLANE_U] =
data + (x >> img->x_chroma_shift) * bytes_per_sample +
- (y >> img->y_chroma_shift) * img->stride[VPX_PLANE_U];
+ (y >> img->y_chroma_shift) * img->stride[AOM_PLANE_U];
}
}
return 0;
@@ -215,20 +215,20 @@
* stride parameter will be promoted to unsigned, causing errors when
* the lhs is a larger type than the rhs.
*/
- img->planes[VPX_PLANE_Y] += (signed)(img->d_h - 1) * img->stride[VPX_PLANE_Y];
- img->stride[VPX_PLANE_Y] = -img->stride[VPX_PLANE_Y];
+ img->planes[AOM_PLANE_Y] += (signed)(img->d_h - 1) * img->stride[AOM_PLANE_Y];
+ img->stride[AOM_PLANE_Y] = -img->stride[AOM_PLANE_Y];
- img->planes[VPX_PLANE_U] += (signed)((img->d_h >> img->y_chroma_shift) - 1) *
- img->stride[VPX_PLANE_U];
- img->stride[VPX_PLANE_U] = -img->stride[VPX_PLANE_U];
+ img->planes[AOM_PLANE_U] += (signed)((img->d_h >> img->y_chroma_shift) - 1) *
+ img->stride[AOM_PLANE_U];
+ img->stride[AOM_PLANE_U] = -img->stride[AOM_PLANE_U];
- img->planes[VPX_PLANE_V] += (signed)((img->d_h >> img->y_chroma_shift) - 1) *
- img->stride[VPX_PLANE_V];
- img->stride[VPX_PLANE_V] = -img->stride[VPX_PLANE_V];
+ img->planes[AOM_PLANE_V] += (signed)((img->d_h >> img->y_chroma_shift) - 1) *
+ img->stride[AOM_PLANE_V];
+ img->stride[AOM_PLANE_V] = -img->stride[AOM_PLANE_V];
- img->planes[VPX_PLANE_ALPHA] +=
- (signed)(img->d_h - 1) * img->stride[VPX_PLANE_ALPHA];
- img->stride[VPX_PLANE_ALPHA] = -img->stride[VPX_PLANE_ALPHA];
+ img->planes[AOM_PLANE_ALPHA] +=
+ (signed)(img->d_h - 1) * img->stride[AOM_PLANE_ALPHA];
+ img->stride[AOM_PLANE_ALPHA] = -img->stride[AOM_PLANE_ALPHA];
}
void aom_img_free(aom_image_t *img) {
diff --git a/aom/src/svc_encodeframe.c b/aom/src/svc_encodeframe.c
index 0d2637a..7fed908 100644
--- a/aom/src/svc_encodeframe.c
+++ b/aom/src/svc_encodeframe.c
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define VPX_DISABLE_CTRL_TYPECHECKS 1
+#define AOM_DISABLE_CTRL_TYPECHECKS 1
#include "./aom_config.h"
#include "aom/svc_context.h"
#include "aom/vp8cx.h"
@@ -48,10 +48,10 @@
#define MAX_QUANTIZER 63
-static const int DEFAULT_SCALE_FACTORS_NUM[VPX_SS_MAX_LAYERS] = { 4, 5, 7, 11,
+static const int DEFAULT_SCALE_FACTORS_NUM[AOM_SS_MAX_LAYERS] = { 4, 5, 7, 11,
16 };
-static const int DEFAULT_SCALE_FACTORS_DEN[VPX_SS_MAX_LAYERS] = { 16, 16, 16,
+static const int DEFAULT_SCALE_FACTORS_DEN[AOM_SS_MAX_LAYERS] = { 16, 16, 16,
16, 16 };
typedef enum {
@@ -129,7 +129,7 @@
int *value0, int *value1) {
if (type == SCALE_FACTOR) {
*value0 = strtol(input, &input, 10);
- if (*input++ != '/') return VPX_CODEC_INVALID_PARAM;
+ if (*input++ != '/') return AOM_CODEC_INVALID_PARAM;
*value1 = strtol(input, &input, 10);
if (*value0 < option_min_values[SCALE_FACTOR] ||
@@ -137,13 +137,13 @@
*value0 > option_max_values[SCALE_FACTOR] ||
*value1 > option_max_values[SCALE_FACTOR] ||
*value0 > *value1) // num shouldn't be greater than den
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
} else {
*value0 = atoi(input);
if (*value0 < option_min_values[type] || *value0 > option_max_values[type])
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static aom_codec_err_t parse_layer_options_from_string(SvcContext *svc_ctx,
@@ -152,7 +152,7 @@
int *option0,
int *option1) {
int i;
- aom_codec_err_t res = VPX_CODEC_OK;
+ aom_codec_err_t res = AOM_CODEC_OK;
char *input_string;
char *token;
const char *delim = ",";
@@ -160,25 +160,25 @@
if (input == NULL || option0 == NULL ||
(option1 == NULL && type == SCALE_FACTOR))
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
input_string = strdup(input);
token = strtok_r(input_string, delim, &save_ptr);
for (i = 0; i < svc_ctx->spatial_layers; ++i) {
if (token != NULL) {
res = extract_option(type, token, option0 + i, option1 + i);
- if (res != VPX_CODEC_OK) break;
+ if (res != AOM_CODEC_OK) break;
token = strtok_r(NULL, delim, &save_ptr);
} else {
break;
}
}
- if (res == VPX_CODEC_OK && i != svc_ctx->spatial_layers) {
+ if (res == AOM_CODEC_OK && i != svc_ctx->spatial_layers) {
svc_log(svc_ctx, SVC_LOG_ERROR,
"svc: layer params type: %d %d values required, "
"but only %d specified\n",
type, svc_ctx->spatial_layers, i);
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
}
free(input_string);
return res;
@@ -197,10 +197,10 @@
char *option_value;
char *input_ptr;
SvcInternal_t *const si = get_svc_internal(svc_ctx);
- aom_codec_err_t res = VPX_CODEC_OK;
+ aom_codec_err_t res = AOM_CODEC_OK;
int i, alt_ref_enabled = 0;
- if (options == NULL) return VPX_CODEC_OK;
+ if (options == NULL) return AOM_CODEC_OK;
input_string = strdup(options);
// parse option name
@@ -211,7 +211,7 @@
if (option_value == NULL) {
svc_log(svc_ctx, SVC_LOG_ERROR, "option missing value: %s\n",
option_name);
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
break;
}
if (strcmp("spatial-layers", option_name) == 0) {
@@ -222,30 +222,30 @@
res = parse_layer_options_from_string(svc_ctx, SCALE_FACTOR, option_value,
si->svc_params.scaling_factor_num,
si->svc_params.scaling_factor_den);
- if (res != VPX_CODEC_OK) break;
+ if (res != AOM_CODEC_OK) break;
} else if (strcmp("max-quantizers", option_name) == 0) {
res =
parse_layer_options_from_string(svc_ctx, QUANTIZER, option_value,
si->svc_params.max_quantizers, NULL);
- if (res != VPX_CODEC_OK) break;
+ if (res != AOM_CODEC_OK) break;
} else if (strcmp("min-quantizers", option_name) == 0) {
res =
parse_layer_options_from_string(svc_ctx, QUANTIZER, option_value,
si->svc_params.min_quantizers, NULL);
- if (res != VPX_CODEC_OK) break;
+ if (res != AOM_CODEC_OK) break;
} else if (strcmp("auto-alt-refs", option_name) == 0) {
res = parse_layer_options_from_string(svc_ctx, AUTO_ALT_REF, option_value,
si->enable_auto_alt_ref, NULL);
- if (res != VPX_CODEC_OK) break;
+ if (res != AOM_CODEC_OK) break;
} else if (strcmp("bitrates", option_name) == 0) {
res = parse_layer_options_from_string(svc_ctx, BITRATE, option_value,
si->bitrates, NULL);
- if (res != VPX_CODEC_OK) break;
+ if (res != AOM_CODEC_OK) break;
} else if (strcmp("multi-frame-contexts", option_name) == 0) {
si->use_multiple_frame_contexts = atoi(option_value);
} else {
svc_log(svc_ctx, SVC_LOG_ERROR, "invalid option: %s\n", option_name);
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
break;
}
option_name = strtok_r(NULL, "=", &input_ptr);
@@ -257,13 +257,13 @@
si->svc_params.max_quantizers[i] < 0 ||
si->svc_params.min_quantizers[i] > si->svc_params.max_quantizers[i] ||
si->svc_params.min_quantizers[i] < 0)
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
}
if (si->use_multiple_frame_contexts &&
(svc_ctx->spatial_layers > 3 ||
svc_ctx->spatial_layers * svc_ctx->temporal_layers > 4))
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
for (i = 0; i < svc_ctx->spatial_layers; ++i)
alt_ref_enabled += si->enable_auto_alt_ref[i];
@@ -272,7 +272,7 @@
"svc: auto alt ref: Maxinum %d(REF_FRAMES - layers) layers could"
"enabled auto alt reference frame, but % layers are enabled\n",
REF_FRAMES - svc_ctx->spatial_layers, alt_ref_enabled);
- res = VPX_CODEC_INVALID_PARAM;
+ res = AOM_CODEC_INVALID_PARAM;
}
return res;
@@ -281,11 +281,11 @@
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;
+ return AOM_CODEC_INVALID_PARAM;
}
strncpy(si->options, options, sizeof(si->options));
si->options[sizeof(si->options) - 1] = '\0';
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
void assign_layer_bitrates(const SvcContext *svc_ctx,
@@ -308,7 +308,7 @@
}
} else {
float total = 0;
- float alloc_ratio[VPX_MAX_LAYERS] = { 0 };
+ float alloc_ratio[AOM_MAX_LAYERS] = { 0 };
for (sl = 0; sl < svc_ctx->spatial_layers; ++sl) {
if (si->svc_params.scaling_factor_den[sl] > 0) {
@@ -351,7 +351,7 @@
}
} else {
float total = 0;
- float alloc_ratio[VPX_MAX_LAYERS] = { 0 };
+ float alloc_ratio[AOM_MAX_LAYERS] = { 0 };
for (i = 0; i < svc_ctx->spatial_layers; ++i) {
if (si->svc_params.scaling_factor_den[i] > 0) {
@@ -362,7 +362,7 @@
total += alloc_ratio[i];
}
}
- for (i = 0; i < VPX_SS_MAX_LAYERS; ++i) {
+ for (i = 0; i < AOM_SS_MAX_LAYERS; ++i) {
if (total > 0) {
enc_cfg->layer_target_bitrate[i] =
(unsigned int)(enc_cfg->rc_target_bitrate * alloc_ratio[i] /
@@ -381,9 +381,9 @@
SvcInternal_t *const si = get_svc_internal(svc_ctx);
if (svc_ctx == NULL || codec_ctx == NULL || iface == NULL ||
enc_cfg == NULL) {
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
- if (si == NULL) return VPX_CODEC_MEM_ERROR;
+ if (si == NULL) return AOM_CODEC_MEM_ERROR;
si->codec_ctx = codec_ctx;
@@ -393,17 +393,17 @@
if (enc_cfg->kf_max_dist < 2) {
svc_log(svc_ctx, SVC_LOG_ERROR, "key frame distance too small: %d\n",
enc_cfg->kf_max_dist);
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
si->kf_dist = enc_cfg->kf_max_dist;
if (svc_ctx->spatial_layers == 0)
- svc_ctx->spatial_layers = VPX_SS_DEFAULT_LAYERS;
+ svc_ctx->spatial_layers = AOM_SS_DEFAULT_LAYERS;
if (svc_ctx->spatial_layers < 1 ||
- svc_ctx->spatial_layers > VPX_SS_MAX_LAYERS) {
+ svc_ctx->spatial_layers > AOM_SS_MAX_LAYERS) {
svc_log(svc_ctx, SVC_LOG_ERROR, "spatial layers: invalid value: %d\n",
svc_ctx->spatial_layers);
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
// Note: temporal_layering_mode only applies to one-pass CBR
@@ -415,7 +415,7 @@
svc_ctx->temporal_layers = 2;
}
- for (sl = 0; sl < VPX_SS_MAX_LAYERS; ++sl) {
+ for (sl = 0; sl < AOM_SS_MAX_LAYERS; ++sl) {
si->svc_params.scaling_factor_num[sl] = DEFAULT_SCALE_FACTORS_NUM[sl];
si->svc_params.scaling_factor_den[sl] = DEFAULT_SCALE_FACTORS_DEN[sl];
}
@@ -430,23 +430,23 @@
// Parse aggregate command line options. Options must start with
// "layers=xx" then followed by other options
res = parse_options(svc_ctx, si->options);
- if (res != VPX_CODEC_OK) return res;
+ if (res != AOM_CODEC_OK) return res;
if (svc_ctx->spatial_layers < 1) svc_ctx->spatial_layers = 1;
- if (svc_ctx->spatial_layers > VPX_SS_MAX_LAYERS)
- svc_ctx->spatial_layers = VPX_SS_MAX_LAYERS;
+ if (svc_ctx->spatial_layers > AOM_SS_MAX_LAYERS)
+ svc_ctx->spatial_layers = AOM_SS_MAX_LAYERS;
if (svc_ctx->temporal_layers < 1) svc_ctx->temporal_layers = 1;
- if (svc_ctx->temporal_layers > VPX_TS_MAX_LAYERS)
- svc_ctx->temporal_layers = VPX_TS_MAX_LAYERS;
+ if (svc_ctx->temporal_layers > AOM_TS_MAX_LAYERS)
+ svc_ctx->temporal_layers = AOM_TS_MAX_LAYERS;
- if (svc_ctx->temporal_layers * svc_ctx->spatial_layers > VPX_MAX_LAYERS) {
+ if (svc_ctx->temporal_layers * svc_ctx->spatial_layers > AOM_MAX_LAYERS) {
svc_log(svc_ctx, SVC_LOG_ERROR,
"spatial layers * temporal layers exceeds the maximum number of "
"allowed layers of %d\n",
svc_ctx->spatial_layers * svc_ctx->temporal_layers,
- (int)VPX_MAX_LAYERS);
- return VPX_CODEC_INVALID_PARAM;
+ (int)AOM_MAX_LAYERS);
+ return AOM_CODEC_INVALID_PARAM;
}
assign_layer_bitrates(svc_ctx, enc_cfg);
@@ -470,7 +470,7 @@
enc_cfg->ss_number_layers = svc_ctx->spatial_layers;
enc_cfg->ts_number_layers = svc_ctx->temporal_layers;
- if (enc_cfg->rc_end_usage == VPX_CBR) {
+ if (enc_cfg->rc_end_usage == AOM_CBR) {
enc_cfg->rc_resize_allowed = 0;
enc_cfg->rc_min_quantizer = 2;
enc_cfg->rc_max_quantizer = 56;
@@ -486,8 +486,8 @@
enc_cfg->g_error_resilient = 1;
// Initialize codec
- res = aom_codec_enc_init(codec_ctx, iface, enc_cfg, VPX_CODEC_USE_PSNR);
- if (res != VPX_CODEC_OK) {
+ res = aom_codec_enc_init(codec_ctx, iface, enc_cfg, AOM_CODEC_USE_PSNR);
+ if (res != AOM_CODEC_OK) {
svc_log(svc_ctx, SVC_LOG_ERROR, "svc_enc_init error\n");
return res;
}
@@ -495,7 +495,7 @@
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;
+ return AOM_CODEC_OK;
}
/**
@@ -510,23 +510,23 @@
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;
+ return AOM_CODEC_INVALID_PARAM;
}
svc_log_reset(svc_ctx);
res =
aom_codec_encode(codec_ctx, rawimg, pts, (uint32_t)duration, 0, deadline);
- if (res != VPX_CODEC_OK) {
+ if (res != AOM_CODEC_OK) {
return res;
}
// save compressed data
iter = NULL;
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 AOM_ENCODER_ABI_VERSION > (5 + AOM_CODEC_ABI_VERSION)
#if CONFIG_SPATIAL_SVC
- case VPX_CODEC_SPATIAL_SVC_LAYER_PSNR: {
+ case AOM_CODEC_SPATIAL_SVC_LAYER_PSNR: {
int i;
for (i = 0; i < svc_ctx->spatial_layers; ++i) {
int j;
@@ -553,7 +553,7 @@
++si->psnr_pkt_received;
break;
}
- case VPX_CODEC_SPATIAL_SVC_LAYER_SIZES: {
+ case AOM_CODEC_SPATIAL_SVC_LAYER_SIZES: {
int i;
for (i = 0; i < svc_ctx->spatial_layers; ++i)
si->bytes_sum[i] += cx_pkt->data.layer_sizes[i];
@@ -565,7 +565,7 @@
}
}
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
const char *aom_svc_get_message(const SvcContext *svc_ctx) {
diff --git a/aom/svc_context.h b/aom/svc_context.h
index 4dcfe0e..236586a 100644
--- a/aom/svc_context.h
+++ b/aom/svc_context.h
@@ -14,8 +14,8 @@
* spatial SVC frame
*/
-#ifndef VPX_SVC_CONTEXT_H_
-#define VPX_SVC_CONTEXT_H_
+#ifndef AOM_SVC_CONTEXT_H_
+#define AOM_SVC_CONTEXT_H_
#include "./vp8cx.h"
#include "./aom_encoder.h"
@@ -54,13 +54,13 @@
// values extracted from option, quantizers
aom_svc_extra_cfg_t svc_params;
- int enable_auto_alt_ref[VPX_SS_MAX_LAYERS];
- int bitrates[VPX_SS_MAX_LAYERS];
+ int enable_auto_alt_ref[AOM_SS_MAX_LAYERS];
+ int bitrates[AOM_SS_MAX_LAYERS];
// accumulated statistics
- double psnr_sum[VPX_SS_MAX_LAYERS][COMPONENTS]; // total/Y/U/V
- uint64_t sse_sum[VPX_SS_MAX_LAYERS][COMPONENTS];
- uint32_t bytes_sum[VPX_SS_MAX_LAYERS];
+ double psnr_sum[AOM_SS_MAX_LAYERS][COMPONENTS]; // total/Y/U/V
+ uint64_t sse_sum[AOM_SS_MAX_LAYERS][COMPONENTS];
+ uint32_t bytes_sum[AOM_SS_MAX_LAYERS];
// codec encoding values
int width; // width of highest layer
@@ -118,4 +118,4 @@
} // extern "C"
#endif
-#endif // VPX_SVC_CONTEXT_H_
+#endif // AOM_SVC_CONTEXT_H_
diff --git a/aom/vp8.h b/aom/vp8.h
index d9413f3..d8fef11 100644
--- a/aom/vp8.h
+++ b/aom/vp8.h
@@ -28,8 +28,8 @@
/*!\file
* \brief Provides controls common to both the VP8 encoder and decoder.
*/
-#ifndef VPX_VP8_H_
-#define VPX_VP8_H_
+#ifndef AOM_VP8_H_
+#define AOM_VP8_H_
#include "./aom_codec.h"
#include "./aom_image.h"
@@ -127,22 +127,22 @@
*
* defines the data type for each of VP8 decoder control function requires
*/
-VPX_CTRL_USE_TYPE(VP8_SET_REFERENCE, aom_ref_frame_t *)
-#define VPX_CTRL_VP8_SET_REFERENCE
-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
-VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_REF_FRAME, int)
-#define VPX_CTRL_VP8_SET_DBG_COLOR_REF_FRAME
-VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_MB_MODES, int)
-#define VPX_CTRL_VP8_SET_DBG_COLOR_MB_MODES
-VPX_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_B_MODES, int)
-#define VPX_CTRL_VP8_SET_DBG_COLOR_B_MODES
-VPX_CTRL_USE_TYPE(VP8_SET_DBG_DISPLAY_MV, int)
-#define VPX_CTRL_VP8_SET_DBG_DISPLAY_MV
-VPX_CTRL_USE_TYPE(VP9_GET_REFERENCE, vp9_ref_frame_t *)
-#define VPX_CTRL_VP9_GET_REFERENCE
+AOM_CTRL_USE_TYPE(VP8_SET_REFERENCE, aom_ref_frame_t *)
+#define AOM_CTRL_VP8_SET_REFERENCE
+AOM_CTRL_USE_TYPE(VP8_COPY_REFERENCE, aom_ref_frame_t *)
+#define AOM_CTRL_VP8_COPY_REFERENCE
+AOM_CTRL_USE_TYPE(VP8_SET_POSTPROC, vp8_postproc_cfg_t *)
+#define AOM_CTRL_VP8_SET_POSTPROC
+AOM_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_REF_FRAME, int)
+#define AOM_CTRL_VP8_SET_DBG_COLOR_REF_FRAME
+AOM_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_MB_MODES, int)
+#define AOM_CTRL_VP8_SET_DBG_COLOR_MB_MODES
+AOM_CTRL_USE_TYPE(VP8_SET_DBG_COLOR_B_MODES, int)
+#define AOM_CTRL_VP8_SET_DBG_COLOR_B_MODES
+AOM_CTRL_USE_TYPE(VP8_SET_DBG_DISPLAY_MV, int)
+#define AOM_CTRL_VP8_SET_DBG_DISPLAY_MV
+AOM_CTRL_USE_TYPE(VP9_GET_REFERENCE, vp9_ref_frame_t *)
+#define AOM_CTRL_VP9_GET_REFERENCE
/*!\endcond */
/*! @} - end defgroup vp8 */
@@ -151,4 +151,4 @@
} // extern "C"
#endif
-#endif // VPX_VP8_H_
+#endif // AOM_VP8_H_
diff --git a/aom/vp8cx.h b/aom/vp8cx.h
index e3cd331..96e661b 100644
--- a/aom/vp8cx.h
+++ b/aom/vp8cx.h
@@ -8,8 +8,8 @@
* 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.
*/
-#ifndef VPX_VP8CX_H_
-#define VPX_VP8CX_H_
+#ifndef AOM_VP8CX_H_
+#define AOM_VP8CX_H_
/*!\defgroup vp8_encoder WebM VP8/VP9 Encoder
* \ingroup vp8
@@ -220,7 +220,7 @@
/*!\brief Codec control function to set constrained quality level.
*
* \attention For this value to be used aom_codec_enc_cfg_t::g_usage must be
- * set to #VPX_CQ.
+ * set to #AOM_CQ.
* \note Valid range: 0..63
*
* Supported in codecs: VP8, VP9
@@ -448,7 +448,7 @@
VP9E_SET_NOISE_SENSITIVITY,
/*!\brief Codec control function to turn on/off SVC in encoder.
- * \note Return value is VPX_CODEC_INVALID_PARAM if the encoder does not
+ * \note Return value is AOM_CODEC_INVALID_PARAM if the encoder does not
* support SVC in its current encoding mode
* 0: off, 1: on
*
@@ -475,8 +475,8 @@
/*!\brief Codec control function to set content type.
* \note Valid parameter range:
- * VPX_CONTENT_DEFAULT = Regular video content (Default)
- * VPX_CONTENT_SCREEN = Screen capture content
+ * AOM_CONTENT_DEFAULT = Regular video content (Default)
+ * AOM_CONTENT_SCREEN = Screen capture content
*
* Supported in codecs: VP9
*/
@@ -582,7 +582,7 @@
VP8E_FOURFIVE = 1,
VP8E_THREEFIVE = 2,
VP8E_ONETWO = 3
-} VPX_SCALING_MODE;
+} AOM_SCALING_MODE;
/*!\brief Temporal layering mode enum for VP9 SVC.
*
@@ -651,8 +651,8 @@
*
*/
typedef struct aom_scaling_mode {
- VPX_SCALING_MODE h_scaling_mode; /**< horizontal scaling mode */
- VPX_SCALING_MODE v_scaling_mode; /**< vertical scaling mode */
+ AOM_SCALING_MODE h_scaling_mode; /**< horizontal scaling mode */
+ AOM_SCALING_MODE v_scaling_mode; /**< vertical scaling mode */
} aom_scaling_mode_t;
/*!\brief VP8 token partition mode
@@ -671,9 +671,9 @@
/*!brief VP9 encoder content type */
typedef enum {
- VPX_CONTENT_DEFAULT,
- VPX_CONTENT_SCREEN,
- VPX_CONTENT_INVALID
+ AOM_CONTENT_DEFAULT,
+ AOM_CONTENT_SCREEN,
+ AOM_CONTENT_INVALID
} aom_tune_content;
/*!\brief VP8 model tuning parameters
@@ -681,7 +681,7 @@
* Changes the encoder to tune for certain types of input material.
*
*/
-typedef enum { VPX_TUNE_PSNR, VPX_TUNE_SSIM } aom_tune_metric;
+typedef enum { AOM_TUNE_PSNR, AOM_TUNE_SSIM } aom_tune_metric;
/*!\brief vp9 svc layer parameters
*
@@ -704,10 +704,10 @@
*
*/
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. */
+ int frame_flags[AOM_TS_MAX_LAYERS]; /**< Frame flags. */
+ int lst_fb_idx[AOM_TS_MAX_LAYERS]; /**< Last buffer index. */
+ int gld_fb_idx[AOM_TS_MAX_LAYERS]; /**< Golden buffer index. */
+ int alt_fb_idx[AOM_TS_MAX_LAYERS]; /**< Altref buffer index. */
} aom_svc_ref_frame_config_t;
/*!\cond */
@@ -718,122 +718,122 @@
*
*/
-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, aom_roi_map_t *)
-#define VPX_CTRL_VP8E_SET_ROI_MAP
-VPX_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, aom_active_map_t *)
-#define VPX_CTRL_VP8E_SET_ACTIVEMAP
-VPX_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, aom_scaling_mode_t *)
-#define VPX_CTRL_VP8E_SET_SCALEMODE
+AOM_CTRL_USE_TYPE(VP8E_SET_FRAME_FLAGS, int)
+#define AOM_CTRL_VP8E_SET_FRAME_FLAGS
+AOM_CTRL_USE_TYPE(VP8E_SET_TEMPORAL_LAYER_ID, int)
+#define AOM_CTRL_VP8E_SET_TEMPORAL_LAYER_ID
+AOM_CTRL_USE_TYPE(VP8E_SET_ROI_MAP, aom_roi_map_t *)
+#define AOM_CTRL_VP8E_SET_ROI_MAP
+AOM_CTRL_USE_TYPE(VP8E_SET_ACTIVEMAP, aom_active_map_t *)
+#define AOM_CTRL_VP8E_SET_ACTIVEMAP
+AOM_CTRL_USE_TYPE(VP8E_SET_SCALEMODE, aom_scaling_mode_t *)
+#define AOM_CTRL_VP8E_SET_SCALEMODE
-VPX_CTRL_USE_TYPE(VP9E_SET_SVC, int)
-#define VPX_CTRL_VP9E_SET_SVC
-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, aom_svc_layer_id_t *)
-#define VPX_CTRL_VP9E_SET_SVC_LAYER_ID
+AOM_CTRL_USE_TYPE(VP9E_SET_SVC, int)
+#define AOM_CTRL_VP9E_SET_SVC
+AOM_CTRL_USE_TYPE(VP9E_SET_SVC_PARAMETERS, void *)
+#define AOM_CTRL_VP9E_SET_SVC_PARAMETERS
+AOM_CTRL_USE_TYPE(VP9E_REGISTER_CX_CALLBACK, void *)
+#define AOM_CTRL_VP9E_REGISTER_CX_CALLBACK
+AOM_CTRL_USE_TYPE(VP9E_SET_SVC_LAYER_ID, aom_svc_layer_id_t *)
+#define AOM_CTRL_VP9E_SET_SVC_LAYER_ID
-VPX_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int)
-#define VPX_CTRL_VP8E_SET_CPUUSED
-VPX_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF, unsigned int)
-#define VPX_CTRL_VP8E_SET_ENABLEAUTOALTREF
-VPX_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int)
-#define VPX_CTRL_VP8E_SET_NOISE_SENSITIVITY
-VPX_CTRL_USE_TYPE(VP8E_SET_SHARPNESS, unsigned int)
-#define VPX_CTRL_VP8E_SET_SHARPNESS
-VPX_CTRL_USE_TYPE(VP8E_SET_STATIC_THRESHOLD, unsigned int)
-#define VPX_CTRL_VP8E_SET_STATIC_THRESHOLD
-VPX_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, int) /* vp8e_token_partitions */
-#define VPX_CTRL_VP8E_SET_TOKEN_PARTITIONS
+AOM_CTRL_USE_TYPE(VP8E_SET_CPUUSED, int)
+#define AOM_CTRL_VP8E_SET_CPUUSED
+AOM_CTRL_USE_TYPE(VP8E_SET_ENABLEAUTOALTREF, unsigned int)
+#define AOM_CTRL_VP8E_SET_ENABLEAUTOALTREF
+AOM_CTRL_USE_TYPE(VP8E_SET_NOISE_SENSITIVITY, unsigned int)
+#define AOM_CTRL_VP8E_SET_NOISE_SENSITIVITY
+AOM_CTRL_USE_TYPE(VP8E_SET_SHARPNESS, unsigned int)
+#define AOM_CTRL_VP8E_SET_SHARPNESS
+AOM_CTRL_USE_TYPE(VP8E_SET_STATIC_THRESHOLD, unsigned int)
+#define AOM_CTRL_VP8E_SET_STATIC_THRESHOLD
+AOM_CTRL_USE_TYPE(VP8E_SET_TOKEN_PARTITIONS, int) /* vp8e_token_partitions */
+#define AOM_CTRL_VP8E_SET_TOKEN_PARTITIONS
-VPX_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES, unsigned int)
-#define VPX_CTRL_VP8E_SET_ARNR_MAXFRAMES
-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) /* 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
+AOM_CTRL_USE_TYPE(VP8E_SET_ARNR_MAXFRAMES, unsigned int)
+#define AOM_CTRL_VP8E_SET_ARNR_MAXFRAMES
+AOM_CTRL_USE_TYPE(VP8E_SET_ARNR_STRENGTH, unsigned int)
+#define AOM_CTRL_VP8E_SET_ARNR_STRENGTH
+AOM_CTRL_USE_TYPE_DEPRECATED(VP8E_SET_ARNR_TYPE, unsigned int)
+#define AOM_CTRL_VP8E_SET_ARNR_TYPE
+AOM_CTRL_USE_TYPE(VP8E_SET_TUNING, int) /* aom_tune_metric */
+#define AOM_CTRL_VP8E_SET_TUNING
+AOM_CTRL_USE_TYPE(VP8E_SET_CQ_LEVEL, unsigned int)
+#define AOM_CTRL_VP8E_SET_CQ_LEVEL
-VPX_CTRL_USE_TYPE(VP9E_SET_TILE_COLUMNS, int)
-#define VPX_CTRL_VP9E_SET_TILE_COLUMNS
-VPX_CTRL_USE_TYPE(VP9E_SET_TILE_ROWS, int)
-#define VPX_CTRL_VP9E_SET_TILE_ROWS
+AOM_CTRL_USE_TYPE(VP9E_SET_TILE_COLUMNS, int)
+#define AOM_CTRL_VP9E_SET_TILE_COLUMNS
+AOM_CTRL_USE_TYPE(VP9E_SET_TILE_ROWS, int)
+#define AOM_CTRL_VP9E_SET_TILE_ROWS
-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, aom_svc_layer_id_t *)
-#define VPX_CTRL_VP9E_GET_SVC_LAYER_ID
+AOM_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER, int *)
+#define AOM_CTRL_VP8E_GET_LAST_QUANTIZER
+AOM_CTRL_USE_TYPE(VP8E_GET_LAST_QUANTIZER_64, int *)
+#define AOM_CTRL_VP8E_GET_LAST_QUANTIZER_64
+AOM_CTRL_USE_TYPE(VP9E_GET_SVC_LAYER_ID, aom_svc_layer_id_t *)
+#define AOM_CTRL_VP9E_GET_SVC_LAYER_ID
-VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int)
-#define VPX_CTRL_VP8E_SET_MAX_INTRA_BITRATE_PCT
-VPX_CTRL_USE_TYPE(VP8E_SET_MAX_INTER_BITRATE_PCT, unsigned int)
-#define VPX_CTRL_VP8E_SET_MAX_INTER_BITRATE_PCT
+AOM_CTRL_USE_TYPE(VP8E_SET_MAX_INTRA_BITRATE_PCT, unsigned int)
+#define AOM_CTRL_VP8E_SET_MAX_INTRA_BITRATE_PCT
+AOM_CTRL_USE_TYPE(VP8E_SET_MAX_INTER_BITRATE_PCT, unsigned int)
+#define AOM_CTRL_VP8E_SET_MAX_INTER_BITRATE_PCT
-VPX_CTRL_USE_TYPE(VP8E_SET_SCREEN_CONTENT_MODE, unsigned int)
-#define VPX_CTRL_VP8E_SET_SCREEN_CONTENT_MODE
+AOM_CTRL_USE_TYPE(VP8E_SET_SCREEN_CONTENT_MODE, unsigned int)
+#define AOM_CTRL_VP8E_SET_SCREEN_CONTENT_MODE
-VPX_CTRL_USE_TYPE(VP9E_SET_GF_CBR_BOOST_PCT, unsigned int)
-#define VPX_CTRL_VP9E_SET_GF_CBR_BOOST_PCT
+AOM_CTRL_USE_TYPE(VP9E_SET_GF_CBR_BOOST_PCT, unsigned int)
+#define AOM_CTRL_VP9E_SET_GF_CBR_BOOST_PCT
-VPX_CTRL_USE_TYPE(VP9E_SET_LOSSLESS, unsigned int)
-#define VPX_CTRL_VP9E_SET_LOSSLESS
+AOM_CTRL_USE_TYPE(VP9E_SET_LOSSLESS, unsigned int)
+#define AOM_CTRL_VP9E_SET_LOSSLESS
#if CONFIG_AOM_QM
-VPX_CTRL_USE_TYPE(VP9E_SET_ENABLE_QM, unsigned int)
-#define VPX_CTRL_VP9E_SET_ENABLE_QM
+AOM_CTRL_USE_TYPE(VP9E_SET_ENABLE_QM, unsigned int)
+#define AOM_CTRL_VP9E_SET_ENABLE_QM
-VPX_CTRL_USE_TYPE(VP9E_SET_QM_MIN, unsigned int)
-#define VPX_CTRL_VP9E_SET_QM_MIN
+AOM_CTRL_USE_TYPE(VP9E_SET_QM_MIN, unsigned int)
+#define AOM_CTRL_VP9E_SET_QM_MIN
-VPX_CTRL_USE_TYPE(VP9E_SET_QM_MAX, unsigned int)
-#define VPX_CTRL_VP9E_SET_QM_MAX
+AOM_CTRL_USE_TYPE(VP9E_SET_QM_MAX, unsigned int)
+#define AOM_CTRL_VP9E_SET_QM_MAX
#endif
-VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int)
-#define VPX_CTRL_VP9E_SET_FRAME_PARALLEL_DECODING
+AOM_CTRL_USE_TYPE(VP9E_SET_FRAME_PARALLEL_DECODING, unsigned int)
+#define AOM_CTRL_VP9E_SET_FRAME_PARALLEL_DECODING
-VPX_CTRL_USE_TYPE(VP9E_SET_AQ_MODE, unsigned int)
-#define VPX_CTRL_VP9E_SET_AQ_MODE
+AOM_CTRL_USE_TYPE(VP9E_SET_AQ_MODE, unsigned int)
+#define AOM_CTRL_VP9E_SET_AQ_MODE
-VPX_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int)
-#define VPX_CTRL_VP9E_SET_FRAME_PERIODIC_BOOST
+AOM_CTRL_USE_TYPE(VP9E_SET_FRAME_PERIODIC_BOOST, unsigned int)
+#define AOM_CTRL_VP9E_SET_FRAME_PERIODIC_BOOST
-VPX_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY, unsigned int)
-#define VPX_CTRL_VP9E_SET_NOISE_SENSITIVITY
+AOM_CTRL_USE_TYPE(VP9E_SET_NOISE_SENSITIVITY, unsigned int)
+#define AOM_CTRL_VP9E_SET_NOISE_SENSITIVITY
-VPX_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* aom_tune_content */
-#define VPX_CTRL_VP9E_SET_TUNE_CONTENT
+AOM_CTRL_USE_TYPE(VP9E_SET_TUNE_CONTENT, int) /* aom_tune_content */
+#define AOM_CTRL_VP9E_SET_TUNE_CONTENT
-VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_SPACE, int)
-#define VPX_CTRL_VP9E_SET_COLOR_SPACE
+AOM_CTRL_USE_TYPE(VP9E_SET_COLOR_SPACE, int)
+#define AOM_CTRL_VP9E_SET_COLOR_SPACE
-VPX_CTRL_USE_TYPE(VP9E_SET_MIN_GF_INTERVAL, unsigned int)
-#define VPX_CTRL_VP9E_SET_MIN_GF_INTERVAL
+AOM_CTRL_USE_TYPE(VP9E_SET_MIN_GF_INTERVAL, unsigned int)
+#define AOM_CTRL_VP9E_SET_MIN_GF_INTERVAL
-VPX_CTRL_USE_TYPE(VP9E_SET_MAX_GF_INTERVAL, unsigned int)
-#define VPX_CTRL_VP9E_SET_MAX_GF_INTERVAL
+AOM_CTRL_USE_TYPE(VP9E_SET_MAX_GF_INTERVAL, unsigned int)
+#define AOM_CTRL_VP9E_SET_MAX_GF_INTERVAL
-VPX_CTRL_USE_TYPE(VP9E_GET_ACTIVEMAP, aom_active_map_t *)
-#define VPX_CTRL_VP9E_GET_ACTIVEMAP
+AOM_CTRL_USE_TYPE(VP9E_GET_ACTIVEMAP, aom_active_map_t *)
+#define AOM_CTRL_VP9E_GET_ACTIVEMAP
-VPX_CTRL_USE_TYPE(VP9E_SET_COLOR_RANGE, int)
-#define VPX_CTRL_VP9E_SET_COLOR_RANGE
+AOM_CTRL_USE_TYPE(VP9E_SET_COLOR_RANGE, int)
+#define AOM_CTRL_VP9E_SET_COLOR_RANGE
-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
+AOM_CTRL_USE_TYPE(VP9E_SET_SVC_REF_FRAME_CONFIG, aom_svc_ref_frame_config_t *)
+#define AOM_CTRL_VP9E_SET_SVC_REF_FRAME_CONFIG
-VPX_CTRL_USE_TYPE(VP9E_SET_RENDER_SIZE, int *)
-#define VPX_CTRL_VP9E_SET_RENDER_SIZE
+AOM_CTRL_USE_TYPE(VP9E_SET_RENDER_SIZE, int *)
+#define AOM_CTRL_VP9E_SET_RENDER_SIZE
/*!\endcond */
/*! @} - end defgroup vp8_encoder */
@@ -841,4 +841,4 @@
} // extern "C"
#endif
-#endif // VPX_VP8CX_H_
+#endif // AOM_VP8CX_H_
diff --git a/aom/vp8dx.h b/aom/vp8dx.h
index 9efbc8c..d72a9f0 100644
--- a/aom/vp8dx.h
+++ b/aom/vp8dx.h
@@ -18,8 +18,8 @@
* \brief Provides definitions for using VP8 or VP9 within the aom Decoder
* interface.
*/
-#ifndef VPX_VP8DX_H_
-#define VPX_VP8DX_H_
+#ifndef AOM_VP8DX_H_
+#define AOM_VP8DX_H_
#ifdef __cplusplus
extern "C" {
@@ -63,8 +63,8 @@
* before decoding. Takes a aom_decrypt_init, which contains
* a callback function and opaque context pointer.
*/
- VPXD_SET_DECRYPTOR,
- VP8D_SET_DECRYPTOR = VPXD_SET_DECRYPTOR,
+ AOMD_SET_DECRYPTOR,
+ VP8D_SET_DECRYPTOR = AOMD_SET_DECRYPTOR,
/** control function to get the dimensions that the current frame is decoded
* at. This may be different to the intended display size for the frame as
@@ -107,7 +107,7 @@
};
/** Decrypt n bytes of data from input -> output, using the decrypt_state
- * passed in VPXD_SET_DECRYPTOR.
+ * passed in AOMD_SET_DECRYPTOR.
*/
typedef void (*aom_decrypt_cb)(void *decrypt_state, const unsigned char *input,
unsigned char *output, int count);
@@ -136,24 +136,24 @@
*
*/
-VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_UPDATES, int *)
-#define VPX_CTRL_VP8D_GET_LAST_REF_UPDATES
-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, aom_decrypt_init *)
-#define VPX_CTRL_VPXD_SET_DECRYPTOR
-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
-VPX_CTRL_USE_TYPE(VP9D_GET_BIT_DEPTH, unsigned int *)
-#define VPX_CTRL_VP9D_GET_BIT_DEPTH
-VPX_CTRL_USE_TYPE(VP9D_GET_FRAME_SIZE, int *)
-#define VPX_CTRL_VP9D_GET_FRAME_SIZE
-VPX_CTRL_USE_TYPE(VP9_INVERT_TILE_DECODE_ORDER, int)
-#define VPX_CTRL_VP9_INVERT_TILE_DECODE_ORDER
+AOM_CTRL_USE_TYPE(VP8D_GET_LAST_REF_UPDATES, int *)
+#define AOM_CTRL_VP8D_GET_LAST_REF_UPDATES
+AOM_CTRL_USE_TYPE(VP8D_GET_FRAME_CORRUPTED, int *)
+#define AOM_CTRL_VP8D_GET_FRAME_CORRUPTED
+AOM_CTRL_USE_TYPE(VP8D_GET_LAST_REF_USED, int *)
+#define AOM_CTRL_VP8D_GET_LAST_REF_USED
+AOM_CTRL_USE_TYPE(AOMD_SET_DECRYPTOR, aom_decrypt_init *)
+#define AOM_CTRL_AOMD_SET_DECRYPTOR
+AOM_CTRL_USE_TYPE(VP8D_SET_DECRYPTOR, aom_decrypt_init *)
+#define AOM_CTRL_VP8D_SET_DECRYPTOR
+AOM_CTRL_USE_TYPE(VP9D_GET_DISPLAY_SIZE, int *)
+#define AOM_CTRL_VP9D_GET_DISPLAY_SIZE
+AOM_CTRL_USE_TYPE(VP9D_GET_BIT_DEPTH, unsigned int *)
+#define AOM_CTRL_VP9D_GET_BIT_DEPTH
+AOM_CTRL_USE_TYPE(VP9D_GET_FRAME_SIZE, int *)
+#define AOM_CTRL_VP9D_GET_FRAME_SIZE
+AOM_CTRL_USE_TYPE(VP9_INVERT_TILE_DECODE_ORDER, int)
+#define AOM_CTRL_VP9_INVERT_TILE_DECODE_ORDER
/*!\endcond */
/*! @} - end defgroup vp8_decoder */
@@ -162,4 +162,4 @@
} // extern "C"
#endif
-#endif // VPX_VP8DX_H_
+#endif // AOM_VP8DX_H_
diff --git a/aom_dsp/aom_convolve.h b/aom_dsp/aom_convolve.h
index 6f17c4a..3a33fe0 100644
--- a/aom_dsp/aom_convolve.h
+++ b/aom_dsp/aom_convolve.h
@@ -8,8 +8,8 @@
* 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.
*/
-#ifndef VPX_DSP_VPX_CONVOLVE_H_
-#define VPX_DSP_VPX_CONVOLVE_H_
+#ifndef AOM_DSP_AOM_CONVOLVE_H_
+#define AOM_DSP_AOM_CONVOLVE_H_
#include "./aom_config.h"
#include "aom/aom_integer.h"
@@ -36,4 +36,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_VPX_CONVOLVE_H_
+#endif // AOM_DSP_AOM_CONVOLVE_H_
diff --git a/aom_dsp/aom_dsp_common.h b/aom_dsp/aom_dsp_common.h
index 2372049..036ca61 100644
--- a/aom_dsp/aom_dsp_common.h
+++ b/aom_dsp/aom_dsp_common.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_COMMON_H_
-#define VPX_DSP_COMMON_H_
+#ifndef AOM_DSP_COMMON_H_
+#define AOM_DSP_COMMON_H_
#include "./aom_config.h"
#include "aom/aom_integer.h"
@@ -21,8 +21,8 @@
extern "C" {
#endif
-#define VPXMIN(x, y) (((x) < (y)) ? (x) : (y))
-#define VPXMAX(x, y) (((x) > (y)) ? (x) : (y))
+#define AOMMIN(x, y) (((x) < (y)) ? (x) : (y))
+#define AOMMAX(x, y) (((x) > (y)) ? (x) : (y))
#if CONFIG_AOM_QM
typedef uint16_t qm_val_t;
@@ -70,4 +70,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_COMMON_H_
+#endif // AOM_DSP_COMMON_H_
diff --git a/aom_dsp/aom_filter.h b/aom_dsp/aom_filter.h
index 9bca720..1fc1cd6 100644
--- a/aom_dsp/aom_filter.h
+++ b/aom_dsp/aom_filter.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_VPX_FILTER_H_
-#define VPX_DSP_VPX_FILTER_H_
+#ifndef AOM_DSP_AOM_FILTER_H_
+#define AOM_DSP_AOM_FILTER_H_
#include "aom/aom_integer.h"
@@ -31,4 +31,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_VPX_FILTER_H_
+#endif // AOM_DSP_AOM_FILTER_H_
diff --git a/aom_dsp/bitreader.c b/aom_dsp/bitreader.c
index 1420542..37e4672 100644
--- a/aom_dsp/bitreader.c
+++ b/aom_dsp/bitreader.c
@@ -47,7 +47,7 @@
int shift = BD_VALUE_SIZE - CHAR_BIT - (count + CHAR_BIT);
if (r->decrypt_cb) {
- size_t n = VPXMIN(sizeof(r->clear_buffer), bytes_left);
+ size_t n = AOMMIN(sizeof(r->clear_buffer), bytes_left);
r->decrypt_cb(r->decrypt_state, buffer, r->clear_buffer, (int)n);
buffer = r->clear_buffer;
buffer_start = r->clear_buffer;
diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h
index 897a099..17b92ea 100644
--- a/aom_dsp/bitreader.h
+++ b/aom_dsp/bitreader.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_BITREADER_H_
-#define VPX_DSP_BITREADER_H_
+#ifndef AOM_DSP_BITREADER_H_
+#define AOM_DSP_BITREADER_H_
#include <stddef.h>
#include <limits.h>
@@ -132,4 +132,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_BITREADER_H_
+#endif // AOM_DSP_BITREADER_H_
diff --git a/aom_dsp/bitreader_buffer.h b/aom_dsp/bitreader_buffer.h
index 5636f63..a6a3b58 100644
--- a/aom_dsp/bitreader_buffer.h
+++ b/aom_dsp/bitreader_buffer.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_BITREADER_BUFFER_H_
-#define VPX_DSP_BITREADER_BUFFER_H_
+#ifndef AOM_DSP_BITREADER_BUFFER_H_
+#define AOM_DSP_BITREADER_BUFFER_H_
#include <limits.h>
@@ -45,4 +45,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_BITREADER_BUFFER_H_
+#endif // AOM_DSP_BITREADER_BUFFER_H_
diff --git a/aom_dsp/bitwriter.h b/aom_dsp/bitwriter.h
index f731a65..38ac1c2 100644
--- a/aom_dsp/bitwriter.h
+++ b/aom_dsp/bitwriter.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_BITWRITER_H_
-#define VPX_DSP_BITWRITER_H_
+#ifndef AOM_DSP_BITWRITER_H_
+#define AOM_DSP_BITWRITER_H_
#include "aom_ports/mem.h"
@@ -95,4 +95,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_BITWRITER_H_
+#endif // AOM_DSP_BITWRITER_H_
diff --git a/aom_dsp/bitwriter_buffer.h b/aom_dsp/bitwriter_buffer.h
index 9b33fe8..63027ef 100644
--- a/aom_dsp/bitwriter_buffer.h
+++ b/aom_dsp/bitwriter_buffer.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_BITWRITER_BUFFER_H_
-#define VPX_DSP_BITWRITER_BUFFER_H_
+#ifndef AOM_DSP_BITWRITER_BUFFER_H_
+#define AOM_DSP_BITWRITER_BUFFER_H_
#include "aom/aom_integer.h"
@@ -36,4 +36,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_BITWRITER_BUFFER_H_
+#endif // AOM_DSP_BITWRITER_BUFFER_H_
diff --git a/aom_dsp/fwd_txfm.h b/aom_dsp/fwd_txfm.h
index 97df577..fe8c182 100644
--- a/aom_dsp/fwd_txfm.h
+++ b/aom_dsp/fwd_txfm.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_FWD_TXFM_H_
-#define VPX_DSP_FWD_TXFM_H_
+#ifndef AOM_DSP_FWD_TXFM_H_
+#define AOM_DSP_FWD_TXFM_H_
#include "aom_dsp/txfm_common.h"
@@ -23,4 +23,4 @@
}
void aom_fdct32(const tran_high_t *input, tran_high_t *output, int round);
-#endif // VPX_DSP_FWD_TXFM_H_
+#endif // AOM_DSP_FWD_TXFM_H_
diff --git a/aom_dsp/inv_txfm.h b/aom_dsp/inv_txfm.h
index e36b35f..c99fd57 100644
--- a/aom_dsp/inv_txfm.h
+++ b/aom_dsp/inv_txfm.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_INV_TXFM_H_
-#define VPX_DSP_INV_TXFM_H_
+#ifndef AOM_DSP_INV_TXFM_H_
+#define AOM_DSP_INV_TXFM_H_
#include <assert.h>
@@ -120,4 +120,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_INV_TXFM_H_
+#endif // AOM_DSP_INV_TXFM_H_
diff --git a/aom_dsp/mips/aom_convolve_msa.h b/aom_dsp/mips/aom_convolve_msa.h
index 2722702..4efbcbc 100644
--- a/aom_dsp/mips/aom_convolve_msa.h
+++ b/aom_dsp/mips/aom_convolve_msa.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_MIPS_VPX_CONVOLVE_MSA_H_
-#define VPX_DSP_MIPS_VPX_CONVOLVE_MSA_H_
+#ifndef AOM_DSP_MIPS_AOM_CONVOLVE_MSA_H_
+#define AOM_DSP_MIPS_AOM_CONVOLVE_MSA_H_
#include "aom_dsp/mips/macros_msa.h"
#include "aom_dsp/aom_filter.h"
@@ -122,4 +122,4 @@
AVER_UB2_UB(tmp0_m, tmp2_m, tmp1_m, tmp3_m, tmp0_m, tmp1_m); \
ST8x4_UB(tmp0_m, tmp1_m, pdst_m, stride); \
}
-#endif /* VPX_DSP_MIPS_VPX_CONVOLVE_MSA_H_ */
+#endif /* AOM_DSP_MIPS_AOM_CONVOLVE_MSA_H_ */
diff --git a/aom_dsp/mips/common_dspr2.h b/aom_dsp/mips/common_dspr2.h
index efb9afd..31159fd 100644
--- a/aom_dsp/mips/common_dspr2.h
+++ b/aom_dsp/mips/common_dspr2.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_COMMON_MIPS_DSPR2_H_
-#define VPX_COMMON_MIPS_DSPR2_H_
+#ifndef AOM_COMMON_MIPS_DSPR2_H_
+#define AOM_COMMON_MIPS_DSPR2_H_
#include <assert.h>
#include "./aom_config.h"
@@ -46,4 +46,4 @@
} // extern "C"
#endif
-#endif // VPX_COMMON_MIPS_DSPR2_H_
+#endif // AOM_COMMON_MIPS_DSPR2_H_
diff --git a/aom_dsp/mips/convolve_common_dspr2.h b/aom_dsp/mips/convolve_common_dspr2.h
index 8f2c40b..f8fd9e2 100644
--- a/aom_dsp/mips/convolve_common_dspr2.h
+++ b/aom_dsp/mips/convolve_common_dspr2.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_MIPS_VPX_COMMON_DSPR2_H_
-#define VPX_DSP_MIPS_VPX_COMMON_DSPR2_H_
+#ifndef AOM_DSP_MIPS_AOM_COMMON_DSPR2_H_
+#define AOM_DSP_MIPS_AOM_COMMON_DSPR2_H_
#include <assert.h>
@@ -56,4 +56,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_MIPS_VPX_COMMON_DSPR2_H_
+#endif // AOM_DSP_MIPS_AOM_COMMON_DSPR2_H_
diff --git a/aom_dsp/mips/fwd_txfm_msa.c b/aom_dsp/mips/fwd_txfm_msa.c
index d9f2b1d..df8c7c8 100644
--- a/aom_dsp/mips/fwd_txfm_msa.c
+++ b/aom_dsp/mips/fwd_txfm_msa.c
@@ -187,9 +187,9 @@
in0 += vec;
}
- VPX_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
ADD4(in0, 1, in1, 1, in2, 1, in3, 1, in0, in1, in2, in3);
SRA_4V(in0, in1, in2, in3, 2);
@@ -204,11 +204,11 @@
LD_SH8(input, src_stride, in0, in1, in2, in3, in4, in5, in6, in7);
SLLI_4V(in0, in1, in2, in3, 2);
SLLI_4V(in4, in5, in6, in7, 2);
- VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
- VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
diff --git a/aom_dsp/mips/fwd_txfm_msa.h b/aom_dsp/mips/fwd_txfm_msa.h
index 90697c8..ada25df 100644
--- a/aom_dsp/mips/fwd_txfm_msa.h
+++ b/aom_dsp/mips/fwd_txfm_msa.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_MIPS_FWD_TXFM_MSA_H_
-#define VPX_DSP_MIPS_FWD_TXFM_MSA_H_
+#ifndef AOM_DSP_MIPS_FWD_TXFM_MSA_H_
+#define AOM_DSP_MIPS_FWD_TXFM_MSA_H_
#include "aom_dsp/mips/txfm_macros_msa.h"
#include "aom_dsp/txfm_common.h"
@@ -31,7 +31,7 @@
HADD_SW_S32(vec_w_m); \
})
-#define VPX_FDCT4(in0, in1, in2, in3, out0, out1, out2, out3) \
+#define AOM_FDCT4(in0, in1, in2, in3, out0, out1, out2, out3) \
{ \
v8i16 cnst0_m, cnst1_m, cnst2_m, cnst3_m; \
v8i16 vec0_m, vec1_m, vec2_m, vec3_m; \
@@ -72,7 +72,7 @@
in6, in7); \
}
-#define VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, \
+#define AOM_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, \
out3, out4, out5, out6, out7) \
{ \
v8i16 s0_m, s1_m, s2_m, s3_m, s4_m, s5_m, s6_m; \
@@ -378,4 +378,4 @@
void fdct8x16_1d_column(const int16_t *input, int16_t *tmp_ptr,
int32_t src_stride);
void fdct16x8_1d_row(int16_t *input, int16_t *output);
-#endif // VPX_DSP_MIPS_FWD_TXFM_MSA_H_
+#endif // AOM_DSP_MIPS_FWD_TXFM_MSA_H_
diff --git a/aom_dsp/mips/idct16x16_msa.c b/aom_dsp/mips/idct16x16_msa.c
index 0300873..0ea127f 100644
--- a/aom_dsp/mips/idct16x16_msa.c
+++ b/aom_dsp/mips/idct16x16_msa.c
@@ -190,16 +190,16 @@
reg3 = tmp7;
SRARI_H4_SH(reg0, reg2, reg4, reg6, 6);
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, reg0, reg2, reg4, reg6);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, reg0, reg2, reg4, reg6);
dst += (4 * dst_stride);
SRARI_H4_SH(reg8, reg10, reg12, reg14, 6);
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, reg8, reg10, reg12, reg14);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, reg8, reg10, reg12, reg14);
dst += (4 * dst_stride);
SRARI_H4_SH(reg3, reg13, reg11, reg5, 6);
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, reg3, reg13, reg11, reg5);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, reg3, reg13, reg11, reg5);
dst += (4 * dst_stride);
SRARI_H4_SH(reg7, reg9, reg1, reg15, 6);
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, reg7, reg9, reg1, reg15);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, reg7, reg9, reg1, reg15);
}
void aom_idct16x16_256_add_msa(const int16_t *input, uint8_t *dst,
@@ -303,7 +303,7 @@
l12, l13, l14, l15);
/* ADST in horizontal */
- VPX_IADST8x16_1D(l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
+ AOM_IADST8x16_1D(l0, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
l14, l15, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11,
r12, r13, r14, r15);
@@ -344,20 +344,20 @@
r15 = LD_SH(input + 15 * 16);
/* stage 1 */
- k0 = VPX_SET_COSPI_PAIR(cospi_1_64, cospi_31_64);
- k1 = VPX_SET_COSPI_PAIR(cospi_31_64, -cospi_1_64);
- k2 = VPX_SET_COSPI_PAIR(cospi_17_64, cospi_15_64);
- k3 = VPX_SET_COSPI_PAIR(cospi_15_64, -cospi_17_64);
+ k0 = AOM_SET_COSPI_PAIR(cospi_1_64, cospi_31_64);
+ k1 = AOM_SET_COSPI_PAIR(cospi_31_64, -cospi_1_64);
+ k2 = AOM_SET_COSPI_PAIR(cospi_17_64, cospi_15_64);
+ k3 = AOM_SET_COSPI_PAIR(cospi_15_64, -cospi_17_64);
MADD_BF(r15, r0, r7, r8, k0, k1, k2, k3, g0, g1, g2, g3);
- k0 = VPX_SET_COSPI_PAIR(cospi_9_64, cospi_23_64);
- k1 = VPX_SET_COSPI_PAIR(cospi_23_64, -cospi_9_64);
- k2 = VPX_SET_COSPI_PAIR(cospi_25_64, cospi_7_64);
- k3 = VPX_SET_COSPI_PAIR(cospi_7_64, -cospi_25_64);
+ k0 = AOM_SET_COSPI_PAIR(cospi_9_64, cospi_23_64);
+ k1 = AOM_SET_COSPI_PAIR(cospi_23_64, -cospi_9_64);
+ k2 = AOM_SET_COSPI_PAIR(cospi_25_64, cospi_7_64);
+ k3 = AOM_SET_COSPI_PAIR(cospi_7_64, -cospi_25_64);
MADD_BF(r11, r4, r3, r12, k0, k1, k2, k3, g8, g9, g10, g11);
BUTTERFLY_4(g0, g2, g10, g8, h8, h9, v2, v0);
- k0 = VPX_SET_COSPI_PAIR(cospi_4_64, cospi_28_64);
- k1 = VPX_SET_COSPI_PAIR(cospi_28_64, -cospi_4_64);
- k2 = VPX_SET_COSPI_PAIR(-cospi_28_64, cospi_4_64);
+ k0 = AOM_SET_COSPI_PAIR(cospi_4_64, cospi_28_64);
+ k1 = AOM_SET_COSPI_PAIR(cospi_28_64, -cospi_4_64);
+ k2 = AOM_SET_COSPI_PAIR(-cospi_28_64, cospi_4_64);
MADD_BF(g1, g3, g9, g11, k0, k1, k2, k0, h0, h1, h2, h3);
r1 = LD_SH(input + 1 * 16);
@@ -369,15 +369,15 @@
r13 = LD_SH(input + 13 * 16);
r14 = LD_SH(input + 14 * 16);
- k0 = VPX_SET_COSPI_PAIR(cospi_5_64, cospi_27_64);
- k1 = VPX_SET_COSPI_PAIR(cospi_27_64, -cospi_5_64);
- k2 = VPX_SET_COSPI_PAIR(cospi_21_64, cospi_11_64);
- k3 = VPX_SET_COSPI_PAIR(cospi_11_64, -cospi_21_64);
+ k0 = AOM_SET_COSPI_PAIR(cospi_5_64, cospi_27_64);
+ k1 = AOM_SET_COSPI_PAIR(cospi_27_64, -cospi_5_64);
+ k2 = AOM_SET_COSPI_PAIR(cospi_21_64, cospi_11_64);
+ k3 = AOM_SET_COSPI_PAIR(cospi_11_64, -cospi_21_64);
MADD_BF(r13, r2, r5, r10, k0, k1, k2, k3, g4, g5, g6, g7);
- k0 = VPX_SET_COSPI_PAIR(cospi_13_64, cospi_19_64);
- k1 = VPX_SET_COSPI_PAIR(cospi_19_64, -cospi_13_64);
- k2 = VPX_SET_COSPI_PAIR(cospi_29_64, cospi_3_64);
- k3 = VPX_SET_COSPI_PAIR(cospi_3_64, -cospi_29_64);
+ k0 = AOM_SET_COSPI_PAIR(cospi_13_64, cospi_19_64);
+ k1 = AOM_SET_COSPI_PAIR(cospi_19_64, -cospi_13_64);
+ k2 = AOM_SET_COSPI_PAIR(cospi_29_64, cospi_3_64);
+ k3 = AOM_SET_COSPI_PAIR(cospi_3_64, -cospi_29_64);
MADD_BF(r9, r6, r1, r14, k0, k1, k2, k3, g12, g13, g14, g15);
BUTTERFLY_4(g4, g6, g14, g12, h10, h11, v6, v4);
BUTTERFLY_4(h8, h9, h11, h10, out0, out1, h11, h10);
@@ -392,9 +392,9 @@
ST8x1_UB(res0, dst);
ST8x1_UB(res1, dst + 15 * dst_stride);
- k0 = VPX_SET_COSPI_PAIR(cospi_12_64, cospi_20_64);
- k1 = VPX_SET_COSPI_PAIR(-cospi_20_64, cospi_12_64);
- k2 = VPX_SET_COSPI_PAIR(cospi_20_64, -cospi_12_64);
+ k0 = AOM_SET_COSPI_PAIR(cospi_12_64, cospi_20_64);
+ k1 = AOM_SET_COSPI_PAIR(-cospi_20_64, cospi_12_64);
+ k2 = AOM_SET_COSPI_PAIR(cospi_20_64, -cospi_12_64);
MADD_BF(g7, g5, g15, g13, k0, k1, k2, k0, h4, h5, h6, h7);
BUTTERFLY_4(h0, h2, h6, h4, out8, out9, out11, out10);
out8 = -out8;
@@ -409,9 +409,9 @@
ST8x1_UB(res8, dst + dst_stride);
ST8x1_UB(res9, dst + 14 * dst_stride);
- k0 = VPX_SET_COSPI_PAIR(cospi_8_64, cospi_24_64);
- k1 = VPX_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64);
- k2 = VPX_SET_COSPI_PAIR(-cospi_24_64, cospi_8_64);
+ k0 = AOM_SET_COSPI_PAIR(cospi_8_64, cospi_24_64);
+ k1 = AOM_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64);
+ k2 = AOM_SET_COSPI_PAIR(-cospi_24_64, cospi_8_64);
MADD_BF(v0, v2, v4, v6, k0, k1, k2, k0, out4, out6, out5, out7);
out4 = -out4;
SRARI_H2_SH(out4, out5, 6);
@@ -436,8 +436,8 @@
ST8x1_UB(res12, dst + 2 * dst_stride);
ST8x1_UB(res13, dst + 13 * dst_stride);
- k0 = VPX_SET_COSPI_PAIR(cospi_16_64, cospi_16_64);
- k3 = VPX_SET_COSPI_PAIR(-cospi_16_64, cospi_16_64);
+ k0 = AOM_SET_COSPI_PAIR(cospi_16_64, cospi_16_64);
+ k3 = AOM_SET_COSPI_PAIR(-cospi_16_64, cospi_16_64);
MADD_SHORT(out6, out7, k0, k3, out6, out7);
SRARI_H2_SH(out6, out7, 6);
dst6 = LD_UB(dst + 4 * dst_stride);
@@ -460,8 +460,8 @@
ST8x1_UB(res10, dst + 6 * dst_stride);
ST8x1_UB(res11, dst + 9 * dst_stride);
- k1 = VPX_SET_COSPI_PAIR(-cospi_16_64, -cospi_16_64);
- k2 = VPX_SET_COSPI_PAIR(cospi_16_64, -cospi_16_64);
+ k1 = AOM_SET_COSPI_PAIR(-cospi_16_64, -cospi_16_64);
+ k2 = AOM_SET_COSPI_PAIR(cospi_16_64, -cospi_16_64);
MADD_SHORT(h10, h11, k1, k2, out2, out3);
SRARI_H2_SH(out2, out3, 6);
dst2 = LD_UB(dst + 7 * dst_stride);
diff --git a/aom_dsp/mips/idct32x32_msa.c b/aom_dsp/mips/idct32x32_msa.c
index 61a54a2..f1ca757 100644
--- a/aom_dsp/mips/idct32x32_msa.c
+++ b/aom_dsp/mips/idct32x32_msa.c
@@ -554,11 +554,11 @@
ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, m0, m4, m2, m6);
SRARI_H4_SH(m0, m2, m4, m6, 6);
- VPX_ADDBLK_ST8x4_UB(dst, (4 * dst_stride), m0, m2, m4, m6);
+ AOM_ADDBLK_ST8x4_UB(dst, (4 * dst_stride), m0, m2, m4, m6);
SUB4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, m6, m2, m4, m0);
SRARI_H4_SH(m0, m2, m4, m6, 6);
- VPX_ADDBLK_ST8x4_UB((dst + 19 * dst_stride), (4 * dst_stride), m0, m2, m4,
+ AOM_ADDBLK_ST8x4_UB((dst + 19 * dst_stride), (4 * dst_stride), m0, m2, m4,
m6);
/* Load 8 & Store 8 */
@@ -573,11 +573,11 @@
ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, m1, m5, m3, m7);
SRARI_H4_SH(m1, m3, m5, m7, 6);
- VPX_ADDBLK_ST8x4_UB((dst + 2 * dst_stride), (4 * dst_stride), m1, m3, m5, m7);
+ AOM_ADDBLK_ST8x4_UB((dst + 2 * dst_stride), (4 * dst_stride), m1, m3, m5, m7);
SUB4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, m7, m3, m5, m1);
SRARI_H4_SH(m1, m3, m5, m7, 6);
- VPX_ADDBLK_ST8x4_UB((dst + 17 * dst_stride), (4 * dst_stride), m1, m3, m5,
+ AOM_ADDBLK_ST8x4_UB((dst + 17 * dst_stride), (4 * dst_stride), m1, m3, m5,
m7);
/* Load 8 & Store 8 */
@@ -592,11 +592,11 @@
ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, n0, n4, n2, n6);
SRARI_H4_SH(n0, n2, n4, n6, 6);
- VPX_ADDBLK_ST8x4_UB((dst + 1 * dst_stride), (4 * dst_stride), n0, n2, n4, n6);
+ AOM_ADDBLK_ST8x4_UB((dst + 1 * dst_stride), (4 * dst_stride), n0, n2, n4, n6);
SUB4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, n6, n2, n4, n0);
SRARI_H4_SH(n0, n2, n4, n6, 6);
- VPX_ADDBLK_ST8x4_UB((dst + 18 * dst_stride), (4 * dst_stride), n0, n2, n4,
+ AOM_ADDBLK_ST8x4_UB((dst + 18 * dst_stride), (4 * dst_stride), n0, n2, n4,
n6);
/* Load 8 & Store 8 */
@@ -611,11 +611,11 @@
ADD4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, n1, n5, n3, n7);
SRARI_H4_SH(n1, n3, n5, n7, 6);
- VPX_ADDBLK_ST8x4_UB((dst + 3 * dst_stride), (4 * dst_stride), n1, n3, n5, n7);
+ AOM_ADDBLK_ST8x4_UB((dst + 3 * dst_stride), (4 * dst_stride), n1, n3, n5, n7);
SUB4(loc0, vec3, loc1, vec2, loc2, vec1, loc3, vec0, n7, n3, n5, n1);
SRARI_H4_SH(n1, n3, n5, n7, 6);
- VPX_ADDBLK_ST8x4_UB((dst + 16 * dst_stride), (4 * dst_stride), n1, n3, n5,
+ AOM_ADDBLK_ST8x4_UB((dst + 16 * dst_stride), (4 * dst_stride), n1, n3, n5,
n7);
}
diff --git a/aom_dsp/mips/idct4x4_msa.c b/aom_dsp/mips/idct4x4_msa.c
index f4d8dfa..274818b 100644
--- a/aom_dsp/mips/idct4x4_msa.c
+++ b/aom_dsp/mips/idct4x4_msa.c
@@ -76,10 +76,10 @@
LD4x4_SH(input, in0, in1, in2, in3);
/* rows */
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
/* columns */
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
/* rounding (add 2^3, divide by 2^4) */
SRARI_H4_SH(in0, in1, in2, in3, 4);
ADDBLK_ST4x4_UB(in0, in1, in2, in3, dst, dst_stride);
diff --git a/aom_dsp/mips/idct8x8_msa.c b/aom_dsp/mips/idct8x8_msa.c
index a9e9332..981c103 100644
--- a/aom_dsp/mips/idct8x8_msa.c
+++ b/aom_dsp/mips/idct8x8_msa.c
@@ -22,21 +22,21 @@
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
/* 1D idct8x8 */
- VPX_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
+ AOM_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
/* columns transform */
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
/* 1D idct8x8 */
- VPX_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
+ AOM_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
/* final rounding (add 2^4, divide by 2^5) and shift */
SRARI_H4_SH(in0, in1, in2, in3, 5);
SRARI_H4_SH(in4, in5, in6, in7, 5);
/* add block and store 8x8 */
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, in0, in1, in2, in3);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, in0, in1, in2, in3);
dst += (4 * dst_stride);
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, in4, in5, in6, in7);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, in4, in5, in6, in7);
}
void aom_idct8x8_12_add_msa(const int16_t *input, uint8_t *dst,
@@ -52,10 +52,10 @@
/* stage1 */
ILVL_H2_SH(in3, in0, in2, in1, s0, s1);
- k0 = VPX_SET_COSPI_PAIR(cospi_28_64, -cospi_4_64);
- k1 = VPX_SET_COSPI_PAIR(cospi_4_64, cospi_28_64);
- k2 = VPX_SET_COSPI_PAIR(-cospi_20_64, cospi_12_64);
- k3 = VPX_SET_COSPI_PAIR(cospi_12_64, cospi_20_64);
+ k0 = AOM_SET_COSPI_PAIR(cospi_28_64, -cospi_4_64);
+ k1 = AOM_SET_COSPI_PAIR(cospi_4_64, cospi_28_64);
+ k2 = AOM_SET_COSPI_PAIR(-cospi_20_64, cospi_12_64);
+ k3 = AOM_SET_COSPI_PAIR(cospi_12_64, cospi_20_64);
DOTP_SH4_SW(s0, s0, s1, s1, k0, k1, k2, k3, tmp0, tmp1, tmp2, tmp3);
SRARI_W4_SW(tmp0, tmp1, tmp2, tmp3, DCT_CONST_BITS);
PCKEV_H2_SH(zero, tmp0, zero, tmp1, s0, s1);
@@ -64,10 +64,10 @@
/* stage2 */
ILVR_H2_SH(in3, in1, in2, in0, s1, s0);
- k0 = VPX_SET_COSPI_PAIR(cospi_16_64, cospi_16_64);
- k1 = VPX_SET_COSPI_PAIR(cospi_16_64, -cospi_16_64);
- k2 = VPX_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64);
- k3 = VPX_SET_COSPI_PAIR(cospi_8_64, cospi_24_64);
+ k0 = AOM_SET_COSPI_PAIR(cospi_16_64, cospi_16_64);
+ k1 = AOM_SET_COSPI_PAIR(cospi_16_64, -cospi_16_64);
+ k2 = AOM_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64);
+ k3 = AOM_SET_COSPI_PAIR(cospi_8_64, cospi_24_64);
DOTP_SH4_SW(s0, s0, s1, s1, k0, k1, k2, k3, tmp0, tmp1, tmp2, tmp3);
SRARI_W4_SW(tmp0, tmp1, tmp2, tmp3, DCT_CONST_BITS);
PCKEV_H2_SH(zero, tmp0, zero, tmp1, s0, s1);
@@ -77,7 +77,7 @@
/* stage3 */
s0 = __msa_ilvr_h(s6, s5);
- k1 = VPX_SET_COSPI_PAIR(-cospi_16_64, cospi_16_64);
+ k1 = AOM_SET_COSPI_PAIR(-cospi_16_64, cospi_16_64);
DOTP_SH2_SW(s0, s0, k1, k0, tmp0, tmp1);
SRARI_W2_SW(tmp0, tmp1, DCT_CONST_BITS);
PCKEV_H2_SH(zero, tmp0, zero, tmp1, s2, s3);
@@ -87,7 +87,7 @@
in7);
TRANSPOSE4X8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
- VPX_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
+ AOM_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
/* final rounding (add 2^4, divide by 2^5) and shift */
@@ -95,9 +95,9 @@
SRARI_H4_SH(in4, in5, in6, in7, 5);
/* add block and store 8x8 */
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, in0, in1, in2, in3);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, in0, in1, in2, in3);
dst += (4 * dst_stride);
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, in4, in5, in6, in7);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, in4, in5, in6, in7);
}
void aom_idct8x8_1_add_msa(const int16_t *input, uint8_t *dst,
@@ -111,7 +111,7 @@
val = ROUND_POWER_OF_TWO(out, 5);
vec = __msa_fill_h(val);
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, vec, vec, vec, vec);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, vec, vec, vec, vec);
dst += (4 * dst_stride);
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, vec, vec, vec, vec);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, vec, vec, vec, vec);
}
diff --git a/aom_dsp/mips/inv_txfm_dspr2.h b/aom_dsp/mips/inv_txfm_dspr2.h
index e742574..c4a7bb4 100644
--- a/aom_dsp/mips/inv_txfm_dspr2.h
+++ b/aom_dsp/mips/inv_txfm_dspr2.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_MIPS_INV_TXFM_DSPR2_H_
-#define VPX_DSP_MIPS_INV_TXFM_DSPR2_H_
+#ifndef AOM_DSP_MIPS_INV_TXFM_DSPR2_H_
+#define AOM_DSP_MIPS_INV_TXFM_DSPR2_H_
#include <assert.h>
@@ -78,4 +78,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_MIPS_INV_TXFM_DSPR2_H_
+#endif // AOM_DSP_MIPS_INV_TXFM_DSPR2_H_
diff --git a/aom_dsp/mips/inv_txfm_msa.h b/aom_dsp/mips/inv_txfm_msa.h
index c8950ba..0dd8445 100644
--- a/aom_dsp/mips/inv_txfm_msa.h
+++ b/aom_dsp/mips/inv_txfm_msa.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_MIPS_INV_TXFM_MSA_H_
-#define VPX_DSP_MIPS_INV_TXFM_MSA_H_
+#ifndef AOM_DSP_MIPS_INV_TXFM_MSA_H_
+#define AOM_DSP_MIPS_INV_TXFM_MSA_H_
#include "aom_dsp/mips/macros_msa.h"
#include "aom_dsp/mips/txfm_macros_msa.h"
@@ -80,7 +80,7 @@
out5 = -out5; \
}
-#define VPX_SET_COSPI_PAIR(c0_h, c1_h) \
+#define AOM_SET_COSPI_PAIR(c0_h, c1_h) \
({ \
v8i16 out0_m, r0_m, r1_m; \
\
@@ -91,7 +91,7 @@
out0_m; \
})
-#define VPX_ADDBLK_ST8x4_UB(dst, dst_stride, in0, in1, in2, in3) \
+#define AOM_ADDBLK_ST8x4_UB(dst, dst_stride, in0, in1, in2, in3) \
{ \
uint8_t *dst_m = (uint8_t *)(dst); \
v16u8 dst0_m, dst1_m, dst2_m, dst3_m; \
@@ -109,19 +109,19 @@
ST8x4_UB(tmp0_m, tmp1_m, dst_m, dst_stride); \
}
-#define VPX_IDCT4x4(in0, in1, in2, in3, out0, out1, out2, out3) \
+#define AOM_IDCT4x4(in0, in1, in2, in3, out0, out1, out2, out3) \
{ \
v8i16 c0_m, c1_m, c2_m, c3_m; \
v8i16 step0_m, step1_m; \
v4i32 tmp0_m, tmp1_m, tmp2_m, tmp3_m; \
\
- c0_m = VPX_SET_COSPI_PAIR(cospi_16_64, cospi_16_64); \
- c1_m = VPX_SET_COSPI_PAIR(cospi_16_64, -cospi_16_64); \
+ c0_m = AOM_SET_COSPI_PAIR(cospi_16_64, cospi_16_64); \
+ c1_m = AOM_SET_COSPI_PAIR(cospi_16_64, -cospi_16_64); \
step0_m = __msa_ilvr_h(in2, in0); \
DOTP_SH2_SW(step0_m, step0_m, c0_m, c1_m, tmp0_m, tmp1_m); \
\
- c2_m = VPX_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64); \
- c3_m = VPX_SET_COSPI_PAIR(cospi_8_64, cospi_24_64); \
+ c2_m = AOM_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64); \
+ c3_m = AOM_SET_COSPI_PAIR(cospi_8_64, cospi_24_64); \
step1_m = __msa_ilvr_h(in3, in1); \
DOTP_SH2_SW(step1_m, step1_m, c2_m, c3_m, tmp2_m, tmp3_m); \
SRARI_W4_SW(tmp0_m, tmp1_m, tmp2_m, tmp3_m, DCT_CONST_BITS); \
@@ -132,7 +132,7 @@
out0, out1, out2, out3); \
}
-#define VPX_IADST4x4(in0, in1, in2, in3, out0, out1, out2, out3) \
+#define AOM_IADST4x4(in0, in1, in2, in3, out0, out1, out2, out3) \
{ \
v8i16 res0_m, res1_m, c0_m, c1_m; \
v8i16 k1_m, k2_m, k3_m, k4_m; \
@@ -212,7 +212,7 @@
}
/* idct 8x8 macro */
-#define VPX_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \
+#define AOM_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \
out2, out3, out4, out5, out6, out7) \
{ \
v8i16 tp0_m, tp1_m, tp2_m, tp3_m, tp4_m, tp5_m, tp6_m, tp7_m; \
@@ -237,8 +237,8 @@
tp4_m = in1 + in3; \
PCKEV_H2_SH(tmp1_m, tmp0_m, tmp3_m, tmp2_m, tp5_m, tp6_m); \
tp7_m = in7 + in5; \
- k2_m = VPX_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64); \
- k3_m = VPX_SET_COSPI_PAIR(cospi_8_64, cospi_24_64); \
+ k2_m = AOM_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64); \
+ k3_m = AOM_SET_COSPI_PAIR(cospi_8_64, cospi_24_64); \
VP9_MADD(in0, in4, in2, in6, k1_m, k0_m, k2_m, k3_m, in0, in4, in2, in6); \
BUTTERFLY_4(in0, in4, in2, in6, tp0_m, tp1_m, tp2_m, tp3_m); \
BUTTERFLY_8(tp0_m, tp1_m, tp2_m, tp3_m, tp4_m, tp5_m, tp6_m, tp7_m, out0, \
@@ -332,7 +332,7 @@
out7 = -in7; \
}
-#define VPX_IADST8x16_1D(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, \
+#define AOM_IADST8x16_1D(r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, \
r12, r13, r14, r15, out0, out1, out2, out3, out4, \
out5, out6, out7, out8, out9, out10, out11, out12, \
out13, out14, out15) \
@@ -344,38 +344,38 @@
v8i16 k0_m, k1_m, k2_m, k3_m; \
\
/* stage 1 */ \
- k0_m = VPX_SET_COSPI_PAIR(cospi_1_64, cospi_31_64); \
- k1_m = VPX_SET_COSPI_PAIR(cospi_31_64, -cospi_1_64); \
- k2_m = VPX_SET_COSPI_PAIR(cospi_17_64, cospi_15_64); \
- k3_m = VPX_SET_COSPI_PAIR(cospi_15_64, -cospi_17_64); \
+ k0_m = AOM_SET_COSPI_PAIR(cospi_1_64, cospi_31_64); \
+ k1_m = AOM_SET_COSPI_PAIR(cospi_31_64, -cospi_1_64); \
+ k2_m = AOM_SET_COSPI_PAIR(cospi_17_64, cospi_15_64); \
+ k3_m = AOM_SET_COSPI_PAIR(cospi_15_64, -cospi_17_64); \
MADD_BF(r15, r0, r7, r8, k0_m, k1_m, k2_m, k3_m, g0_m, g1_m, g2_m, g3_m); \
- k0_m = VPX_SET_COSPI_PAIR(cospi_5_64, cospi_27_64); \
- k1_m = VPX_SET_COSPI_PAIR(cospi_27_64, -cospi_5_64); \
- k2_m = VPX_SET_COSPI_PAIR(cospi_21_64, cospi_11_64); \
- k3_m = VPX_SET_COSPI_PAIR(cospi_11_64, -cospi_21_64); \
+ k0_m = AOM_SET_COSPI_PAIR(cospi_5_64, cospi_27_64); \
+ k1_m = AOM_SET_COSPI_PAIR(cospi_27_64, -cospi_5_64); \
+ k2_m = AOM_SET_COSPI_PAIR(cospi_21_64, cospi_11_64); \
+ k3_m = AOM_SET_COSPI_PAIR(cospi_11_64, -cospi_21_64); \
MADD_BF(r13, r2, r5, r10, k0_m, k1_m, k2_m, k3_m, g4_m, g5_m, g6_m, g7_m); \
- k0_m = VPX_SET_COSPI_PAIR(cospi_9_64, cospi_23_64); \
- k1_m = VPX_SET_COSPI_PAIR(cospi_23_64, -cospi_9_64); \
- k2_m = VPX_SET_COSPI_PAIR(cospi_25_64, cospi_7_64); \
- k3_m = VPX_SET_COSPI_PAIR(cospi_7_64, -cospi_25_64); \
+ k0_m = AOM_SET_COSPI_PAIR(cospi_9_64, cospi_23_64); \
+ k1_m = AOM_SET_COSPI_PAIR(cospi_23_64, -cospi_9_64); \
+ k2_m = AOM_SET_COSPI_PAIR(cospi_25_64, cospi_7_64); \
+ k3_m = AOM_SET_COSPI_PAIR(cospi_7_64, -cospi_25_64); \
MADD_BF(r11, r4, r3, r12, k0_m, k1_m, k2_m, k3_m, g8_m, g9_m, g10_m, \
g11_m); \
- k0_m = VPX_SET_COSPI_PAIR(cospi_13_64, cospi_19_64); \
- k1_m = VPX_SET_COSPI_PAIR(cospi_19_64, -cospi_13_64); \
- k2_m = VPX_SET_COSPI_PAIR(cospi_29_64, cospi_3_64); \
- k3_m = VPX_SET_COSPI_PAIR(cospi_3_64, -cospi_29_64); \
+ k0_m = AOM_SET_COSPI_PAIR(cospi_13_64, cospi_19_64); \
+ k1_m = AOM_SET_COSPI_PAIR(cospi_19_64, -cospi_13_64); \
+ k2_m = AOM_SET_COSPI_PAIR(cospi_29_64, cospi_3_64); \
+ k3_m = AOM_SET_COSPI_PAIR(cospi_3_64, -cospi_29_64); \
MADD_BF(r9, r6, r1, r14, k0_m, k1_m, k2_m, k3_m, g12_m, g13_m, g14_m, \
g15_m); \
\
/* stage 2 */ \
- k0_m = VPX_SET_COSPI_PAIR(cospi_4_64, cospi_28_64); \
- k1_m = VPX_SET_COSPI_PAIR(cospi_28_64, -cospi_4_64); \
- k2_m = VPX_SET_COSPI_PAIR(-cospi_28_64, cospi_4_64); \
+ k0_m = AOM_SET_COSPI_PAIR(cospi_4_64, cospi_28_64); \
+ k1_m = AOM_SET_COSPI_PAIR(cospi_28_64, -cospi_4_64); \
+ k2_m = AOM_SET_COSPI_PAIR(-cospi_28_64, cospi_4_64); \
MADD_BF(g1_m, g3_m, g9_m, g11_m, k0_m, k1_m, k2_m, k0_m, h0_m, h1_m, h2_m, \
h3_m); \
- k0_m = VPX_SET_COSPI_PAIR(cospi_12_64, cospi_20_64); \
- k1_m = VPX_SET_COSPI_PAIR(-cospi_20_64, cospi_12_64); \
- k2_m = VPX_SET_COSPI_PAIR(cospi_20_64, -cospi_12_64); \
+ k0_m = AOM_SET_COSPI_PAIR(cospi_12_64, cospi_20_64); \
+ k1_m = AOM_SET_COSPI_PAIR(-cospi_20_64, cospi_12_64); \
+ k2_m = AOM_SET_COSPI_PAIR(cospi_20_64, -cospi_12_64); \
MADD_BF(g7_m, g5_m, g15_m, g13_m, k0_m, k1_m, k2_m, k0_m, h4_m, h5_m, \
h6_m, h7_m); \
BUTTERFLY_4(h0_m, h2_m, h6_m, h4_m, out8, out9, out11, out10); \
@@ -384,19 +384,19 @@
\
/* stage 3 */ \
BUTTERFLY_4(h8_m, h9_m, h11_m, h10_m, out0, out1, h11_m, h10_m); \
- k0_m = VPX_SET_COSPI_PAIR(cospi_8_64, cospi_24_64); \
- k1_m = VPX_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64); \
- k2_m = VPX_SET_COSPI_PAIR(-cospi_24_64, cospi_8_64); \
+ k0_m = AOM_SET_COSPI_PAIR(cospi_8_64, cospi_24_64); \
+ k1_m = AOM_SET_COSPI_PAIR(cospi_24_64, -cospi_8_64); \
+ k2_m = AOM_SET_COSPI_PAIR(-cospi_24_64, cospi_8_64); \
MADD_BF(h0_m, h2_m, h4_m, h6_m, k0_m, k1_m, k2_m, k0_m, out4, out6, out5, \
out7); \
MADD_BF(h1_m, h3_m, h5_m, h7_m, k0_m, k1_m, k2_m, k0_m, out12, out14, \
out13, out15); \
\
/* stage 4 */ \
- k0_m = VPX_SET_COSPI_PAIR(cospi_16_64, cospi_16_64); \
- k1_m = VPX_SET_COSPI_PAIR(-cospi_16_64, -cospi_16_64); \
- k2_m = VPX_SET_COSPI_PAIR(cospi_16_64, -cospi_16_64); \
- k3_m = VPX_SET_COSPI_PAIR(-cospi_16_64, cospi_16_64); \
+ k0_m = AOM_SET_COSPI_PAIR(cospi_16_64, cospi_16_64); \
+ k1_m = AOM_SET_COSPI_PAIR(-cospi_16_64, -cospi_16_64); \
+ k2_m = AOM_SET_COSPI_PAIR(cospi_16_64, -cospi_16_64); \
+ k3_m = AOM_SET_COSPI_PAIR(-cospi_16_64, cospi_16_64); \
MADD_SHORT(h10_m, h11_m, k1_m, k2_m, out2, out3); \
MADD_SHORT(out6, out7, k0_m, k3_m, out6, out7); \
MADD_SHORT(out10, out11, k0_m, k3_m, out10, out11); \
@@ -409,4 +409,4 @@
void aom_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst,
int32_t dst_stride);
void aom_iadst16_1d_rows_msa(const int16_t *input, int16_t *output);
-#endif // VPX_DSP_MIPS_INV_TXFM_MSA_H_
+#endif // AOM_DSP_MIPS_INV_TXFM_MSA_H_
diff --git a/aom_dsp/mips/loopfilter_16_msa.c b/aom_dsp/mips/loopfilter_16_msa.c
index b3c3fd3..412eaeb 100644
--- a/aom_dsp/mips/loopfilter_16_msa.c
+++ b/aom_dsp/mips/loopfilter_16_msa.c
@@ -35,8 +35,8 @@
/* mask and hev */
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, hev,
mask, flat);
- VPX_FLAT4(p3, p2, p0, q0, q2, q3, flat);
- VPX_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
+ AOM_FLAT4(p3, p2, p0, q0, q2, q3, flat);
+ AOM_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
if (__msa_test_bz_v(flat)) {
ST_UB4(p1_out, p0_out, q0_out, q1_out, (src - 2 * pitch), pitch);
@@ -45,12 +45,12 @@
} else {
ILVR_B8_UH(zero, p3, zero, p2, zero, p1, zero, p0, zero, q0, zero, q1, zero,
q2, zero, q3, p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r);
- VPX_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
+ AOM_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
p1_filt8_r, p0_filt8_r, q0_filt8_r, q1_filt8_r, q2_filt8_r);
ILVL_B4_UH(zero, p3, zero, p2, zero, p1, zero, p0, p3_l, p2_l, p1_l, p0_l);
ILVL_B4_UH(zero, q0, zero, q1, zero, q2, zero, q3, q0_l, q1_l, q2_l, q3_l);
- VPX_FILTER8(p3_l, p2_l, p1_l, p0_l, q0_l, q1_l, q2_l, q3_l, p2_filt8_l,
+ AOM_FILTER8(p3_l, p2_l, p1_l, p0_l, q0_l, q1_l, q2_l, q3_l, p2_filt8_l,
p1_filt8_l, p0_filt8_l, q0_filt8_l, q1_filt8_l, q2_filt8_l);
/* convert 16 bit output data into 8 bit */
@@ -93,7 +93,7 @@
LD_UB8((src - 8 * pitch), pitch, p7, p6, p5, p4, p3, p2, p1, p0);
LD_UB8(src, pitch, q0, q1, q2, q3, q4, q5, q6, q7);
- VPX_FLAT5(p7, p6, p5, p4, p0, q0, q4, q5, q6, q7, flat, flat2);
+ AOM_FLAT5(p7, p6, p5, p4, p0, q0, q4, q5, q6, q7, flat, flat2);
if (__msa_test_bz_v(flat2)) {
LD_UB4(filter48, 16, p2, p1, p0, q0);
@@ -448,8 +448,8 @@
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, hev,
mask, flat);
- VPX_FLAT4(p3, p2, p0, q0, q2, q3, flat);
- VPX_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out,
+ AOM_FLAT4(p3, p2, p0, q0, q2, q3, flat);
+ AOM_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out,
q1_out);
flat = (v16u8)__msa_ilvr_d((v2i64)zero, (v2i64)flat);
@@ -465,7 +465,7 @@
ILVR_B8_UH(zero, p3, zero, p2, zero, p1, zero, p0, zero, q0, zero, q1,
zero, q2, zero, q3, p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r,
q3_r);
- VPX_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filter8,
+ AOM_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filter8,
p1_filter8, p0_filter8, q0_filter8, q1_filter8, q2_filter8);
/* convert 16 bit output data into 8 bit */
@@ -485,7 +485,7 @@
LD_UB4((src - 8 * pitch), pitch, p7, p6, p5, p4);
LD_UB4(src + (4 * pitch), pitch, q4, q5, q6, q7);
- VPX_FLAT5(p7, p6, p5, p4, p0, q0, q4, q5, q6, q7, flat, flat2);
+ AOM_FLAT5(p7, p6, p5, p4, p0, q0, q4, q5, q6, q7, flat, flat2);
if (__msa_test_bz_v(flat2)) {
p2_d = __msa_copy_u_d((v2i64)p2_out, 0);
@@ -763,9 +763,9 @@
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, hev,
mask, flat);
/* flat4 */
- VPX_FLAT4(p3, p2, p0, q0, q2, q3, flat);
+ AOM_FLAT4(p3, p2, p0, q0, q2, q3, flat);
/* filter4 */
- VPX_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
+ AOM_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
flat = (v16u8)__msa_ilvr_d((v2i64)zero, (v2i64)flat);
@@ -777,7 +777,7 @@
} else {
ILVR_B8_UH(zero, p3, zero, p2, zero, p1, zero, p0, zero, q0, zero, q1, zero,
q2, zero, q3, p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r);
- VPX_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
+ AOM_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
p1_filt8_r, p0_filt8_r, q0_filt8_r, q1_filt8_r, q2_filt8_r);
/* convert 16 bit output data into 8 bit */
@@ -821,7 +821,7 @@
LD_UB8((src - 8 * 16), 16, p7, p6, p5, p4, p3, p2, p1, p0);
LD_UB8(src, 16, q0, q1, q2, q3, q4, q5, q6, q7);
- VPX_FLAT5(p7, p6, p5, p4, p0, q0, q4, q5, q6, q7, flat, flat2);
+ AOM_FLAT5(p7, p6, p5, p4, p0, q0, q4, q5, q6, q7, flat, flat2);
if (__msa_test_bz_v(flat2)) {
v8i16 vec0, vec1, vec2, vec3, vec4;
@@ -1076,9 +1076,9 @@
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, hev,
mask, flat);
/* flat4 */
- VPX_FLAT4(p3, p2, p0, q0, q2, q3, flat);
+ AOM_FLAT4(p3, p2, p0, q0, q2, q3, flat);
/* filter4 */
- VPX_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
+ AOM_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
if (__msa_test_bz_v(flat)) {
ILVR_B2_SH(p0_out, p1_out, q1_out, q0_out, vec0, vec1);
@@ -1095,11 +1095,11 @@
} else {
ILVR_B8_UH(zero, p3, zero, p2, zero, p1, zero, p0, zero, q0, zero, q1, zero,
q2, zero, q3, p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r);
- VPX_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
+ AOM_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
p1_filt8_r, p0_filt8_r, q0_filt8_r, q1_filt8_r, q2_filt8_r);
ILVL_B4_UH(zero, p3, zero, p2, zero, p1, zero, p0, p3_l, p2_l, p1_l, p0_l);
ILVL_B4_UH(zero, q0, zero, q1, zero, q2, zero, q3, q0_l, q1_l, q2_l, q3_l);
- VPX_FILTER8(p3_l, p2_l, p1_l, p0_l, q0_l, q1_l, q2_l, q3_l, p2_filt8_l,
+ AOM_FILTER8(p3_l, p2_l, p1_l, p0_l, q0_l, q1_l, q2_l, q3_l, p2_filt8_l,
p1_filt8_l, p0_filt8_l, q0_filt8_l, q1_filt8_l, q2_filt8_l);
/* convert 16 bit output data into 8 bit */
@@ -1144,7 +1144,7 @@
LD_UB8((src - 8 * 16), 16, p7, p6, p5, p4, p3, p2, p1, p0);
LD_UB8(src, 16, q0, q1, q2, q3, q4, q5, q6, q7);
- VPX_FLAT5(p7, p6, p5, p4, p0, q0, q4, q5, q6, q7, flat, flat2);
+ AOM_FLAT5(p7, p6, p5, p4, p0, q0, q4, q5, q6, q7, flat, flat2);
if (__msa_test_bz_v(flat2)) {
v8i16 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7;
diff --git a/aom_dsp/mips/loopfilter_4_msa.c b/aom_dsp/mips/loopfilter_4_msa.c
index c1877d3..d94936f 100644
--- a/aom_dsp/mips/loopfilter_4_msa.c
+++ b/aom_dsp/mips/loopfilter_4_msa.c
@@ -30,7 +30,7 @@
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, hev,
mask, flat);
- VPX_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
+ AOM_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
p1_d = __msa_copy_u_d((v2i64)p1_out, 0);
p0_d = __msa_copy_u_d((v2i64)p0_out, 0);
@@ -66,7 +66,7 @@
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit0, b_limit0, thresh0, hev,
mask, flat);
- VPX_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1, p0, q0, q1);
+ AOM_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1, p0, q0, q1);
ST_UB4(p1, p0, q0, q1, (src - 2 * pitch), pitch);
}
@@ -91,7 +91,7 @@
q3);
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, hev,
mask, flat);
- VPX_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1, p0, q0, q1);
+ AOM_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1, p0, q0, q1);
ILVR_B2_SH(p0, p1, q1, q0, vec0, vec1);
ILVRL_H2_SH(vec1, vec0, vec2, vec3);
@@ -137,7 +137,7 @@
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit0, b_limit0, thresh0, hev,
mask, flat);
- VPX_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1, p0, q0, q1);
+ AOM_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1, p0, q0, q1);
ILVR_B2_SH(p0, p1, q1, q0, tmp0, tmp1);
ILVRL_H2_SH(tmp1, tmp0, tmp2, tmp3);
ILVL_B2_SH(p0, p1, q1, q0, tmp0, tmp1);
diff --git a/aom_dsp/mips/loopfilter_8_msa.c b/aom_dsp/mips/loopfilter_8_msa.c
index 1d4c1fe..f40eaf5 100644
--- a/aom_dsp/mips/loopfilter_8_msa.c
+++ b/aom_dsp/mips/loopfilter_8_msa.c
@@ -34,8 +34,8 @@
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, hev,
mask, flat);
- VPX_FLAT4(p3, p2, p0, q0, q2, q3, flat);
- VPX_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
+ AOM_FLAT4(p3, p2, p0, q0, q2, q3, flat);
+ AOM_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
flat = (v16u8)__msa_ilvr_d((v2i64)zero, (v2i64)flat);
@@ -48,7 +48,7 @@
} else {
ILVR_B8_UH(zero, p3, zero, p2, zero, p1, zero, p0, zero, q0, zero, q1, zero,
q2, zero, q3, p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r);
- VPX_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filter8,
+ AOM_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filter8,
p1_filter8, p0_filter8, q0_filter8, q1_filter8, q2_filter8);
/* convert 16 bit output data into 8 bit */
@@ -112,20 +112,20 @@
/* mask and hev */
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, hev,
mask, flat);
- VPX_FLAT4(p3, p2, p0, q0, q2, q3, flat);
- VPX_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
+ AOM_FLAT4(p3, p2, p0, q0, q2, q3, flat);
+ AOM_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
if (__msa_test_bz_v(flat)) {
ST_UB4(p1_out, p0_out, q0_out, q1_out, (src - 2 * pitch), pitch);
} else {
ILVR_B8_UH(zero, p3, zero, p2, zero, p1, zero, p0, zero, q0, zero, q1, zero,
q2, zero, q3, p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r);
- VPX_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
+ AOM_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
p1_filt8_r, p0_filt8_r, q0_filt8_r, q1_filt8_r, q2_filt8_r);
ILVL_B4_UH(zero, p3, zero, p2, zero, p1, zero, p0, p3_l, p2_l, p1_l, p0_l);
ILVL_B4_UH(zero, q0, zero, q1, zero, q2, zero, q3, q0_l, q1_l, q2_l, q3_l);
- VPX_FILTER8(p3_l, p2_l, p1_l, p0_l, q0_l, q1_l, q2_l, q3_l, p2_filt8_l,
+ AOM_FILTER8(p3_l, p2_l, p1_l, p0_l, q0_l, q1_l, q2_l, q3_l, p2_filt8_l,
p1_filt8_l, p0_filt8_l, q0_filt8_l, q1_filt8_l, q2_filt8_l);
/* convert 16 bit output data into 8 bit */
@@ -180,9 +180,9 @@
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, hev,
mask, flat);
/* flat4 */
- VPX_FLAT4(p3, p2, p0, q0, q2, q3, flat);
+ AOM_FLAT4(p3, p2, p0, q0, q2, q3, flat);
/* filter4 */
- VPX_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
+ AOM_LPF_FILTER4_8W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
flat = (v16u8)__msa_ilvr_d((v2i64)zero, (v2i64)flat);
@@ -198,7 +198,7 @@
} else {
ILVR_B8_UH(zero, p3, zero, p2, zero, p1, zero, p0, zero, q0, zero, q1, zero,
q2, zero, q3, p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r);
- VPX_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
+ AOM_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
p1_filt8_r, p0_filt8_r, q0_filt8_r, q1_filt8_r, q2_filt8_r);
/* convert 16 bit output data into 8 bit */
PCKEV_B4_SH(p2_filt8_r, p2_filt8_r, p1_filt8_r, p1_filt8_r, p0_filt8_r,
@@ -273,9 +273,9 @@
LPF_MASK_HEV(p3, p2, p1, p0, q0, q1, q2, q3, limit, b_limit, thresh, hev,
mask, flat);
/* flat4 */
- VPX_FLAT4(p3, p2, p0, q0, q2, q3, flat);
+ AOM_FLAT4(p3, p2, p0, q0, q2, q3, flat);
/* filter4 */
- VPX_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
+ AOM_LPF_FILTER4_4W(p1, p0, q0, q1, mask, hev, p1_out, p0_out, q0_out, q1_out);
if (__msa_test_bz_v(flat)) {
ILVR_B2_SH(p0_out, p1_out, q1_out, q0_out, vec0, vec1);
@@ -290,14 +290,14 @@
} else {
ILVR_B8_UH(zero, p3, zero, p2, zero, p1, zero, p0, zero, q0, zero, q1, zero,
q2, zero, q3, p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r);
- VPX_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
+ AOM_FILTER8(p3_r, p2_r, p1_r, p0_r, q0_r, q1_r, q2_r, q3_r, p2_filt8_r,
p1_filt8_r, p0_filt8_r, q0_filt8_r, q1_filt8_r, q2_filt8_r);
ILVL_B4_UH(zero, p3, zero, p2, zero, p1, zero, p0, p3_l, p2_l, p1_l, p0_l);
ILVL_B4_UH(zero, q0, zero, q1, zero, q2, zero, q3, q0_l, q1_l, q2_l, q3_l);
/* filter8 */
- VPX_FILTER8(p3_l, p2_l, p1_l, p0_l, q0_l, q1_l, q2_l, q3_l, p2_filt8_l,
+ AOM_FILTER8(p3_l, p2_l, p1_l, p0_l, q0_l, q1_l, q2_l, q3_l, p2_filt8_l,
p1_filt8_l, p0_filt8_l, q0_filt8_l, q1_filt8_l, q2_filt8_l);
/* convert 16 bit output data into 8 bit */
diff --git a/aom_dsp/mips/loopfilter_filters_dspr2.h b/aom_dsp/mips/loopfilter_filters_dspr2.h
index aa86c07..34f783b 100644
--- a/aom_dsp/mips/loopfilter_filters_dspr2.h
+++ b/aom_dsp/mips/loopfilter_filters_dspr2.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
-#define VPX_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
+#ifndef AOM_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
+#define AOM_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
#include <stdlib.h>
@@ -732,4 +732,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
+#endif // AOM_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
diff --git a/aom_dsp/mips/loopfilter_macros_dspr2.h b/aom_dsp/mips/loopfilter_macros_dspr2.h
index c7b1c7f..3e69947 100644
--- a/aom_dsp/mips/loopfilter_macros_dspr2.h
+++ b/aom_dsp/mips/loopfilter_macros_dspr2.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
-#define VPX_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
+#ifndef AOM_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
+#define AOM_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
#include <stdlib.h>
@@ -433,4 +433,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
+#endif // AOM_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
diff --git a/aom_dsp/mips/loopfilter_masks_dspr2.h b/aom_dsp/mips/loopfilter_masks_dspr2.h
index b283e18..8db3e52 100644
--- a/aom_dsp/mips/loopfilter_masks_dspr2.h
+++ b/aom_dsp/mips/loopfilter_masks_dspr2.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
-#define VPX_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
+#ifndef AOM_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
+#define AOM_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
#include <stdlib.h>
@@ -353,4 +353,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
+#endif // AOM_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
diff --git a/aom_dsp/mips/loopfilter_msa.h b/aom_dsp/mips/loopfilter_msa.h
index c72258f..c1cabc2 100644
--- a/aom_dsp/mips/loopfilter_msa.h
+++ b/aom_dsp/mips/loopfilter_msa.h
@@ -9,12 +9,12 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_LOOPFILTER_MSA_H_
-#define VPX_DSP_LOOPFILTER_MSA_H_
+#ifndef AOM_DSP_LOOPFILTER_MSA_H_
+#define AOM_DSP_LOOPFILTER_MSA_H_
#include "aom_dsp/mips/macros_msa.h"
-#define VPX_LPF_FILTER4_8W(p1_in, p0_in, q0_in, q1_in, mask_in, hev_in, \
+#define AOM_LPF_FILTER4_8W(p1_in, p0_in, q0_in, q1_in, mask_in, hev_in, \
p1_out, p0_out, q0_out, q1_out) \
{ \
v16i8 p1_m, p0_m, q0_m, q1_m, q0_sub_p0, filt_sign; \
@@ -65,7 +65,7 @@
p1_out = __msa_xori_b((v16u8)p1_m, 0x80); \
}
-#define VPX_LPF_FILTER4_4W(p1_in, p0_in, q0_in, q1_in, mask_in, hev_in, \
+#define AOM_LPF_FILTER4_4W(p1_in, p0_in, q0_in, q1_in, mask_in, hev_in, \
p1_out, p0_out, q0_out, q1_out) \
{ \
v16i8 p1_m, p0_m, q0_m, q1_m, q0_sub_p0, filt_sign; \
@@ -123,7 +123,7 @@
p1_out = __msa_xori_b((v16u8)p1_m, 0x80); \
}
-#define VPX_FLAT4(p3_in, p2_in, p0_in, q0_in, q2_in, q3_in, flat_out) \
+#define AOM_FLAT4(p3_in, p2_in, p0_in, q0_in, q2_in, q3_in, flat_out) \
{ \
v16u8 tmp, p2_a_sub_p0, q2_a_sub_q0, p3_a_sub_p0, q3_a_sub_q0; \
v16u8 zero_in = { 0 }; \
@@ -144,7 +144,7 @@
flat_out = flat_out & (mask); \
}
-#define VPX_FLAT5(p7_in, p6_in, p5_in, p4_in, p0_in, q0_in, q4_in, q5_in, \
+#define AOM_FLAT5(p7_in, p6_in, p5_in, p4_in, p0_in, q0_in, q4_in, q5_in, \
q6_in, q7_in, flat_in, flat2_out) \
{ \
v16u8 tmp, zero_in = { 0 }; \
@@ -174,7 +174,7 @@
flat2_out = flat2_out & flat_in; \
}
-#define VPX_FILTER8(p3_in, p2_in, p1_in, p0_in, q0_in, q1_in, q2_in, q3_in, \
+#define AOM_FILTER8(p3_in, p2_in, p1_in, p0_in, q0_in, q1_in, q2_in, q3_in, \
p2_filt8_out, p1_filt8_out, p0_filt8_out, q0_filt8_out, \
q1_filt8_out, q2_filt8_out) \
{ \
@@ -248,4 +248,4 @@
mask_out = limit_in < (v16u8)mask_out; \
mask_out = __msa_xori_b(mask_out, 0xff); \
}
-#endif /* VPX_DSP_LOOPFILTER_MSA_H_ */
+#endif /* AOM_DSP_LOOPFILTER_MSA_H_ */
diff --git a/aom_dsp/mips/macros_msa.h b/aom_dsp/mips/macros_msa.h
index cbfa6a1..1aa3d75 100644
--- a/aom_dsp/mips/macros_msa.h
+++ b/aom_dsp/mips/macros_msa.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_MIPS_MACROS_MSA_H_
-#define VPX_DSP_MIPS_MACROS_MSA_H_
+#ifndef AOM_DSP_MIPS_MACROS_MSA_H_
+#define AOM_DSP_MIPS_MACROS_MSA_H_
#include <msa.h>
@@ -2051,4 +2051,4 @@
\
tmp1_m; \
})
-#endif /* VPX_DSP_MIPS_MACROS_MSA_H_ */
+#endif /* AOM_DSP_MIPS_MACROS_MSA_H_ */
diff --git a/aom_dsp/mips/sad_msa.c b/aom_dsp/mips/sad_msa.c
index 3c21f3c..258eb5c 100644
--- a/aom_dsp/mips/sad_msa.c
+++ b/aom_dsp/mips/sad_msa.c
@@ -1260,142 +1260,142 @@
return HADD_SW_S32(sad);
}
-#define VPX_SAD_4xHEIGHT_MSA(height) \
+#define AOM_SAD_4xHEIGHT_MSA(height) \
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) \
+#define AOM_SAD_8xHEIGHT_MSA(height) \
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) \
+#define AOM_SAD_16xHEIGHT_MSA(height) \
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) \
+#define AOM_SAD_32xHEIGHT_MSA(height) \
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) \
+#define AOM_SAD_64xHEIGHT_MSA(height) \
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) \
+#define AOM_SAD_4xHEIGHTx3_MSA(height) \
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) \
+#define AOM_SAD_8xHEIGHTx3_MSA(height) \
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) \
+#define AOM_SAD_16xHEIGHTx3_MSA(height) \
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) \
+#define AOM_SAD_32xHEIGHTx3_MSA(height) \
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) \
+#define AOM_SAD_64xHEIGHTx3_MSA(height) \
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) \
+#define AOM_SAD_4xHEIGHTx8_MSA(height) \
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) \
+#define AOM_SAD_8xHEIGHTx8_MSA(height) \
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) \
+#define AOM_SAD_16xHEIGHTx8_MSA(height) \
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) \
+#define AOM_SAD_32xHEIGHTx8_MSA(height) \
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) \
+#define AOM_SAD_64xHEIGHTx8_MSA(height) \
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) \
+#define AOM_SAD_4xHEIGHTx4D_MSA(height) \
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) \
+#define AOM_SAD_8xHEIGHTx4D_MSA(height) \
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) \
+#define AOM_SAD_16xHEIGHTx4D_MSA(height) \
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) \
+#define AOM_SAD_32xHEIGHTx4D_MSA(height) \
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) \
+#define AOM_SAD_64xHEIGHTx4D_MSA(height) \
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) \
+#define AOM_AVGSAD_4xHEIGHT_MSA(height) \
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) { \
@@ -1403,7 +1403,7 @@
second_pred); \
}
-#define VPX_AVGSAD_8xHEIGHT_MSA(height) \
+#define AOM_AVGSAD_8xHEIGHT_MSA(height) \
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) { \
@@ -1411,7 +1411,7 @@
second_pred); \
}
-#define VPX_AVGSAD_16xHEIGHT_MSA(height) \
+#define AOM_AVGSAD_16xHEIGHT_MSA(height) \
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) { \
@@ -1419,7 +1419,7 @@
second_pred); \
}
-#define VPX_AVGSAD_32xHEIGHT_MSA(height) \
+#define AOM_AVGSAD_32xHEIGHT_MSA(height) \
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) { \
@@ -1427,7 +1427,7 @@
second_pred); \
}
-#define VPX_AVGSAD_64xHEIGHT_MSA(height) \
+#define AOM_AVGSAD_64xHEIGHT_MSA(height) \
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) { \
@@ -1437,93 +1437,93 @@
/* clang-format off */
// 64x64
-VPX_SAD_64xHEIGHT_MSA(64)
-VPX_SAD_64xHEIGHTx3_MSA(64)
-VPX_SAD_64xHEIGHTx8_MSA(64)
-VPX_SAD_64xHEIGHTx4D_MSA(64)
-VPX_AVGSAD_64xHEIGHT_MSA(64)
+AOM_SAD_64xHEIGHT_MSA(64)
+AOM_SAD_64xHEIGHTx3_MSA(64)
+AOM_SAD_64xHEIGHTx8_MSA(64)
+AOM_SAD_64xHEIGHTx4D_MSA(64)
+AOM_AVGSAD_64xHEIGHT_MSA(64)
// 64x32
-VPX_SAD_64xHEIGHT_MSA(32)
-VPX_SAD_64xHEIGHTx3_MSA(32)
-VPX_SAD_64xHEIGHTx8_MSA(32)
-VPX_SAD_64xHEIGHTx4D_MSA(32)
-VPX_AVGSAD_64xHEIGHT_MSA(32)
+AOM_SAD_64xHEIGHT_MSA(32)
+AOM_SAD_64xHEIGHTx3_MSA(32)
+AOM_SAD_64xHEIGHTx8_MSA(32)
+AOM_SAD_64xHEIGHTx4D_MSA(32)
+AOM_AVGSAD_64xHEIGHT_MSA(32)
// 32x64
-VPX_SAD_32xHEIGHT_MSA(64)
-VPX_SAD_32xHEIGHTx3_MSA(64)
-VPX_SAD_32xHEIGHTx8_MSA(64)
-VPX_SAD_32xHEIGHTx4D_MSA(64)
-VPX_AVGSAD_32xHEIGHT_MSA(64)
+AOM_SAD_32xHEIGHT_MSA(64)
+AOM_SAD_32xHEIGHTx3_MSA(64)
+AOM_SAD_32xHEIGHTx8_MSA(64)
+AOM_SAD_32xHEIGHTx4D_MSA(64)
+AOM_AVGSAD_32xHEIGHT_MSA(64)
// 32x32
-VPX_SAD_32xHEIGHT_MSA(32)
-VPX_SAD_32xHEIGHTx3_MSA(32)
-VPX_SAD_32xHEIGHTx8_MSA(32)
-VPX_SAD_32xHEIGHTx4D_MSA(32)
-VPX_AVGSAD_32xHEIGHT_MSA(32)
+AOM_SAD_32xHEIGHT_MSA(32)
+AOM_SAD_32xHEIGHTx3_MSA(32)
+AOM_SAD_32xHEIGHTx8_MSA(32)
+AOM_SAD_32xHEIGHTx4D_MSA(32)
+AOM_AVGSAD_32xHEIGHT_MSA(32)
// 32x16
-VPX_SAD_32xHEIGHT_MSA(16)
-VPX_SAD_32xHEIGHTx3_MSA(16)
-VPX_SAD_32xHEIGHTx8_MSA(16)
-VPX_SAD_32xHEIGHTx4D_MSA(16)
-VPX_AVGSAD_32xHEIGHT_MSA(16)
+AOM_SAD_32xHEIGHT_MSA(16)
+AOM_SAD_32xHEIGHTx3_MSA(16)
+AOM_SAD_32xHEIGHTx8_MSA(16)
+AOM_SAD_32xHEIGHTx4D_MSA(16)
+AOM_AVGSAD_32xHEIGHT_MSA(16)
// 16x32
-VPX_SAD_16xHEIGHT_MSA(32)
-VPX_SAD_16xHEIGHTx3_MSA(32)
-VPX_SAD_16xHEIGHTx8_MSA(32)
-VPX_SAD_16xHEIGHTx4D_MSA(32)
-VPX_AVGSAD_16xHEIGHT_MSA(32)
+AOM_SAD_16xHEIGHT_MSA(32)
+AOM_SAD_16xHEIGHTx3_MSA(32)
+AOM_SAD_16xHEIGHTx8_MSA(32)
+AOM_SAD_16xHEIGHTx4D_MSA(32)
+AOM_AVGSAD_16xHEIGHT_MSA(32)
// 16x16
-VPX_SAD_16xHEIGHT_MSA(16)
-VPX_SAD_16xHEIGHTx3_MSA(16)
-VPX_SAD_16xHEIGHTx8_MSA(16)
-VPX_SAD_16xHEIGHTx4D_MSA(16)
-VPX_AVGSAD_16xHEIGHT_MSA(16)
+AOM_SAD_16xHEIGHT_MSA(16)
+AOM_SAD_16xHEIGHTx3_MSA(16)
+AOM_SAD_16xHEIGHTx8_MSA(16)
+AOM_SAD_16xHEIGHTx4D_MSA(16)
+AOM_AVGSAD_16xHEIGHT_MSA(16)
// 16x8
-VPX_SAD_16xHEIGHT_MSA(8)
-VPX_SAD_16xHEIGHTx3_MSA(8)
-VPX_SAD_16xHEIGHTx8_MSA(8)
-VPX_SAD_16xHEIGHTx4D_MSA(8)
-VPX_AVGSAD_16xHEIGHT_MSA(8)
+AOM_SAD_16xHEIGHT_MSA(8)
+AOM_SAD_16xHEIGHTx3_MSA(8)
+AOM_SAD_16xHEIGHTx8_MSA(8)
+AOM_SAD_16xHEIGHTx4D_MSA(8)
+AOM_AVGSAD_16xHEIGHT_MSA(8)
// 8x16
-VPX_SAD_8xHEIGHT_MSA(16)
-VPX_SAD_8xHEIGHTx3_MSA(16)
-VPX_SAD_8xHEIGHTx8_MSA(16)
-VPX_SAD_8xHEIGHTx4D_MSA(16)
-VPX_AVGSAD_8xHEIGHT_MSA(16)
+AOM_SAD_8xHEIGHT_MSA(16)
+AOM_SAD_8xHEIGHTx3_MSA(16)
+AOM_SAD_8xHEIGHTx8_MSA(16)
+AOM_SAD_8xHEIGHTx4D_MSA(16)
+AOM_AVGSAD_8xHEIGHT_MSA(16)
// 8x8
-VPX_SAD_8xHEIGHT_MSA(8)
-VPX_SAD_8xHEIGHTx3_MSA(8)
-VPX_SAD_8xHEIGHTx8_MSA(8)
-VPX_SAD_8xHEIGHTx4D_MSA(8)
-VPX_AVGSAD_8xHEIGHT_MSA(8)
+AOM_SAD_8xHEIGHT_MSA(8)
+AOM_SAD_8xHEIGHTx3_MSA(8)
+AOM_SAD_8xHEIGHTx8_MSA(8)
+AOM_SAD_8xHEIGHTx4D_MSA(8)
+AOM_AVGSAD_8xHEIGHT_MSA(8)
// 8x4
-VPX_SAD_8xHEIGHT_MSA(4)
-VPX_SAD_8xHEIGHTx3_MSA(4)
-VPX_SAD_8xHEIGHTx8_MSA(4)
-VPX_SAD_8xHEIGHTx4D_MSA(4)
-VPX_AVGSAD_8xHEIGHT_MSA(4)
+AOM_SAD_8xHEIGHT_MSA(4)
+AOM_SAD_8xHEIGHTx3_MSA(4)
+AOM_SAD_8xHEIGHTx8_MSA(4)
+AOM_SAD_8xHEIGHTx4D_MSA(4)
+AOM_AVGSAD_8xHEIGHT_MSA(4)
// 4x8
-VPX_SAD_4xHEIGHT_MSA(8)
-VPX_SAD_4xHEIGHTx3_MSA(8)
-VPX_SAD_4xHEIGHTx8_MSA(8)
-VPX_SAD_4xHEIGHTx4D_MSA(8)
-VPX_AVGSAD_4xHEIGHT_MSA(8)
+AOM_SAD_4xHEIGHT_MSA(8)
+AOM_SAD_4xHEIGHTx3_MSA(8)
+AOM_SAD_4xHEIGHTx8_MSA(8)
+AOM_SAD_4xHEIGHTx4D_MSA(8)
+AOM_AVGSAD_4xHEIGHT_MSA(8)
// 4x4
-VPX_SAD_4xHEIGHT_MSA(4)
-VPX_SAD_4xHEIGHTx3_MSA(4)
-VPX_SAD_4xHEIGHTx8_MSA(4)
-VPX_SAD_4xHEIGHTx4D_MSA(4)
-VPX_AVGSAD_4xHEIGHT_MSA(4)
+AOM_SAD_4xHEIGHT_MSA(4)
+AOM_SAD_4xHEIGHTx3_MSA(4)
+AOM_SAD_4xHEIGHTx8_MSA(4)
+AOM_SAD_4xHEIGHTx4D_MSA(4)
+AOM_AVGSAD_4xHEIGHT_MSA(4)
/* clang-format on */
diff --git a/aom_dsp/mips/sub_pixel_variance_msa.c b/aom_dsp/mips/sub_pixel_variance_msa.c
index 221ec49..3eb8510 100644
--- a/aom_dsp/mips/sub_pixel_variance_msa.c
+++ b/aom_dsp/mips/sub_pixel_variance_msa.c
@@ -1618,7 +1618,7 @@
#define VARIANCE_64Wx32H(sse, diff) VARIANCE_LARGE_WxH(sse, diff, 11);
#define VARIANCE_64Wx64H(sse, diff) VARIANCE_LARGE_WxH(sse, diff, 12);
-#define VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(wd, ht) \
+#define AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(wd, ht) \
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, \
@@ -1654,26 +1654,26 @@
}
/* clang-format off */
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(4, 4)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(4, 8)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(4, 4)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(4, 8)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(8, 4)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(8, 8)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(8, 16)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(8, 4)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(8, 8)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(8, 16)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(16, 8)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(16, 16)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(16, 32)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(16, 8)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(16, 16)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(16, 32)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(32, 16)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(32, 32)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(32, 64)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(32, 16)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(32, 32)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(32, 64)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(64, 32)
-VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(64, 64)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(64, 32)
+AOM_SUB_PIXEL_VARIANCE_WDXHT_MSA(64, 64)
/* clang-format on */
-#define VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(wd, ht) \
+#define AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(wd, ht) \
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, \
@@ -1707,19 +1707,19 @@
}
/* clang-format off */
-VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(4, 4)
-VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(4, 8)
+AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(4, 4)
+AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(4, 8)
-VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(8, 4)
-VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(8, 8)
-VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(8, 16)
+AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(8, 4)
+AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(8, 8)
+AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(8, 16)
-VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(16, 8)
-VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(16, 16)
-VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(16, 32)
+AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(16, 8)
+AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(16, 16)
+AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(16, 32)
-VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(32, 16)
-VPX_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(32, 32)
+AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(32, 16)
+AOM_SUB_PIXEL_AVG_VARIANCE_WDXHT_MSA(32, 32)
/* clang-format on */
uint32_t aom_sub_pixel_avg_variance32x64_msa(const uint8_t *src_ptr,
@@ -1756,7 +1756,7 @@
return VARIANCE_32Wx64H(*sse, diff);
}
-#define VPX_SUB_PIXEL_AVG_VARIANCE64XHEIGHT_MSA(ht) \
+#define AOM_SUB_PIXEL_AVG_VARIANCE64XHEIGHT_MSA(ht) \
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, \
@@ -1790,6 +1790,6 @@
}
/* clang-format off */
-VPX_SUB_PIXEL_AVG_VARIANCE64XHEIGHT_MSA(32)
-VPX_SUB_PIXEL_AVG_VARIANCE64XHEIGHT_MSA(64)
+AOM_SUB_PIXEL_AVG_VARIANCE64XHEIGHT_MSA(32)
+AOM_SUB_PIXEL_AVG_VARIANCE64XHEIGHT_MSA(64)
/* clang-format on */
diff --git a/aom_dsp/mips/txfm_macros_msa.h b/aom_dsp/mips/txfm_macros_msa.h
index 2624bb8..cba5d44 100644
--- a/aom_dsp/mips/txfm_macros_msa.h
+++ b/aom_dsp/mips/txfm_macros_msa.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_MIPS_TXFM_MACROS_MIPS_MSA_H_
-#define VPX_DSP_MIPS_TXFM_MACROS_MIPS_MSA_H_
+#ifndef AOM_DSP_MIPS_TXFM_MACROS_MIPS_MSA_H_
+#define AOM_DSP_MIPS_TXFM_MACROS_MIPS_MSA_H_
#include "aom_dsp/mips/macros_msa.h"
@@ -94,4 +94,4 @@
SRARI_W4_SW(m4_m, m5_m, tmp2_m, tmp3_m, DCT_CONST_BITS); \
PCKEV_H2_SH(m5_m, m4_m, tmp3_m, tmp2_m, out2, out3); \
}
-#endif // VPX_DSP_MIPS_TXFM_MACROS_MIPS_MSA_H_
+#endif // AOM_DSP_MIPS_TXFM_MACROS_MIPS_MSA_H_
diff --git a/aom_dsp/mips/variance_msa.c b/aom_dsp/mips/variance_msa.c
index e4c56e3..745fdfc 100644
--- a/aom_dsp/mips/variance_msa.c
+++ b/aom_dsp/mips/variance_msa.c
@@ -528,7 +528,7 @@
#define VARIANCE_64Wx32H(sse, diff) VARIANCE_LARGE_WxH(sse, diff, 11);
#define VARIANCE_64Wx64H(sse, diff) VARIANCE_LARGE_WxH(sse, diff, 12);
-#define VPX_VARIANCE_WDXHT_MSA(wd, ht) \
+#define AOM_VARIANCE_WDXHT_MSA(wd, ht) \
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) { \
@@ -541,19 +541,19 @@
}
/* clang-format off */
-VPX_VARIANCE_WDXHT_MSA(4, 4)
-VPX_VARIANCE_WDXHT_MSA(4, 8)
+AOM_VARIANCE_WDXHT_MSA(4, 4)
+AOM_VARIANCE_WDXHT_MSA(4, 8)
-VPX_VARIANCE_WDXHT_MSA(8, 4)
-VPX_VARIANCE_WDXHT_MSA(8, 8)
-VPX_VARIANCE_WDXHT_MSA(8, 16)
+AOM_VARIANCE_WDXHT_MSA(8, 4)
+AOM_VARIANCE_WDXHT_MSA(8, 8)
+AOM_VARIANCE_WDXHT_MSA(8, 16)
-VPX_VARIANCE_WDXHT_MSA(16, 8)
-VPX_VARIANCE_WDXHT_MSA(16, 16)
-VPX_VARIANCE_WDXHT_MSA(16, 32)
+AOM_VARIANCE_WDXHT_MSA(16, 8)
+AOM_VARIANCE_WDXHT_MSA(16, 16)
+AOM_VARIANCE_WDXHT_MSA(16, 32)
-VPX_VARIANCE_WDXHT_MSA(32, 16)
-VPX_VARIANCE_WDXHT_MSA(32, 32)
+AOM_VARIANCE_WDXHT_MSA(32, 16)
+AOM_VARIANCE_WDXHT_MSA(32, 32)
/* clang-format on */
uint32_t aom_variance32x64_msa(const uint8_t *src, int32_t src_stride,
diff --git a/aom_dsp/prob.h b/aom_dsp/prob.h
index dcb1f0e..24aa6e9 100644
--- a/aom_dsp/prob.h
+++ b/aom_dsp/prob.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_PROB_H_
-#define VPX_DSP_PROB_H_
+#ifndef AOM_DSP_PROB_H_
+#define AOM_DSP_PROB_H_
#include "./aom_config.h"
#include "./aom_dsp_common.h"
@@ -65,7 +65,7 @@
unsigned int count_sat,
unsigned int max_update_factor) {
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 count = AOMMIN(ct[0] + ct[1], count_sat);
const unsigned int factor = max_update_factor * count / count_sat;
return weighted_prob(pre_prob, prob, factor);
}
@@ -82,7 +82,7 @@
if (den == 0) {
return pre_prob;
} else {
- const unsigned int count = VPXMIN(den, MODE_MV_COUNT_SAT);
+ const unsigned int count = AOMMIN(den, MODE_MV_COUNT_SAT);
const unsigned int factor = count_to_update_factor[count];
const aom_prob prob =
clip_prob(((int64_t)(ct[0]) * 256 + (den >> 1)) / den);
@@ -99,4 +99,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_PROB_H_
+#endif // AOM_DSP_PROB_H_
diff --git a/aom_dsp/quantize.h b/aom_dsp/quantize.h
index ffb158d..7260eb2 100644
--- a/aom_dsp/quantize.h
+++ b/aom_dsp/quantize.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_QUANTIZE_H_
-#define VPX_DSP_QUANTIZE_H_
+#ifndef AOM_DSP_QUANTIZE_H_
+#define AOM_DSP_QUANTIZE_H_
#include "./aom_config.h"
#include "aom_dsp/aom_dsp_common.h"
@@ -101,4 +101,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_QUANTIZE_H_
+#endif // AOM_DSP_QUANTIZE_H_
diff --git a/aom_dsp/ssim.h b/aom_dsp/ssim.h
index 0b4d8f4..80bb2b1 100644
--- a/aom_dsp/ssim.h
+++ b/aom_dsp/ssim.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_SSIM_H_
-#define VPX_DSP_SSIM_H_
+#ifndef AOM_DSP_SSIM_H_
+#define AOM_DSP_SSIM_H_
#ifdef __cplusplus
extern "C" {
@@ -94,4 +94,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_SSIM_H_
+#endif // AOM_DSP_SSIM_H_
diff --git a/aom_dsp/txfm_common.h b/aom_dsp/txfm_common.h
index 6fda5b5..4e35439 100644
--- a/aom_dsp/txfm_common.h
+++ b/aom_dsp/txfm_common.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_TXFM_COMMON_H_
-#define VPX_DSP_TXFM_COMMON_H_
+#ifndef AOM_DSP_TXFM_COMMON_H_
+#define AOM_DSP_TXFM_COMMON_H_
#include "aom_dsp/aom_dsp_common.h"
@@ -64,4 +64,4 @@
static const tran_high_t sinpi_3_9 = 13377;
static const tran_high_t sinpi_4_9 = 15212;
-#endif // VPX_DSP_TXFM_COMMON_H_
+#endif // AOM_DSP_TXFM_COMMON_H_
diff --git a/aom_dsp/variance.h b/aom_dsp/variance.h
index 8bd10dd..aaa5bd5 100644
--- a/aom_dsp/variance.h
+++ b/aom_dsp/variance.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_VARIANCE_H_
-#define VPX_DSP_VARIANCE_H_
+#ifndef AOM_DSP_VARIANCE_H_
+#define AOM_DSP_VARIANCE_H_
#include "./aom_config.h"
@@ -71,4 +71,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_VARIANCE_H_
+#endif // AOM_DSP_VARIANCE_H_
diff --git a/aom_dsp/x86/convolve.h b/aom_dsp/x86/convolve.h
index dd453b0..63ff04c 100644
--- a/aom_dsp/x86/convolve.h
+++ b/aom_dsp/x86/convolve.h
@@ -8,8 +8,8 @@
* 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.
*/
-#ifndef VPX_DSP_X86_CONVOLVE_H_
-#define VPX_DSP_X86_CONVOLVE_H_
+#ifndef AOM_DSP_X86_CONVOLVE_H_
+#define AOM_DSP_X86_CONVOLVE_H_
#include <assert.h>
@@ -208,4 +208,4 @@
}
#endif // CONFIG_AOM_HIGHBITDEPTH
-#endif // VPX_DSP_X86_CONVOLVE_H_
+#endif // AOM_DSP_X86_CONVOLVE_H_
diff --git a/aom_dsp/x86/fwd_txfm_sse2.h b/aom_dsp/x86/fwd_txfm_sse2.h
index 8e1a007..4b243ba 100644
--- a/aom_dsp/x86/fwd_txfm_sse2.h
+++ b/aom_dsp/x86/fwd_txfm_sse2.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_X86_FWD_TXFM_SSE2_H_
-#define VPX_DSP_X86_FWD_TXFM_SSE2_H_
+#ifndef AOM_DSP_X86_FWD_TXFM_SSE2_H_
+#define AOM_DSP_X86_FWD_TXFM_SSE2_H_
#ifdef __cplusplus
extern "C" {
@@ -369,4 +369,4 @@
} // extern "C"
#endif
-#endif // VPX_DSP_X86_FWD_TXFM_SSE2_H_
+#endif // AOM_DSP_X86_FWD_TXFM_SSE2_H_
diff --git a/aom_dsp/x86/inv_txfm_sse2.h b/aom_dsp/x86/inv_txfm_sse2.h
index dbe233d..59faec3 100644
--- a/aom_dsp/x86/inv_txfm_sse2.h
+++ b/aom_dsp/x86/inv_txfm_sse2.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_X86_INV_TXFM_SSE2_H_
-#define VPX_DSP_X86_INV_TXFM_SSE2_H_
+#ifndef AOM_DSP_X86_INV_TXFM_SSE2_H_
+#define AOM_DSP_X86_INV_TXFM_SSE2_H_
#include <emmintrin.h> // SSE2
#include "./aom_config.h"
@@ -194,4 +194,4 @@
void iadst8_sse2(__m128i *in);
void iadst16_sse2(__m128i *in0, __m128i *in1);
-#endif // VPX_DSP_X86_INV_TXFM_SSE2_H_
+#endif // AOM_DSP_X86_INV_TXFM_SSE2_H_
diff --git a/aom_dsp/x86/txfm_common_sse2.h b/aom_dsp/x86/txfm_common_sse2.h
index 0a6a227..027bd48 100644
--- a/aom_dsp/x86/txfm_common_sse2.h
+++ b/aom_dsp/x86/txfm_common_sse2.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_X86_TXFM_COMMON_SSE2_H_
-#define VPX_DSP_X86_TXFM_COMMON_SSE2_H_
+#ifndef AOM_DSP_X86_TXFM_COMMON_SSE2_H_
+#define AOM_DSP_X86_TXFM_COMMON_SSE2_H_
#include <emmintrin.h>
#include "aom/aom_integer.h"
@@ -27,4 +27,4 @@
_mm_setr_epi16((int16_t)(a), (int16_t)(b), (int16_t)(c), (int16_t)(d), \
(int16_t)(e), (int16_t)(f), (int16_t)(g), (int16_t)(h))
-#endif // VPX_DSP_X86_TXFM_COMMON_SSE2_H_
+#endif // AOM_DSP_X86_TXFM_COMMON_SSE2_H_
diff --git a/aom_mem/aom_mem.c b/aom_mem/aom_mem.c
index cbfc704..43f8237 100644
--- a/aom_mem/aom_mem.c
+++ b/aom_mem/aom_mem.c
@@ -9,7 +9,7 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#define __VPX_MEM_C__
+#define __AOM_MEM_C__
#include "aom_mem.h"
#include <stdio.h>
diff --git a/aom_mem/aom_mem.h b/aom_mem/aom_mem.h
index ae5fe3a..df0bff1 100644
--- a/aom_mem/aom_mem.h
+++ b/aom_mem/aom_mem.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_MEM_VPX_MEM_H_
-#define VPX_MEM_VPX_MEM_H_
+#ifndef AOM_MEM_AOM_MEM_H_
+#define AOM_MEM_AOM_MEM_H_
#include "aom_config.h"
#if defined(__uClinux__)
@@ -36,12 +36,12 @@
#include <string.h>
-#ifdef VPX_MEM_PLTFRM
-#include VPX_MEM_PLTFRM
+#ifdef AOM_MEM_PLTFRM
+#include AOM_MEM_PLTFRM
#endif
#if defined(__cplusplus)
}
#endif
-#endif // VPX_MEM_VPX_MEM_H_
+#endif // AOM_MEM_AOM_MEM_H_
diff --git a/aom_mem/include/aom_mem_intrnl.h b/aom_mem/include/aom_mem_intrnl.h
index 7dae6d9..2e96fa4 100644
--- a/aom_mem/include/aom_mem_intrnl.h
+++ b/aom_mem/include/aom_mem_intrnl.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
-#define VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
+#ifndef AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
+#define AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
#include "./aom_config.h"
#define ADDRESS_STORAGE_SIZE sizeof(size_t)
@@ -29,4 +29,4 @@
#define align_addr(addr, align) \
(void *)(((size_t)(addr) + ((align)-1)) & (size_t) - (align))
-#endif // VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_
+#endif // AOM_MEM_INCLUDE_AOM_MEM_INTRNL_H_
diff --git a/aom_ports/aom_once.h b/aom_ports/aom_once.h
index f5cfa50..3cfd2fd 100644
--- a/aom_ports/aom_once.h
+++ b/aom_ports/aom_once.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_VPX_ONCE_H_
-#define VPX_PORTS_VPX_ONCE_H_
+#ifndef AOM_PORTS_AOM_ONCE_H_
+#define AOM_PORTS_AOM_ONCE_H_
#include "aom_config.h"
@@ -138,4 +138,4 @@
}
#endif
-#endif // VPX_PORTS_VPX_ONCE_H_
+#endif // AOM_PORTS_AOM_ONCE_H_
diff --git a/aom_ports/aom_timer.h b/aom_ports/aom_timer.h
index b1c9a50..cc5203c 100644
--- a/aom_ports/aom_timer.h
+++ b/aom_ports/aom_timer.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_VPX_TIMER_H_
-#define VPX_PORTS_VPX_TIMER_H_
+#ifndef AOM_PORTS_AOM_TIMER_H_
+#define AOM_PORTS_AOM_TIMER_H_
#include "./aom_config.h"
@@ -105,4 +105,4 @@
#endif /* CONFIG_OS_SUPPORT */
-#endif // VPX_PORTS_VPX_TIMER_H_
+#endif // AOM_PORTS_AOM_TIMER_H_
diff --git a/aom_ports/arm.h b/aom_ports/arm.h
index ba8ffbc..448a70d 100644
--- a/aom_ports/arm.h
+++ b/aom_ports/arm.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_ARM_H_
-#define VPX_PORTS_ARM_H_
+#ifndef AOM_PORTS_ARM_H_
+#define AOM_PORTS_ARM_H_
#include <stdlib.h>
#include "aom_config.h"
@@ -30,11 +30,11 @@
// Earlier gcc compilers have issues with some neon intrinsics
#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 4 && \
__GNUC_MINOR__ <= 6
-#define VPX_INCOMPATIBLE_GCC
+#define AOM_INCOMPATIBLE_GCC
#endif
#ifdef __cplusplus
} // extern "C"
#endif
-#endif // VPX_PORTS_ARM_H_
+#endif // AOM_PORTS_ARM_H_
diff --git a/aom_ports/arm_cpudetect.c b/aom_ports/arm_cpudetect.c
index ae0571b..65ba846 100644
--- a/aom_ports/arm_cpudetect.c
+++ b/aom_ports/arm_cpudetect.c
@@ -23,7 +23,7 @@
static int arm_cpu_env_flags(int *flags) {
char *env;
- env = getenv("VPX_SIMD_CAPS");
+ env = getenv("AOM_SIMD_CAPS");
if (env && *env) {
*flags = (int)strtol(env, NULL, 0);
return 0;
@@ -34,7 +34,7 @@
static int arm_cpu_env_mask(void) {
char *env;
- env = getenv("VPX_SIMD_CAPS_MASK");
+ env = getenv("AOM_SIMD_CAPS_MASK");
return env && *env ? (int)strtol(env, NULL, 0) : ~0;
}
diff --git a/aom_ports/bitops.h b/aom_ports/bitops.h
index add744b..23c3f42 100644
--- a/aom_ports/bitops.h
+++ b/aom_ports/bitops.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_BITOPS_H_
-#define VPX_PORTS_BITOPS_H_
+#ifndef AOM_PORTS_BITOPS_H_
+#define AOM_PORTS_BITOPS_H_
#include <assert.h>
@@ -74,4 +74,4 @@
} // extern "C"
#endif
-#endif // VPX_PORTS_BITOPS_H_
+#endif // AOM_PORTS_BITOPS_H_
diff --git a/aom_ports/config.h b/aom_ports/config.h
index f9eb332..462ec66 100644
--- a/aom_ports/config.h
+++ b/aom_ports/config.h
@@ -9,9 +9,9 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_CONFIG_H_
-#define VPX_PORTS_CONFIG_H_
+#ifndef AOM_PORTS_CONFIG_H_
+#define AOM_PORTS_CONFIG_H_
#include "aom_config.h"
-#endif // VPX_PORTS_CONFIG_H_
+#endif // AOM_PORTS_CONFIG_H_
diff --git a/aom_ports/emmintrin_compat.h b/aom_ports/emmintrin_compat.h
index 053ef74..f9d44c6 100644
--- a/aom_ports/emmintrin_compat.h
+++ b/aom_ports/emmintrin_compat.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_EMMINTRIN_COMPAT_H_
-#define VPX_PORTS_EMMINTRIN_COMPAT_H_
+#ifndef AOM_PORTS_EMMINTRIN_COMPAT_H_
+#define AOM_PORTS_EMMINTRIN_COMPAT_H_
#if defined(__GNUC__) && __GNUC__ < 4
/* From emmintrin.h (gcc 4.5.3) */
@@ -53,4 +53,4 @@
}
#endif
-#endif // VPX_PORTS_EMMINTRIN_COMPAT_H_
+#endif // AOM_PORTS_EMMINTRIN_COMPAT_H_
diff --git a/aom_ports/mem.h b/aom_ports/mem.h
index c06c50c..b669ae8 100644
--- a/aom_ports/mem.h
+++ b/aom_ports/mem.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_MEM_H_
-#define VPX_PORTS_MEM_H_
+#ifndef AOM_PORTS_MEM_H_
+#define AOM_PORTS_MEM_H_
#include "aom_config.h"
#include "aom/aom_integer.h"
@@ -49,4 +49,4 @@
#define CONVERT_TO_BYTEPTR(x) ((uint8_t *)(((uintptr_t)x) >> 1))
#endif // CONFIG_AOM_HIGHBITDEPTH
-#endif // VPX_PORTS_MEM_H_
+#endif // AOM_PORTS_MEM_H_
diff --git a/aom_ports/mem_ops.h b/aom_ports/mem_ops.h
index 3f46351..c87873f 100644
--- a/aom_ports/mem_ops.h
+++ b/aom_ports/mem_ops.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_MEM_OPS_H_
-#define VPX_PORTS_MEM_OPS_H_
+#ifndef AOM_PORTS_MEM_OPS_H_
+#define AOM_PORTS_MEM_OPS_H_
/* \file
* \brief Provides portable memory access primitives
@@ -134,7 +134,7 @@
}
#define mem_get_s_generic(end, sz) \
- static VPX_INLINE signed MEM_VALUE_T mem_get_s##end##sz(const void *vmem) { \
+ static AOM_INLINE signed MEM_VALUE_T mem_get_s##end##sz(const void *vmem) { \
const MAU_T *mem = (const MAU_T *)vmem; \
signed MEM_VALUE_T val = mem_get_##end##sz(mem); \
return (val << (MEM_VALUE_T_SZ_BITS - sz)) >> (MEM_VALUE_T_SZ_BITS - sz); \
@@ -165,7 +165,7 @@
#undef mem_put_be16
#define mem_put_be16 mem_ops_wrap_symbol(mem_put_be16)
- static VPX_INLINE
+ static AOM_INLINE
void mem_put_be16(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
@@ -175,7 +175,7 @@
#undef mem_put_be24
#define mem_put_be24 mem_ops_wrap_symbol(mem_put_be24)
-static VPX_INLINE void mem_put_be24(void *vmem, MEM_VALUE_T val) {
+static AOM_INLINE void mem_put_be24(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (val >> 16) & 0xff;
@@ -185,7 +185,7 @@
#undef mem_put_be32
#define mem_put_be32 mem_ops_wrap_symbol(mem_put_be32)
-static VPX_INLINE void mem_put_be32(void *vmem, MEM_VALUE_T val) {
+static AOM_INLINE void mem_put_be32(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (val >> 24) & 0xff;
@@ -196,7 +196,7 @@
#undef mem_put_le16
#define mem_put_le16 mem_ops_wrap_symbol(mem_put_le16)
-static VPX_INLINE void mem_put_le16(void *vmem, MEM_VALUE_T val) {
+static AOM_INLINE void mem_put_le16(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (val >> 0) & 0xff;
@@ -205,7 +205,7 @@
#undef mem_put_le24
#define mem_put_le24 mem_ops_wrap_symbol(mem_put_le24)
-static VPX_INLINE void mem_put_le24(void *vmem, MEM_VALUE_T val) {
+static AOM_INLINE void mem_put_le24(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (val >> 0) & 0xff;
@@ -215,7 +215,7 @@
#undef mem_put_le32
#define mem_put_le32 mem_ops_wrap_symbol(mem_put_le32)
-static VPX_INLINE void mem_put_le32(void *vmem, MEM_VALUE_T val) {
+static AOM_INLINE void mem_put_le32(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (val >> 0) & 0xff;
@@ -224,4 +224,4 @@
mem[3] = (val >> 24) & 0xff;
}
-#endif // VPX_PORTS_MEM_OPS_H_
+#endif // AOM_PORTS_MEM_OPS_H_
diff --git a/aom_ports/mem_ops_aligned.h b/aom_ports/mem_ops_aligned.h
index 2c35bdd..6dcf321 100644
--- a/aom_ports/mem_ops_aligned.h
+++ b/aom_ports/mem_ops_aligned.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_MEM_OPS_ALIGNED_H_
-#define VPX_PORTS_MEM_OPS_ALIGNED_H_
+#ifndef AOM_PORTS_MEM_OPS_ALIGNED_H_
+#define AOM_PORTS_MEM_OPS_ALIGNED_H_
#include "aom/aom_integer.h"
@@ -45,21 +45,21 @@
#define swap_endian_32_se(val, raw) swap_endian_32(val, raw)
#define mem_get_ne_aligned_generic(end, sz) \
- static VPX_INLINE unsigned MEM_VALUE_T mem_get_##end##sz##_aligned( \
+ static AOM_INLINE unsigned MEM_VALUE_T mem_get_##end##sz##_aligned( \
const void *vmem) { \
const uint##sz##_t *mem = (const uint##sz##_t *)vmem; \
return *mem; \
}
#define mem_get_sne_aligned_generic(end, sz) \
- static VPX_INLINE signed MEM_VALUE_T mem_get_s##end##sz##_aligned( \
+ static AOM_INLINE signed MEM_VALUE_T mem_get_s##end##sz##_aligned( \
const void *vmem) { \
const int##sz##_t *mem = (const int##sz##_t *)vmem; \
return *mem; \
}
#define mem_get_se_aligned_generic(end, sz) \
- static VPX_INLINE unsigned MEM_VALUE_T mem_get_##end##sz##_aligned( \
+ static AOM_INLINE unsigned MEM_VALUE_T mem_get_##end##sz##_aligned( \
const void *vmem) { \
const uint##sz##_t *mem = (const uint##sz##_t *)vmem; \
unsigned MEM_VALUE_T val, raw = *mem; \
@@ -68,7 +68,7 @@
}
#define mem_get_sse_aligned_generic(end, sz) \
- static VPX_INLINE signed MEM_VALUE_T mem_get_s##end##sz##_aligned( \
+ static AOM_INLINE signed MEM_VALUE_T mem_get_s##end##sz##_aligned( \
const void *vmem) { \
const int##sz##_t *mem = (const int##sz##_t *)vmem; \
unsigned MEM_VALUE_T val, raw = *mem; \
@@ -77,14 +77,14 @@
}
#define mem_put_ne_aligned_generic(end, sz) \
- static VPX_INLINE void mem_put_##end##sz##_aligned(void *vmem, \
+ static AOM_INLINE void mem_put_##end##sz##_aligned(void *vmem, \
MEM_VALUE_T val) { \
uint##sz##_t *mem = (uint##sz##_t *)vmem; \
*mem = (uint##sz##_t)val; \
}
#define mem_put_se_aligned_generic(end, sz) \
- static VPX_INLINE void mem_put_##end##sz##_aligned(void *vmem, \
+ static AOM_INLINE void mem_put_##end##sz##_aligned(void *vmem, \
MEM_VALUE_T val) { \
uint##sz##_t *mem = (uint##sz##_t *)vmem, raw; \
swap_endian_##sz(raw, val); \
@@ -167,4 +167,4 @@
#undef swap_endian_16_se
#undef swap_endian_32_se
-#endif // VPX_PORTS_MEM_OPS_ALIGNED_H_
+#endif // AOM_PORTS_MEM_OPS_ALIGNED_H_
diff --git a/aom_ports/msvc.h b/aom_ports/msvc.h
index 132478b..89e986a 100644
--- a/aom_ports/msvc.h
+++ b/aom_ports/msvc.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_MSVC_H_
-#define VPX_PORTS_MSVC_H_
+#ifndef AOM_PORTS_MSVC_H_
+#define AOM_PORTS_MSVC_H_
#ifdef _MSC_VER
#include "./aom_config.h"
@@ -30,4 +30,4 @@
#endif // _MSC_VER < 1800
#endif // _MSC_VER
-#endif // VPX_PORTS_MSVC_H_
+#endif // AOM_PORTS_MSVC_H_
diff --git a/aom_ports/system_state.h b/aom_ports/system_state.h
index 0a277ed..5d40d4c 100644
--- a/aom_ports/system_state.h
+++ b/aom_ports/system_state.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_SYSTEM_STATE_H_
-#define VPX_PORTS_SYSTEM_STATE_H_
+#ifndef AOM_PORTS_SYSTEM_STATE_H_
+#define AOM_PORTS_SYSTEM_STATE_H_
#include "./aom_config.h"
@@ -20,4 +20,4 @@
#else
#define aom_clear_system_state()
#endif // ARCH_X86 || ARCH_X86_64
-#endif // VPX_PORTS_SYSTEM_STATE_H_
+#endif // AOM_PORTS_SYSTEM_STATE_H_
diff --git a/aom_ports/x86.h b/aom_ports/x86.h
index a088cdd..d823dbc 100644
--- a/aom_ports/x86.h
+++ b/aom_ports/x86.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_PORTS_X86_H_
-#define VPX_PORTS_X86_H_
+#ifndef AOM_PORTS_X86_H_
+#define AOM_PORTS_X86_H_
#include <stdlib.h>
#include "aom_config.h"
#include "aom/aom_integer.h"
@@ -20,22 +20,22 @@
#endif
typedef enum {
- VPX_CPU_UNKNOWN = -1,
- VPX_CPU_AMD,
- VPX_CPU_AMD_OLD,
- VPX_CPU_CENTAUR,
- VPX_CPU_CYRIX,
- VPX_CPU_INTEL,
- VPX_CPU_NEXGEN,
- VPX_CPU_NSC,
- VPX_CPU_RISE,
- VPX_CPU_SIS,
- VPX_CPU_TRANSMETA,
- VPX_CPU_TRANSMETA_OLD,
- VPX_CPU_UMC,
- VPX_CPU_VIA,
+ AOM_CPU_UNKNOWN = -1,
+ AOM_CPU_AMD,
+ AOM_CPU_AMD_OLD,
+ AOM_CPU_CENTAUR,
+ AOM_CPU_CYRIX,
+ AOM_CPU_INTEL,
+ AOM_CPU_NEXGEN,
+ AOM_CPU_NSC,
+ AOM_CPU_RISE,
+ AOM_CPU_SIS,
+ AOM_CPU_TRANSMETA,
+ AOM_CPU_TRANSMETA_OLD,
+ AOM_CPU_UMC,
+ AOM_CPU_VIA,
- VPX_CPU_LAST
+ AOM_CPU_LAST
} aom_cpu_t;
#if defined(__GNUC__) && __GNUC__ || defined(__ANDROID__)
@@ -173,11 +173,11 @@
(void)reg_ebx;
/* See if the CPU capabilities are being overridden by the environment */
- env = getenv("VPX_SIMD_CAPS");
+ env = getenv("AOM_SIMD_CAPS");
if (env && *env) return (int)strtol(env, NULL, 0);
- env = getenv("VPX_SIMD_CAPS_MASK");
+ env = getenv("AOM_SIMD_CAPS_MASK");
if (env && *env) mask = strtol(env, NULL, 0);
@@ -299,4 +299,4 @@
} // extern "C"
#endif
-#endif // VPX_PORTS_X86_H_
+#endif // AOM_PORTS_X86_H_
diff --git a/aom_scale/aom_scale.h b/aom_scale/aom_scale.h
index d0c6cd8..6e089f5 100644
--- a/aom_scale/aom_scale.h
+++ b/aom_scale/aom_scale.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_SCALE_VPX_SCALE_H_
-#define VPX_SCALE_VPX_SCALE_H_
+#ifndef AOM_SCALE_AOM_SCALE_H_
+#define AOM_SCALE_AOM_SCALE_H_
#include "aom_scale/yv12config.h"
@@ -20,4 +20,4 @@
unsigned int vscale, unsigned int vratio,
unsigned int interlaced);
-#endif // VPX_SCALE_VPX_SCALE_H_
+#endif // AOM_SCALE_AOM_SCALE_H_
diff --git a/aom_scale/generic/yv12extend.c b/aom_scale/generic/yv12extend.c
index 017f6d1..9df4a96 100644
--- a/aom_scale/generic/yv12extend.c
+++ b/aom_scale/generic/yv12extend.c
@@ -191,8 +191,8 @@
}
void aom_extend_frame_inner_borders_c(YV12_BUFFER_CONFIG *ybf) {
- const int inner_bw = (ybf->border > VPXINNERBORDERINPIXELS)
- ? VPXINNERBORDERINPIXELS
+ const int inner_bw = (ybf->border > AOMINNERBORDERINPIXELS)
+ ? AOMINNERBORDERINPIXELS
: ybf->border;
extend_frame(ybf, inner_bw);
}
diff --git a/aom_scale/mips/dspr2/yv12extend_dspr2.c b/aom_scale/mips/dspr2/yv12extend_dspr2.c
index 7e0ce14..51192f7 100644
--- a/aom_scale/mips/dspr2/yv12extend_dspr2.c
+++ b/aom_scale/mips/dspr2/yv12extend_dspr2.c
@@ -131,8 +131,8 @@
}
void aom_extend_frame_inner_borders_dspr2(YV12_BUFFER_CONFIG *ybf) {
- const int inner_bw = (ybf->border > VPXINNERBORDERINPIXELS)
- ? VPXINNERBORDERINPIXELS
+ const int inner_bw = (ybf->border > AOMINNERBORDERINPIXELS)
+ ? AOMINNERBORDERINPIXELS
: ybf->border;
extend_frame(ybf, inner_bw);
}
diff --git a/aom_scale/yv12config.h b/aom_scale/yv12config.h
index 9a2fce3..9f91567 100644
--- a/aom_scale/yv12config.h
+++ b/aom_scale/yv12config.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_SCALE_YV12CONFIG_H_
-#define VPX_SCALE_YV12CONFIG_H_
+#ifndef AOM_SCALE_YV12CONFIG_H_
+#define AOM_SCALE_YV12CONFIG_H_
#ifdef __cplusplus
extern "C" {
@@ -22,10 +22,10 @@
#include "aom/aom_integer.h"
#define VP8BORDERINPIXELS 32
-#define VPXINNERBORDERINPIXELS 96
-#define VPX_INTERP_EXTEND 4
-#define VPX_ENC_BORDER_IN_PIXELS 160
-#define VPX_DEC_BORDER_IN_PIXELS 32
+#define AOMINNERBORDERINPIXELS 96
+#define AOM_INTERP_EXTEND 4
+#define AOM_ENC_BORDER_IN_PIXELS 160
+#define AOM_DEC_BORDER_IN_PIXELS 32
typedef struct yv12_buffer_config {
int y_width;
@@ -101,4 +101,4 @@
}
#endif
-#endif // VPX_SCALE_YV12CONFIG_H_
+#endif // AOM_SCALE_YV12CONFIG_H_
diff --git a/aom_util/aom_thread.h b/aom_util/aom_thread.h
index 6c9752c..d047f21 100644
--- a/aom_util/aom_thread.h
+++ b/aom_util/aom_thread.h
@@ -15,8 +15,8 @@
// http://git.chromium.org/webm/libwebp.git
// 100644 blob 7bd451b124ae3b81596abfbcc823e3cb129d3a38 src/utils/thread.h
-#ifndef VPX_THREAD_H_
-#define VPX_THREAD_H_
+#ifndef AOM_THREAD_H_
+#define AOM_THREAD_H_
#include "./aom_config.h"
@@ -218,4 +218,4 @@
} // extern "C"
#endif
-#endif // VPX_THREAD_H_
+#endif // AOM_THREAD_H_
diff --git a/aom_util/endian_inl.h b/aom_util/endian_inl.h
index fcee5dd..17a2386 100644
--- a/aom_util/endian_inl.h
+++ b/aom_util/endian_inl.h
@@ -11,8 +11,8 @@
//
// Endian related functions.
-#ifndef VPX_UTIL_ENDIAN_INL_H_
-#define VPX_UTIL_ENDIAN_INL_H_
+#ifndef AOM_UTIL_ENDIAN_INL_H_
+#define AOM_UTIL_ENDIAN_INL_H_
#include <stdlib.h>
#include "./aom_config.h"
@@ -64,7 +64,7 @@
#if HAVE_MIPS32 && defined(__mips__) && !defined(__mips64) && \
defined(__mips_isa_rev) && (__mips_isa_rev >= 2) && (__mips_isa_rev < 6)
-#define VPX_USE_MIPS32_R2
+#define AOM_USE_MIPS32_R2
#endif
static INLINE uint16_t BSwap16(uint16_t x) {
@@ -79,7 +79,7 @@
}
static INLINE uint32_t BSwap32(uint32_t x) {
-#if defined(VPX_USE_MIPS32_R2)
+#if defined(AOM_USE_MIPS32_R2)
uint32_t ret;
__asm__ volatile(
"wsbh %[ret], %[x] \n\t"
@@ -117,4 +117,4 @@
#endif // HAVE_BUILTIN_BSWAP64
}
-#endif // VPX_UTIL_ENDIAN_INL_H_
+#endif // AOM_UTIL_ENDIAN_INL_H_
diff --git a/aomdec.c b/aomdec.c
index 9230b3c..39a6377 100644
--- a/aomdec.c
+++ b/aomdec.c
@@ -111,26 +111,26 @@
static INLINE int libyuv_scale(aom_image_t *src, aom_image_t *dst,
FilterModeEnum mode) {
#if CONFIG_AOM_HIGHBITDEPTH
- if (src->fmt == VPX_IMG_FMT_I42016) {
- assert(dst->fmt == VPX_IMG_FMT_I42016);
+ if (src->fmt == AOM_IMG_FMT_I42016) {
+ assert(dst->fmt == AOM_IMG_FMT_I42016);
return I420Scale_16(
- (uint16_t *)src->planes[VPX_PLANE_Y], src->stride[VPX_PLANE_Y] / 2,
- (uint16_t *)src->planes[VPX_PLANE_U], src->stride[VPX_PLANE_U] / 2,
- (uint16_t *)src->planes[VPX_PLANE_V], src->stride[VPX_PLANE_V] / 2,
- src->d_w, src->d_h, (uint16_t *)dst->planes[VPX_PLANE_Y],
- dst->stride[VPX_PLANE_Y] / 2, (uint16_t *)dst->planes[VPX_PLANE_U],
- dst->stride[VPX_PLANE_U] / 2, (uint16_t *)dst->planes[VPX_PLANE_V],
- dst->stride[VPX_PLANE_V] / 2, dst->d_w, dst->d_h, mode);
+ (uint16_t *)src->planes[AOM_PLANE_Y], src->stride[AOM_PLANE_Y] / 2,
+ (uint16_t *)src->planes[AOM_PLANE_U], src->stride[AOM_PLANE_U] / 2,
+ (uint16_t *)src->planes[AOM_PLANE_V], src->stride[AOM_PLANE_V] / 2,
+ src->d_w, src->d_h, (uint16_t *)dst->planes[AOM_PLANE_Y],
+ dst->stride[AOM_PLANE_Y] / 2, (uint16_t *)dst->planes[AOM_PLANE_U],
+ dst->stride[AOM_PLANE_U] / 2, (uint16_t *)dst->planes[AOM_PLANE_V],
+ dst->stride[AOM_PLANE_V] / 2, dst->d_w, dst->d_h, mode);
}
#endif
- assert(src->fmt == VPX_IMG_FMT_I420);
- assert(dst->fmt == VPX_IMG_FMT_I420);
- return I420Scale(src->planes[VPX_PLANE_Y], src->stride[VPX_PLANE_Y],
- src->planes[VPX_PLANE_U], src->stride[VPX_PLANE_U],
- src->planes[VPX_PLANE_V], src->stride[VPX_PLANE_V], src->d_w,
- src->d_h, dst->planes[VPX_PLANE_Y], dst->stride[VPX_PLANE_Y],
- dst->planes[VPX_PLANE_U], dst->stride[VPX_PLANE_U],
- dst->planes[VPX_PLANE_V], dst->stride[VPX_PLANE_V], dst->d_w,
+ assert(src->fmt == AOM_IMG_FMT_I420);
+ assert(dst->fmt == AOM_IMG_FMT_I420);
+ return I420Scale(src->planes[AOM_PLANE_Y], src->stride[AOM_PLANE_Y],
+ src->planes[AOM_PLANE_U], src->stride[AOM_PLANE_U],
+ src->planes[AOM_PLANE_V], src->stride[AOM_PLANE_V], src->d_w,
+ src->d_h, dst->planes[AOM_PLANE_Y], dst->stride[AOM_PLANE_Y],
+ dst->planes[AOM_PLANE_U], dst->stride[AOM_PLANE_U],
+ dst->planes[AOM_PLANE_V], dst->stride[AOM_PLANE_V], dst->d_w,
dst->d_h, mode);
}
#endif
@@ -240,7 +240,7 @@
const unsigned char *buf = img->planes[plane];
const int stride = img->stride[plane];
const int w = aom_img_plane_width(img, plane) *
- ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1);
+ ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 2 : 1);
const int h = aom_img_plane_height(img, plane);
for (y = 0; y < h; ++y) {
@@ -254,7 +254,7 @@
FILE *file) {
int i, y;
#if CONFIG_AOM_HIGHBITDEPTH
- const int bytes_per_sample = ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1);
+ const int bytes_per_sample = ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 2 : 1);
#else
const int bytes_per_sample = 1;
#endif
@@ -666,9 +666,9 @@
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);
+ dec_flags = (postproc ? AOM_CODEC_USE_POSTPROC : 0) |
+ (ec_enabled ? AOM_CODEC_USE_ERROR_CONCEALMENT : 0) |
+ (frame_parallel ? AOM_CODEC_USE_FRAME_THREADING : 0);
if (aom_codec_dec_init(&decoder, interface->codec_interface(), &cfg,
dec_flags)) {
fprintf(stderr, "Failed to initialize decoder: %s\n",
@@ -762,8 +762,8 @@
if (progress) show_progress(frame_in, frame_out, dx_time);
if (!noblit && img) {
- const int PLANES_YUV[] = { VPX_PLANE_Y, VPX_PLANE_U, VPX_PLANE_V };
- const int PLANES_YVU[] = { VPX_PLANE_Y, VPX_PLANE_V, VPX_PLANE_U };
+ const int PLANES_YUV[] = { AOM_PLANE_Y, AOM_PLANE_U, AOM_PLANE_V };
+ const int PLANES_YVU[] = { AOM_PLANE_Y, AOM_PLANE_V, AOM_PLANE_U };
const int *planes = flipuv ? PLANES_YVU : PLANES_YUV;
if (do_scale) {
@@ -815,8 +815,8 @@
if (output_bit_depth != 0 && output_bit_depth != img->bit_depth) {
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;
+ ? img->fmt ^ (img->fmt & AOM_IMG_FMT_HIGHBITDEPTH)
+ : img->fmt | AOM_IMG_FMT_HIGHBITDEPTH;
if (img_shifted &&
img_shifted_realloc_required(img, img_shifted, shifted_fmt)) {
aom_img_free(img_shifted);
@@ -841,7 +841,7 @@
if (use_y4m) {
char buf[Y4M_BUFFER_SIZE] = { 0 };
size_t len = 0;
- if (img->fmt == VPX_IMG_FMT_I440 || img->fmt == VPX_IMG_FMT_I44016) {
+ if (img->fmt == AOM_IMG_FMT_I440 || img->fmt == AOM_IMG_FMT_I44016) {
fprintf(stderr, "Cannot produce y4m output for 440 sampling.\n");
goto fail;
}
@@ -869,15 +869,15 @@
// Check if --yv12 or --i420 options are consistent with the
// bit-stream decoded
if (opt_i420) {
- if (img->fmt != VPX_IMG_FMT_I420 &&
- img->fmt != VPX_IMG_FMT_I42016) {
+ if (img->fmt != AOM_IMG_FMT_I420 &&
+ img->fmt != AOM_IMG_FMT_I42016) {
fprintf(stderr, "Cannot produce i420 output for bit-stream.\n");
goto fail;
}
}
if (opt_yv12) {
- if ((img->fmt != VPX_IMG_FMT_I420 &&
- img->fmt != VPX_IMG_FMT_YV12) ||
+ if ((img->fmt != AOM_IMG_FMT_I420 &&
+ img->fmt != AOM_IMG_FMT_YV12) ||
img->bit_depth != 8) {
fprintf(stderr, "Cannot produce yv12 output for bit-stream.\n");
goto fail;
diff --git a/aomenc.c b/aomenc.c
index 552126c..11a1566 100644
--- a/aomenc.c
+++ b/aomenc.c
@@ -286,10 +286,10 @@
ARG_DEF(NULL, "resize-up", 1, "Upscale threshold (buf %)");
static const arg_def_t resize_down_thresh =
ARG_DEF(NULL, "resize-down", 1, "Downscale threshold (buf %)");
-static const struct arg_enum_list end_usage_enum[] = { { "vbr", VPX_VBR },
- { "cbr", VPX_CBR },
- { "cq", VPX_CQ },
- { "q", VPX_Q },
+static const struct arg_enum_list end_usage_enum[] = { { "vbr", AOM_VBR },
+ { "cbr", AOM_CBR },
+ { "cq", AOM_CQ },
+ { "q", AOM_Q },
{ NULL, 0 } };
static const arg_def_t end_usage =
ARG_DEF_ENUM(NULL, "end-usage", 1, "Rate control mode", end_usage_enum);
@@ -348,7 +348,7 @@
ARG_DEF(NULL, "arnr-strength", 1, "AltRef filter strength (0..6)");
static const arg_def_t arnr_type = ARG_DEF(NULL, "arnr-type", 1, "AltRef type");
static const struct arg_enum_list tuning_enum[] = {
- { "psnr", VPX_TUNE_PSNR }, { "ssim", VPX_TUNE_SSIM }, { NULL, 0 }
+ { "psnr", AOM_TUNE_PSNR }, { "ssim", AOM_TUNE_SSIM }, { NULL, 0 }
};
static const arg_def_t tune_ssim =
ARG_DEF_ENUM(NULL, "tune", 1, "Material to favor", tuning_enum);
@@ -396,14 +396,14 @@
"max gf/arf frame interval (default 0, indicating in-built behavior)");
static const struct arg_enum_list color_space_enum[] = {
- { "unknown", VPX_CS_UNKNOWN },
- { "bt601", VPX_CS_BT_601 },
- { "bt709", VPX_CS_BT_709 },
- { "smpte170", VPX_CS_SMPTE_170 },
- { "smpte240", VPX_CS_SMPTE_240 },
- { "bt2020", VPX_CS_BT_2020 },
- { "reserved", VPX_CS_RESERVED },
- { "sRGB", VPX_CS_SRGB },
+ { "unknown", AOM_CS_UNKNOWN },
+ { "bt601", AOM_CS_BT_601 },
+ { "bt709", AOM_CS_BT_709 },
+ { "smpte170", AOM_CS_SMPTE_170 },
+ { "smpte240", AOM_CS_SMPTE_240 },
+ { "bt2020", AOM_CS_BT_2020 },
+ { "reserved", AOM_CS_RESERVED },
+ { "sRGB", AOM_CS_SRGB },
{ NULL, 0 }
};
@@ -413,7 +413,7 @@
#if CONFIG_AOM_HIGHBITDEPTH
static const struct arg_enum_list bitdepth_enum[] = {
- { "8", VPX_BITS_8 }, { "10", VPX_BITS_10 }, { "12", VPX_BITS_12 }, { NULL, 0 }
+ { "8", AOM_BITS_8 }, { "10", AOM_BITS_10 }, { "12", AOM_BITS_12 }, { NULL, 0 }
};
static const arg_def_t bitdeptharg = ARG_DEF_ENUM(
@@ -425,8 +425,8 @@
#endif
static const struct arg_enum_list tune_content_enum[] = {
- { "default", VPX_CONTENT_DEFAULT },
- { "screen", VPX_CONTENT_SCREEN },
+ { "default", AOM_CONTENT_DEFAULT },
+ { "screen", AOM_CONTENT_SCREEN },
{ NULL, 0 }
};
@@ -530,10 +530,10 @@
int match = 1;
uint32_t i, j;
yloc[0] = yloc[1] = yloc[2] = yloc[3] = -1;
- plane1 = (uint16_t *)img1->planes[VPX_PLANE_Y];
- plane2 = (uint16_t *)img2->planes[VPX_PLANE_Y];
- stride1 = img1->stride[VPX_PLANE_Y] / 2;
- stride2 = img2->stride[VPX_PLANE_Y] / 2;
+ plane1 = (uint16_t *)img1->planes[AOM_PLANE_Y];
+ plane2 = (uint16_t *)img2->planes[AOM_PLANE_Y];
+ stride1 = img1->stride[AOM_PLANE_Y] / 2;
+ stride2 = img2->stride[AOM_PLANE_Y] / 2;
for (i = 0, match = 1; match && i < img1->d_h; i += bsize) {
for (j = 0; match && j < img1->d_w; j += bsize) {
int k, l;
@@ -556,10 +556,10 @@
}
uloc[0] = uloc[1] = uloc[2] = uloc[3] = -1;
- plane1 = (uint16_t *)img1->planes[VPX_PLANE_U];
- plane2 = (uint16_t *)img2->planes[VPX_PLANE_U];
- stride1 = img1->stride[VPX_PLANE_U] / 2;
- stride2 = img2->stride[VPX_PLANE_U] / 2;
+ plane1 = (uint16_t *)img1->planes[AOM_PLANE_U];
+ plane2 = (uint16_t *)img2->planes[AOM_PLANE_U];
+ stride1 = img1->stride[AOM_PLANE_U] / 2;
+ stride2 = img2->stride[AOM_PLANE_U] / 2;
for (i = 0, match = 1; match && i < c_h; i += bsizey) {
for (j = 0; match && j < c_w; j += bsizex) {
int k, l;
@@ -582,10 +582,10 @@
}
vloc[0] = vloc[1] = vloc[2] = vloc[3] = -1;
- plane1 = (uint16_t *)img1->planes[VPX_PLANE_V];
- plane2 = (uint16_t *)img2->planes[VPX_PLANE_V];
- stride1 = img1->stride[VPX_PLANE_V] / 2;
- stride2 = img2->stride[VPX_PLANE_V] / 2;
+ plane1 = (uint16_t *)img1->planes[AOM_PLANE_V];
+ plane2 = (uint16_t *)img2->planes[AOM_PLANE_V];
+ stride1 = img1->stride[AOM_PLANE_V] / 2;
+ stride2 = img2->stride[AOM_PLANE_V] / 2;
for (i = 0, match = 1; match && i < c_h; i += bsizey) {
for (j = 0; match && j < c_w; j += bsizex) {
int k, l;
@@ -629,16 +629,16 @@
const int sj = mmin(j + bsize, img1->d_w) - j;
for (k = 0; match && k < si; ++k) {
for (l = 0; match && l < sj; ++l) {
- if (*(img1->planes[VPX_PLANE_Y] +
- (i + k) * img1->stride[VPX_PLANE_Y] + j + l) !=
- *(img2->planes[VPX_PLANE_Y] +
- (i + k) * img2->stride[VPX_PLANE_Y] + j + l)) {
+ if (*(img1->planes[AOM_PLANE_Y] +
+ (i + k) * img1->stride[AOM_PLANE_Y] + j + l) !=
+ *(img2->planes[AOM_PLANE_Y] +
+ (i + k) * img2->stride[AOM_PLANE_Y] + j + l)) {
yloc[0] = i + k;
yloc[1] = j + l;
- yloc[2] = *(img1->planes[VPX_PLANE_Y] +
- (i + k) * img1->stride[VPX_PLANE_Y] + j + l);
- yloc[3] = *(img2->planes[VPX_PLANE_Y] +
- (i + k) * img2->stride[VPX_PLANE_Y] + j + l);
+ yloc[2] = *(img1->planes[AOM_PLANE_Y] +
+ (i + k) * img1->stride[AOM_PLANE_Y] + j + l);
+ yloc[3] = *(img2->planes[AOM_PLANE_Y] +
+ (i + k) * img2->stride[AOM_PLANE_Y] + j + l);
match = 0;
break;
}
@@ -655,16 +655,16 @@
const int sj = mmin(j + bsizex, c_w - j);
for (k = 0; match && k < si; ++k) {
for (l = 0; match && l < sj; ++l) {
- if (*(img1->planes[VPX_PLANE_U] +
- (i + k) * img1->stride[VPX_PLANE_U] + j + l) !=
- *(img2->planes[VPX_PLANE_U] +
- (i + k) * img2->stride[VPX_PLANE_U] + j + l)) {
+ if (*(img1->planes[AOM_PLANE_U] +
+ (i + k) * img1->stride[AOM_PLANE_U] + j + l) !=
+ *(img2->planes[AOM_PLANE_U] +
+ (i + k) * img2->stride[AOM_PLANE_U] + j + l)) {
uloc[0] = i + k;
uloc[1] = j + l;
- uloc[2] = *(img1->planes[VPX_PLANE_U] +
- (i + k) * img1->stride[VPX_PLANE_U] + j + l);
- uloc[3] = *(img2->planes[VPX_PLANE_U] +
- (i + k) * img2->stride[VPX_PLANE_U] + j + l);
+ uloc[2] = *(img1->planes[AOM_PLANE_U] +
+ (i + k) * img1->stride[AOM_PLANE_U] + j + l);
+ uloc[3] = *(img2->planes[AOM_PLANE_U] +
+ (i + k) * img2->stride[AOM_PLANE_U] + j + l);
match = 0;
break;
}
@@ -680,16 +680,16 @@
const int sj = mmin(j + bsizex, c_w - j);
for (k = 0; match && k < si; ++k) {
for (l = 0; match && l < sj; ++l) {
- if (*(img1->planes[VPX_PLANE_V] +
- (i + k) * img1->stride[VPX_PLANE_V] + j + l) !=
- *(img2->planes[VPX_PLANE_V] +
- (i + k) * img2->stride[VPX_PLANE_V] + j + l)) {
+ if (*(img1->planes[AOM_PLANE_V] +
+ (i + k) * img1->stride[AOM_PLANE_V] + j + l) !=
+ *(img2->planes[AOM_PLANE_V] +
+ (i + k) * img2->stride[AOM_PLANE_V] + j + l)) {
vloc[0] = i + k;
vloc[1] = j + l;
- vloc[2] = *(img1->planes[VPX_PLANE_V] +
- (i + k) * img1->stride[VPX_PLANE_V] + j + l);
- vloc[3] = *(img2->planes[VPX_PLANE_V] +
- (i + k) * img2->stride[VPX_PLANE_V] + j + l);
+ vloc[2] = *(img1->planes[AOM_PLANE_V] +
+ (i + k) * img1->stride[AOM_PLANE_V] + j + l);
+ vloc[3] = *(img2->planes[AOM_PLANE_V] +
+ (i + k) * img2->stride[AOM_PLANE_V] + j + l);
match = 0;
break;
}
@@ -712,25 +712,25 @@
match &= (img1->d_w == img2->d_w);
match &= (img1->d_h == img2->d_h);
#if CONFIG_AOM_HIGHBITDEPTH
- if (img1->fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
+ if (img1->fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
l_w *= 2;
c_w *= 2;
}
#endif
for (i = 0; i < img1->d_h; ++i)
- match &= (memcmp(img1->planes[VPX_PLANE_Y] + i * img1->stride[VPX_PLANE_Y],
- img2->planes[VPX_PLANE_Y] + i * img2->stride[VPX_PLANE_Y],
+ match &= (memcmp(img1->planes[AOM_PLANE_Y] + i * img1->stride[AOM_PLANE_Y],
+ img2->planes[AOM_PLANE_Y] + i * img2->stride[AOM_PLANE_Y],
l_w) == 0);
for (i = 0; i < c_h; ++i)
- match &= (memcmp(img1->planes[VPX_PLANE_U] + i * img1->stride[VPX_PLANE_U],
- img2->planes[VPX_PLANE_U] + i * img2->stride[VPX_PLANE_U],
+ match &= (memcmp(img1->planes[AOM_PLANE_U] + i * img1->stride[AOM_PLANE_U],
+ img2->planes[AOM_PLANE_U] + i * img2->stride[AOM_PLANE_U],
c_w) == 0);
for (i = 0; i < c_h; ++i)
- match &= (memcmp(img1->planes[VPX_PLANE_V] + i * img1->stride[VPX_PLANE_V],
- img2->planes[VPX_PLANE_V] + i * img2->stride[VPX_PLANE_V],
+ match &= (memcmp(img1->planes[AOM_PLANE_V] + i * img1->stride[AOM_PLANE_V],
+ img2->planes[AOM_PLANE_V] + i * img2->stride[AOM_PLANE_V],
c_w) == 0);
return match;
@@ -817,7 +817,7 @@
global->passes = 0;
global->color_type = I420;
/* Assign default deadline to good quality */
- global->deadline = VPX_DL_GOOD_QUALITY;
+ global->deadline = AOM_DL_GOOD_QUALITY;
for (argi = argj = argv; (*argj = *argi); argi += arg.argv_step) {
arg.argv_step = 1;
@@ -841,11 +841,11 @@
else if (arg_match(&arg, &deadline, argi))
global->deadline = arg_parse_uint(&arg);
else if (arg_match(&arg, &best_dl, argi))
- global->deadline = VPX_DL_BEST_QUALITY;
+ global->deadline = AOM_DL_BEST_QUALITY;
else if (arg_match(&arg, &good_dl, argi))
- global->deadline = VPX_DL_GOOD_QUALITY;
+ global->deadline = AOM_DL_GOOD_QUALITY;
else if (arg_match(&arg, &rt_dl, argi))
- global->deadline = VPX_DL_REALTIME;
+ global->deadline = AOM_DL_REALTIME;
else if (arg_match(&arg, &use_yv12, argi))
global->color_type = YV12;
else if (arg_match(&arg, &use_i420, argi))
@@ -903,7 +903,7 @@
// encoder
if (global->codec != NULL && global->codec->name != NULL)
global->passes = (strcmp(global->codec->name, "vp9") == 0 &&
- global->deadline != VPX_DL_REALTIME)
+ global->deadline != AOM_DL_REALTIME)
? 2
: 1;
#else
@@ -911,7 +911,7 @@
#endif
}
- if (global->deadline == VPX_DL_REALTIME && global->passes > 1) {
+ if (global->deadline == AOM_DL_REALTIME && global->passes > 1) {
warn("Enforcing one-pass encoding in realtime mode\n");
global->passes = 1;
}
@@ -1013,7 +1013,7 @@
stream->ebml.debug = global->debug;
/* Default lag_in_frames is 0 in realtime mode */
- if (global->deadline == VPX_DL_REALTIME)
+ if (global->deadline == AOM_DL_REALTIME)
stream->config.cfg.g_lag_in_frames = 0;
}
@@ -1102,7 +1102,7 @@
config->cfg.g_error_resilient = arg_parse_uint(&arg);
} else if (arg_match(&arg, &lag_in_frames, argi)) {
config->cfg.g_lag_in_frames = arg_parse_uint(&arg);
- if (global->deadline == VPX_DL_REALTIME &&
+ if (global->deadline == AOM_DL_REALTIME &&
config->cfg.g_lag_in_frames != 0) {
warn("non-zero %s option ignored in realtime mode.\n", arg.name);
config->cfg.g_lag_in_frames = 0;
@@ -1157,7 +1157,7 @@
config->cfg.kf_max_dist = arg_parse_uint(&arg);
config->have_kf_max_dist = 1;
} else if (arg_match(&arg, &kf_disabled, argi)) {
- config->cfg.kf_mode = VPX_KF_DISABLED;
+ config->cfg.kf_mode = AOM_KF_DISABLED;
#if CONFIG_AOM_HIGHBITDEPTH
} else if (arg_match(&arg, &test16bitinternalarg, argi)) {
if (strcmp(global->codec->name, "vp9") == 0 ||
@@ -1301,15 +1301,15 @@
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";
- case VPX_IMG_FMT_I444: return "I444";
- case VPX_IMG_FMT_I440: return "I440";
- case VPX_IMG_FMT_YV12: return "YV12";
- case VPX_IMG_FMT_I42016: return "I42016";
- case VPX_IMG_FMT_I42216: return "I42216";
- case VPX_IMG_FMT_I44416: return "I44416";
- case VPX_IMG_FMT_I44016: return "I44016";
+ case AOM_IMG_FMT_I420: return "I420";
+ case AOM_IMG_FMT_I422: return "I422";
+ case AOM_IMG_FMT_I444: return "I444";
+ case AOM_IMG_FMT_I440: return "I440";
+ case AOM_IMG_FMT_YV12: return "YV12";
+ case AOM_IMG_FMT_I42016: return "I42016";
+ case AOM_IMG_FMT_I42216: return "I42216";
+ case AOM_IMG_FMT_I44416: return "I44416";
+ case AOM_IMG_FMT_I44016: return "I44016";
default: return "Other";
}
}
@@ -1373,7 +1373,7 @@
const char *fn = stream->config.out_fn;
const struct aom_codec_enc_cfg *const cfg = &stream->config.cfg;
- if (cfg->g_pass == VPX_RC_FIRST_PASS) return;
+ if (cfg->g_pass == AOM_RC_FIRST_PASS) return;
stream->file = strcmp(fn, "-") ? fopen(fn, "wb") : set_binary_mode(stdout);
@@ -1400,7 +1400,7 @@
unsigned int fourcc) {
const struct aom_codec_enc_cfg *const cfg = &stream->config.cfg;
- if (cfg->g_pass == VPX_RC_FIRST_PASS) return;
+ if (cfg->g_pass == AOM_RC_FIRST_PASS) return;
#if CONFIG_WEBM_IO
if (stream->config.write_webm) {
@@ -1439,8 +1439,8 @@
#endif
stream->config.cfg.g_pass = global->passes == 2
- ? pass ? VPX_RC_LAST_PASS : VPX_RC_FIRST_PASS
- : VPX_RC_ONE_PASS;
+ ? pass ? AOM_RC_LAST_PASS : AOM_RC_FIRST_PASS
+ : AOM_RC_ONE_PASS;
if (pass) {
stream->config.cfg.rc_twopass_stats_in = stats_get(&stream->stats);
#if CONFIG_FP_MB_STATS
@@ -1459,10 +1459,10 @@
int i;
int flags = 0;
- flags |= global->show_psnr ? VPX_CODEC_USE_PSNR : 0;
- flags |= global->out_part ? VPX_CODEC_USE_OUTPUT_PARTITION : 0;
+ flags |= global->show_psnr ? AOM_CODEC_USE_PSNR : 0;
+ flags |= global->out_part ? AOM_CODEC_USE_OUTPUT_PARTITION : 0;
#if CONFIG_AOM_HIGHBITDEPTH
- flags |= stream->config.use_16bit_internal ? VPX_CODEC_USE_HIGHBITDEPTH : 0;
+ flags |= stream->config.use_16bit_internal ? AOM_CODEC_USE_HIGHBITDEPTH : 0;
#endif
/* Construct Encoder Context */
@@ -1508,27 +1508,27 @@
/* Scale if necessary */
#if CONFIG_AOM_HIGHBITDEPTH
if (img) {
- if ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) &&
+ if ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) &&
(img->d_w != cfg->g_w || img->d_h != cfg->g_h)) {
- if (img->fmt != VPX_IMG_FMT_I42016) {
+ if (img->fmt != AOM_IMG_FMT_I42016) {
fprintf(stderr, "%s can only scale 4:2:0 inputs\n", exec_name);
exit(EXIT_FAILURE);
}
#if CONFIG_LIBYUV
if (!stream->img) {
stream->img =
- aom_img_alloc(NULL, VPX_IMG_FMT_I42016, cfg->g_w, cfg->g_h, 16);
+ aom_img_alloc(NULL, AOM_IMG_FMT_I42016, cfg->g_w, cfg->g_h, 16);
}
I420Scale_16(
- (uint16 *)img->planes[VPX_PLANE_Y], img->stride[VPX_PLANE_Y] / 2,
- (uint16 *)img->planes[VPX_PLANE_U], img->stride[VPX_PLANE_U] / 2,
- (uint16 *)img->planes[VPX_PLANE_V], img->stride[VPX_PLANE_V] / 2,
- img->d_w, img->d_h, (uint16 *)stream->img->planes[VPX_PLANE_Y],
- stream->img->stride[VPX_PLANE_Y] / 2,
- (uint16 *)stream->img->planes[VPX_PLANE_U],
- stream->img->stride[VPX_PLANE_U] / 2,
- (uint16 *)stream->img->planes[VPX_PLANE_V],
- stream->img->stride[VPX_PLANE_V] / 2, stream->img->d_w,
+ (uint16 *)img->planes[AOM_PLANE_Y], img->stride[AOM_PLANE_Y] / 2,
+ (uint16 *)img->planes[AOM_PLANE_U], img->stride[AOM_PLANE_U] / 2,
+ (uint16 *)img->planes[AOM_PLANE_V], img->stride[AOM_PLANE_V] / 2,
+ img->d_w, img->d_h, (uint16 *)stream->img->planes[AOM_PLANE_Y],
+ stream->img->stride[AOM_PLANE_Y] / 2,
+ (uint16 *)stream->img->planes[AOM_PLANE_U],
+ stream->img->stride[AOM_PLANE_U] / 2,
+ (uint16 *)stream->img->planes[AOM_PLANE_V],
+ stream->img->stride[AOM_PLANE_V] / 2, stream->img->d_w,
stream->img->d_h, kFilterBox);
img = stream->img;
#else
@@ -1543,21 +1543,21 @@
}
#endif
if (img && (img->d_w != cfg->g_w || img->d_h != cfg->g_h)) {
- if (img->fmt != VPX_IMG_FMT_I420 && img->fmt != VPX_IMG_FMT_YV12) {
+ if (img->fmt != AOM_IMG_FMT_I420 && img->fmt != AOM_IMG_FMT_YV12) {
fprintf(stderr, "%s can only scale 4:2:0 8bpp inputs\n", exec_name);
exit(EXIT_FAILURE);
}
#if CONFIG_LIBYUV
if (!stream->img)
stream->img =
- aom_img_alloc(NULL, VPX_IMG_FMT_I420, cfg->g_w, cfg->g_h, 16);
+ aom_img_alloc(NULL, AOM_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],
- img->planes[VPX_PLANE_V], img->stride[VPX_PLANE_V], img->d_w, img->d_h,
- stream->img->planes[VPX_PLANE_Y], stream->img->stride[VPX_PLANE_Y],
- stream->img->planes[VPX_PLANE_U], stream->img->stride[VPX_PLANE_U],
- stream->img->planes[VPX_PLANE_V], stream->img->stride[VPX_PLANE_V],
+ img->planes[AOM_PLANE_Y], img->stride[AOM_PLANE_Y],
+ img->planes[AOM_PLANE_U], img->stride[AOM_PLANE_U],
+ img->planes[AOM_PLANE_V], img->stride[AOM_PLANE_V], img->d_w, img->d_h,
+ stream->img->planes[AOM_PLANE_Y], stream->img->stride[AOM_PLANE_Y],
+ stream->img->planes[AOM_PLANE_U], stream->img->stride[AOM_PLANE_U],
+ stream->img->planes[AOM_PLANE_V], stream->img->stride[AOM_PLANE_V],
stream->img->d_w, stream->img->d_h, kFilterBox);
img = stream->img;
#else
@@ -1581,7 +1581,7 @@
}
static void update_quantizer_histogram(struct stream_state *stream) {
- if (stream->config.cfg.g_pass != VPX_RC_FIRST_PASS) {
+ if (stream->config.cfg.g_pass != AOM_RC_FIRST_PASS) {
int q;
aom_codec_control(&stream->encoder, VP8E_GET_LAST_QUANTIZER_64, &q);
@@ -1602,8 +1602,8 @@
static int64_t ivf_header_pos = 0;
switch (pkt->kind) {
- case VPX_CODEC_CX_FRAME_PKT:
- if (!(pkt->data.frame.flags & VPX_FRAME_IS_FRAGMENT)) {
+ case AOM_CODEC_CX_FRAME_PKT:
+ if (!(pkt->data.frame.flags & AOM_FRAME_IS_FRAGMENT)) {
stream->frames_out++;
}
if (!global->quiet)
@@ -1624,7 +1624,7 @@
} else {
fsize += pkt->data.frame.sz;
- if (!(pkt->data.frame.flags & VPX_FRAME_IS_FRAGMENT)) {
+ if (!(pkt->data.frame.flags & AOM_FRAME_IS_FRAGMENT)) {
const int64_t currpos = ftello(stream->file);
fseeko(stream->file, ivf_header_pos, SEEK_SET);
ivf_write_frame_size(stream->file, fsize);
@@ -1652,20 +1652,20 @@
}
#endif
break;
- case VPX_CODEC_STATS_PKT:
+ case AOM_CODEC_STATS_PKT:
stream->frames_out++;
stats_write(&stream->stats, pkt->data.twopass_stats.buf,
pkt->data.twopass_stats.sz);
stream->nbytes += pkt->data.raw.sz;
break;
#if CONFIG_FP_MB_STATS
- case VPX_CODEC_FPMB_STATS_PKT:
+ case AOM_CODEC_FPMB_STATS_PKT:
stats_write(&stream->fpmb_stats, pkt->data.firstpass_mb_stats.buf,
pkt->data.firstpass_mb_stats.sz);
stream->nbytes += pkt->data.raw.sz;
break;
#endif
- case VPX_CODEC_PSNR_PKT:
+ case AOM_CODEC_PSNR_PKT:
if (global->show_psnr) {
int i;
@@ -1722,15 +1722,15 @@
aom_codec_control(&stream->decoder, VP9_GET_REFERENCE, &ref_dec);
dec_img = ref_dec.img;
#if CONFIG_AOM_HIGHBITDEPTH
- if ((enc_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH) !=
- (dec_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH)) {
- if (enc_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
- aom_img_alloc(&enc_img, enc_img.fmt - VPX_IMG_FMT_HIGHBITDEPTH,
+ if ((enc_img.fmt & AOM_IMG_FMT_HIGHBITDEPTH) !=
+ (dec_img.fmt & AOM_IMG_FMT_HIGHBITDEPTH)) {
+ if (enc_img.fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
+ aom_img_alloc(&enc_img, enc_img.fmt - AOM_IMG_FMT_HIGHBITDEPTH,
enc_img.d_w, enc_img.d_h, 16);
aom_img_truncate_16_to_8(&enc_img, &ref_enc.img);
}
- if (dec_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
- aom_img_alloc(&dec_img, dec_img.fmt - VPX_IMG_FMT_HIGHBITDEPTH,
+ if (dec_img.fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
+ aom_img_alloc(&dec_img, dec_img.fmt - AOM_IMG_FMT_HIGHBITDEPTH,
dec_img.d_w, dec_img.d_h, 16);
aom_img_truncate_16_to_8(&dec_img, &ref_dec.img);
}
@@ -1742,7 +1742,7 @@
if (!compare_img(&enc_img, &dec_img)) {
int y[4], u[4], v[4];
#if CONFIG_AOM_HIGHBITDEPTH
- if (enc_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
+ if (enc_img.fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
find_mismatch_high(&enc_img, &dec_img, y, u, v);
} else {
find_mismatch(&enc_img, &dec_img, y, u, v);
@@ -1822,11 +1822,11 @@
parse_global_config(&global, argv);
switch (global.color_type) {
- case I420: input.fmt = VPX_IMG_FMT_I420; break;
- case I422: input.fmt = VPX_IMG_FMT_I422; break;
- case I444: input.fmt = VPX_IMG_FMT_I444; break;
- case I440: input.fmt = VPX_IMG_FMT_I440; break;
- case YV12: input.fmt = VPX_IMG_FMT_YV12; break;
+ case I420: input.fmt = AOM_IMG_FMT_I420; break;
+ case I422: input.fmt = AOM_IMG_FMT_I422; break;
+ case I444: input.fmt = AOM_IMG_FMT_I444; break;
+ case I440: input.fmt = AOM_IMG_FMT_I440; break;
+ case YV12: input.fmt = AOM_IMG_FMT_YV12; break;
}
{
@@ -1900,7 +1900,7 @@
input.bit_depth = stream->config.cfg.g_input_bit_depth =
(int)stream->config.cfg.g_bit_depth;
});
- if (input.bit_depth > 8) input.fmt |= VPX_IMG_FMT_HIGHBITDEPTH;
+ if (input.bit_depth > 8) input.fmt |= AOM_IMG_FMT_HIGHBITDEPTH;
} else {
FOREACH_STREAM(
{ stream->config.cfg.g_input_bit_depth = input.bit_depth; });
@@ -2025,7 +2025,7 @@
// Input bit depth and stream bit depth do not match, so up
// shift frame to stream bit depth
if (!allocated_raw_shift) {
- aom_img_alloc(&raw_shift, raw.fmt | VPX_IMG_FMT_HIGHBITDEPTH,
+ aom_img_alloc(&raw_shift, raw.fmt | AOM_IMG_FMT_HIGHBITDEPTH,
input.width, input.height, 32);
allocated_raw_shift = 1;
}
@@ -2036,7 +2036,7 @@
}
aom_usec_timer_start(&timer);
if (use_16bit_internal) {
- assert(frame_to_encode->fmt & VPX_IMG_FMT_HIGHBITDEPTH);
+ assert(frame_to_encode->fmt & AOM_IMG_FMT_HIGHBITDEPTH);
FOREACH_STREAM({
if (stream->config.use_16bit_internal)
encode_frame(stream, &global,
@@ -2045,7 +2045,7 @@
assert(0);
});
} else {
- assert((frame_to_encode->fmt & VPX_IMG_FMT_HIGHBITDEPTH) == 0);
+ assert((frame_to_encode->fmt & AOM_IMG_FMT_HIGHBITDEPTH) == 0);
FOREACH_STREAM(encode_frame(stream, &global,
frame_avail ? frame_to_encode : NULL,
frames_in));
diff --git a/aomenc.h b/aomenc.h
index 7f64bfe..6527344 100644
--- a/aomenc.h
+++ b/aomenc.h
@@ -8,8 +8,8 @@
* 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.
*/
-#ifndef VPXENC_H_
-#define VPXENC_H_
+#ifndef AOMENC_H_
+#define AOMENC_H_
#include "aom/aom_encoder.h"
@@ -62,4 +62,4 @@
} // extern "C"
#endif
-#endif // VPXENC_H_
+#endif // AOMENC_H_
diff --git a/aomstats.h b/aomstats.h
index c59bc99..6438093 100644
--- a/aomstats.h
+++ b/aomstats.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPXSTATS_H_
-#define VPXSTATS_H_
+#ifndef AOMSTATS_H_
+#define AOMSTATS_H_
#include <stdio.h>
@@ -41,4 +41,4 @@
} // extern "C"
#endif
-#endif // VPXSTATS_H_
+#endif // AOMSTATS_H_
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index 9215237..c9cd6b8 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -68,7 +68,7 @@
5, // arnr_strength
0, // min_gf_interval; 0 -> default decision
0, // max_gf_interval; 0 -> default decision
- VPX_TUNE_PSNR, // tuning
+ AOM_TUNE_PSNR, // tuning
10, // cq_level
0, // rc_max_intra_bitrate_pct
0, // rc_max_inter_bitrate_pct
@@ -82,9 +82,9 @@
1, // frame_parallel_decoding_mode
NO_AQ, // aq_mode
0, // frame_periodic_delta_q
- VPX_BITS_8, // Bit depth
- VPX_CONTENT_DEFAULT, // content
- VPX_CS_UNKNOWN, // color space
+ AOM_BITS_8, // Bit depth
+ AOM_CONTENT_DEFAULT, // content
+ AOM_CS_UNKNOWN, // color space
0, // color range
0, // render width
0, // render height
@@ -115,21 +115,21 @@
BufferPool *buffer_pool;
};
-static VPX_REFFRAME ref_frame_to_av1_reframe(aom_ref_frame_type_t frame) {
+static AOM_REFFRAME ref_frame_to_av1_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;
- case VP8_ALTR_FRAME: return VPX_ALT_FLAG;
+ case VP8_LAST_FRAME: return AOM_LAST_FLAG;
+ case VP8_GOLD_FRAME: return AOM_GOLD_FLAG;
+ case VP8_ALTR_FRAME: return AOM_ALT_FLAG;
}
assert(0 && "Invalid Reference Frame");
- return VPX_LAST_FLAG;
+ return AOM_LAST_FLAG;
}
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)
+ if (res != AOM_CODEC_OK)
ctx->base.err_detail = error->has_detail ? error->detail : NULL;
return res;
@@ -139,7 +139,7 @@
#define ERROR(str) \
do { \
ctx->base.err_detail = str; \
- return VPX_CODEC_INVALID_PARAM; \
+ return AOM_CODEC_INVALID_PARAM; \
} while (0)
#define RANGE_CHECK(p, memb, lo, hi) \
@@ -179,16 +179,16 @@
RANGE_CHECK(extra_cfg, frame_periodic_boost, 0, 1);
RANGE_CHECK_HI(cfg, g_threads, 64);
RANGE_CHECK_HI(cfg, g_lag_in_frames, MAX_LAG_BUFFERS);
- RANGE_CHECK(cfg, rc_end_usage, VPX_VBR, VPX_Q);
+ RANGE_CHECK(cfg, rc_end_usage, AOM_VBR, AOM_Q);
RANGE_CHECK_HI(cfg, rc_undershoot_pct, 100);
RANGE_CHECK_HI(cfg, rc_overshoot_pct, 100);
RANGE_CHECK_HI(cfg, rc_2pass_vbr_bias_pct, 100);
- RANGE_CHECK(cfg, kf_mode, VPX_KF_DISABLED, VPX_KF_AUTO);
+ RANGE_CHECK(cfg, kf_mode, AOM_KF_DISABLED, AOM_KF_AUTO);
RANGE_CHECK_BOOL(cfg, rc_resize_allowed);
RANGE_CHECK_HI(cfg, rc_dropframe_thresh, 100);
RANGE_CHECK_HI(cfg, rc_resize_up_thresh, 100);
RANGE_CHECK_HI(cfg, rc_resize_down_thresh, 100);
- RANGE_CHECK(cfg, g_pass, VPX_RC_ONE_PASS, VPX_RC_LAST_PASS);
+ RANGE_CHECK(cfg, g_pass, AOM_RC_ONE_PASS, AOM_RC_LAST_PASS);
RANGE_CHECK(extra_cfg, min_gf_interval, 0, (MAX_LAG_BUFFERS - 1));
RANGE_CHECK(extra_cfg, max_gf_interval, 0, (MAX_LAG_BUFFERS - 1));
if (extra_cfg->max_gf_interval > 0) {
@@ -210,7 +210,7 @@
RANGE_CHECK(cfg, ts_number_layers, 1, 1);
// AV1 does not support a lower bound on the keyframe interval in
// automatic keyframe placement mode.
- if (cfg->kf_mode != VPX_KF_DISABLED && cfg->kf_min_dist != cfg->kf_max_dist &&
+ if (cfg->kf_mode != AOM_KF_DISABLED && cfg->kf_min_dist != cfg->kf_max_dist &&
cfg->kf_min_dist > 0)
ERROR(
"kf_min_dist not supported in auto mode, use 0 "
@@ -225,15 +225,15 @@
RANGE_CHECK(extra_cfg, arnr_max_frames, 0, 15);
RANGE_CHECK_HI(extra_cfg, arnr_strength, 6);
RANGE_CHECK(extra_cfg, cq_level, 0, 63);
- RANGE_CHECK(cfg, g_bit_depth, VPX_BITS_8, VPX_BITS_12);
+ RANGE_CHECK(cfg, g_bit_depth, AOM_BITS_8, AOM_BITS_12);
RANGE_CHECK(cfg, g_input_bit_depth, 8, 12);
- RANGE_CHECK(extra_cfg, content, VPX_CONTENT_DEFAULT, VPX_CONTENT_INVALID - 1);
+ RANGE_CHECK(extra_cfg, content, AOM_CONTENT_DEFAULT, AOM_CONTENT_INVALID - 1);
// TODO(yaowu): remove this when ssim tuning is implemented for av1
- if (extra_cfg->tuning == VPX_TUNE_SSIM)
+ if (extra_cfg->tuning == AOM_TUNE_SSIM)
ERROR("Option --tune=ssim is not currently supported in AV1.");
- if (cfg->g_pass == VPX_RC_LAST_PASS) {
+ if (cfg->g_pass == AOM_RC_LAST_PASS) {
const size_t packet_sz = sizeof(FIRSTPASS_STATS);
const int n_packets = (int)(cfg->rc_twopass_stats_in.sz / packet_sz);
const FIRSTPASS_STATS *stats;
@@ -260,39 +260,39 @@
}
#endif
if (cfg->g_profile <= (unsigned int)PROFILE_1 &&
- cfg->g_bit_depth > VPX_BITS_8) {
+ cfg->g_bit_depth > AOM_BITS_8) {
ERROR("Codec high bit-depth not supported in profile < 2");
}
if (cfg->g_profile <= (unsigned int)PROFILE_1 && cfg->g_input_bit_depth > 8) {
ERROR("Source high bit-depth not supported in profile < 2");
}
if (cfg->g_profile > (unsigned int)PROFILE_1 &&
- cfg->g_bit_depth == VPX_BITS_8) {
+ cfg->g_bit_depth == AOM_BITS_8) {
ERROR("Codec bit-depth 8 not supported in profile > 1");
}
- RANGE_CHECK(extra_cfg, color_space, VPX_CS_UNKNOWN, VPX_CS_SRGB);
+ RANGE_CHECK(extra_cfg, color_space, AOM_CS_UNKNOWN, AOM_CS_SRGB);
RANGE_CHECK(extra_cfg, color_range, 0, 1);
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
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:
- case VPX_IMG_FMT_I42016: break;
- case VPX_IMG_FMT_I422:
- case VPX_IMG_FMT_I444:
- case VPX_IMG_FMT_I440:
+ case AOM_IMG_FMT_YV12:
+ case AOM_IMG_FMT_I420:
+ case AOM_IMG_FMT_I42016: break;
+ case AOM_IMG_FMT_I422:
+ case AOM_IMG_FMT_I444:
+ case AOM_IMG_FMT_I440:
if (ctx->cfg.g_profile != (unsigned int)PROFILE_1) {
ERROR(
"Invalid image format. I422, I444, I440 images are "
"not supported in profile.");
}
break;
- case VPX_IMG_FMT_I42216:
- case VPX_IMG_FMT_I44416:
- case VPX_IMG_FMT_I44016:
+ case AOM_IMG_FMT_I42216:
+ case AOM_IMG_FMT_I44416:
+ case AOM_IMG_FMT_I44016:
if (ctx->cfg.g_profile != (unsigned int)PROFILE_1 &&
ctx->cfg.g_profile != (unsigned int)PROFILE_3) {
ERROR(
@@ -310,20 +310,20 @@
if (img->d_w != ctx->cfg.g_w || img->d_h != ctx->cfg.g_h)
ERROR("Image size must match encoder init configuration size");
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
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;
- case VPX_IMG_FMT_I422: return 16;
- case VPX_IMG_FMT_I444: return 24;
- case VPX_IMG_FMT_I440: return 16;
- case VPX_IMG_FMT_I42016: return 24;
- case VPX_IMG_FMT_I42216: return 32;
- case VPX_IMG_FMT_I44416: return 48;
- case VPX_IMG_FMT_I44016: return 32;
+ case AOM_IMG_FMT_YV12:
+ case AOM_IMG_FMT_I420: return 12;
+ case AOM_IMG_FMT_I422: return 16;
+ case AOM_IMG_FMT_I444: return 24;
+ case AOM_IMG_FMT_I440: return 16;
+ case AOM_IMG_FMT_I42016: return 24;
+ case AOM_IMG_FMT_I42216: return 32;
+ case AOM_IMG_FMT_I44416: return 48;
+ case AOM_IMG_FMT_I44016: return 32;
default: assert(0 && "Invalid image format"); break;
}
return 0;
@@ -332,7 +332,7 @@
static aom_codec_err_t set_encoder_config(
AV1EncoderConfig *oxcf, const aom_codec_enc_cfg_t *cfg,
const struct av1_extracfg *extra_cfg) {
- const int is_vbr = cfg->rc_end_usage == VPX_VBR;
+ const int is_vbr = cfg->rc_end_usage == AOM_VBR;
oxcf->profile = cfg->g_profile;
oxcf->max_threads = (int)cfg->g_threads;
oxcf->width = cfg->g_w;
@@ -346,13 +346,13 @@
oxcf->mode = GOOD;
switch (cfg->g_pass) {
- case VPX_RC_ONE_PASS: oxcf->pass = 0; break;
- case VPX_RC_FIRST_PASS: oxcf->pass = 1; break;
- case VPX_RC_LAST_PASS: oxcf->pass = 2; break;
+ case AOM_RC_ONE_PASS: oxcf->pass = 0; break;
+ case AOM_RC_FIRST_PASS: oxcf->pass = 1; break;
+ case AOM_RC_LAST_PASS: oxcf->pass = 2; break;
}
oxcf->lag_in_frames =
- cfg->g_pass == VPX_RC_FIRST_PASS ? 0 : cfg->g_lag_in_frames;
+ cfg->g_pass == AOM_RC_FIRST_PASS ? 0 : cfg->g_lag_in_frames;
oxcf->rc_mode = cfg->rc_end_usage;
// Convert target bandwidth from Kbit/s to Bit/s
@@ -399,7 +399,7 @@
oxcf->two_pass_vbrmax_section = cfg->rc_2pass_vbr_maxsection_pct;
oxcf->auto_key =
- cfg->kf_mode == VPX_KF_AUTO && cfg->kf_min_dist != cfg->kf_max_dist;
+ cfg->kf_mode == AOM_KF_AUTO && cfg->kf_min_dist != cfg->kf_max_dist;
oxcf->key_freq = cfg->kf_max_dist;
@@ -469,7 +469,7 @@
printf("frame parallel detokenization: %d\n",
oxcf->frame_parallel_decoding_mode);
*/
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static aom_codec_err_t encoder_set_config(aom_codec_alg_priv_t *ctx,
@@ -478,7 +478,7 @@
int force_key = 0;
if (cfg->g_w != ctx->cfg.g_w || cfg->g_h != ctx->cfg.g_h) {
- if (cfg->g_lag_in_frames > 1 || cfg->g_pass != VPX_RC_ONE_PASS)
+ if (cfg->g_lag_in_frames > 1 || cfg->g_pass != AOM_RC_ONE_PASS)
ERROR("Cannot change width or height after initialization");
if (!valid_ref_frame_size(ctx->cfg.g_w, ctx->cfg.g_h, cfg->g_w, cfg->g_h) ||
(ctx->cpi->initial_width && (int)cfg->g_w > ctx->cpi->initial_width) ||
@@ -495,7 +495,7 @@
res = validate_config(ctx, cfg, &ctx->extra_cfg);
- if (res == VPX_CODEC_OK) {
+ if (res == AOM_CODEC_OK) {
ctx->cfg = *cfg;
set_encoder_config(&ctx->oxcf, &ctx->cfg, &ctx->extra_cfg);
// On profile change, request a key frame
@@ -503,7 +503,7 @@
av1_change_config(ctx->cpi, &ctx->oxcf);
}
- if (force_key) ctx->next_frame_flags |= VPX_EFLAG_FORCE_KF;
+ if (force_key) ctx->next_frame_flags |= AOM_EFLAG_FORCE_KF;
return res;
}
@@ -511,23 +511,23 @@
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;
+ if (arg == NULL) return AOM_CODEC_INVALID_PARAM;
*arg = av1_get_quantizer(ctx->cpi);
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
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;
+ if (arg == NULL) return AOM_CODEC_INVALID_PARAM;
*arg = av1_qindex_to_quantizer(av1_get_quantizer(ctx->cpi));
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static aom_codec_err_t update_extra_cfg(aom_codec_alg_priv_t *ctx,
const struct av1_extracfg *extra_cfg) {
const aom_codec_err_t res = validate_config(ctx, &ctx->cfg, extra_cfg);
- if (res == VPX_CODEC_OK) {
+ if (res == AOM_CODEC_OK) {
ctx->extra_cfg = *extra_cfg;
set_encoder_config(&ctx->oxcf, &ctx->cfg, &ctx->extra_cfg);
av1_change_config(ctx->cpi, &ctx->oxcf);
@@ -602,7 +602,7 @@
va_list args) {
(void)ctx;
(void)args;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static aom_codec_err_t ctrl_set_tuning(aom_codec_alg_priv_t *ctx,
@@ -710,22 +710,22 @@
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;
+ aom_codec_err_t res = AOM_CODEC_OK;
(void)data;
if (ctx->priv == NULL) {
aom_codec_alg_priv_t *const priv = aom_calloc(1, sizeof(*priv));
- if (priv == NULL) return VPX_CODEC_MEM_ERROR;
+ if (priv == NULL) return AOM_CODEC_MEM_ERROR;
ctx->priv = (aom_codec_priv_t *)priv;
ctx->priv->init_flags = ctx->init_flags;
ctx->priv->enc.total_encoders = 1;
priv->buffer_pool = (BufferPool *)aom_calloc(1, sizeof(BufferPool));
- if (priv->buffer_pool == NULL) return VPX_CODEC_MEM_ERROR;
+ if (priv->buffer_pool == NULL) return AOM_CODEC_MEM_ERROR;
#if CONFIG_MULTITHREAD
if (pthread_mutex_init(&priv->buffer_pool->pool_mutex, NULL)) {
- return VPX_CODEC_MEM_ERROR;
+ return AOM_CODEC_MEM_ERROR;
}
#endif
@@ -740,15 +740,15 @@
res = validate_config(priv, &priv->cfg, &priv->extra_cfg);
- if (res == VPX_CODEC_OK) {
+ if (res == AOM_CODEC_OK) {
set_encoder_config(&priv->oxcf, &priv->cfg, &priv->extra_cfg);
#if CONFIG_AOM_HIGHBITDEPTH
priv->oxcf.use_highbitdepth =
- (ctx->init_flags & VPX_CODEC_USE_HIGHBITDEPTH) ? 1 : 0;
+ (ctx->init_flags & AOM_CODEC_USE_HIGHBITDEPTH) ? 1 : 0;
#endif
priv->cpi = av1_create_compressor(&priv->oxcf, priv->buffer_pool);
if (priv->cpi == NULL)
- res = VPX_CODEC_MEM_ERROR;
+ res = AOM_CODEC_MEM_ERROR;
else
priv->cpi->output_pkt_list = &priv->pkt_list.head;
}
@@ -765,7 +765,7 @@
#endif
aom_free(ctx->buffer_pool);
aom_free(ctx);
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static void pick_quickcompress_mode(aom_codec_alg_priv_t *ctx,
@@ -774,7 +774,7 @@
MODE new_mode = BEST;
switch (ctx->cfg.g_pass) {
- case VPX_RC_ONE_PASS:
+ case AOM_RC_ONE_PASS:
if (deadline > 0) {
const aom_codec_enc_cfg_t *const cfg = &ctx->cfg;
@@ -790,8 +790,8 @@
new_mode = BEST;
}
break;
- case VPX_RC_FIRST_PASS: break;
- case VPX_RC_LAST_PASS: new_mode = deadline > 0 ? GOOD : BEST; break;
+ case AOM_RC_FIRST_PASS: break;
+ case AOM_RC_LAST_PASS: new_mode = deadline > 0 ? GOOD : BEST; break;
}
if (ctx->oxcf.mode != new_mode) {
@@ -893,9 +893,9 @@
unsigned int lib_flags) {
aom_codec_frame_flags_t flags = lib_flags << 16;
- if (lib_flags & FRAMEFLAGS_KEY) flags |= VPX_FRAME_IS_KEY;
+ if (lib_flags & FRAMEFLAGS_KEY) flags |= AOM_FRAME_IS_KEY;
- if (cpi->droppable) flags |= VPX_FRAME_IS_DROPPABLE;
+ if (cpi->droppable) flags |= AOM_FRAME_IS_DROPPABLE;
return flags;
}
@@ -906,7 +906,7 @@
unsigned long duration,
aom_enc_frame_flags_t flags,
unsigned long deadline) {
- aom_codec_err_t res = VPX_CODEC_OK;
+ aom_codec_err_t res = AOM_CODEC_OK;
AV1_COMP *const cpi = ctx->cpi;
const aom_rational_t *const timebase = &ctx->cfg.g_timebase;
size_t data_sz;
@@ -915,7 +915,7 @@
res = validate_img(ctx, img);
// TODO(jzern) the checks related to cpi's validity should be treated as a
// failure condition, encoder setup is done fully in init() currently.
- if (res == VPX_CODEC_OK && cpi != NULL) {
+ if (res == AOM_CODEC_OK && cpi != NULL) {
// There's no codec control for multiple alt-refs so check the encoder
// instance for its status to determine the compressed data size.
data_sz = ctx->cfg.g_w * ctx->cfg.g_h * get_image_bps(img) / 8 *
@@ -926,7 +926,7 @@
free(ctx->cx_data);
ctx->cx_data = (unsigned char *)malloc(ctx->cx_data_sz);
if (ctx->cx_data == NULL) {
- return VPX_CODEC_MEM_ERROR;
+ return AOM_CODEC_MEM_ERROR;
}
}
}
@@ -939,22 +939,22 @@
if (((flags & VP8_EFLAG_NO_UPD_GF) && (flags & VP8_EFLAG_FORCE_GF)) ||
((flags & VP8_EFLAG_NO_UPD_ARF) && (flags & VP8_EFLAG_FORCE_ARF))) {
ctx->base.err_detail = "Conflicting flags.";
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
av1_apply_encoding_flags(cpi, flags);
// Handle fixed keyframe intervals
- if (ctx->cfg.kf_mode == VPX_KF_AUTO &&
+ if (ctx->cfg.kf_mode == AOM_KF_AUTO &&
ctx->cfg.kf_min_dist == ctx->cfg.kf_max_dist) {
if (++ctx->fixed_kf_cntr > ctx->cfg.kf_min_dist) {
- flags |= VPX_EFLAG_FORCE_KF;
+ flags |= AOM_EFLAG_FORCE_KF;
ctx->fixed_kf_cntr = 1;
}
}
// Initialize the encoder instance on the first frame.
- if (res == VPX_CODEC_OK && cpi != NULL) {
+ if (res == AOM_CODEC_OK && cpi != NULL) {
unsigned int lib_flags = 0;
YV12_BUFFER_CONFIG sd;
int64_t dst_time_stamp = timebase_units_to_ticks(timebase, pts);
@@ -964,7 +964,7 @@
unsigned char *cx_data;
// Set up internal flags
- if (ctx->base.init_flags & VPX_CODEC_USE_PSNR) cpi->b_calculate_psnr = 1;
+ if (ctx->base.init_flags & AOM_CODEC_USE_PSNR) cpi->b_calculate_psnr = 1;
if (img != NULL) {
res = image2yuvconfig(img, &sd);
@@ -993,7 +993,7 @@
*/
if (cx_data_sz < ctx->cx_data_sz / 2) {
ctx->base.err_detail = "Compressed data buffer too small";
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
}
}
@@ -1016,7 +1016,7 @@
cx_data_sz -= size;
if (ctx->output_cx_pkt_cb.output_cx_pkt) {
- pkt.kind = VPX_CODEC_CX_FRAME_PKT;
+ pkt.kind = AOM_CODEC_CX_FRAME_PKT;
pkt.data.frame.pts =
ticks_to_timebase_units(timebase, dst_time_stamp);
pkt.data.frame.duration = (unsigned long)ticks_to_timebase_units(
@@ -1037,7 +1037,7 @@
}
// Add the frame packet to the list of returned packets.
- pkt.kind = VPX_CODEC_CX_FRAME_PKT;
+ pkt.kind = AOM_CODEC_CX_FRAME_PKT;
pkt.data.frame.pts = ticks_to_timebase_units(timebase, dst_time_stamp);
pkt.data.frame.duration = (unsigned long)ticks_to_timebase_units(
timebase, dst_end_time_stamp - dst_time_stamp);
@@ -1096,9 +1096,9 @@
image2yuvconfig(&frame->img, &sd);
av1_set_reference_enc(ctx->cpi,
ref_frame_to_av1_reframe(frame->frame_type), &sd);
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
} else {
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
}
@@ -1112,9 +1112,9 @@
image2yuvconfig(&frame->img, &sd);
av1_copy_reference_enc(ctx->cpi,
ref_frame_to_av1_reframe(frame->frame_type), &sd);
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
} else {
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
}
@@ -1124,12 +1124,12 @@
if (frame != NULL) {
YV12_BUFFER_CONFIG *fb = get_ref_frame(&ctx->cpi->common, frame->idx);
- if (fb == NULL) return VPX_CODEC_ERROR;
+ if (fb == NULL) return AOM_CODEC_ERROR;
yuvconfig2image(&frame->img, fb, NULL);
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
} else {
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
}
@@ -1137,7 +1137,7 @@
va_list args) {
(void)ctx;
(void)args;
- return VPX_CODEC_INCAPABLE;
+ return AOM_CODEC_INCAPABLE;
}
static aom_image_t *encoder_get_preview(aom_codec_alg_priv_t *ctx) {
@@ -1157,7 +1157,7 @@
(void)args;
// TODO(yaowu): Need to re-implement and test for AV1.
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
static aom_codec_err_t ctrl_set_active_map(aom_codec_alg_priv_t *ctx,
@@ -1167,11 +1167,11 @@
if (map) {
if (!av1_set_active_map(ctx->cpi, map->active_map, (int)map->rows,
(int)map->cols))
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
else
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
} else {
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
}
@@ -1182,11 +1182,11 @@
if (map) {
if (!av1_get_active_map(ctx->cpi, map->active_map, (int)map->rows,
(int)map->cols))
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
else
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
} else {
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
}
@@ -1196,11 +1196,11 @@
if (mode) {
const int res =
- av1_set_internal_size(ctx->cpi, (VPX_SCALING)mode->h_scaling_mode,
- (VPX_SCALING)mode->v_scaling_mode);
- return (res == 0) ? VPX_CODEC_OK : VPX_CODEC_INVALID_PARAM;
+ av1_set_internal_size(ctx->cpi, (AOM_SCALING)mode->h_scaling_mode,
+ (AOM_SCALING)mode->v_scaling_mode);
+ return (res == 0) ? AOM_CODEC_OK : AOM_CODEC_INVALID_PARAM;
} else {
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
}
@@ -1211,7 +1211,7 @@
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;
+ return AOM_CODEC_OK;
}
static aom_codec_err_t ctrl_set_tune_content(aom_codec_alg_priv_t *ctx,
@@ -1304,14 +1304,14 @@
320, // g_width
240, // g_height
- VPX_BITS_8, // g_bit_depth
+ AOM_BITS_8, // g_bit_depth
8, // g_input_bit_depth
{ 1, 30 }, // g_timebase
0, // g_error_resilient
- VPX_RC_ONE_PASS, // g_pass
+ AOM_RC_ONE_PASS, // g_pass
25, // g_lag_in_frames
@@ -1322,7 +1322,7 @@
60, // rc_resize_down_thresold
30, // rc_resize_up_thresold
- VPX_VBR, // rc_end_usage
+ AOM_VBR, // rc_end_usage
{ NULL, 0 }, // rc_twopass_stats_in
{ NULL, 0 }, // rc_firstpass_mb_stats_in
256, // rc_target_bandwidth
@@ -1340,7 +1340,7 @@
2000, // rc_two_pass_vbrmax_section
// keyframing settings (kf)
- VPX_KF_AUTO, // g_kfmode
+ AOM_KF_AUTO, // g_kfmode
0, // kf_min_dist
9999, // kf_max_dist
@@ -1365,11 +1365,11 @@
#endif
CODEC_INTERFACE(aom_codec_av1_cx) = {
"WebM Project AV1 Encoder" VERSION_STRING,
- VPX_CODEC_INTERNAL_ABI_VERSION,
+ AOM_CODEC_INTERNAL_ABI_VERSION,
#if CONFIG_AOM_HIGHBITDEPTH
- VPX_CODEC_CAP_HIGHBITDEPTH |
+ AOM_CODEC_CAP_HIGHBITDEPTH |
#endif
- VPX_CODEC_CAP_ENCODER | VPX_CODEC_CAP_PSNR, // aom_codec_caps_t
+ AOM_CODEC_CAP_ENCODER | AOM_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
diff --git a/av1/av1_dx_iface.c b/av1/av1_dx_iface.c
index bccbb88..d56b68e 100644
--- a/av1/av1_dx_iface.c
+++ b/av1/av1_dx_iface.c
@@ -89,7 +89,7 @@
if (!ctx->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;
+ if (priv == NULL) return AOM_CODEC_MEM_ERROR;
ctx->priv = (aom_codec_priv_t *)priv;
ctx->priv->init_flags = ctx->init_flags;
@@ -98,7 +98,7 @@
// Only do frame parallel decode when threads > 1.
priv->frame_parallel_decode =
(ctx->config.dec && (ctx->config.dec->threads > 1) &&
- (ctx->init_flags & VPX_CODEC_USE_FRAME_THREADING))
+ (ctx->init_flags & AOM_CODEC_USE_FRAME_THREADING))
? 1
: 0;
if (ctx->config.dec) {
@@ -107,7 +107,7 @@
}
}
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static aom_codec_err_t decoder_destroy(aom_codec_alg_priv_t *ctx) {
@@ -140,7 +140,7 @@
aom_free(ctx->frame_workers);
aom_free(ctx->buffer_pool);
aom_free(ctx);
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static int parse_bitdepth_colorspace_sampling(BITSTREAM_PROFILE profile,
@@ -148,7 +148,7 @@
aom_color_space_t color_space;
if (profile >= PROFILE_2) rb->bit_offset += 1; // Bit-depth 10 or 12.
color_space = (aom_color_space_t)aom_rb_read_literal(rb, 3);
- if (color_space != VPX_CS_SRGB) {
+ if (color_space != AOM_CS_SRGB) {
rb->bit_offset += 1; // [16,235] (including xvycc) vs [0,255] range.
if (profile == PROFILE_1 || profile == PROFILE_3) {
rb->bit_offset += 2; // subsampling x/y.
@@ -171,13 +171,13 @@
int intra_only_flag = 0;
uint8_t clear_buffer[9];
- if (data + data_sz <= data) return VPX_CODEC_INVALID_PARAM;
+ if (data + data_sz <= data) return AOM_CODEC_INVALID_PARAM;
si->is_kf = 0;
si->w = si->h = 0;
if (decrypt_cb) {
- data_sz = VPXMIN(sizeof(clear_buffer), data_sz);
+ data_sz = AOMMIN(sizeof(clear_buffer), data_sz);
decrypt_cb(decrypt_state, data, clear_buffer, data_sz);
data = clear_buffer;
}
@@ -189,29 +189,29 @@
const int frame_marker = aom_rb_read_literal(&rb, 2);
const BITSTREAM_PROFILE profile = av1_read_profile(&rb);
- if (frame_marker != VPX_FRAME_MARKER) return VPX_CODEC_UNSUP_BITSTREAM;
+ if (frame_marker != AOM_FRAME_MARKER) return AOM_CODEC_UNSUP_BITSTREAM;
- if (profile >= MAX_PROFILES) return VPX_CODEC_UNSUP_BITSTREAM;
+ if (profile >= MAX_PROFILES) return AOM_CODEC_UNSUP_BITSTREAM;
if ((profile >= 2 && data_sz <= 1) || data_sz < 1)
- return VPX_CODEC_UNSUP_BITSTREAM;
+ return AOM_CODEC_UNSUP_BITSTREAM;
if (aom_rb_read_bit(&rb)) { // show an existing frame
aom_rb_read_literal(&rb, 3); // Frame buffer to show.
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
- if (data_sz <= 8) return VPX_CODEC_UNSUP_BITSTREAM;
+ if (data_sz <= 8) return AOM_CODEC_UNSUP_BITSTREAM;
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 (!av1_read_sync_code(&rb)) return VPX_CODEC_UNSUP_BITSTREAM;
+ if (!av1_read_sync_code(&rb)) return AOM_CODEC_UNSUP_BITSTREAM;
if (!parse_bitdepth_colorspace_sampling(profile, &rb))
- return VPX_CODEC_UNSUP_BITSTREAM;
+ return AOM_CODEC_UNSUP_BITSTREAM;
av1_read_frame_size(&rb, (int *)&si->w, (int *)&si->h);
} else {
intra_only_flag = show_frame ? 0 : aom_rb_read_bit(&rb);
@@ -219,10 +219,10 @@
rb.bit_offset += error_resilient ? 0 : 2; // reset_frame_context
if (intra_only_flag) {
- if (!av1_read_sync_code(&rb)) return VPX_CODEC_UNSUP_BITSTREAM;
+ if (!av1_read_sync_code(&rb)) return AOM_CODEC_UNSUP_BITSTREAM;
if (profile > PROFILE_0) {
if (!parse_bitdepth_colorspace_sampling(profile, &rb))
- return VPX_CODEC_UNSUP_BITSTREAM;
+ return AOM_CODEC_UNSUP_BITSTREAM;
}
rb.bit_offset += REF_FRAMES; // refresh_frame_flags
av1_read_frame_size(&rb, (int *)&si->w, (int *)&si->h);
@@ -230,7 +230,7 @@
}
}
if (is_intra_only != NULL) *is_intra_only = intra_only_flag;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static aom_codec_err_t decoder_peek_si(const uint8_t *data,
@@ -247,7 +247,7 @@
memcpy(si, &ctx->si, sz);
si->sz = (unsigned int)sz;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static void set_error_detail(aom_codec_alg_priv_t *ctx,
@@ -285,7 +285,7 @@
pool->release_fb_cb = av1_release_frame_buffer;
if (av1_alloc_internal_frame_buffers(&pool->int_frame_buffers))
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to initialize internal frame buffers");
pool->cb_priv = &pool->int_frame_buffers;
@@ -354,12 +354,12 @@
ctx->flushed = 0;
ctx->buffer_pool = (BufferPool *)aom_calloc(1, sizeof(BufferPool));
- if (ctx->buffer_pool == NULL) return VPX_CODEC_MEM_ERROR;
+ if (ctx->buffer_pool == NULL) return AOM_CODEC_MEM_ERROR;
#if CONFIG_MULTITHREAD
if (pthread_mutex_init(&ctx->buffer_pool->pool_mutex, NULL)) {
set_error_detail(ctx, "Failed to allocate buffer pool mutex");
- return VPX_CODEC_MEM_ERROR;
+ return AOM_CODEC_MEM_ERROR;
}
#endif
@@ -367,7 +367,7 @@
sizeof(*ctx->frame_workers));
if (ctx->frame_workers == NULL) {
set_error_detail(ctx, "Failed to allocate frame_workers");
- return VPX_CODEC_MEM_ERROR;
+ return AOM_CODEC_MEM_ERROR;
}
for (i = 0; i < ctx->num_frame_workers; ++i) {
@@ -377,13 +377,13 @@
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;
+ return AOM_CODEC_MEM_ERROR;
}
frame_worker_data = (FrameWorkerData *)worker->data1;
frame_worker_data->pbi = av1_decoder_create(ctx->buffer_pool);
if (frame_worker_data->pbi == NULL) {
set_error_detail(ctx, "Failed to allocate frame_worker_data");
- return VPX_CODEC_MEM_ERROR;
+ return AOM_CODEC_MEM_ERROR;
}
frame_worker_data->pbi->frame_worker_owner = worker;
frame_worker_data->worker_id = i;
@@ -394,12 +394,12 @@
#if CONFIG_MULTITHREAD
if (pthread_mutex_init(&frame_worker_data->stats_mutex, NULL)) {
set_error_detail(ctx, "Failed to allocate frame_worker_data mutex");
- return VPX_CODEC_MEM_ERROR;
+ return AOM_CODEC_MEM_ERROR;
}
if (pthread_cond_init(&frame_worker_data->stats_cond, NULL)) {
set_error_detail(ctx, "Failed to allocate frame_worker_data cond");
- return VPX_CODEC_MEM_ERROR;
+ return AOM_CODEC_MEM_ERROR;
}
#endif
// If decoding in serial mode, FrameWorker thread could create tile worker
@@ -413,18 +413,18 @@
worker->hook = (VPxWorkerHook)frame_worker_hook;
if (!winterface->reset(worker)) {
set_error_detail(ctx, "Frame Worker thread creation failed");
- return VPX_CODEC_MEM_ERROR;
+ return AOM_CODEC_MEM_ERROR;
}
}
// If postprocessing was enabled by the application and a
// configuration has not been provided, default it.
- if (!ctx->postproc_cfg_set && (ctx->base.init_flags & VPX_CODEC_USE_POSTPROC))
+ if (!ctx->postproc_cfg_set && (ctx->base.init_flags & AOM_CODEC_USE_POSTPROC))
set_default_ppflags(&ctx->postproc_cfg);
init_buffer_callbacks(ctx);
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static INLINE void check_resync(aom_codec_alg_priv_t *const ctx,
@@ -449,9 +449,9 @@
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;
+ if (res != AOM_CODEC_OK) return res;
- if (!ctx->si.is_kf && !is_intra_only) return VPX_CODEC_ERROR;
+ if (!ctx->si.is_kf && !is_intra_only) return AOM_CODEC_ERROR;
}
if (!ctx->frame_parallel_decode) {
@@ -496,7 +496,7 @@
(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;
+ return AOM_CODEC_MEM_ERROR;
}
frame_worker_data->scratch_buffer_size = data_sz;
}
@@ -520,7 +520,7 @@
winterface->launch(worker);
}
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static void wait_worker_and_cache_frame(aom_codec_alg_priv_t *ctx) {
@@ -561,7 +561,7 @@
if (data == NULL && data_sz == 0) {
ctx->flushed = 1;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
// Reset flushed when receiving a valid frame.
@@ -570,12 +570,12 @@
// Initialize the decoder workers on the first frame.
if (ctx->frame_workers == NULL) {
const aom_codec_err_t res = init_decoder(ctx);
- if (res != VPX_CODEC_OK) return res;
+ if (res != AOM_CODEC_OK) return res;
}
res = av1_parse_superframe_index(data, data_sz, frame_sizes, &frame_count,
ctx->decrypt_cb, ctx->decrypt_state);
- if (res != VPX_CODEC_OK) return res;
+ if (res != AOM_CODEC_OK) return res;
if (ctx->frame_parallel_decode) {
// Decode in frame parallel mode. When decoding in this mode, the frame
@@ -591,7 +591,7 @@
if (data_start < data ||
frame_size > (uint32_t)(data_end - data_start)) {
set_error_detail(ctx, "Invalid frame size in index");
- return VPX_CODEC_CORRUPT_FRAME;
+ return AOM_CODEC_CORRUPT_FRAME;
}
if (ctx->available_threads == 0) {
@@ -602,13 +602,13 @@
} else {
// TODO(hkuang): Add unit test to test this path.
set_error_detail(ctx, "Frame output cache is full.");
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
}
}
res =
decode_one(ctx, &data_start_copy, frame_size, user_priv, deadline);
- if (res != VPX_CODEC_OK) return res;
+ if (res != AOM_CODEC_OK) return res;
data_start += frame_size;
}
} else {
@@ -620,12 +620,12 @@
} else {
// TODO(hkuang): Add unit test to test this path.
set_error_detail(ctx, "Frame output cache is full.");
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
}
}
res = decode_one(ctx, &data, data_sz, user_priv, deadline);
- if (res != VPX_CODEC_OK) return res;
+ if (res != AOM_CODEC_OK) return res;
}
} else {
// Decode in serial mode.
@@ -639,12 +639,12 @@
if (data_start < data ||
frame_size > (uint32_t)(data_end - data_start)) {
set_error_detail(ctx, "Invalid frame size in index");
- return VPX_CODEC_CORRUPT_FRAME;
+ return AOM_CODEC_CORRUPT_FRAME;
}
res =
decode_one(ctx, &data_start_copy, frame_size, user_priv, deadline);
- if (res != VPX_CODEC_OK) return res;
+ if (res != AOM_CODEC_OK) return res;
data_start += frame_size;
}
@@ -653,7 +653,7 @@
const uint32_t frame_size = (uint32_t)(data_end - data_start);
const aom_codec_err_t res =
decode_one(ctx, &data_start, frame_size, user_priv, deadline);
- if (res != VPX_CODEC_OK) return res;
+ if (res != AOM_CODEC_OK) return res;
// Account for suboptimal termination by the encoder.
while (data_start < data_end) {
@@ -748,17 +748,17 @@
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;
+ return AOM_CODEC_INVALID_PARAM;
} else if (ctx->frame_workers == NULL) {
// If the decoder has already been initialized, do not accept changes to
// the frame buffer functions.
ctx->get_ext_fb_cb = cb_get;
ctx->release_ext_fb_cb = cb_release;
ctx->ext_priv = cb_priv;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
}
static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx,
@@ -768,7 +768,7 @@
// Only support this function in serial decode.
if (ctx->frame_parallel_decode) {
set_error_detail(ctx, "Not supported in frame parallel decode");
- return VPX_CODEC_INCAPABLE;
+ return AOM_CODEC_INCAPABLE;
}
if (data) {
@@ -778,9 +778,9 @@
FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
image2yuvconfig(&frame->img, &sd);
return av1_set_reference_dec(&frame_worker_data->pbi->common,
- (VPX_REFFRAME)frame->frame_type, &sd);
+ (AOM_REFFRAME)frame->frame_type, &sd);
} else {
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
}
@@ -791,7 +791,7 @@
// Only support this function in serial decode.
if (ctx->frame_parallel_decode) {
set_error_detail(ctx, "Not supported in frame parallel decode");
- return VPX_CODEC_INCAPABLE;
+ return AOM_CODEC_INCAPABLE;
}
if (data) {
@@ -801,9 +801,9 @@
FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
image2yuvconfig(&frame->img, &sd);
return av1_copy_reference_dec(frame_worker_data->pbi,
- (VPX_REFFRAME)frame->frame_type, &sd);
+ (AOM_REFFRAME)frame->frame_type, &sd);
} else {
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
}
@@ -814,7 +814,7 @@
// Only support this function in serial decode.
if (ctx->frame_parallel_decode) {
set_error_detail(ctx, "Not supported in frame parallel decode");
- return VPX_CODEC_INCAPABLE;
+ return AOM_CODEC_INCAPABLE;
}
if (data) {
@@ -822,11 +822,11 @@
VPxWorker *const worker = ctx->frame_workers;
FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
fb = get_ref_frame(&frame_worker_data->pbi->common, data->idx);
- if (fb == NULL) return VPX_CODEC_ERROR;
+ if (fb == NULL) return AOM_CODEC_ERROR;
yuvconfig2image(&data->img, fb, NULL);
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
} else {
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
}
@@ -834,14 +834,14 @@
va_list args) {
(void)ctx;
(void)args;
- return VPX_CODEC_INCAPABLE;
+ return AOM_CODEC_INCAPABLE;
}
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;
+ return AOM_CODEC_INCAPABLE;
}
static aom_codec_err_t ctrl_get_last_ref_updates(aom_codec_alg_priv_t *ctx,
@@ -851,7 +851,7 @@
// Only support this function in serial decode.
if (ctx->frame_parallel_decode) {
set_error_detail(ctx, "Not supported in frame parallel decode");
- return VPX_CODEC_INCAPABLE;
+ return AOM_CODEC_INCAPABLE;
}
if (update_info) {
@@ -860,13 +860,13 @@
FrameWorkerData *const frame_worker_data =
(FrameWorkerData *)worker->data1;
*update_info = frame_worker_data->pbi->refresh_frame_flags;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
} else {
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
}
}
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
static aom_codec_err_t ctrl_get_frame_corrupted(aom_codec_alg_priv_t *ctx,
@@ -881,16 +881,16 @@
RefCntBuffer *const frame_bufs =
frame_worker_data->pbi->common.buffer_pool->frame_bufs;
if (frame_worker_data->pbi->common.frame_to_show == NULL)
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
if (ctx->last_show_frame >= 0)
*corrupted = frame_bufs[ctx->last_show_frame].buf.corrupted;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
} else {
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
}
}
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
static aom_codec_err_t ctrl_get_frame_size(aom_codec_alg_priv_t *ctx,
@@ -900,7 +900,7 @@
// Only support this function in serial decode.
if (ctx->frame_parallel_decode) {
set_error_detail(ctx, "Not supported in frame parallel decode");
- return VPX_CODEC_INCAPABLE;
+ return AOM_CODEC_INCAPABLE;
}
if (frame_size) {
@@ -911,13 +911,13 @@
const AV1_COMMON *const cm = &frame_worker_data->pbi->common;
frame_size[0] = cm->width;
frame_size[1] = cm->height;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
} else {
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
}
}
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
static aom_codec_err_t ctrl_get_render_size(aom_codec_alg_priv_t *ctx,
@@ -927,7 +927,7 @@
// Only support this function in serial decode.
if (ctx->frame_parallel_decode) {
set_error_detail(ctx, "Not supported in frame parallel decode");
- return VPX_CODEC_INCAPABLE;
+ return AOM_CODEC_INCAPABLE;
}
if (render_size) {
@@ -938,13 +938,13 @@
const AV1_COMMON *const cm = &frame_worker_data->pbi->common;
render_size[0] = cm->render_width;
render_size[1] = cm->render_height;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
} else {
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
}
}
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
static aom_codec_err_t ctrl_get_bit_depth(aom_codec_alg_priv_t *ctx,
@@ -958,19 +958,19 @@
(FrameWorkerData *)worker->data1;
const AV1_COMMON *const cm = &frame_worker_data->pbi->common;
*bit_depth = cm->bit_depth;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
} else {
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
}
}
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
}
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;
+ return AOM_CODEC_OK;
}
static aom_codec_err_t ctrl_set_decryptor(aom_codec_alg_priv_t *ctx,
@@ -978,7 +978,7 @@
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;
+ return AOM_CODEC_OK;
}
static aom_codec_err_t ctrl_set_byte_alignment(aom_codec_alg_priv_t *ctx,
@@ -992,7 +992,7 @@
(byte_alignment < min_byte_alignment ||
byte_alignment > max_byte_alignment ||
(byte_alignment & (byte_alignment - 1)) != 0))
- return VPX_CODEC_INVALID_PARAM;
+ return AOM_CODEC_INVALID_PARAM;
ctx->byte_alignment = byte_alignment;
if (ctx->frame_workers) {
@@ -1000,7 +1000,7 @@
FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1;
frame_worker_data->pbi->common.byte_alignment = byte_alignment;
}
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static aom_codec_err_t ctrl_set_skip_loop_filter(aom_codec_alg_priv_t *ctx,
@@ -1013,7 +1013,7 @@
frame_worker_data->pbi->common.skip_loop_filter = ctx->skip_loop_filter;
}
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
static aom_codec_ctrl_fn_map_t decoder_ctrl_maps[] = {
@@ -1027,7 +1027,7 @@
{ VP8_SET_DBG_COLOR_B_MODES, ctrl_set_dbg_options },
{ VP8_SET_DBG_DISPLAY_MV, ctrl_set_dbg_options },
{ VP9_INVERT_TILE_DECODE_ORDER, ctrl_set_invert_tile_order },
- { VPXD_SET_DECRYPTOR, ctrl_set_decryptor },
+ { AOMD_SET_DECRYPTOR, ctrl_set_decryptor },
{ VP9_SET_BYTE_ALIGNMENT, ctrl_set_byte_alignment },
{ VP9_SET_SKIP_LOOP_FILTER, ctrl_set_skip_loop_filter },
@@ -1047,9 +1047,9 @@
#endif
CODEC_INTERFACE(aom_codec_av1_dx) = {
"WebM Project AV1 Decoder" VERSION_STRING,
- VPX_CODEC_INTERNAL_ABI_VERSION,
- VPX_CODEC_CAP_DECODER |
- VPX_CODEC_CAP_EXTERNAL_FRAME_BUFFER, // aom_codec_caps_t
+ AOM_CODEC_INTERNAL_ABI_VERSION,
+ AOM_CODEC_CAP_DECODER |
+ AOM_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
diff --git a/av1/av1_iface_common.h b/av1/av1_iface_common.h
index b4a01af..b69f178 100644
--- a/av1/av1_iface_common.h
+++ b/av1/av1_iface_common.h
@@ -22,18 +22,18 @@
int bps;
if (!yv12->subsampling_y) {
if (!yv12->subsampling_x) {
- img->fmt = VPX_IMG_FMT_I444;
+ img->fmt = AOM_IMG_FMT_I444;
bps = 24;
} else {
- img->fmt = VPX_IMG_FMT_I422;
+ img->fmt = AOM_IMG_FMT_I422;
bps = 16;
}
} else {
if (!yv12->subsampling_x) {
- img->fmt = VPX_IMG_FMT_I440;
+ img->fmt = AOM_IMG_FMT_I440;
bps = 16;
} else {
- img->fmt = VPX_IMG_FMT_I420;
+ img->fmt = AOM_IMG_FMT_I420;
bps = 12;
}
}
@@ -41,35 +41,35 @@
img->range = yv12->color_range;
img->bit_depth = 8;
img->w = yv12->y_stride;
- img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * VPX_ENC_BORDER_IN_PIXELS, 3);
+ img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * AOM_ENC_BORDER_IN_PIXELS, 3);
img->d_w = yv12->y_crop_width;
img->d_h = yv12->y_crop_height;
img->r_w = yv12->render_width;
img->r_h = yv12->render_height;
img->x_chroma_shift = yv12->subsampling_x;
img->y_chroma_shift = yv12->subsampling_y;
- img->planes[VPX_PLANE_Y] = yv12->y_buffer;
- img->planes[VPX_PLANE_U] = yv12->u_buffer;
- img->planes[VPX_PLANE_V] = yv12->v_buffer;
- img->planes[VPX_PLANE_ALPHA] = NULL;
- img->stride[VPX_PLANE_Y] = yv12->y_stride;
- img->stride[VPX_PLANE_U] = yv12->uv_stride;
- img->stride[VPX_PLANE_V] = yv12->uv_stride;
- img->stride[VPX_PLANE_ALPHA] = yv12->y_stride;
+ img->planes[AOM_PLANE_Y] = yv12->y_buffer;
+ img->planes[AOM_PLANE_U] = yv12->u_buffer;
+ img->planes[AOM_PLANE_V] = yv12->v_buffer;
+ img->planes[AOM_PLANE_ALPHA] = NULL;
+ img->stride[AOM_PLANE_Y] = yv12->y_stride;
+ img->stride[AOM_PLANE_U] = yv12->uv_stride;
+ img->stride[AOM_PLANE_V] = yv12->uv_stride;
+ img->stride[AOM_PLANE_ALPHA] = yv12->y_stride;
#if CONFIG_AOM_HIGHBITDEPTH
if (yv12->flags & YV12_FLAG_HIGHBITDEPTH) {
// aom_image_t uses byte strides and a pointer to the first byte
// of the image.
- img->fmt = (aom_img_fmt_t)(img->fmt | VPX_IMG_FMT_HIGHBITDEPTH);
+ img->fmt = (aom_img_fmt_t)(img->fmt | AOM_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);
- img->planes[VPX_PLANE_V] = (uint8_t *)CONVERT_TO_SHORTPTR(yv12->v_buffer);
- img->planes[VPX_PLANE_ALPHA] = NULL;
- img->stride[VPX_PLANE_Y] = 2 * yv12->y_stride;
- img->stride[VPX_PLANE_U] = 2 * yv12->uv_stride;
- img->stride[VPX_PLANE_V] = 2 * yv12->uv_stride;
- img->stride[VPX_PLANE_ALPHA] = 2 * yv12->y_stride;
+ img->planes[AOM_PLANE_Y] = (uint8_t *)CONVERT_TO_SHORTPTR(yv12->y_buffer);
+ img->planes[AOM_PLANE_U] = (uint8_t *)CONVERT_TO_SHORTPTR(yv12->u_buffer);
+ img->planes[AOM_PLANE_V] = (uint8_t *)CONVERT_TO_SHORTPTR(yv12->v_buffer);
+ img->planes[AOM_PLANE_ALPHA] = NULL;
+ img->stride[AOM_PLANE_Y] = 2 * yv12->y_stride;
+ img->stride[AOM_PLANE_U] = 2 * yv12->uv_stride;
+ img->stride[AOM_PLANE_V] = 2 * yv12->uv_stride;
+ img->stride[AOM_PLANE_ALPHA] = 2 * yv12->y_stride;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
img->bps = bps;
@@ -81,9 +81,9 @@
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];
- yv12->v_buffer = img->planes[VPX_PLANE_V];
+ yv12->y_buffer = img->planes[AOM_PLANE_Y];
+ yv12->u_buffer = img->planes[AOM_PLANE_U];
+ yv12->v_buffer = img->planes[AOM_PLANE_V];
yv12->y_crop_width = img->d_w;
yv12->y_crop_height = img->d_h;
@@ -99,13 +99,13 @@
yv12->uv_crop_width = yv12->uv_width;
yv12->uv_crop_height = yv12->uv_height;
- yv12->y_stride = img->stride[VPX_PLANE_Y];
- yv12->uv_stride = img->stride[VPX_PLANE_U];
+ yv12->y_stride = img->stride[AOM_PLANE_Y];
+ yv12->uv_stride = img->stride[AOM_PLANE_U];
yv12->color_space = img->cs;
yv12->color_range = img->range;
#if CONFIG_AOM_HIGHBITDEPTH
- if (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
+ if (img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
// In aom_image_t
// planes point to uint8 address of start of data
// stride counts uint8s to reach next row
@@ -127,11 +127,11 @@
}
yv12->border = (yv12->y_stride - img->w) / 2;
#else
- yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2;
+ yv12->border = (img->stride[AOM_PLANE_Y] - img->w) / 2;
#endif // CONFIG_AOM_HIGHBITDEPTH
yv12->subsampling_x = img->x_chroma_shift;
yv12->subsampling_y = img->y_chroma_shift;
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
#endif // AV1_AV1_IFACE_COMMON_H_
diff --git a/av1/common/av1_inv_txfm.h b/av1/common/av1_inv_txfm.h
index eb5254e..9470d29 100644
--- a/av1/common/av1_inv_txfm.h
+++ b/av1/common/av1_inv_txfm.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_INV_TXFM_H_
-#define VPX_DSP_INV_TXFM_H_
+#ifndef AOM_DSP_INV_TXFM_H_
+#define AOM_DSP_INV_TXFM_H_
#include <assert.h>
@@ -119,4 +119,4 @@
#ifdef __cplusplus
} // extern "C"
#endif
-#endif // VPX_DSP_INV_TXFM_H_
+#endif // AOM_DSP_INV_TXFM_H_
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 5884182..586bbdc 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -249,7 +249,7 @@
return TX_4X4;
} else {
const BLOCK_SIZE plane_bsize = ss_size_lookup[bsize][xss][yss];
- return VPXMIN(y_tx_size, max_txsize_lookup[plane_bsize]);
+ return AOMMIN(y_tx_size, max_txsize_lookup[plane_bsize]);
}
}
diff --git a/av1/common/common.h b/av1/common/common.h
index f39f4f8..4a2d031 100644
--- a/av1/common/common.h
+++ b/av1/common/common.h
@@ -52,7 +52,7 @@
do { \
lval = (expr); \
if (!lval) \
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR, \
"Failed to allocate " #lval " at %s:%d", __FILE__, \
__LINE__); \
} while (0)
@@ -61,7 +61,7 @@
do { \
lval = (expr); \
if (!lval) \
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR, \
"Failed to allocate " #lval); \
} while (0)
#endif
@@ -70,7 +70,7 @@
#define AV1_SYNC_CODE_1 0x83
#define AV1_SYNC_CODE_2 0x43
-#define VPX_FRAME_MARKER 0x2
+#define AOM_FRAME_MARKER 0x2
#ifdef __cplusplus
} // extern "C"
diff --git a/av1/common/common_data.h b/av1/common/common_data.h
index a1db52a..2c7ee1d 100644
--- a/av1/common/common_data.h
+++ b/av1/common/common_data.h
@@ -43,7 +43,7 @@
1, 1, 1, 1, 2, 1, 2, 4, 2, 4, 8, 4, 8
};
-// VPXMIN(3, VPXMIN(b_width_log2(bsize), b_height_log2(bsize)))
+// AOMMIN(3, AOMMIN(b_width_log2(bsize), b_height_log2(bsize)))
static const uint8_t size_group_lookup[BLOCK_SIZES] = { 0, 0, 0, 1, 1, 1, 2,
2, 2, 3, 3, 3, 3 };
diff --git a/av1/common/dering.c b/av1/common/dering.c
index 0717e68..552c29a 100644
--- a/av1/common/dering.c
+++ b/av1/common/dering.c
@@ -58,7 +58,7 @@
int bsize[3];
int dec[3];
int pli;
- int coeff_shift = VPXMAX(cm->bit_depth - 8, 0);
+ int coeff_shift = AOMMAX(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 = aom_malloc(sizeof(*bskip)*cm->mi_rows*cm->mi_cols);
@@ -98,8 +98,8 @@
for (sbc = 0; sbc < nhsb; sbc++) {
int level;
int nhb, nvb;
- nhb = VPXMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE*sbc);
- nvb = VPXMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE*sbr);
+ nhb = AOMMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE*sbc);
+ nvb = AOMMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE*sbr);
for (pli = 0; pli < 3; pli++) {
int16_t dst[MI_BLOCK_SIZE*MI_BLOCK_SIZE*8*8];
int threshold;
diff --git a/av1/common/enums.h b/av1/common/enums.h
index a133a28..eb2d2e8 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -101,10 +101,10 @@
#define EXT_TX_SIZES 3 // number of sizes that use extended transforms
typedef enum {
- VPX_LAST_FLAG = 1 << 0,
- VPX_GOLD_FLAG = 1 << 1,
- VPX_ALT_FLAG = 1 << 2,
-} VPX_REFFRAME;
+ AOM_LAST_FLAG = 1 << 0,
+ AOM_GOLD_FLAG = 1 << 1,
+ AOM_ALT_FLAG = 1 << 2,
+} AOM_REFFRAME;
typedef enum { PLANE_TYPE_Y = 0, PLANE_TYPE_UV = 1, PLANE_TYPES } PLANE_TYPE;
diff --git a/av1/common/frame_buffers.c b/av1/common/frame_buffers.c
index 0ca3919..a75ac74 100644
--- a/av1/common/frame_buffers.c
+++ b/av1/common/frame_buffers.c
@@ -19,7 +19,7 @@
av1_free_internal_frame_buffers(list);
list->num_internal_frame_buffers =
- VPX_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
+ AOM_MAXIMUM_REF_BUFFERS + AOM_MAXIMUM_WORK_BUFFERS;
list->int_fb = (InternalFrameBuffer *)aom_calloc(
list->num_internal_frame_buffers, sizeof(*list->int_fb));
return (list->int_fb == NULL);
diff --git a/av1/common/loopfilter.c b/av1/common/loopfilter.c
index b0b6596..3a7d651 100644
--- a/av1/common/loopfilter.c
+++ b/av1/common/loopfilter.c
@@ -1576,7 +1576,7 @@
if (partial_frame && cm->mi_rows > 8) {
start_mi_row = cm->mi_rows >> 1;
start_mi_row &= 0xfffffff8;
- mi_rows_to_filter = VPXMAX(cm->mi_rows / 8, 8);
+ mi_rows_to_filter = AOMMAX(cm->mi_rows / 8, 8);
}
end_mi_row = start_mi_row + mi_rows_to_filter;
av1_loop_filter_frame_init(cm, frame_filter_level);
diff --git a/av1/common/mips/msa/idct4x4_msa.c b/av1/common/mips/msa/idct4x4_msa.c
index 8ad1ba8..2157cae 100644
--- a/av1/common/mips/msa/idct4x4_msa.c
+++ b/av1/common/mips/msa/idct4x4_msa.c
@@ -25,31 +25,31 @@
switch (tx_type) {
case DCT_DCT:
/* DCT in horizontal */
- VPX_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
/* DCT in vertical */
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
break;
case ADST_DCT:
/* DCT in horizontal */
- VPX_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
/* ADST in vertical */
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
break;
case DCT_ADST:
/* ADST in horizontal */
- VPX_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
/* DCT in vertical */
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_IDCT4x4(in0, in1, in2, in3, in0, in1, in2, in3);
break;
case ADST_ADST:
/* ADST in horizontal */
- VPX_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
/* ADST in vertical */
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_IADST4x4(in0, in1, in2, in3, in0, in1, in2, in3);
break;
default: assert(0); break;
}
diff --git a/av1/common/mips/msa/idct8x8_msa.c b/av1/common/mips/msa/idct8x8_msa.c
index 8caf8fc..b901e0a 100644
--- a/av1/common/mips/msa/idct8x8_msa.c
+++ b/av1/common/mips/msa/idct8x8_msa.c
@@ -27,42 +27,42 @@
switch (tx_type) {
case DCT_DCT:
/* DCT in horizontal */
- VPX_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
+ AOM_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
/* DCT in vertical */
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
in3, in4, in5, in6, in7);
- VPX_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
+ AOM_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
break;
case ADST_DCT:
/* DCT in horizontal */
- VPX_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
+ AOM_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
/* ADST in vertical */
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
in3, in4, in5, in6, in7);
- VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
break;
case DCT_ADST:
/* ADST in horizontal */
- VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
/* DCT in vertical */
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
in3, in4, in5, in6, in7);
- VPX_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
+ AOM_IDCT8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3,
in4, in5, in6, in7);
break;
case ADST_ADST:
/* ADST in horizontal */
- VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
/* ADST in vertical */
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
in3, in4, in5, in6, in7);
- VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
break;
default: assert(0); break;
@@ -73,7 +73,7 @@
SRARI_H4_SH(in4, in5, in6, in7, 5);
/* add block and store 8x8 */
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, in0, in1, in2, in3);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, in0, in1, in2, in3);
dst += (4 * dst_stride);
- VPX_ADDBLK_ST8x4_UB(dst, dst_stride, in4, in5, in6, in7);
+ AOM_ADDBLK_ST8x4_UB(dst, dst_stride, in4, in5, in6, in7);
}
diff --git a/av1/common/odintrin.h b/av1/common/odintrin.h
index 47f17bf..66e83ef 100644
--- a/av1/common/odintrin.h
+++ b/av1/common/odintrin.h
@@ -46,7 +46,7 @@
# define OD_DIVU(_x, _d) \
(((_d) < OD_DIVU_DMAX)?(OD_DIVU_SMALL((_x), (_d))):((_x)/(_d)))
-#define OD_MINI VPXMIN
+#define OD_MINI AOMMIN
#define OD_CLAMPI(min, val, max) clamp((val), (min), (max))
# define OD_CLZ0 (1)
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 83fead3..5025d20 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -283,7 +283,7 @@
unsigned int current_video_frame;
BITSTREAM_PROFILE profile;
- // VPX_BITS_8 in profile 0 or 1, VPX_BITS_10 or VPX_BITS_12 in profile 2 or 3.
+ // AOM_BITS_8 in profile 0 or 1, AOM_BITS_10 or AOM_BITS_12 in profile 2 or 3.
aom_bit_depth_t bit_depth;
aom_bit_depth_t dequant_bit_depth; // bit_depth of current dequantizer
diff --git a/av1/common/pred_common.h b/av1/common/pred_common.h
index a07e3f2..b870fee 100644
--- a/av1/common/pred_common.h
+++ b/av1/common/pred_common.h
@@ -26,14 +26,14 @@
const int mi_offset = mi_row * cm->mi_cols + mi_col;
const int bw = num_8x8_blocks_wide_lookup[bsize];
const int bh = num_8x8_blocks_high_lookup[bsize];
- const int xmis = VPXMIN(cm->mi_cols - mi_col, bw);
- const int ymis = VPXMIN(cm->mi_rows - mi_row, bh);
+ const int xmis = AOMMIN(cm->mi_cols - mi_col, bw);
+ const int ymis = AOMMIN(cm->mi_rows - mi_row, bh);
int x, y, segment_id = MAX_SEGMENTS;
for (y = 0; y < ymis; ++y)
for (x = 0; x < xmis; ++x)
segment_id =
- VPXMIN(segment_id, segment_ids[mi_offset + y * cm->mi_cols + x]);
+ AOMMIN(segment_id, segment_ids[mi_offset + y * cm->mi_cols + x]);
assert(segment_id >= 0 && segment_id < MAX_SEGMENTS);
return segment_id;
diff --git a/av1/common/quant_common.c b/av1/common/quant_common.c
index 2a5a946..fbc391e 100644
--- a/av1/common/quant_common.c
+++ b/av1/common/quant_common.c
@@ -171,11 +171,11 @@
int16_t av1_dc_quant(int qindex, int delta, aom_bit_depth_t bit_depth) {
#if CONFIG_AOM_HIGHBITDEPTH
switch (bit_depth) {
- case VPX_BITS_8: return dc_qlookup[clamp(qindex + delta, 0, MAXQ)];
- case VPX_BITS_10: return dc_qlookup_10[clamp(qindex + delta, 0, MAXQ)];
- case VPX_BITS_12: return dc_qlookup_12[clamp(qindex + delta, 0, MAXQ)];
+ case AOM_BITS_8: return dc_qlookup[clamp(qindex + delta, 0, MAXQ)];
+ case AOM_BITS_10: return dc_qlookup_10[clamp(qindex + delta, 0, MAXQ)];
+ case AOM_BITS_12: return dc_qlookup_12[clamp(qindex + delta, 0, MAXQ)];
default:
- assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
+ assert(0 && "bit_depth should be AOM_BITS_8, AOM_BITS_10 or AOM_BITS_12");
return -1;
}
#else
@@ -187,11 +187,11 @@
int16_t av1_ac_quant(int qindex, int delta, aom_bit_depth_t bit_depth) {
#if CONFIG_AOM_HIGHBITDEPTH
switch (bit_depth) {
- case VPX_BITS_8: return ac_qlookup[clamp(qindex + delta, 0, MAXQ)];
- case VPX_BITS_10: return ac_qlookup_10[clamp(qindex + delta, 0, MAXQ)];
- case VPX_BITS_12: return ac_qlookup_12[clamp(qindex + delta, 0, MAXQ)];
+ case AOM_BITS_8: return ac_qlookup[clamp(qindex + delta, 0, MAXQ)];
+ case AOM_BITS_10: return ac_qlookup_10[clamp(qindex + delta, 0, MAXQ)];
+ case AOM_BITS_12: return ac_qlookup_12[clamp(qindex + delta, 0, MAXQ)];
default:
- assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
+ assert(0 && "bit_depth should be AOM_BITS_8, AOM_BITS_10 or AOM_BITS_12");
return -1;
}
#else
diff --git a/av1/common/quant_common.h b/av1/common/quant_common.h
index e6bb62e..063a1bd 100644
--- a/av1/common/quant_common.h
+++ b/av1/common/quant_common.h
@@ -47,7 +47,7 @@
// different matrices may be defined
static inline int aom_get_qmlevel(int qindex, int first, int last) {
int qmlevel = (qindex * (last + 1 - first) + QINDEX_RANGE / 2) / QINDEX_RANGE;
- qmlevel = VPXMIN(qmlevel + first, NUM_QM_LEVELS - 1);
+ qmlevel = AOMMIN(qmlevel + first, NUM_QM_LEVELS - 1);
return qmlevel;
}
void aom_qm_init(struct AV1Common *cm);
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h
index 183ec30..97a0c9d 100644
--- a/av1/common/reconinter.h
+++ b/av1/common/reconinter.h
@@ -78,9 +78,9 @@
// If the MV points so far into the UMV border that no visible pixels
// are used for reconstruction, the subpel part of the MV can be
// discarded and the MV limited to 16 pixels with equivalent results.
- const int spel_left = (VPX_INTERP_EXTEND + bw) << SUBPEL_BITS;
+ const int spel_left = (AOM_INTERP_EXTEND + bw) << SUBPEL_BITS;
const int spel_right = spel_left - SUBPEL_SHIFTS;
- const int spel_top = (VPX_INTERP_EXTEND + bh) << SUBPEL_BITS;
+ const int spel_top = (AOM_INTERP_EXTEND + bh) << SUBPEL_BITS;
const int spel_bottom = spel_top - SUBPEL_SHIFTS;
MV clamped_mv = { src_mv->row * (1 << (1 - ss_y)),
src_mv->col * (1 << (1 - ss_x)) };
diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c
index d6e8605..1ded6bc 100644
--- a/av1/common/reconintra.c
+++ b/av1/common/reconintra.c
@@ -685,8 +685,8 @@
const int x = aoff * 4;
const int y = loff * 4;
#if CONFIG_MISC_FIXES
- const int bw = VPXMAX(2, 1 << bwl_in);
- const int bh = VPXMAX(2, 1 << bhl_in);
+ const int bw = AOMMAX(2, 1 << bwl_in);
+ const int bh = AOMMAX(2, 1 << bhl_in);
const int mi_row = -xd->mb_to_top_edge >> 6;
const int mi_col = -xd->mb_to_left_edge >> 6;
const BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type;
@@ -714,19 +714,19 @@
#if CONFIG_AOM_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
build_intra_predictors_high(xd, ref, ref_stride, dst, dst_stride, mode,
- tx_size, have_top ? VPXMIN(txpx, xr + txpx) : 0,
- have_top && have_right ? VPXMIN(txpx, xr) : 0,
- have_left ? VPXMIN(txpx, yd + txpx) : 0,
- have_bottom && have_left ? VPXMIN(txpx, yd) : 0,
+ tx_size, have_top ? AOMMIN(txpx, xr + txpx) : 0,
+ have_top && have_right ? AOMMIN(txpx, xr) : 0,
+ have_left ? AOMMIN(txpx, yd + txpx) : 0,
+ have_bottom && have_left ? AOMMIN(txpx, yd) : 0,
x, y, plane, xd->bd);
return;
}
#endif
build_intra_predictors(xd, ref, ref_stride, dst, dst_stride, mode, tx_size,
- have_top ? VPXMIN(txpx, xr + txpx) : 0,
- have_top && have_right ? VPXMIN(txpx, xr) : 0,
- have_left ? VPXMIN(txpx, yd + txpx) : 0,
- have_bottom && have_left ? VPXMIN(txpx, yd) : 0, x, y,
+ have_top ? AOMMIN(txpx, xr + txpx) : 0,
+ have_top && have_right ? AOMMIN(txpx, xr) : 0,
+ have_left ? AOMMIN(txpx, yd + txpx) : 0,
+ have_bottom && have_left ? AOMMIN(txpx, yd) : 0, x, y,
plane);
#else // CONFIG_MISC_FIXES
(void)bhl_in;
diff --git a/av1/common/thread_common.c b/av1/common/thread_common.c
index f068cf4..2d66f84 100644
--- a/av1/common/thread_common.c
+++ b/av1/common/thread_common.c
@@ -161,7 +161,7 @@
// Decoder may allocate more threads than number of tiles based on user's
// input.
const int tile_cols = 1 << cm->log2_tile_cols;
- const int num_workers = VPXMIN(nworkers, tile_cols);
+ const int num_workers = AOMMIN(nworkers, tile_cols);
int i;
if (!lf_sync->sync_range || sb_rows != lf_sync->rows ||
@@ -223,7 +223,7 @@
if (partial_frame && cm->mi_rows > 8) {
start_mi_row = cm->mi_rows >> 1;
start_mi_row &= 0xfffffff8;
- mi_rows_to_filter = VPXMAX(cm->mi_rows / 8, 8);
+ mi_rows_to_filter = AOMMAX(cm->mi_rows / 8, 8);
}
end_mi_row = start_mi_row + mi_rows_to_filter;
av1_loop_filter_frame_init(cm, frame_filter_level);
diff --git a/av1/common/tile_common.c b/av1/common/tile_common.c
index ebe6d67..d696890 100644
--- a/av1/common/tile_common.c
+++ b/av1/common/tile_common.c
@@ -19,7 +19,7 @@
static int get_tile_offset(int idx, int mis, int log2) {
const int sb_cols = mi_cols_aligned_to_sb(mis) >> MI_BLOCK_SIZE_LOG2;
const int offset = ((idx * sb_cols) >> log2) << MI_BLOCK_SIZE_LOG2;
- return VPXMIN(offset, mis);
+ return AOMMIN(offset, mis);
}
void av1_tile_set_row(TileInfo *tile, const AV1_COMMON *cm, int row) {
diff --git a/av1/common/x86/av1_inv_txfm_sse2.h b/av1/common/x86/av1_inv_txfm_sse2.h
index 31f5f2a..3aab34c 100644
--- a/av1/common/x86/av1_inv_txfm_sse2.h
+++ b/av1/common/x86/av1_inv_txfm_sse2.h
@@ -9,8 +9,8 @@
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#ifndef VPX_DSP_X86_INV_TXFM_SSE2_H_
-#define VPX_DSP_X86_INV_TXFM_SSE2_H_
+#ifndef AOM_DSP_X86_INV_TXFM_SSE2_H_
+#define AOM_DSP_X86_INV_TXFM_SSE2_H_
#include <emmintrin.h> // SSE2
#include "./aom_config.h"
@@ -182,4 +182,4 @@
void iadst8_sse2(__m128i *in);
void iadst16_sse2(__m128i *in0, __m128i *in1);
-#endif // VPX_DSP_X86_INV_TXFM_SSE2_H_
+#endif // AOM_DSP_X86_INV_TXFM_SSE2_H_
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index ec80ec6..cab930e 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -602,14 +602,14 @@
int x_pad = 0, y_pad = 0;
if (subpel_x || (sf->x_step_q4 != SUBPEL_SHIFTS)) {
- x0 -= VPX_INTERP_EXTEND - 1;
- x1 += VPX_INTERP_EXTEND;
+ x0 -= AOM_INTERP_EXTEND - 1;
+ x1 += AOM_INTERP_EXTEND;
x_pad = 1;
}
if (subpel_y || (sf->y_step_q4 != SUBPEL_SHIFTS)) {
- y0 -= VPX_INTERP_EXTEND - 1;
- y1 += VPX_INTERP_EXTEND;
+ y0 -= AOM_INTERP_EXTEND - 1;
+ y1 += AOM_INTERP_EXTEND;
y_pad = 1;
}
@@ -617,7 +617,7 @@
// pixels of each superblock row can be changed by next superblock row.
if (cm->frame_parallel_decode)
av1_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf,
- VPXMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1));
+ AOMMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1));
// Skip border extension if block is inside the frame.
if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 ||
@@ -643,7 +643,7 @@
if (cm->frame_parallel_decode) {
const int y1 = (y0_16 + (h - 1) * ys) >> SUBPEL_BITS;
av1_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf,
- VPXMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1));
+ AOMMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1));
}
}
#if CONFIG_AOM_HIGHBITDEPTH
@@ -720,8 +720,8 @@
static INLINE TX_SIZE
dec_get_uv_tx_size(const MB_MODE_INFO *mbmi, int n4_wl, int n4_hl) {
// get minimum log2 num4x4s dimension
- const int x = VPXMIN(n4_wl, n4_hl);
- return VPXMIN(mbmi->tx_size, x);
+ const int x = AOMMIN(n4_wl, n4_hl);
+ return AOMMIN(mbmi->tx_size, x);
}
static INLINE void dec_reset_skip_context(MACROBLOCKD *xd) {
@@ -781,8 +781,8 @@
const int less8x8 = bsize < BLOCK_8X8;
const int bw = 1 << (bwl - 1);
const int bh = 1 << (bhl - 1);
- const int x_mis = VPXMIN(bw, cm->mi_cols - mi_col);
- const int y_mis = VPXMIN(bh, cm->mi_rows - mi_row);
+ const int x_mis = AOMMIN(bw, cm->mi_cols - mi_col);
+ const int y_mis = AOMMIN(bh, cm->mi_rows - mi_row);
MB_MODE_INFO *mbmi = set_offsets(cm, xd, bsize, mi_row, mi_col, bw, bh, x_mis,
y_mis, bwl, bhl);
@@ -791,7 +791,7 @@
const BLOCK_SIZE uv_subsize =
ss_size_lookup[bsize][cm->subsampling_x][cm->subsampling_y];
if (uv_subsize == BLOCK_INVALID)
- aom_internal_error(xd->error_info, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(xd->error_info, AOM_CODEC_CORRUPT_FRAME,
"Invalid block size.");
}
@@ -994,11 +994,11 @@
// 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))
- aom_internal_error(error_info, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(error_info, AOM_CODEC_CORRUPT_FRAME,
"Truncated packet or corrupt tile length");
if (aom_reader_init(r, data, read_size, decrypt_cb, decrypt_state))
- aom_internal_error(error_info, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(error_info, AOM_CODEC_MEM_ERROR,
"Failed to allocate bool decoder %d", 1);
}
@@ -1237,7 +1237,7 @@
static void resize_context_buffers(AV1_COMMON *cm, int width, int height) {
#if CONFIG_SIZE_LIMIT
if (width > DECODE_WIDTH_LIMIT || height > DECODE_HEIGHT_LIMIT)
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_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 @@
// dimensions as well as the overall size.
if (new_mi_cols > cm->mi_cols || new_mi_rows > cm->mi_rows) {
if (av1_alloc_context_buffers(cm, width, height))
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate context buffers");
} else {
av1_set_mb_mi(cm, width, height);
@@ -1280,11 +1280,11 @@
#if CONFIG_AOM_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
- VPX_DEC_BORDER_IN_PIXELS, cm->byte_alignment,
+ AOM_DEC_BORDER_IN_PIXELS, cm->byte_alignment,
&pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb,
pool->cb_priv)) {
unlock_buffer_pool(pool);
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate frame buffer");
}
unlock_buffer_pool(pool);
@@ -1334,7 +1334,7 @@
}
if (width <= 0 || height <= 0)
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Invalid frame size");
// Check to make sure at least one of frames that this frame references
@@ -1346,7 +1346,7 @@
ref_frame->buf->y_crop_height, width, height);
}
if (!has_valid_ref_frame)
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_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 @@
ref_frame->buf->subsampling_x,
ref_frame->buf->subsampling_y, cm->bit_depth,
cm->subsampling_x, cm->subsampling_y))
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Referenced frame has incompatible color format");
}
@@ -1370,11 +1370,11 @@
#if CONFIG_AOM_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
- VPX_DEC_BORDER_IN_PIXELS, cm->byte_alignment,
+ AOM_DEC_BORDER_IN_PIXELS, cm->byte_alignment,
&pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb,
pool->cb_priv)) {
unlock_buffer_pool(pool);
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate frame buffer");
}
unlock_buffer_pool(pool);
@@ -1398,7 +1398,7 @@
while (max_ones-- && aom_rb_read_bit(rb)) cm->log2_tile_cols++;
if (cm->log2_tile_cols > 6)
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Invalid number of tile columns");
// rows
@@ -1445,7 +1445,7 @@
if (!is_last) {
if (!read_is_valid(*data, 4, data_end))
- aom_internal_error(error_info, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(error_info, AOM_CODEC_CORRUPT_FRAME,
"Truncated packet or corrupt tile length");
if (decrypt_cb) {
@@ -1458,7 +1458,7 @@
*data += tile_sz_mag + 1;
if (size > (size_t)(data_end - *data))
- aom_internal_error(error_info, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(error_info, AOM_CODEC_CORRUPT_FRAME,
"Truncated packet or corrupt tile size");
} else {
size = data_end - *data;
@@ -1506,7 +1506,7 @@
aom_memalign(32, sizeof(LFWorkerData)));
pbi->lf_worker.hook = (VPxWorkerHook)av1_loop_filter_worker;
if (pbi->max_threads > 1 && !winterface->reset(&pbi->lf_worker)) {
- aom_internal_error(&cm->error, VPX_CODEC_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_ERROR,
"Loop filter thread creation failed");
}
}
@@ -1582,7 +1582,7 @@
}
pbi->mb.corrupted |= tile_data->xd.corrupted;
if (pbi->mb.corrupted)
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Failed to decode tile data");
}
// Loopfilter one row.
@@ -1680,7 +1680,7 @@
const int aligned_mi_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;
- const int num_workers = VPXMIN(pbi->max_threads & ~1, tile_cols);
+ const int num_workers = AOMMIN(pbi->max_threads & ~1, tile_cols);
TileBuffer tile_buffers[1][1 << 6];
int n;
int final_worker = -1;
@@ -1710,7 +1710,7 @@
winterface->init(worker);
if (i < num_threads - 1 && !winterface->reset(worker)) {
- aom_internal_error(&cm->error, VPX_CODEC_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_ERROR,
"Tile decoder thread creation failed");
}
}
@@ -1747,7 +1747,7 @@
int group_start = 0;
while (group_start < tile_cols) {
const TileBuffer largest = tile_buffers[0][group_start];
- const int group_end = VPXMIN(group_start + num_workers, tile_cols) - 1;
+ const int group_end = AOMMIN(group_start + num_workers, tile_cols) - 1;
memmove(tile_buffers[0] + group_start, tile_buffers[0] + group_start + 1,
(group_end - group_start) * sizeof(tile_buffers[0][0]));
tile_buffers[0][group_end] = largest;
@@ -1837,34 +1837,34 @@
static void error_handler(void *data) {
AV1_COMMON *const cm = (AV1_COMMON *)data;
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Truncated packet");
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME, "Truncated packet");
}
static void read_bitdepth_colorspace_sampling(AV1_COMMON *cm,
struct aom_read_bit_buffer *rb) {
if (cm->profile >= PROFILE_2) {
- cm->bit_depth = aom_rb_read_bit(rb) ? VPX_BITS_12 : VPX_BITS_10;
+ cm->bit_depth = aom_rb_read_bit(rb) ? AOM_BITS_12 : AOM_BITS_10;
#if CONFIG_AOM_HIGHBITDEPTH
cm->use_highbitdepth = 1;
#endif
} else {
- cm->bit_depth = VPX_BITS_8;
+ cm->bit_depth = AOM_BITS_8;
#if CONFIG_AOM_HIGHBITDEPTH
cm->use_highbitdepth = 0;
#endif
}
cm->color_space = aom_rb_read_literal(rb, 3);
- if (cm->color_space != VPX_CS_SRGB) {
+ if (cm->color_space != AOM_CS_SRGB) {
// [16,235] (including xvycc) vs [0,255] range
cm->color_range = aom_rb_read_bit(rb);
if (cm->profile == PROFILE_1 || cm->profile == PROFILE_3) {
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)
- aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"4:2:0 color not supported in profile 1 or 3");
if (aom_rb_read_bit(rb))
- aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Reserved bit set");
} else {
cm->subsampling_y = cm->subsampling_x = 1;
@@ -1875,10 +1875,10 @@
// 4:2:2 or 4:4:0 chroma sampling is not allowed.
cm->subsampling_y = cm->subsampling_x = 0;
if (aom_rb_read_bit(rb))
- aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Reserved bit set");
} else {
- aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"4:4:4 color not supported in profile 0 or 2");
}
}
@@ -1896,18 +1896,18 @@
cm->last_frame_type = cm->frame_type;
cm->last_intra_only = cm->intra_only;
- if (aom_rb_read_literal(rb, 2) != VPX_FRAME_MARKER)
- aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
+ if (aom_rb_read_literal(rb, 2) != AOM_FRAME_MARKER)
+ aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Invalid frame marker");
cm->profile = av1_read_profile(rb);
#if CONFIG_AOM_HIGHBITDEPTH
if (cm->profile >= MAX_PROFILES)
- aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Unsupported bitstream profile");
#else
if (cm->profile >= PROFILE_2)
- aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Unsupported bitstream profile");
#endif
@@ -1918,7 +1918,7 @@
lock_buffer_pool(pool);
if (frame_to_show < 0 || frame_bufs[frame_to_show].ref_count < 1) {
unlock_buffer_pool(pool);
- aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Buffer %d does not contain a decoded frame",
frame_to_show);
}
@@ -1942,7 +1942,7 @@
if (cm->frame_type == KEY_FRAME) {
if (!av1_read_sync_code(rb))
- aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Invalid frame sync code");
read_bitdepth_colorspace_sampling(cm, rb);
@@ -1991,7 +1991,7 @@
if (cm->intra_only) {
if (!av1_read_sync_code(rb))
- aom_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Invalid frame sync code");
#if CONFIG_MISC_FIXES
read_bitdepth_colorspace_sampling(cm, rb);
@@ -2003,10 +2003,10 @@
// of either the color format or color sub-sampling in profile 0. AV1
// specifies that the default color format should be YUV 4:2:0 in this
// case (normative).
- cm->color_space = VPX_CS_BT_601;
+ cm->color_space = AOM_CS_BT_601;
cm->color_range = 0;
cm->subsampling_y = cm->subsampling_x = 1;
- cm->bit_depth = VPX_BITS_8;
+ cm->bit_depth = AOM_BITS_8;
#if CONFIG_AOM_HIGHBITDEPTH
cm->use_highbitdepth = 0;
#endif
@@ -2059,7 +2059,7 @@
get_frame_new_buffer(cm)->render_height = cm->render_height;
if (pbi->need_resync) {
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Keyframe / intra-only frame required to reset decoder"
" state");
}
@@ -2148,7 +2148,7 @@
sz = aom_rb_read_literal(rb, 16);
if (sz == 0)
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Invalid header size");
return sz;
@@ -2183,7 +2183,7 @@
if (aom_reader_init(&r, data, partition_size, pbi->decrypt_cb,
pbi->decrypt_state))
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate bool decoder 0");
#if !CONFIG_MISC_FIXES
@@ -2304,7 +2304,7 @@
rb->error_handler = error_handler;
rb->error_handler_data = &pbi->common;
if (pbi->decrypt_cb) {
- const int n = (int)VPXMIN(MAX_AV1_HEADER_SIZE, data_end - data);
+ const int n = (int)AOMMIN(MAX_AV1_HEADER_SIZE, data_end - data);
pbi->decrypt_cb(pbi->decrypt_state, data, clear_data, n);
rb->bit_buffer = clear_data;
rb->bit_buffer_end = clear_data + n;
@@ -2358,7 +2358,7 @@
data += aom_rb_bytes_read(&rb);
if (!read_is_valid(data, first_partition_size, data_end))
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Truncated packet or corrupt header length");
cm->use_prev_frame_mvs =
@@ -2370,7 +2370,7 @@
*cm->fc = cm->frame_contexts[cm->frame_context_idx];
if (!cm->fc->initialized)
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Uninitialized entropy context.");
av1_zero(cm->counts);
@@ -2378,7 +2378,7 @@
xd->corrupted = 0;
new_fb->corrupted = read_compressed_header(pbi, data, first_partition_size);
if (new_fb->corrupted)
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Decode failed. Frame data header is corrupted.");
if (cm->lf.filter_level && !cm->skip_loop_filter) {
@@ -2416,7 +2416,7 @@
pbi->num_tile_workers, &pbi->lf_row_sync);
}
} else {
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Decode failed. Frame data is corrupted.");
}
} else {
@@ -2441,7 +2441,7 @@
debug_check_frame_counts(cm);
}
} else {
- aom_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
"Decode failed. Frame data is corrupted.");
}
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index 870dc5c..fd0ccdf 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -88,7 +88,7 @@
if (allow_select && tx_mode == TX_MODE_SELECT && bsize >= BLOCK_8X8)
return read_selected_tx_size(cm, xd, max_tx_size, r);
else
- return VPXMIN(max_tx_size, tx_mode_to_biggest_tx_size[tx_mode]);
+ return AOMMIN(max_tx_size, tx_mode_to_biggest_tx_size[tx_mode]);
}
static int dec_get_segment_id(const AV1_COMMON *cm, const uint8_t *segment_ids,
@@ -98,7 +98,7 @@
for (y = 0; y < y_mis; y++)
for (x = 0; x < x_mis; x++)
segment_id =
- VPXMIN(segment_id, segment_ids[mi_offset + y * cm->mi_cols + x]);
+ AOMMIN(segment_id, segment_ids[mi_offset + y * cm->mi_cols + x]);
assert(segment_id >= 0 && segment_id < MAX_SEGMENTS);
return segment_id;
@@ -172,8 +172,8 @@
const int bh = xd->plane[0].n4_h >> 1;
// TODO(slavarnway): move x_mis, y_mis into xd ?????
- const int x_mis = VPXMIN(cm->mi_cols - mi_col, bw);
- const int y_mis = VPXMIN(cm->mi_rows - mi_row, bh);
+ const int x_mis = AOMMIN(cm->mi_cols - mi_col, bw);
+ const int y_mis = AOMMIN(cm->mi_rows - mi_row, bh);
if (!seg->enabled) return 0; // Default for disabled segmentation
@@ -240,8 +240,8 @@
const int bh = xd->plane[0].n4_h >> 1;
// TODO(slavarnway): move x_mis, y_mis into xd ?????
- const int x_mis = VPXMIN(cm->mi_cols - mi_col, bw);
- const int y_mis = VPXMIN(cm->mi_rows - mi_row, bh);
+ const int x_mis = AOMMIN(cm->mi_cols - mi_col, bw);
+ const int y_mis = AOMMIN(cm->mi_rows - mi_row, bh);
mbmi->segment_id = read_intra_segment_id(cm, xd, mi_offset, x_mis, y_mis, r);
mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r);
@@ -526,7 +526,7 @@
xd->block_refs[ref] = ref_buf;
if ((!av1_is_valid_scale(&ref_buf->sf)))
- aom_internal_error(xd->error_info, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(xd->error_info, AOM_CODEC_UNSUP_BITSTREAM,
"Reference frame has invalid dimensions");
av1_setup_pre_planes(xd, ref, ref_buf->buf, mi_row, mi_col, &ref_buf->sf);
av1_find_mv_refs(cm, xd, mi, frame, ref_mvs[frame], mi_row, mi_col,
@@ -536,7 +536,7 @@
if (segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) {
mbmi->mode = ZEROMV;
if (bsize < BLOCK_8X8) {
- aom_internal_error(xd->error_info, VPX_CODEC_UNSUP_BITSTREAM,
+ aom_internal_error(xd->error_info, AOM_CODEC_UNSUP_BITSTREAM,
"Invalid usage of segement feature on small blocks");
return;
}
diff --git a/av1/decoder/decoder.c b/av1/decoder/decoder.c
index 80d14bb..f162a42 100644
--- a/av1/decoder/decoder.c
+++ b/av1/decoder/decoder.c
@@ -101,8 +101,8 @@
pbi->ready_for_new_data = 1;
pbi->common.buffer_pool = pool;
- cm->bit_depth = VPX_BITS_8;
- cm->dequant_bit_depth = VPX_BITS_8;
+ cm->bit_depth = AOM_BITS_8;
+ cm->dequant_bit_depth = AOM_BITS_8;
cm->alloc_mi = av1_dec_alloc_mi;
cm->free_mi = av1_dec_free_mi;
@@ -151,7 +151,7 @@
}
aom_codec_err_t av1_copy_reference_dec(AV1Decoder *pbi,
- VPX_REFFRAME ref_frame_flag,
+ AOM_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd) {
AV1_COMMON *cm = &pbi->common;
@@ -160,27 +160,27 @@
* aomenc --test-decode functionality working, and will be replaced in a
* later commit that adds AV1-specific controls for this functionality.
*/
- if (ref_frame_flag == VPX_LAST_FLAG) {
+ if (ref_frame_flag == AOM_LAST_FLAG) {
const YV12_BUFFER_CONFIG *const cfg = get_ref_frame(cm, 0);
if (cfg == NULL) {
- aom_internal_error(&cm->error, VPX_CODEC_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_ERROR,
"No 'last' reference frame");
- return VPX_CODEC_ERROR;
+ return AOM_CODEC_ERROR;
}
if (!equal_dimensions(cfg, sd))
- aom_internal_error(&cm->error, VPX_CODEC_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_ERROR,
"Incorrect buffer dimensions");
else
aom_yv12_copy_frame(cfg, sd);
} else {
- aom_internal_error(&cm->error, VPX_CODEC_ERROR, "Invalid reference frame");
+ aom_internal_error(&cm->error, AOM_CODEC_ERROR, "Invalid reference frame");
}
return cm->error.error_code;
}
aom_codec_err_t av1_set_reference_dec(AV1_COMMON *cm,
- VPX_REFFRAME ref_frame_flag,
+ AOM_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd) {
RefBuffer *ref_buf = NULL;
RefCntBuffer *const frame_bufs = cm->buffer_pool->frame_bufs;
@@ -189,26 +189,26 @@
// encoder is using the frame buffers for. This is just a stub to keep the
// aomenc --test-decode functionality working, and will be replaced in a
// later commit that adds AV1-specific controls for this functionality.
- if (ref_frame_flag == VPX_LAST_FLAG) {
+ if (ref_frame_flag == AOM_LAST_FLAG) {
ref_buf = &cm->frame_refs[0];
- } else if (ref_frame_flag == VPX_GOLD_FLAG) {
+ } else if (ref_frame_flag == AOM_GOLD_FLAG) {
ref_buf = &cm->frame_refs[1];
- } else if (ref_frame_flag == VPX_ALT_FLAG) {
+ } else if (ref_frame_flag == AOM_ALT_FLAG) {
ref_buf = &cm->frame_refs[2];
} else {
- aom_internal_error(&cm->error, VPX_CODEC_ERROR, "Invalid reference frame");
+ aom_internal_error(&cm->error, AOM_CODEC_ERROR, "Invalid reference frame");
return cm->error.error_code;
}
if (!equal_dimensions(ref_buf->buf, sd)) {
- aom_internal_error(&cm->error, VPX_CODEC_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_ERROR,
"Incorrect buffer dimensions");
} else {
int *ref_fb_ptr = &ref_buf->idx;
// Find an empty frame buffer.
const int free_fb = get_free_fb(cm);
- if (cm->new_fb_idx == INVALID_IDX) return VPX_CODEC_MEM_ERROR;
+ if (cm->new_fb_idx == INVALID_IDX) return AOM_CODEC_MEM_ERROR;
// Decrease ref_count since it will be increased again in
// ref_cnt_fb() below.
@@ -272,7 +272,7 @@
RefCntBuffer *volatile const frame_bufs = cm->buffer_pool->frame_bufs;
const uint8_t *source = *psource;
int retcode = 0;
- cm->error.error_code = VPX_CODEC_OK;
+ cm->error.error_code = AOM_CODEC_OK;
if (size == 0) {
// This is used to signal that we are missing frames.
@@ -299,7 +299,7 @@
&frame_bufs[cm->new_fb_idx].raw_frame_buffer);
// Find a free frame buffer. Return error if can not find any.
cm->new_fb_idx = get_free_fb(cm);
- if (cm->new_fb_idx == INVALID_IDX) return VPX_CODEC_MEM_ERROR;
+ if (cm->new_fb_idx == INVALID_IDX) return AOM_CODEC_MEM_ERROR;
// Assign a MV array to the frame buffer.
cm->cur_frame = &pool->frame_bufs[cm->new_fb_idx];
@@ -449,7 +449,7 @@
// This chunk is marked as having a superframe index but doesn't have
// enough data for it, thus it's an invalid superframe index.
- if (data_sz < index_sz) return VPX_CODEC_CORRUPT_FRAME;
+ if (data_sz < index_sz) return AOM_CODEC_CORRUPT_FRAME;
{
const uint8_t marker2 =
@@ -458,7 +458,7 @@
// This chunk is marked as having a superframe index but doesn't have
// the matching marker byte at the front of the index therefore it's an
// invalid chunk.
- if (marker != marker2) return VPX_CODEC_CORRUPT_FRAME;
+ if (marker != marker2) return AOM_CODEC_CORRUPT_FRAME;
}
{
@@ -490,5 +490,5 @@
*count = frames;
}
}
- return VPX_CODEC_OK;
+ return AOM_CODEC_OK;
}
diff --git a/av1/decoder/decoder.h b/av1/decoder/decoder.h
index 7cf8abb..8d6a447 100644
--- a/av1/decoder/decoder.h
+++ b/av1/decoder/decoder.h
@@ -88,11 +88,11 @@
int av1_get_raw_frame(struct AV1Decoder *pbi, YV12_BUFFER_CONFIG *sd);
aom_codec_err_t av1_copy_reference_dec(struct AV1Decoder *pbi,
- VPX_REFFRAME ref_frame_flag,
+ AOM_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
aom_codec_err_t av1_set_reference_dec(AV1_COMMON *cm,
- VPX_REFFRAME ref_frame_flag,
+ AOM_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
static INLINE uint8_t read_marker(aom_decrypt_cb decrypt_cb,
diff --git a/av1/decoder/detokenize.c b/av1/decoder/detokenize.c
index 99ee02d..8b1bd6a 100644
--- a/av1/decoder/detokenize.c
+++ b/av1/decoder/detokenize.c
@@ -87,8 +87,8 @@
}
#if CONFIG_AOM_HIGHBITDEPTH
- if (xd->bd > VPX_BITS_8) {
- if (xd->bd == VPX_BITS_10) {
+ if (xd->bd > AOM_BITS_8) {
+ if (xd->bd == AOM_BITS_10) {
cat1_prob = av1_cat1_prob_high10;
cat2_prob = av1_cat2_prob_high10;
cat3_prob = av1_cat3_prob_high10;
@@ -177,13 +177,13 @@
const uint8_t *cat6p = cat6_prob + skip_bits;
#if CONFIG_AOM_HIGHBITDEPTH
switch (xd->bd) {
- case VPX_BITS_8:
+ case AOM_BITS_8:
val = CAT6_MIN_VAL + read_coeff(cat6p, 14 - skip_bits, r);
break;
- case VPX_BITS_10:
+ case AOM_BITS_10:
val = CAT6_MIN_VAL + read_coeff(cat6p, 16 - skip_bits, r);
break;
- case VPX_BITS_12:
+ case AOM_BITS_12:
val = CAT6_MIN_VAL + read_coeff(cat6p, 18 - skip_bits, r);
break;
default: assert(0); return -1;
diff --git a/av1/decoder/dthread.c b/av1/decoder/dthread.c
index 25f8dca..415c1b7 100644
--- a/av1/decoder/dthread.c
+++ b/av1/decoder/dthread.c
@@ -99,7 +99,7 @@
FrameWorkerData *const worker_data = (FrameWorkerData *)worker->data1;
av1_frameworker_unlock_stats(ref_worker);
aom_internal_error(&worker_data->pbi->common.error,
- VPX_CODEC_CORRUPT_FRAME,
+ AOM_CODEC_CORRUPT_FRAME,
"Worker %p failed to decode frame", worker);
}
av1_frameworker_unlock_stats(ref_worker);
diff --git a/av1/encoder/aq_complexity.c b/av1/encoder/aq_complexity.c
index 2fc004e..9b6216e 100644
--- a/av1/encoder/aq_complexity.c
+++ b/av1/encoder/aq_complexity.c
@@ -118,8 +118,8 @@
const int mi_offset = mi_row * cm->mi_cols + mi_col;
const int bw = num_8x8_blocks_wide_lookup[BLOCK_64X64];
const int bh = num_8x8_blocks_high_lookup[BLOCK_64X64];
- const int xmis = VPXMIN(cm->mi_cols - mi_col, num_8x8_blocks_wide_lookup[bs]);
- const int ymis = VPXMIN(cm->mi_rows - mi_row, num_8x8_blocks_high_lookup[bs]);
+ const int xmis = AOMMIN(cm->mi_cols - mi_col, num_8x8_blocks_wide_lookup[bs]);
+ const int ymis = AOMMIN(cm->mi_rows - mi_row, num_8x8_blocks_high_lookup[bs]);
int x, y;
int i;
unsigned char segment;
@@ -136,7 +136,7 @@
const int aq_strength = get_aq_c_strength(cm->base_qindex, cm->bit_depth);
aom_clear_system_state();
- low_var_thresh = (cpi->oxcf.pass == 2) ? VPXMAX(cpi->twopass.mb_av_energy,
+ low_var_thresh = (cpi->oxcf.pass == 2) ? AOMMAX(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 7f7a5b3..81a49bd 100644
--- a/av1/encoder/aq_cyclicrefresh.c
+++ b/av1/encoder/aq_cyclicrefresh.c
@@ -218,8 +218,8 @@
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
const int bw = num_8x8_blocks_wide_lookup[bsize];
const int bh = num_8x8_blocks_high_lookup[bsize];
- const int xmis = VPXMIN(cm->mi_cols - mi_col, bw);
- const int ymis = VPXMIN(cm->mi_rows - mi_row, bh);
+ const int xmis = AOMMIN(cm->mi_cols - mi_col, bw);
+ const int ymis = AOMMIN(cm->mi_rows - mi_row, bh);
const int block_index = mi_row * cm->mi_cols + mi_col;
const int refresh_this_block =
candidate_refresh_aq(cr, mbmi, rate, dist, bsize);
@@ -270,7 +270,7 @@
} else if (is_inter_block(mbmi) && skip &&
mbmi->segment_id <= CR_SEGMENT_ID_BOOST2) {
cr->last_coded_q_map[map_offset] =
- VPXMIN(clamp(cm->base_qindex + cr->qindex_delta[mbmi->segment_id],
+ AOMMIN(clamp(cm->base_qindex + cr->qindex_delta[mbmi->segment_id],
0, MAXQ),
cr->last_coded_q_map[map_offset]);
}
@@ -411,7 +411,7 @@
int mi_row = sb_row_index * MI_BLOCK_SIZE;
int mi_col = sb_col_index * MI_BLOCK_SIZE;
int qindex_thresh =
- cpi->oxcf.content == VPX_CONTENT_SCREEN
+ cpi->oxcf.content == AOM_CONTENT_SCREEN
? av1_get_qindex(&cm->seg, CR_SEGMENT_ID_BOOST2, cm->base_qindex)
: 0;
assert(mi_row >= 0 && mi_row < cm->mi_rows);
@@ -419,9 +419,9 @@
bl_index = mi_row * cm->mi_cols + mi_col;
// Loop through all 8x8 blocks in superblock and update map.
xmis =
- VPXMIN(cm->mi_cols - mi_col, num_8x8_blocks_wide_lookup[BLOCK_64X64]);
+ AOMMIN(cm->mi_cols - mi_col, num_8x8_blocks_wide_lookup[BLOCK_64X64]);
ymis =
- VPXMIN(cm->mi_rows - mi_row, num_8x8_blocks_high_lookup[BLOCK_64X64]);
+ AOMMIN(cm->mi_rows - mi_row, num_8x8_blocks_high_lookup[BLOCK_64X64]);
for (y = 0; y < ymis; y++) {
for (x = 0; x < xmis; x++) {
const int bl_index2 = bl_index + y * cm->mi_cols + x;
@@ -545,7 +545,7 @@
// Set a more aggressive (higher) q delta for segment BOOST2.
qindex_delta = compute_deltaq(
cpi, cm->base_qindex,
- VPXMIN(CR_MAX_RATE_TARGET_RATIO,
+ AOMMIN(CR_MAX_RATE_TARGET_RATIO,
0.1 * cr->rate_boost_fac * cr->rate_ratio_qdelta));
cr->qindex_delta[2] = qindex_delta;
av1_set_segdata(seg, CR_SEGMENT_ID_BOOST2, SEG_LVL_ALT_Q, qindex_delta);
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 2c90bec..96cb06e 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -207,9 +207,9 @@
int n = a->len;
#if CONFIG_AOM_HIGHBITDEPTH
const av1_extra_bit *b;
- if (bit_depth == VPX_BITS_12)
+ if (bit_depth == AOM_BITS_12)
b = &av1_extra_bits_high12[t];
- else if (bit_depth == VPX_BITS_10)
+ else if (bit_depth == AOM_BITS_10)
b = &av1_extra_bits_high10[t];
else
b = &av1_extra_bits[t];
@@ -993,7 +993,7 @@
}
#else
static void write_txfm_mode(TX_MODE mode, struct aom_writer *wb) {
- aom_write_literal(wb, VPXMIN(mode, ALLOW_32X32), 2);
+ aom_write_literal(wb, AOMMIN(mode, ALLOW_32X32), 2);
if (mode >= ALLOW_32X32) aom_write_bit(wb, mode == TX_MODE_SELECT);
}
#endif
@@ -1225,11 +1225,11 @@
static void write_bitdepth_colorspace_sampling(
AV1_COMMON *const cm, struct aom_write_bit_buffer *wb) {
if (cm->profile >= PROFILE_2) {
- assert(cm->bit_depth > VPX_BITS_8);
- aom_wb_write_bit(wb, cm->bit_depth == VPX_BITS_10 ? 0 : 1);
+ assert(cm->bit_depth > AOM_BITS_8);
+ aom_wb_write_bit(wb, cm->bit_depth == AOM_BITS_10 ? 0 : 1);
}
aom_wb_write_literal(wb, cm->color_space, 3);
- if (cm->color_space != VPX_CS_SRGB) {
+ if (cm->color_space != AOM_CS_SRGB) {
// 0: [16, 235] (i.e. xvYCC), 1: [0, 255]
aom_wb_write_bit(wb, cm->color_range);
if (cm->profile == PROFILE_1 || cm->profile == PROFILE_3) {
@@ -1251,7 +1251,7 @@
AV1_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
- aom_wb_write_literal(wb, VPX_FRAME_MARKER, 2);
+ aom_wb_write_literal(wb, AOM_FRAME_MARKER, 2);
write_profile(cm->profile, wb);
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index f5808ad..7116a89 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -197,10 +197,10 @@
// Set up limit values for MV components.
// Mv beyond the range do not produce new/different prediction block.
- x->mv_row_min = -(((mi_row + mi_height) * MI_SIZE) + VPX_INTERP_EXTEND);
- x->mv_col_min = -(((mi_col + mi_width) * MI_SIZE) + VPX_INTERP_EXTEND);
- x->mv_row_max = (cm->mi_rows - mi_row) * MI_SIZE + VPX_INTERP_EXTEND;
- x->mv_col_max = (cm->mi_cols - mi_col) * MI_SIZE + VPX_INTERP_EXTEND;
+ x->mv_row_min = -(((mi_row + mi_height) * MI_SIZE) + AOM_INTERP_EXTEND);
+ x->mv_col_min = -(((mi_col + mi_width) * MI_SIZE) + AOM_INTERP_EXTEND);
+ x->mv_row_max = (cm->mi_rows - mi_row) * MI_SIZE + AOM_INTERP_EXTEND;
+ x->mv_col_max = (cm->mi_cols - mi_col) * MI_SIZE + AOM_INTERP_EXTEND;
// Set up distance of MB to edge of frame in 1/8th pel units.
assert(!(mi_col & (mi_width - 1)) && !(mi_row & (mi_height - 1)));
@@ -907,8 +907,8 @@
const struct segmentation *const seg = &cm->seg;
const int bw = num_8x8_blocks_wide_lookup[mi->mbmi.sb_type];
const int bh = num_8x8_blocks_high_lookup[mi->mbmi.sb_type];
- const int x_mis = VPXMIN(bw, cm->mi_cols - mi_col);
- const int y_mis = VPXMIN(bh, cm->mi_rows - mi_row);
+ const int x_mis = AOMMIN(bw, cm->mi_cols - mi_col);
+ const int y_mis = AOMMIN(bh, cm->mi_rows - mi_row);
MV_REF *const frame_mvs = cm->cur_frame->mvs + mi_row * cm->mi_cols + mi_col;
int w, h;
@@ -1367,7 +1367,7 @@
static BLOCK_SIZE find_partition_size(BLOCK_SIZE bsize, int rows_left,
int cols_left, int *bh, int *bw) {
if (rows_left <= 0 || cols_left <= 0) {
- return VPXMIN(bsize, BLOCK_8X8);
+ return AOMMIN(bsize, BLOCK_8X8);
} else {
for (; bsize > 0; bsize -= 3) {
*bh = num_8x8_blocks_high_lookup[bsize];
@@ -1724,8 +1724,8 @@
MODE_INFO *mi = mi_8x8[index + j];
BLOCK_SIZE sb_type = mi ? mi->mbmi.sb_type : 0;
bs_hist[sb_type]++;
- *min_block_size = VPXMIN(*min_block_size, sb_type);
- *max_block_size = VPXMAX(*max_block_size, sb_type);
+ *min_block_size = AOMMIN(*min_block_size, sb_type);
+ *max_block_size = AOMMAX(*max_block_size, sb_type);
}
index += xd->mi_stride;
}
@@ -1799,7 +1799,7 @@
min_size = BLOCK_4X4;
} else {
min_size =
- VPXMIN(cpi->sf.rd_auto_partition_min_limit, VPXMIN(min_size, max_size));
+ AOMMIN(cpi->sf.rd_auto_partition_min_limit, AOMMIN(min_size, max_size));
}
// When use_square_partition_only is true, make sure at least one square
@@ -1835,8 +1835,8 @@
for (idx = 0; idx < mi_width; ++idx) {
mi = prev_mi[idy * cm->mi_stride + idx];
bs = mi ? mi->mbmi.sb_type : bsize;
- min_size = VPXMIN(min_size, bs);
- max_size = VPXMAX(max_size, bs);
+ min_size = AOMMIN(min_size, bs);
+ max_size = AOMMAX(max_size, bs);
}
}
}
@@ -1845,8 +1845,8 @@
for (idy = 0; idy < mi_height; ++idy) {
mi = xd->mi[idy * cm->mi_stride - 1];
bs = mi ? mi->mbmi.sb_type : bsize;
- min_size = VPXMIN(min_size, bs);
- max_size = VPXMAX(max_size, bs);
+ min_size = AOMMIN(min_size, bs);
+ max_size = AOMMAX(max_size, bs);
}
}
@@ -1854,8 +1854,8 @@
for (idx = 0; idx < mi_width; ++idx) {
mi = xd->mi[idx - cm->mi_stride];
bs = mi ? mi->mbmi.sb_type : bsize;
- min_size = VPXMIN(min_size, bs);
- max_size = VPXMAX(max_size, bs);
+ min_size = AOMMIN(min_size, bs);
+ max_size = AOMMAX(max_size, bs);
}
}
@@ -2025,9 +2025,9 @@
int mb_row = mi_row >> 1;
int mb_col = mi_col >> 1;
int mb_row_end =
- VPXMIN(mb_row + num_16x16_blocks_high_lookup[bsize], cm->mb_rows);
+ AOMMIN(mb_row + num_16x16_blocks_high_lookup[bsize], cm->mb_rows);
int mb_col_end =
- VPXMIN(mb_col + num_16x16_blocks_wide_lookup[bsize], cm->mb_cols);
+ AOMMIN(mb_col + num_16x16_blocks_wide_lookup[bsize], cm->mb_cols);
int r, c;
// compute a complexity measure, basically measure inconsistency of motion
@@ -2115,9 +2115,9 @@
int mb_row = mi_row >> 1;
int mb_col = mi_col >> 1;
int mb_row_end =
- VPXMIN(mb_row + num_16x16_blocks_high_lookup[bsize], cm->mb_rows);
+ AOMMIN(mb_row + num_16x16_blocks_high_lookup[bsize], cm->mb_rows);
int mb_col_end =
- VPXMIN(mb_col + num_16x16_blocks_wide_lookup[bsize], cm->mb_cols);
+ AOMMIN(mb_col + num_16x16_blocks_wide_lookup[bsize], cm->mb_cols);
int r, c;
int skip = 1;
@@ -2431,8 +2431,8 @@
if (segfeature_active(&cpi->common.seg, 1, SEG_LVL_REF_FRAME)) {
return 0;
} else {
- return (!!(ref_flags & VPX_GOLD_FLAG) + !!(ref_flags & VPX_LAST_FLAG) +
- !!(ref_flags & VPX_ALT_FLAG)) >= 2;
+ return (!!(ref_flags & AOM_GOLD_FLAG) + !!(ref_flags & AOM_LAST_FLAG) +
+ !!(ref_flags & AOM_ALT_FLAG)) >= 2;
}
}
@@ -2620,7 +2620,7 @@
#endif
// If allowed, encoding tiles in parallel with one thread handling one tile.
- if (VPXMIN(cpi->oxcf.max_threads, 1 << cm->log2_tile_cols) > 1)
+ if (AOMMIN(cpi->oxcf.max_threads, 1 << cm->log2_tile_cols) > 1)
av1_encode_tiles_mt(cpi);
else
encode_tiles(cpi);
@@ -2841,11 +2841,11 @@
int plane;
mbmi->skip = 1;
for (plane = 0; plane < MAX_MB_PLANE; ++plane)
- av1_encode_intra_block_plane(x, VPXMAX(bsize, BLOCK_8X8), plane);
+ av1_encode_intra_block_plane(x, AOMMAX(bsize, BLOCK_8X8), plane);
if (output_enabled)
sum_intra_stats(td->counts, mi, xd->above_mi, xd->left_mi,
frame_is_intra_only(cm));
- av1_tokenize_sb(cpi, td, t, !output_enabled, VPXMAX(bsize, BLOCK_8X8));
+ av1_tokenize_sb(cpi, td, t, !output_enabled, AOMMAX(bsize, BLOCK_8X8));
} else {
int ref;
const int is_compound = has_second_ref(mbmi);
@@ -2858,13 +2858,13 @@
}
if (!(cpi->sf.reuse_inter_pred_sby && ctx->pred_pixel_ready) || seg_skip)
av1_build_inter_predictors_sby(xd, mi_row, mi_col,
- VPXMAX(bsize, BLOCK_8X8));
+ AOMMAX(bsize, BLOCK_8X8));
av1_build_inter_predictors_sbuv(xd, mi_row, mi_col,
- VPXMAX(bsize, BLOCK_8X8));
+ AOMMAX(bsize, BLOCK_8X8));
- av1_encode_sb(x, VPXMAX(bsize, BLOCK_8X8));
- av1_tokenize_sb(cpi, td, t, !output_enabled, VPXMAX(bsize, BLOCK_8X8));
+ av1_encode_sb(x, AOMMAX(bsize, BLOCK_8X8));
+ av1_tokenize_sb(cpi, td, t, !output_enabled, AOMMAX(bsize, BLOCK_8X8));
}
if (output_enabled) {
@@ -2877,7 +2877,7 @@
TX_SIZE tx_size;
// The new intra coding scheme requires no change of transform size
if (is_inter_block(&mi->mbmi)) {
- tx_size = VPXMIN(tx_mode_to_biggest_tx_size[cm->tx_mode],
+ tx_size = AOMMIN(tx_mode_to_biggest_tx_size[cm->tx_mode],
max_txsize_lookup[bsize]);
} else {
tx_size = (bsize >= BLOCK_8X8) ? mbmi->tx_size : TX_4X4;
diff --git a/av1/encoder/encodemv.c b/av1/encoder/encodemv.c
index 25c577e..7266b6e 100644
--- a/av1/encoder/encodemv.c
+++ b/av1/encoder/encodemv.c
@@ -220,8 +220,8 @@
// If auto_mv_step_size is enabled then keep track of the largest
// motion vector component used.
if (cpi->sf.mv.auto_mv_step_size) {
- unsigned int maxv = VPXMAX(abs(mv->row), abs(mv->col)) >> 3;
- cpi->max_mv_magnitude = VPXMAX(maxv, cpi->max_mv_magnitude);
+ unsigned int maxv = AOMMAX(abs(mv->row), abs(mv->col)) >> 3;
+ cpi->max_mv_magnitude = AOMMAX(maxv, cpi->max_mv_magnitude);
}
}
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index e84a99a..4e7ad21 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -91,7 +91,7 @@
FILE *keyfile;
#endif
-static INLINE void Scale2Ratio(VPX_SCALING mode, int *hr, int *hs) {
+static INLINE void Scale2Ratio(AOM_SCALING mode, int *hr, int *hs) {
switch (mode) {
case NORMAL:
*hr = 1;
@@ -602,7 +602,7 @@
#endif
oxcf->lag_in_frames);
if (!cpi->lookahead)
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate lag buffers");
// TODO(agrange) Check if ARF is enabled and skip allocation if not.
@@ -611,9 +611,9 @@
#if CONFIG_AOM_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
- VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+ AOM_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
NULL, NULL, NULL))
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate altref buffer");
}
@@ -624,9 +624,9 @@
#if CONFIG_AOM_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
- VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+ AOM_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
NULL, NULL, NULL))
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate last frame buffer");
if (aom_realloc_frame_buffer(&cpi->scaled_source, cm->width, cm->height,
@@ -634,9 +634,9 @@
#if CONFIG_AOM_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
- VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+ AOM_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
NULL, NULL, NULL))
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate scaled source buffer");
if (aom_realloc_frame_buffer(&cpi->scaled_last_source, cm->width, cm->height,
@@ -644,9 +644,9 @@
#if CONFIG_AOM_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
- VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+ AOM_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
NULL, NULL, NULL))
- aom_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate scaled last source buffer");
}
@@ -928,7 +928,7 @@
AV1_COMMON *const cm = &cpi->common;
if (cm->use_highbitdepth) {
switch (cm->bit_depth) {
- case VPX_BITS_8:
+ case AOM_BITS_8:
HIGHBD_BFP(BLOCK_32X16, aom_highbd_sad32x16_bits8,
aom_highbd_sad32x16_avg_bits8, aom_highbd_8_variance32x16,
aom_highbd_8_sub_pixel_variance32x16,
@@ -1011,7 +1011,7 @@
aom_highbd_sad4x4x8_bits8, aom_highbd_sad4x4x4d_bits8)
break;
- case VPX_BITS_10:
+ case AOM_BITS_10:
HIGHBD_BFP(BLOCK_32X16, aom_highbd_sad32x16_bits10,
aom_highbd_sad32x16_avg_bits10, aom_highbd_10_variance32x16,
aom_highbd_10_sub_pixel_variance32x16,
@@ -1096,7 +1096,7 @@
aom_highbd_sad4x4x8_bits10, aom_highbd_sad4x4x4d_bits10)
break;
- case VPX_BITS_12:
+ case AOM_BITS_12:
HIGHBD_BFP(BLOCK_32X16, aom_highbd_sad32x16_bits12,
aom_highbd_sad32x16_avg_bits12, aom_highbd_12_variance32x16,
aom_highbd_12_sub_pixel_variance32x16,
@@ -1183,8 +1183,8 @@
default:
assert(0 &&
- "cm->bit_depth should be VPX_BITS_8, "
- "VPX_BITS_10 or VPX_BITS_12");
+ "cm->bit_depth should be AOM_BITS_8, "
+ "AOM_BITS_10 or AOM_BITS_12");
}
}
}
@@ -1225,16 +1225,16 @@
cm->color_range = oxcf->color_range;
if (cm->profile <= PROFILE_1)
- assert(cm->bit_depth == VPX_BITS_8);
+ assert(cm->bit_depth == AOM_BITS_8);
else
- assert(cm->bit_depth > VPX_BITS_8);
+ assert(cm->bit_depth > AOM_BITS_8);
cpi->oxcf = *oxcf;
#if CONFIG_AOM_HIGHBITDEPTH
cpi->td.mb.e_mbd.bd = (int)cm->bit_depth;
#endif // CONFIG_AOM_HIGHBITDEPTH
- if ((oxcf->pass == 0) && (oxcf->rc_mode == VPX_Q)) {
+ if ((oxcf->pass == 0) && (oxcf->rc_mode == AOM_Q)) {
rc->baseline_gf_interval = FIXED_GF_INTERVAL;
} else {
rc->baseline_gf_interval = (MIN_GF_INTERVAL + MAX_GF_INTERVAL) / 2;
@@ -1264,8 +1264,8 @@
// Under a configuration change, where maximum_buffer_size may change,
// keep buffer level clipped to the maximum allowed buffer size.
- rc->bits_off_target = VPXMIN(rc->bits_off_target, rc->maximum_buffer_size);
- rc->buffer_level = VPXMIN(rc->buffer_level, rc->maximum_buffer_size);
+ rc->bits_off_target = AOMMIN(rc->bits_off_target, rc->maximum_buffer_size);
+ rc->buffer_level = AOMMIN(rc->buffer_level, rc->maximum_buffer_size);
// Set up frame rate and related parameters rate control values.
av1_new_framerate(cpi, cpi->framerate);
@@ -1668,7 +1668,7 @@
snprintf(headings, sizeof(headings),
"Bitrate\tAVGPsnr\tGLBPsnr\tAVPsnrP\tGLPsnrP\t"
- "VPXSSIM\tVPSSIMP\tFASTSIM\tPSNRHVS\t"
+ "AOMSSIM\tVPSSIMP\tFASTSIM\tPSNRHVS\t"
"WstPsnr\tWstSsim\tWstFast\tWstHVS");
snprintf(results, sizeof(results),
"%7.2f\t%7.3f\t%7.3f\t%7.3f\t%7.3f\t"
@@ -2040,7 +2040,7 @@
pkt.data.psnr.sse[i] = psnr.sse[i];
pkt.data.psnr.psnr[i] = psnr.psnr[i];
}
- pkt.kind = VPX_CODEC_PSNR_PKT;
+ pkt.kind = AOM_CODEC_PSNR_PKT;
aom_codec_pkt_list_add(cpi->output_pkt_list, &pkt);
}
@@ -2052,26 +2052,26 @@
}
void av1_update_reference(AV1_COMP *cpi, int ref_frame_flags) {
- cpi->ext_refresh_golden_frame = (ref_frame_flags & VPX_GOLD_FLAG) != 0;
- cpi->ext_refresh_alt_ref_frame = (ref_frame_flags & VPX_ALT_FLAG) != 0;
- cpi->ext_refresh_last_frame = (ref_frame_flags & VPX_LAST_FLAG) != 0;
+ cpi->ext_refresh_golden_frame = (ref_frame_flags & AOM_GOLD_FLAG) != 0;
+ cpi->ext_refresh_alt_ref_frame = (ref_frame_flags & AOM_ALT_FLAG) != 0;
+ cpi->ext_refresh_last_frame = (ref_frame_flags & AOM_LAST_FLAG) != 0;
cpi->ext_refresh_frame_flags_pending = 1;
}
static YV12_BUFFER_CONFIG *get_av1_ref_frame_buffer(
- AV1_COMP *cpi, VPX_REFFRAME ref_frame_flag) {
+ AV1_COMP *cpi, AOM_REFFRAME ref_frame_flag) {
MV_REFERENCE_FRAME ref_frame = NONE;
- if (ref_frame_flag == VPX_LAST_FLAG)
+ if (ref_frame_flag == AOM_LAST_FLAG)
ref_frame = LAST_FRAME;
- else if (ref_frame_flag == VPX_GOLD_FLAG)
+ else if (ref_frame_flag == AOM_GOLD_FLAG)
ref_frame = GOLDEN_FRAME;
- else if (ref_frame_flag == VPX_ALT_FLAG)
+ else if (ref_frame_flag == AOM_ALT_FLAG)
ref_frame = ALTREF_FRAME;
return ref_frame == NONE ? NULL : get_ref_frame_buffer(cpi, ref_frame);
}
-int av1_copy_reference_enc(AV1_COMP *cpi, VPX_REFFRAME ref_frame_flag,
+int av1_copy_reference_enc(AV1_COMP *cpi, AOM_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd) {
YV12_BUFFER_CONFIG *cfg = get_av1_ref_frame_buffer(cpi, ref_frame_flag);
if (cfg) {
@@ -2082,7 +2082,7 @@
}
}
-int av1_set_reference_enc(AV1_COMP *cpi, VPX_REFFRAME ref_frame_flag,
+int av1_set_reference_enc(AV1_COMP *cpi, AOM_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd) {
YV12_BUFFER_CONFIG *cfg = get_av1_ref_frame_buffer(cpi, ref_frame_flag);
if (cfg) {
@@ -2301,7 +2301,7 @@
q >= rc->rf_level_maxq[gf_group->rf_level[gf_group->index]]) {
const int max_size_thresh =
(int)(rate_thresh_mult[SCALE_STEP1] *
- VPXMAX(rc->this_frame_target, rc->avg_frame_bandwidth));
+ AOMMAX(rc->this_frame_target, rc->avg_frame_bandwidth));
scale = rc->projected_frame_size > max_size_thresh ? 1 : 0;
}
return scale;
@@ -2330,7 +2330,7 @@
if ((rc->projected_frame_size > high_limit && q < maxq) ||
(rc->projected_frame_size < low_limit && q > minq)) {
force_recode = 1;
- } else if (cpi->oxcf.rc_mode == VPX_CQ) {
+ } else if (cpi->oxcf.rc_mode == AOM_CQ) {
// Deal with frame undershoot and whether or not we are
// below the automatically set cq level.
if (q > oxcf->cq_level &&
@@ -2522,11 +2522,11 @@
void av1_scale_references(AV1_COMP *cpi) {
AV1_COMMON *cm = &cpi->common;
MV_REFERENCE_FRAME ref_frame;
- const VPX_REFFRAME ref_mask[3] = { VPX_LAST_FLAG, VPX_GOLD_FLAG,
- VPX_ALT_FLAG };
+ const AOM_REFFRAME ref_mask[3] = { AOM_LAST_FLAG, AOM_GOLD_FLAG,
+ AOM_ALT_FLAG };
for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) {
- // Need to convert from VPX_REFFRAME to index into ref_mask (subtract 1).
+ // Need to convert from AOM_REFFRAME to index into ref_mask (subtract 1).
if (cpi->ref_frame_flags & ref_mask[ref_frame - 1]) {
BufferPool *const pool = cm->buffer_pool;
const YV12_BUFFER_CONFIG *const ref =
@@ -2552,7 +2552,7 @@
new_fb_ptr->buf.y_crop_height != cm->height) {
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->subsampling_y, cm->use_highbitdepth, AOM_ENC_BORDER_IN_PIXELS,
cm->byte_alignment, NULL, NULL, NULL);
scale_and_extend_frame(ref, &new_fb_ptr->buf, (int)cm->bit_depth);
cpi->scaled_ref_idx[ref_frame - 1] = new_fb;
@@ -2573,7 +2573,7 @@
new_fb_ptr->buf.y_crop_height != 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,
+ AOM_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
NULL, NULL, NULL);
scale_and_extend_frame(ref, &new_fb_ptr->buf);
cpi->scaled_ref_idx[ref_frame - 1] = new_fb;
@@ -2724,7 +2724,7 @@
static void set_mv_search_params(AV1_COMP *cpi) {
const AV1_COMMON *const cm = &cpi->common;
- const unsigned int max_mv_def = VPXMIN(cm->width, cm->height);
+ const unsigned int max_mv_def = AOMMIN(cm->width, cm->height);
// Default based on max resolution.
cpi->mv_step_param = av1_init_search_range(max_mv_def);
@@ -2740,7 +2740,7 @@
// in the previous frame, capped by the default max_mv_magnitude based
// on resolution.
cpi->mv_step_param = av1_init_search_range(
- VPXMIN(max_mv_def, 2 * cpi->max_mv_magnitude));
+ AOMMIN(max_mv_def, 2 * cpi->max_mv_magnitude));
}
cpi->max_mv_magnitude = 0;
}
@@ -2793,7 +2793,7 @@
AV1EncoderConfig *const oxcf = &cpi->oxcf;
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
- if (oxcf->pass == 2 && oxcf->rc_mode == VPX_VBR &&
+ if (oxcf->pass == 2 && oxcf->rc_mode == AOM_VBR &&
((oxcf->resize_mode == RESIZE_FIXED && cm->current_video_frame == 0) ||
(oxcf->resize_mode == RESIZE_DYNAMIC && cpi->resize_pending))) {
av1_calculate_coded_size(cpi, &oxcf->scaled_frame_width,
@@ -2804,7 +2804,7 @@
oxcf->scaled_frame_height);
}
- if (oxcf->pass == 0 && oxcf->rc_mode == VPX_CBR &&
+ if (oxcf->pass == 0 && oxcf->rc_mode == AOM_CBR &&
oxcf->resize_mode == RESIZE_DYNAMIC) {
if (cpi->resize_pending == 1) {
oxcf->scaled_frame_width =
@@ -2838,7 +2838,7 @@
#if CONFIG_AOM_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
- VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL,
+ AOM_ENC_BORDER_IN_PIXELS, cm->byte_alignment, NULL,
NULL, NULL);
alloc_util_frame_buffers(cpi);
@@ -2881,7 +2881,7 @@
// For 1 pass CBR under dynamic resize mode: use faster scaling for source.
// Only for 2x2 scaling for now.
- if (cpi->oxcf.pass == 0 && cpi->oxcf.rc_mode == VPX_CBR &&
+ if (cpi->oxcf.pass == 0 && cpi->oxcf.rc_mode == AOM_CBR &&
cpi->oxcf.resize_mode == RESIZE_DYNAMIC &&
cpi->un_scaled_source->y_width == (cm->width << 1) &&
cpi->un_scaled_source->y_height == (cm->height << 1)) {
@@ -2928,7 +2928,7 @@
// Update some stats from cyclic refresh, and check if we should not update
// golden reference, for 1 pass CBR.
if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->frame_type != KEY_FRAME &&
- (cpi->oxcf.pass == 0 && cpi->oxcf.rc_mode == VPX_CBR))
+ (cpi->oxcf.pass == 0 && cpi->oxcf.rc_mode == AOM_CBR))
av1_cyclic_refresh_check_golden_update(cpi);
// Update the skip mb flag probabilities based on the distribution
@@ -3032,7 +3032,7 @@
if (frame_over_shoot_limit == 0) frame_over_shoot_limit = 1;
}
- if (cpi->oxcf.rc_mode == VPX_Q) {
+ if (cpi->oxcf.rc_mode == AOM_Q) {
loop = 0;
} else {
if ((cm->frame_type == KEY_FRAME) && rc->this_key_frame_forced &&
@@ -3067,7 +3067,7 @@
// Adjust Q
q = (int)((q * high_err_target) / kf_err);
- q = VPXMIN(q, (q_high + q_low) >> 1);
+ q = AOMMIN(q, (q_high + q_low) >> 1);
} else if (kf_err < low_err_target &&
rc->projected_frame_size >= frame_under_shoot_limit) {
// The key frame is much better than the previous frame
@@ -3076,7 +3076,7 @@
// Adjust Q
q = (int)((q * low_err_target) / kf_err);
- q = VPXMIN(q, (q_high + q_low + 1) >> 1);
+ q = AOMMIN(q, (q_high + q_low + 1) >> 1);
}
// Clamp Q to upper and lower limits:
@@ -3085,7 +3085,7 @@
loop = q != last_q;
} else if (recode_loop_test(cpi, frame_over_shoot_limit,
frame_under_shoot_limit, q,
- VPXMAX(q_high, top_index), bottom_index)) {
+ AOMMAX(q_high, top_index), bottom_index)) {
// Is the projected frame size out of range and are we allowed
// to attempt to recode.
int last_q = q;
@@ -3127,12 +3127,12 @@
av1_rc_update_rate_correction_factors(cpi);
q = av1_rc_regulate_q(cpi, rc->this_frame_target, bottom_index,
- VPXMAX(q_high, top_index));
+ AOMMAX(q_high, top_index));
while (q < q_low && retries < 10) {
av1_rc_update_rate_correction_factors(cpi);
q = av1_rc_regulate_q(cpi, rc->this_frame_target, bottom_index,
- VPXMAX(q_high, top_index));
+ AOMMAX(q_high, top_index));
retries++;
}
}
@@ -3153,7 +3153,7 @@
// This should only trigger where there is very substantial
// undershoot on a frame and the auto cq level is above
// the user passsed in value.
- if (cpi->oxcf.rc_mode == VPX_CQ && q < q_low) {
+ if (cpi->oxcf.rc_mode == AOM_CQ && q < q_low) {
q_low = q;
}
@@ -3198,15 +3198,15 @@
const int gold_is_last = map[cpi->gld_fb_idx] == map[cpi->lst_fb_idx];
const int alt_is_last = map[cpi->alt_fb_idx] == map[cpi->lst_fb_idx];
const int gold_is_alt = map[cpi->gld_fb_idx] == map[cpi->alt_fb_idx];
- int flags = VPX_ALT_FLAG | VPX_GOLD_FLAG | VPX_LAST_FLAG;
+ int flags = AOM_ALT_FLAG | AOM_GOLD_FLAG | AOM_LAST_FLAG;
- if (gold_is_last) flags &= ~VPX_GOLD_FLAG;
+ if (gold_is_last) flags &= ~AOM_GOLD_FLAG;
- if (cpi->rc.frames_till_gf_update_due == INT_MAX) flags &= ~VPX_GOLD_FLAG;
+ if (cpi->rc.frames_till_gf_update_due == INT_MAX) flags &= ~AOM_GOLD_FLAG;
- if (alt_is_last) flags &= ~VPX_ALT_FLAG;
+ if (alt_is_last) flags &= ~AOM_ALT_FLAG;
- if (gold_is_alt) flags &= ~VPX_ALT_FLAG;
+ if (gold_is_alt) flags &= ~AOM_ALT_FLAG;
return flags;
}
@@ -3347,7 +3347,7 @@
// For 1 pass CBR, check if we are dropping this frame.
// Never drop on key frame.
- if (oxcf->pass == 0 && oxcf->rc_mode == VPX_CBR &&
+ if (oxcf->pass == 0 && oxcf->rc_mode == AOM_CBR &&
cm->frame_type != KEY_FRAME) {
if (av1_rc_drop_frame(cpi)) {
av1_rc_postencode_update_drop_frame(cpi);
@@ -3484,7 +3484,7 @@
static void Pass0Encode(AV1_COMP *cpi, size_t *size, uint8_t *dest,
unsigned int *frame_flags) {
- if (cpi->oxcf.rc_mode == VPX_CBR) {
+ if (cpi->oxcf.rc_mode == AOM_CBR) {
av1_rc_get_one_pass_cbr_params(cpi);
} else {
av1_rc_get_one_pass_vbr_params(cpi);
@@ -3569,13 +3569,13 @@
if ((cm->profile == PROFILE_0 || cm->profile == PROFILE_2) &&
(subsampling_x != 1 || subsampling_y != 1)) {
- aom_internal_error(&cm->error, VPX_CODEC_INVALID_PARAM,
+ aom_internal_error(&cm->error, AOM_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)) {
- aom_internal_error(&cm->error, VPX_CODEC_INVALID_PARAM,
+ aom_internal_error(&cm->error, AOM_CODEC_INVALID_PARAM,
"4:2:0 color format requires profile 0 or 2");
res = -1;
}
@@ -3619,7 +3619,7 @@
// Average this frame's rate into the last second's average
// frame rate. If we haven't seen 1 second yet, then average
// over the whole interval seen.
- const double interval = VPXMIN(
+ const double interval = AOMMIN(
(double)(source->ts_end - cpi->first_time_stamp_ever), 10000000.0);
double avg_duration = 10000000.0 / cpi->framerate;
avg_duration *= (interval - avg_duration + this_duration);
@@ -3684,7 +3684,7 @@
s->stat[U] += u;
s->stat[V] += v;
s->stat[ALL] += all;
- s->worst = VPXMIN(s->worst, all);
+ s->worst = AOMMIN(s->worst, all);
}
#endif // CONFIG_INTERNAL_STATS
@@ -3780,7 +3780,7 @@
*time_stamp = source->ts_start;
*time_end = source->ts_end;
- *frame_flags = (source->flags & VPX_EFLAG_FORCE_KF) ? FRAMEFLAGS_KEY : 0;
+ *frame_flags = (source->flags & AOM_EFLAG_FORCE_KF) ? FRAMEFLAGS_KEY : 0;
} else {
*size = 0;
@@ -3914,7 +3914,7 @@
frame_ssim2 = aom_calc_ssim(orig, recon, &weight);
#endif // CONFIG_AOM_HIGHBITDEPTH
- cpi->worst_ssim = VPXMIN(cpi->worst_ssim, frame_ssim2);
+ cpi->worst_ssim = AOMMIN(cpi->worst_ssim, frame_ssim2);
cpi->summed_quality += frame_ssim2 * weight;
cpi->summed_weights += weight;
@@ -3941,7 +3941,7 @@
cm->frame_to_show->y_buffer, cm->frame_to_show->y_stride,
cpi->Source->y_width, cpi->Source->y_height);
cpi->worst_blockiness =
- VPXMAX(cpi->worst_blockiness, frame_blockiness);
+ AOMMAX(cpi->worst_blockiness, frame_blockiness);
cpi->total_blockiness += frame_blockiness;
}
}
@@ -3962,7 +3962,7 @@
aom_sse_to_psnr(samples, peak, (double)cpi->total_inconsistency);
if (consistency > 0.0)
cpi->worst_consistency =
- VPXMIN(cpi->worst_consistency, consistency);
+ AOMMIN(cpi->worst_consistency, consistency);
cpi->total_inconsistency += this_inconsistency;
}
}
@@ -4030,8 +4030,8 @@
}
}
-int av1_set_internal_size(AV1_COMP *cpi, VPX_SCALING horiz_mode,
- VPX_SCALING vert_mode) {
+int av1_set_internal_size(AV1_COMP *cpi, AOM_SCALING horiz_mode,
+ AOM_SCALING vert_mode) {
AV1_COMMON *cm = &cpi->common;
int hr = 0, hs = 0, vr = 0, vs = 0;
@@ -4112,11 +4112,11 @@
(VP8_EFLAG_NO_REF_LAST | VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_REF_ARF)) {
int ref = 7;
- if (flags & VP8_EFLAG_NO_REF_LAST) ref ^= VPX_LAST_FLAG;
+ if (flags & VP8_EFLAG_NO_REF_LAST) ref ^= AOM_LAST_FLAG;
- if (flags & VP8_EFLAG_NO_REF_GF) ref ^= VPX_GOLD_FLAG;
+ if (flags & VP8_EFLAG_NO_REF_GF) ref ^= AOM_GOLD_FLAG;
- if (flags & VP8_EFLAG_NO_REF_ARF) ref ^= VPX_ALT_FLAG;
+ if (flags & VP8_EFLAG_NO_REF_ARF) ref ^= AOM_ALT_FLAG;
av1_use_as_reference(cpi, ref);
}
@@ -4126,11 +4126,11 @@
VP8_EFLAG_FORCE_GF | VP8_EFLAG_FORCE_ARF)) {
int upd = 7;
- if (flags & VP8_EFLAG_NO_UPD_LAST) upd ^= VPX_LAST_FLAG;
+ if (flags & VP8_EFLAG_NO_UPD_LAST) upd ^= AOM_LAST_FLAG;
- if (flags & VP8_EFLAG_NO_UPD_GF) upd ^= VPX_GOLD_FLAG;
+ if (flags & VP8_EFLAG_NO_UPD_GF) upd ^= AOM_GOLD_FLAG;
- if (flags & VP8_EFLAG_NO_UPD_ARF) upd ^= VPX_ALT_FLAG;
+ if (flags & VP8_EFLAG_NO_UPD_ARF) upd ^= AOM_ALT_FLAG;
av1_update_reference(cpi, upd);
}
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 81ef833..60f3772 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -79,7 +79,7 @@
FOURFIVE = 1,
THREEFIVE = 2,
ONETWO = 3
-} VPX_SCALING;
+} AOM_SCALING;
typedef enum {
// Good Quality Fast Encoding. The encoder balances quality with the amount of
@@ -511,10 +511,10 @@
void av1_update_reference(AV1_COMP *cpi, int ref_frame_flags);
-int av1_copy_reference_enc(AV1_COMP *cpi, VPX_REFFRAME ref_frame_flag,
+int av1_copy_reference_enc(AV1_COMP *cpi, AOM_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
-int av1_set_reference_enc(AV1_COMP *cpi, VPX_REFFRAME ref_frame_flag,
+int av1_set_reference_enc(AV1_COMP *cpi, AOM_REFFRAME ref_frame_flag,
YV12_BUFFER_CONFIG *sd);
int av1_update_entropy(AV1_COMP *cpi, int update);
@@ -523,8 +523,8 @@
int av1_get_active_map(AV1_COMP *cpi, unsigned char *map, int rows, int cols);
-int av1_set_internal_size(AV1_COMP *cpi, VPX_SCALING horiz_mode,
- VPX_SCALING vert_mode);
+int av1_set_internal_size(AV1_COMP *cpi, AOM_SCALING horiz_mode,
+ AOM_SCALING vert_mode);
int av1_set_size_literal(AV1_COMP *cpi, unsigned int width,
unsigned int height);
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c
index 371bf25..f8d3aff 100644
--- a/av1/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -61,7 +61,7 @@
AV1_COMMON *const cm = &cpi->common;
const int tile_cols = 1 << cm->log2_tile_cols;
const VPxWorkerInterface *const winterface = aom_get_worker_interface();
- const int num_workers = VPXMIN(cpi->oxcf.max_threads, tile_cols);
+ const int num_workers = AOMMIN(cpi->oxcf.max_threads, tile_cols);
int i;
av1_init_tile_data(cpi);
@@ -102,7 +102,7 @@
// Create threads
if (!winterface->reset(worker))
- aom_internal_error(&cm->error, VPX_CODEC_ERROR,
+ aom_internal_error(&cm->error, AOM_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 c7aaa49..9999c10 100644
--- a/av1/encoder/extend.c
+++ b/av1/encoder/extend.c
@@ -112,10 +112,10 @@
// to 64x64, so the right and bottom need to be extended to 64 multiple
// or up to 16, whichever is greater.
const int er_y =
- VPXMAX(src->y_width + 16, ALIGN_POWER_OF_TWO(src->y_width, 6)) -
+ AOMMAX(src->y_width + 16, ALIGN_POWER_OF_TWO(src->y_width, 6)) -
src->y_crop_width;
const int eb_y =
- VPXMAX(src->y_height + 16, ALIGN_POWER_OF_TWO(src->y_height, 6)) -
+ AOMMAX(src->y_height + 16, ALIGN_POWER_OF_TWO(src->y_height, 6)) -
src->y_crop_height;
const int uv_width_subsampling = (src->uv_width != src->y_width);
const int uv_height_subsampling = (src->uv_height != src->y_height);
diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c
index 2c22bbe..0edb673 100644
--- a/av1/encoder/firstpass.c
+++ b/av1/encoder/firstpass.c
@@ -99,7 +99,7 @@
static void output_stats(FIRSTPASS_STATS *stats,
struct aom_codec_pkt_list *pktlist) {
struct aom_codec_cx_pkt pkt;
- pkt.kind = VPX_CODEC_STATS_PKT;
+ pkt.kind = AOM_CODEC_STATS_PKT;
pkt.data.twopass_stats.buf = stats;
pkt.data.twopass_stats.sz = sizeof(FIRSTPASS_STATS);
aom_codec_pkt_list_add(pktlist, &pkt);
@@ -130,7 +130,7 @@
static void output_fpmb_stats(uint8_t *this_frame_mb_stats, AV1_COMMON *cm,
struct aom_codec_pkt_list *pktlist) {
struct aom_codec_cx_pkt pkt;
- pkt.kind = VPX_CODEC_FPMB_STATS_PKT;
+ pkt.kind = AOM_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);
aom_codec_pkt_list_add(pktlist, &pkt);
@@ -342,7 +342,7 @@
// for first pass test.
static int get_search_range(const AV1_COMP *cpi) {
int sr = 0;
- const int dim = VPXMIN(cpi->initial_width, cpi->initial_height);
+ const int dim = AOMMIN(cpi->initial_width, cpi->initial_height);
while ((dim << sr) < MAX_FULL_PEL_VAL) ++sr;
return sr;
@@ -595,13 +595,13 @@
#if CONFIG_AOM_HIGHBITDEPTH
if (cm->use_highbitdepth) {
switch (cm->bit_depth) {
- case VPX_BITS_8: break;
- case VPX_BITS_10: this_error >>= 4; break;
- case VPX_BITS_12: this_error >>= 8; break;
+ case AOM_BITS_8: break;
+ case AOM_BITS_10: this_error >>= 4; break;
+ case AOM_BITS_12: this_error >>= 8; break;
default:
assert(0 &&
- "cm->bit_depth should be VPX_BITS_8, "
- "VPX_BITS_10 or VPX_BITS_12");
+ "cm->bit_depth should be AOM_BITS_8, "
+ "AOM_BITS_10 or AOM_BITS_12");
return;
}
}
@@ -920,7 +920,7 @@
// Exclude any image dead zone
if (image_data_start_row > 0) {
intra_skip_count =
- VPXMAX(0, intra_skip_count - (image_data_start_row * cm->mb_cols * 2));
+ AOMMAX(0, intra_skip_count - (image_data_start_row * cm->mb_cols * 2));
}
{
@@ -1047,7 +1047,7 @@
// Adjustment based on actual quantizer to power term.
const double power_term =
- VPXMIN(av1_convert_qindex_to_q(q, bit_depth) * 0.01 + pt_low, pt_high);
+ AOMMIN(av1_convert_qindex_to_q(q, bit_depth) * 0.01 + pt_low, pt_high);
// Calculate correction factor.
if (power_term < 1.0) assert(error_term >= 0.0);
@@ -1076,7 +1076,7 @@
const int num_mbs = (cpi->oxcf.resize_mode != RESIZE_NONE)
? cpi->initial_mbs
: cpi->common.MBs;
- const int active_mbs = VPXMAX(1, num_mbs - (int)(num_mbs * inactive_zone));
+ const int active_mbs = AOMMAX(1, num_mbs - (int)(num_mbs * inactive_zone));
const double av_err_per_mb = section_err / active_mbs;
const double speed_term = 1.0 + 0.04 * oxcf->speed;
const double ediv_size_correction = (double)num_mbs / EDIV_SIZE_FACTOR;
@@ -1098,7 +1098,7 @@
}
// Restriction on active max q for constrained quality mode.
- if (cpi->oxcf.rc_mode == VPX_CQ) q = VPXMAX(q, oxcf->cq_level);
+ if (cpi->oxcf.rc_mode == AOM_CQ) q = AOMMAX(q, oxcf->cq_level);
return q;
}
}
@@ -1108,7 +1108,7 @@
RATE_CONTROL *const rc = &cpi->rc;
for (i = INTER_NORMAL; i < RATE_FACTOR_LEVELS; ++i) {
int qdelta = av1_frame_type_qdelta(cpi, i, rc->worst_quality);
- rc->rf_level_maxq[i] = VPXMAX(rc->worst_quality + qdelta, rc->best_quality);
+ rc->rf_level_maxq[i] = AOMMAX(rc->worst_quality + qdelta, rc->best_quality);
}
}
@@ -1223,12 +1223,12 @@
modified_pcnt_intra = 100 * (1.0 - modified_pct_inter);
if ((sr_diff > LOW_SR_DIFF_TRHESH)) {
- sr_diff = VPXMIN(sr_diff, SR_DIFF_MAX);
+ sr_diff = AOMMIN(sr_diff, SR_DIFF_MAX);
sr_decay = 1.0 - (SR_DIFF_PART * sr_diff) -
(MOTION_AMP_PART * motion_amplitude_factor) -
(INTRA_PART * modified_pcnt_intra);
}
- return VPXMAX(sr_decay, VPXMIN(DEFAULT_DECAY_LIMIT, modified_pct_inter));
+ return AOMMAX(sr_decay, AOMMIN(DEFAULT_DECAY_LIMIT, modified_pct_inter));
}
// This function gives an estimate of how badly we believe the prediction
@@ -1237,7 +1237,7 @@
const FIRSTPASS_STATS *frame) {
const double zero_motion_pct = frame->pcnt_inter - frame->pcnt_motion;
double sr_decay = get_sr_decay_rate(cpi, frame);
- return VPXMIN(sr_decay, zero_motion_pct);
+ return AOMMIN(sr_decay, zero_motion_pct);
}
#define ZM_POWER_FACTOR 0.75
@@ -1249,7 +1249,7 @@
(0.95 * pow((next_frame->pcnt_inter - next_frame->pcnt_motion),
ZM_POWER_FACTOR));
- return VPXMAX(zero_motion_factor,
+ return AOMMAX(zero_motion_factor,
(sr_decay_rate + ((1.0 - sr_decay_rate) * zero_motion_factor)));
}
@@ -1336,12 +1336,12 @@
double frame_boost;
const double lq = av1_convert_qindex_to_q(
cpi->rc.avg_frame_qindex[INTER_FRAME], cpi->common.bit_depth);
- const double boost_q_correction = VPXMIN((0.5 + (lq * 0.015)), 1.5);
+ const double boost_q_correction = AOMMIN((0.5 + (lq * 0.015)), 1.5);
int num_mbs = (cpi->oxcf.resize_mode != RESIZE_NONE) ? cpi->initial_mbs
: cpi->common.MBs;
// Correct for any inactive region in the image
- num_mbs = (int)VPXMAX(1, num_mbs * calculate_active_area(cpi, this_frame));
+ num_mbs = (int)AOMMAX(1, num_mbs * calculate_active_area(cpi, this_frame));
// Underlying boost factor is based on inter error ratio.
frame_boost = (BASELINE_ERR_PER_MB * num_mbs) /
@@ -1357,7 +1357,7 @@
else
frame_boost += frame_boost * (this_frame_mv_in_out / 2.0);
- return VPXMIN(frame_boost, max_boost * boost_q_correction);
+ return AOMMIN(frame_boost, max_boost * boost_q_correction);
}
static int calc_arf_boost(AV1_COMP *cpi, int offset, int f_frames,
@@ -1443,7 +1443,7 @@
arf_boost = (*f_boost + *b_boost);
if (arf_boost < ((b_frames + f_frames) * 20))
arf_boost = ((b_frames + f_frames) * 20);
- arf_boost = VPXMAX(arf_boost, MIN_ARF_GF_BOOST);
+ arf_boost = AOMMAX(arf_boost, MIN_ARF_GF_BOOST);
return arf_boost;
}
@@ -1514,7 +1514,7 @@
}
// Calculate the number of extra bits for use in the boosted frame or frames.
- return VPXMAX((int)(((int64_t)boost * total_group_bits) / allocation_chunks),
+ return AOMMAX((int)(((int64_t)boost * total_group_bits) / allocation_chunks),
0);
}
@@ -1633,7 +1633,7 @@
gf_group->arf_ref_idx[frame_index] = arf_buffer_indices[arf_idx];
target_frame_size =
- clamp(target_frame_size, 0, VPXMIN(max_bits, (int)total_group_bits));
+ clamp(target_frame_size, 0, AOMMIN(max_bits, (int)total_group_bits));
gf_group->update_type[frame_index] = LF_UPDATE;
gf_group->rf_level[frame_index] = INTER_NORMAL;
@@ -1752,7 +1752,7 @@
twopass->active_worst_quality, cpi->common.bit_depth));
int int_lbq = (int)(av1_convert_qindex_to_q(rc->last_boosted_qindex,
cpi->common.bit_depth));
- active_min_gf_interval = rc->min_gf_interval + VPXMIN(2, int_max_q / 200);
+ active_min_gf_interval = rc->min_gf_interval + AOMMIN(2, int_max_q / 200);
if (active_min_gf_interval > rc->max_gf_interval)
active_min_gf_interval = rc->max_gf_interval;
@@ -1763,7 +1763,7 @@
// bits to spare and are better with a smaller interval and smaller boost.
// At high Q when there are few bits to spare we are better with a longer
// interval to spread the cost of the GF.
- active_max_gf_interval = 12 + VPXMIN(4, (int_lbq / 6));
+ active_max_gf_interval = 12 + AOMMIN(4, (int_lbq / 6));
if (active_max_gf_interval < active_min_gf_interval)
active_max_gf_interval = active_min_gf_interval;
@@ -1806,7 +1806,7 @@
decay_accumulator = decay_accumulator * loop_decay_rate;
// Monitor for static sections.
- zero_motion_accumulator = VPXMIN(
+ zero_motion_accumulator = AOMMIN(
zero_motion_accumulator, get_zero_motion_factor(cpi, &next_frame));
// Break clause to detect very still sections after motion. For example,
@@ -1864,7 +1864,7 @@
? 1
: 0;
} else {
- rc->gfu_boost = VPXMAX((int)boost_score, MIN_ARF_GF_BOOST);
+ rc->gfu_boost = AOMMAX((int)boost_score, MIN_ARF_GF_BOOST);
rc->source_alt_ref_pending = 0;
}
@@ -1885,7 +1885,7 @@
// where there could be significant overshoot than for easier
// sections where we do not wish to risk creating an overshoot
// of the allocated bit budget.
- if ((cpi->oxcf.rc_mode != VPX_Q) && (rc->baseline_gf_interval > 1)) {
+ if ((cpi->oxcf.rc_mode != AOM_Q) && (rc->baseline_gf_interval > 1)) {
const int vbr_group_bits_per_frame =
(int)(gf_group_bits / rc->baseline_gf_interval);
const double group_av_err = gf_group_raw_error / rc->baseline_gf_interval;
@@ -1899,17 +1899,17 @@
// rc factor is a weight factor that corrects for local rate control drift.
double rc_factor = 1.0;
if (rc->rate_error_estimate > 0) {
- rc_factor = VPXMAX(RC_FACTOR_MIN,
+ rc_factor = AOMMAX(RC_FACTOR_MIN,
(double)(100 - rc->rate_error_estimate) / 100.0);
} else {
- rc_factor = VPXMIN(RC_FACTOR_MAX,
+ rc_factor = AOMMIN(RC_FACTOR_MAX,
(double)(100 - rc->rate_error_estimate) / 100.0);
}
tmp_q = get_twopass_worst_quality(
cpi, group_av_err, (group_av_skip_pct + group_av_inactive_zone),
vbr_group_bits_per_frame, twopass->kfgroup_inter_fraction * rc_factor);
twopass->active_worst_quality =
- VPXMAX(tmp_q, twopass->active_worst_quality >> 1);
+ AOMMAX(tmp_q, twopass->active_worst_quality >> 1);
}
#endif
@@ -2207,7 +2207,7 @@
} else {
twopass->kf_group_bits = 0;
}
- twopass->kf_group_bits = VPXMAX(0, twopass->kf_group_bits);
+ twopass->kf_group_bits = AOMMAX(0, twopass->kf_group_bits);
// Reset the first pass file position.
reset_fpf_position(twopass, start_position);
@@ -2220,7 +2220,7 @@
if (EOF == input_stats(twopass, &next_frame)) break;
// Monitor for static sections.
- zero_motion_accumulator = VPXMIN(zero_motion_accumulator,
+ zero_motion_accumulator = AOMMIN(zero_motion_accumulator,
get_zero_motion_factor(cpi, &next_frame));
// Not all frames in the group are necessarily used in calculating boost.
@@ -2234,7 +2234,7 @@
const double loop_decay_rate =
get_prediction_decay_rate(cpi, &next_frame);
decay_accumulator *= loop_decay_rate;
- decay_accumulator = VPXMAX(decay_accumulator, MIN_DECAY_FACTOR);
+ decay_accumulator = AOMMAX(decay_accumulator, MIN_DECAY_FACTOR);
av_decay_accumulator += decay_accumulator;
++loop_decay_counter;
}
@@ -2254,8 +2254,8 @@
// Apply various clamps for min and max boost
rc->kf_boost = (int)(av_decay_accumulator * boost_score);
- rc->kf_boost = VPXMAX(rc->kf_boost, (rc->frames_to_key * 3));
- rc->kf_boost = VPXMAX(rc->kf_boost, MIN_KF_BOOST);
+ rc->kf_boost = AOMMAX(rc->kf_boost, (rc->frames_to_key * 3));
+ rc->kf_boost = AOMMAX(rc->kf_boost, MIN_KF_BOOST);
// Work out how many bits to allocate for the key frame itself.
kf_bits = calculate_boost_bits((rc->frames_to_key - 1), rc->kf_boost,
@@ -2383,7 +2383,7 @@
aom_clear_system_state();
- if (cpi->oxcf.rc_mode == VPX_Q) {
+ if (cpi->oxcf.rc_mode == AOM_Q) {
twopass->active_worst_quality = cpi->oxcf.cq_level;
} else if (cm->current_video_frame == 0) {
// Special case code for first frame.
@@ -2494,7 +2494,7 @@
// is designed to prevent extreme behaviour at the end of a clip
// or group of frames.
rc->vbr_bits_off_target += rc->base_frame_target - rc->projected_frame_size;
- twopass->bits_left = VPXMAX(twopass->bits_left - bits_used, 0);
+ twopass->bits_left = AOMMAX(twopass->bits_left - bits_used, 0);
// Calculate the pct rc error.
if (rc->total_actual_bits) {
@@ -2509,19 +2509,19 @@
twopass->kf_group_bits -= bits_used;
twopass->last_kfgroup_zeromotion_pct = twopass->kf_zeromotion_pct;
}
- twopass->kf_group_bits = VPXMAX(twopass->kf_group_bits, 0);
+ twopass->kf_group_bits = AOMMAX(twopass->kf_group_bits, 0);
// Increment the gf group index ready for the next frame.
++twopass->gf_group.index;
// If the rate control is drifting consider adjustment to min or maxq.
- if ((cpi->oxcf.rc_mode != VPX_Q) &&
+ if ((cpi->oxcf.rc_mode != AOM_Q) &&
(cpi->twopass.gf_zeromotion_pct < VLOW_MOTION_THRESHOLD) &&
!cpi->rc.is_src_frame_alt_ref) {
const int maxq_adj_limit =
rc->worst_quality - twopass->active_worst_quality;
const int minq_adj_limit =
- (cpi->oxcf.rc_mode == VPX_CQ ? MINQ_ADJ_LIMIT_CQ : MINQ_ADJ_LIMIT);
+ (cpi->oxcf.rc_mode == AOM_CQ ? MINQ_ADJ_LIMIT_CQ : MINQ_ADJ_LIMIT);
// Undershoot.
if (rc->rate_error_estimate > cpi->oxcf.under_shoot_pct) {
@@ -2559,17 +2559,17 @@
rc->vbr_bits_off_target_fast +=
fast_extra_thresh - rc->projected_frame_size;
rc->vbr_bits_off_target_fast =
- VPXMIN(rc->vbr_bits_off_target_fast, (4 * rc->avg_frame_bandwidth));
+ AOMMIN(rc->vbr_bits_off_target_fast, (4 * rc->avg_frame_bandwidth));
// Fast adaptation of minQ if necessary to use up the extra bits.
if (rc->avg_frame_bandwidth) {
twopass->extend_minq_fast =
(int)(rc->vbr_bits_off_target_fast * 8 / rc->avg_frame_bandwidth);
}
- twopass->extend_minq_fast = VPXMIN(
+ twopass->extend_minq_fast = AOMMIN(
twopass->extend_minq_fast, minq_adj_limit - twopass->extend_minq);
} else if (rc->vbr_bits_off_target_fast) {
- twopass->extend_minq_fast = VPXMIN(
+ twopass->extend_minq_fast = AOMMIN(
twopass->extend_minq_fast, minq_adj_limit - twopass->extend_minq);
} else {
twopass->extend_minq_fast = 0;
diff --git a/av1/encoder/lookahead.c b/av1/encoder/lookahead.c
index d245466..e71d158 100644
--- a/av1/encoder/lookahead.c
+++ b/av1/encoder/lookahead.c
@@ -73,7 +73,7 @@
#if CONFIG_AOM_HIGHBITDEPTH
use_highbitdepth,
#endif
- VPX_ENC_BORDER_IN_PIXELS, legacy_byte_alignment))
+ AOM_ENC_BORDER_IN_PIXELS, legacy_byte_alignment))
goto bail;
}
return ctx;
@@ -165,7 +165,7 @@
#if CONFIG_AOM_HIGHBITDEPTH
use_highbitdepth,
#endif
- VPX_ENC_BORDER_IN_PIXELS, 0))
+ AOM_ENC_BORDER_IN_PIXELS, 0))
return 1;
aom_free_frame_buffer(&buf->img);
buf->img = new_img;
diff --git a/av1/encoder/mbgraph.c b/av1/encoder/mbgraph.c
index 2196a0e..82d9b12 100644
--- a/av1/encoder/mbgraph.c
+++ b/av1/encoder/mbgraph.c
@@ -40,7 +40,7 @@
// Further step/diamond searches as necessary
int step_param = mv_sf->reduce_first_step_size;
- step_param = VPXMIN(step_param, MAX_MVSEARCH_STEPS - 2);
+ step_param = AOMMIN(step_param, MAX_MVSEARCH_STEPS - 2);
av1_set_mv_search_range(x, ref_mv);
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index b3690e8..7de0434 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -39,10 +39,10 @@
int col_max = (mv->col >> 3) + MAX_FULL_PEL_VAL;
int row_max = (mv->row >> 3) + MAX_FULL_PEL_VAL;
- col_min = VPXMAX(col_min, (MV_LOW >> 3) + 1);
- row_min = VPXMAX(row_min, (MV_LOW >> 3) + 1);
- col_max = VPXMIN(col_max, (MV_UPP >> 3) - 1);
- row_max = VPXMIN(row_max, (MV_UPP >> 3) - 1);
+ col_min = AOMMAX(col_min, (MV_LOW >> 3) + 1);
+ row_min = AOMMAX(row_min, (MV_LOW >> 3) + 1);
+ col_max = AOMMIN(col_max, (MV_UPP >> 3) - 1);
+ row_max = AOMMIN(row_max, (MV_UPP >> 3) - 1);
// Get intersection of UMV window and valid MV window to reduce # of checks
// in diamond search.
@@ -55,11 +55,11 @@
int av1_init_search_range(int size) {
int sr = 0;
// Minimum search size no matter what the passed in value.
- size = VPXMAX(16, size);
+ size = AOMMAX(16, size);
while ((size << sr) < MAX_FULL_PEL_VAL) sr++;
- sr = VPXMIN(sr, MAX_MVSEARCH_STEPS - 2);
+ sr = AOMMIN(sr, MAX_MVSEARCH_STEPS - 2);
return sr;
}
@@ -279,10 +279,10 @@
int br = bestmv->row * 8; \
int bc = bestmv->col * 8; \
int hstep = 4; \
- const int minc = VPXMAX(x->mv_col_min * 8, ref_mv->col - MV_MAX); \
- const int maxc = VPXMIN(x->mv_col_max * 8, ref_mv->col + MV_MAX); \
- const int minr = VPXMAX(x->mv_row_min * 8, ref_mv->row - MV_MAX); \
- const int maxr = VPXMIN(x->mv_row_max * 8, ref_mv->row + MV_MAX); \
+ const int minc = AOMMAX(x->mv_col_min * 8, ref_mv->col - MV_MAX); \
+ const int maxc = AOMMIN(x->mv_col_max * 8, ref_mv->col + MV_MAX); \
+ const int minr = AOMMAX(x->mv_row_min * 8, ref_mv->row - MV_MAX); \
+ const int maxr = AOMMIN(x->mv_row_max * 8, ref_mv->row + MV_MAX); \
int tr = br; \
int tc = bc; \
\
@@ -603,10 +603,10 @@
int bc = bestmv->col * 8;
int hstep = 4;
int iter, round = 3 - forced_stop;
- const int minc = VPXMAX(x->mv_col_min * 8, ref_mv->col - MV_MAX);
- const int maxc = VPXMIN(x->mv_col_max * 8, ref_mv->col + MV_MAX);
- const int minr = VPXMAX(x->mv_row_min * 8, ref_mv->row - MV_MAX);
- const int maxr = VPXMIN(x->mv_row_max * 8, ref_mv->row + MV_MAX);
+ const int minc = AOMMAX(x->mv_col_min * 8, ref_mv->col - MV_MAX);
+ const int maxc = AOMMIN(x->mv_col_max * 8, ref_mv->col + MV_MAX);
+ const int minr = AOMMAX(x->mv_row_min * 8, ref_mv->row - MV_MAX);
+ const int maxr = AOMMIN(x->mv_row_max * 8, ref_mv->row + MV_MAX);
int tr = br;
int tc = bc;
const MV *search_step = search_step_table;
@@ -1552,7 +1552,7 @@
int *cost_list, const aom_variance_fn_ptr_t *vfp,
int use_mvcost, const MV *center_mv, MV *best_mv) {
return av1_hex_search(
- x, ref_mv, VPXMAX(MAX_MVSEARCH_STEPS - 2, search_param), sad_per_bit,
+ x, ref_mv, AOMMAX(MAX_MVSEARCH_STEPS - 2, search_param), sad_per_bit,
do_init_search, cost_list, vfp, use_mvcost, center_mv, best_mv);
}
@@ -1561,7 +1561,7 @@
const aom_variance_fn_ptr_t *vfp, int use_mvcost,
const MV *center_mv, MV *best_mv) {
return av1_bigdia_search(
- x, ref_mv, VPXMAX(MAX_MVSEARCH_STEPS - 2, search_param), sad_per_bit,
+ x, ref_mv, AOMMAX(MAX_MVSEARCH_STEPS - 2, search_param), sad_per_bit,
do_init_search, cost_list, vfp, use_mvcost, center_mv, best_mv);
}
@@ -1591,10 +1591,10 @@
fn_ptr->sdf(what->buf, what->stride,
get_buf_from_mv(in_what, &fcenter_mv), in_what->stride) +
mvsad_err_cost(x, &fcenter_mv, ref_mv, sad_per_bit);
- start_row = VPXMAX(-range, x->mv_row_min - fcenter_mv.row);
- start_col = VPXMAX(-range, x->mv_col_min - fcenter_mv.col);
- end_row = VPXMIN(range, x->mv_row_max - fcenter_mv.row);
- end_col = VPXMIN(range, x->mv_col_max - fcenter_mv.col);
+ start_row = AOMMAX(-range, x->mv_row_min - fcenter_mv.row);
+ start_col = AOMMAX(-range, x->mv_col_min - fcenter_mv.col);
+ end_row = AOMMIN(range, x->mv_row_max - fcenter_mv.row);
+ end_col = AOMMIN(range, x->mv_col_max - fcenter_mv.col);
for (r = start_row; r <= end_row; r += step) {
for (c = start_col; c <= end_col; c += col_step) {
@@ -2087,9 +2087,9 @@
// Check size of proposed first range against magnitude of the centre
// value used as a starting point.
- range = VPXMAX(range, (5 * VPXMAX(abs(temp_mv.row), abs(temp_mv.col))) / 4);
- range = VPXMIN(range, MAX_RANGE);
- interval = VPXMAX(interval, range / baseline_interval_divisor);
+ range = AOMMAX(range, (5 * AOMMAX(abs(temp_mv.row), abs(temp_mv.col))) / 4);
+ range = AOMMIN(range, MAX_RANGE);
+ interval = AOMMAX(interval, range / baseline_interval_divisor);
// initial search
bestsme = exhuastive_mesh_search(x, &f_ref_mv, &temp_mv, range, interval,
@@ -2127,10 +2127,10 @@
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];
- const int row_min = VPXMAX(ref_mv->row - distance, x->mv_row_min);
- const int row_max = VPXMIN(ref_mv->row + distance, x->mv_row_max);
- const int col_min = VPXMAX(ref_mv->col - distance, x->mv_col_min);
- const int col_max = VPXMIN(ref_mv->col + distance, x->mv_col_max);
+ const int row_min = AOMMAX(ref_mv->row - distance, x->mv_row_min);
+ const int row_max = AOMMIN(ref_mv->row + distance, x->mv_row_max);
+ const int col_min = AOMMAX(ref_mv->col - distance, x->mv_col_min);
+ const int col_max = AOMMIN(ref_mv->col + distance, x->mv_col_max);
const MV fcenter_mv = { center_mv->row >> 3, center_mv->col >> 3 };
int best_sad =
fn_ptr->sdf(what->buf, what->stride, get_buf_from_mv(in_what, ref_mv),
@@ -2162,10 +2162,10 @@
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];
- const int row_min = VPXMAX(ref_mv->row - distance, x->mv_row_min);
- const int row_max = VPXMIN(ref_mv->row + distance, x->mv_row_max);
- const int col_min = VPXMAX(ref_mv->col - distance, x->mv_col_min);
- const int col_max = VPXMIN(ref_mv->col + distance, x->mv_col_max);
+ const int row_min = AOMMAX(ref_mv->row - distance, x->mv_row_min);
+ const int row_max = AOMMIN(ref_mv->row + distance, x->mv_row_max);
+ const int col_min = AOMMAX(ref_mv->col - distance, x->mv_col_min);
+ const int col_max = AOMMIN(ref_mv->col + distance, x->mv_col_max);
const MV fcenter_mv = { center_mv->row >> 3, center_mv->col >> 3 };
unsigned int best_sad =
fn_ptr->sdf(what->buf, what->stride, get_buf_from_mv(in_what, ref_mv),
@@ -2228,10 +2228,10 @@
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];
- const int row_min = VPXMAX(ref_mv->row - distance, x->mv_row_min);
- const int row_max = VPXMIN(ref_mv->row + distance, x->mv_row_max);
- const int col_min = VPXMAX(ref_mv->col - distance, x->mv_col_min);
- const int col_max = VPXMIN(ref_mv->col + distance, x->mv_col_max);
+ const int row_min = AOMMAX(ref_mv->row - distance, x->mv_row_min);
+ const int row_max = AOMMIN(ref_mv->row + distance, x->mv_row_max);
+ const int col_min = AOMMAX(ref_mv->col - distance, x->mv_col_min);
+ const int col_max = AOMMIN(ref_mv->col + distance, x->mv_col_max);
const MV fcenter_mv = { center_mv->row >> 3, center_mv->col >> 3 };
unsigned int best_sad =
fn_ptr->sdf(what->buf, what->stride, get_buf_from_mv(in_what, ref_mv),
@@ -2436,7 +2436,7 @@
static int is_exhaustive_allowed(AV1_COMP *cpi, MACROBLOCK *x) {
const SPEED_FEATURES *const sf = &cpi->sf;
const int max_ex =
- VPXMAX(MIN_EX_SEARCH_LIMIT,
+ AOMMAX(MIN_EX_SEARCH_LIMIT,
(*x->m_search_count_ptr * sf->max_exaustive_pct) / 100);
return sf->allow_exhaustive_searches &&
diff --git a/av1/encoder/mcomp.h b/av1/encoder/mcomp.h
index f3516c2..c943d3c 100644
--- a/av1/encoder/mcomp.h
+++ b/av1/encoder/mcomp.h
@@ -29,7 +29,7 @@
#define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS - 1))
// Allowed motion vector pixel distance outside image border
// for Block_16x16
-#define BORDER_MV_PIXELS_B16 (16 + VPX_INTERP_EXTEND)
+#define BORDER_MV_PIXELS_B16 (16 + AOM_INTERP_EXTEND)
// motion search site
typedef struct search_site {
diff --git a/av1/encoder/mips/msa/fdct4x4_msa.c b/av1/encoder/mips/msa/fdct4x4_msa.c
index 1bc7fe4..767247c 100644
--- a/av1/encoder/mips/msa/fdct4x4_msa.c
+++ b/av1/encoder/mips/msa/fdct4x4_msa.c
@@ -68,24 +68,24 @@
switch (tx_type) {
case DCT_DCT:
- VPX_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
break;
case ADST_DCT:
- VPX_FADST4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_FADST4(in0, in1, in2, in3, in0, in1, in2, in3);
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
break;
case DCT_ADST:
- VPX_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_FDCT4(in0, in1, in2, in3, in0, in1, in2, in3);
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_FADST4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_FADST4(in0, in1, in2, in3, in0, in1, in2, in3);
break;
case ADST_ADST:
- VPX_FADST4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_FADST4(in0, in1, in2, in3, in0, in1, in2, in3);
TRANSPOSE4x4_SH_SH(in0, in1, in2, in3, in0, in1, in2, in3);
- VPX_FADST4(in0, in1, in2, in3, in0, in1, in2, in3);
+ AOM_FADST4(in0, in1, in2, in3, in0, in1, in2, in3);
break;
default: assert(0); break;
}
diff --git a/av1/encoder/mips/msa/fdct8x8_msa.c b/av1/encoder/mips/msa/fdct8x8_msa.c
index 7a2bde6..1a8fc3d 100644
--- a/av1/encoder/mips/msa/fdct8x8_msa.c
+++ b/av1/encoder/mips/msa/fdct8x8_msa.c
@@ -24,35 +24,35 @@
switch (tx_type) {
case DCT_DCT:
- VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
in3, in4, in5, in6, in7);
- VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
break;
case ADST_DCT:
- VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
in3, in4, in5, in6, in7);
- VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
break;
case DCT_ADST:
- VPX_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_FDCT8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
in3, in4, in5, in6, in7);
- VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
break;
case ADST_ADST:
- VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
TRANSPOSE8x8_SH_SH(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2,
in3, in4, in5, in6, in7);
- VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
+ AOM_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, in0, in1, in2, in3, in4,
in5, in6, in7);
break;
default: assert(0); break;
diff --git a/av1/encoder/mips/msa/fdct_msa.h b/av1/encoder/mips/msa/fdct_msa.h
index 7f02df0..52bcf79 100644
--- a/av1/encoder/mips/msa/fdct_msa.h
+++ b/av1/encoder/mips/msa/fdct_msa.h
@@ -16,7 +16,7 @@
#include "aom_dsp/mips/txfm_macros_msa.h"
#include "aom_ports/mem.h"
-#define VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, \
+#define AOM_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, \
out3, out4, out5, out6, out7) \
{ \
v8i16 cnst0_m, cnst1_m, cnst2_m, cnst3_m, cnst4_m; \
@@ -80,7 +80,7 @@
out5 = -out5; \
}
-#define VPX_FADST4(in0, in1, in2, in3, out0, out1, out2, out3) \
+#define AOM_FADST4(in0, in1, in2, in3, out0, out1, out2, out3) \
{ \
v4i32 s0_m, s1_m, s2_m, s3_m, constant_m; \
v4i32 in0_r_m, in1_r_m, in2_r_m, in3_r_m; \
diff --git a/av1/encoder/pickdering.c b/av1/encoder/pickdering.c
index 05c0877..bb6c5fc 100644
--- a/av1/encoder/pickdering.c
+++ b/av1/encoder/pickdering.c
@@ -54,7 +54,7 @@
int best_level;
int global_level;
double best_tot_mse = 1e15;
- int coeff_shift = VPXMAX(cm->bit_depth - 8, 0);
+ int coeff_shift = AOMMAX(cm->bit_depth - 8, 0);
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);
@@ -99,8 +99,8 @@
int nvb, nhb;
int16_t dst[MI_BLOCK_SIZE*MI_BLOCK_SIZE*8*8];
best_level = 0;
- nhb = VPXMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE*sbc);
- nvb = VPXMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE*sbr);
+ nhb = AOMMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE*sbc);
+ nvb = AOMMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE*sbr);
for (level = 0; level < 64; level++) {
int threshold;
threshold = level << coeff_shift;
diff --git a/av1/encoder/picklpf.c b/av1/encoder/picklpf.c
index 88788df..5bf6614 100644
--- a/av1/encoder/picklpf.c
+++ b/av1/encoder/picklpf.c
@@ -93,8 +93,8 @@
ss_err[filt_mid] = best_err;
while (filter_step > 0) {
- const int filt_high = VPXMIN(filt_mid + filter_step, max_filter_level);
- const int filt_low = VPXMAX(filt_mid - filter_step, min_filter_level);
+ const int filt_high = AOMMIN(filt_mid + filter_step, max_filter_level);
+ const int filt_low = AOMMAX(filt_mid - filter_step, min_filter_level);
// Bias against raising loop filter in favor of lowering it.
int64_t bias = (best_err >> (15 - (filt_mid / 8))) * filter_step;
@@ -163,19 +163,19 @@
#if CONFIG_AOM_HIGHBITDEPTH
int filt_guess;
switch (cm->bit_depth) {
- case VPX_BITS_8:
+ case AOM_BITS_8:
filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 1015158, 18);
break;
- case VPX_BITS_10:
+ case AOM_BITS_10:
filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 4060632, 20);
break;
- case VPX_BITS_12:
+ case AOM_BITS_12:
filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 16242526, 22);
break;
default:
assert(0 &&
- "bit_depth should be VPX_BITS_8, VPX_BITS_10 "
- "or VPX_BITS_12");
+ "bit_depth should be AOM_BITS_8, AOM_BITS_10 "
+ "or AOM_BITS_12");
return;
}
#else
diff --git a/av1/encoder/quantize.c b/av1/encoder/quantize.c
index 5ad2456..3433e65 100644
--- a/av1/encoder/quantize.c
+++ b/av1/encoder/quantize.c
@@ -312,14 +312,14 @@
const int quant = av1_dc_quant(q, 0, bit_depth);
#if CONFIG_AOM_HIGHBITDEPTH
switch (bit_depth) {
- case VPX_BITS_8:
+ case AOM_BITS_8:
return q == 0 ? 64 : (quant < 148 ? 84 : 80);
- case VPX_BITS_10:
+ case AOM_BITS_10:
return q == 0 ? 64 : (quant < 592 ? 84 : 80);
- case VPX_BITS_12:
+ case AOM_BITS_12:
return q == 0 ? 64 : (quant < 2368 ? 84 : 80);
default:
- assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
+ assert(0 && "bit_depth should be AOM_BITS_8, AOM_BITS_10 or AOM_BITS_12");
return -1;
}
#else
diff --git a/av1/encoder/ratectrl.c b/av1/encoder/ratectrl.c
index 79dc74c..9e65009 100644
--- a/av1/encoder/ratectrl.c
+++ b/av1/encoder/ratectrl.c
@@ -50,13 +50,13 @@
#define ASSIGN_MINQ_TABLE(bit_depth, name) \
do { \
switch (bit_depth) { \
- case VPX_BITS_8: name = name##_8; break; \
- case VPX_BITS_10: name = name##_10; break; \
- case VPX_BITS_12: name = name##_12; break; \
+ case AOM_BITS_8: name = name##_8; break; \
+ case AOM_BITS_10: name = name##_10; break; \
+ case AOM_BITS_12: name = name##_12; break; \
default: \
assert(0 && \
- "bit_depth should be VPX_BITS_8, VPX_BITS_10" \
- " or VPX_BITS_12"); \
+ "bit_depth should be AOM_BITS_8, AOM_BITS_10" \
+ " or AOM_BITS_12"); \
name = NULL; \
} \
} while (0)
@@ -103,7 +103,7 @@
static int get_minq_index(double maxq, double x3, double x2, double x1,
aom_bit_depth_t bit_depth) {
int i;
- const double minqtarget = VPXMIN(((x3 * maxq + x2) * maxq + x1) * maxq, maxq);
+ const double minqtarget = AOMMIN(((x3 * maxq + x2) * maxq + x1) * maxq, maxq);
// Special case handling to deal with the step from q2.0
// down to lossless mode represented by q 1.0.
@@ -134,14 +134,14 @@
void av1_rc_init_minq_luts(void) {
init_minq_luts(kf_low_motion_minq_8, kf_high_motion_minq_8,
arfgf_low_motion_minq_8, arfgf_high_motion_minq_8,
- inter_minq_8, rtc_minq_8, VPX_BITS_8);
+ inter_minq_8, rtc_minq_8, AOM_BITS_8);
#if CONFIG_AOM_HIGHBITDEPTH
init_minq_luts(kf_low_motion_minq_10, kf_high_motion_minq_10,
arfgf_low_motion_minq_10, arfgf_high_motion_minq_10,
- inter_minq_10, rtc_minq_10, VPX_BITS_10);
+ inter_minq_10, rtc_minq_10, AOM_BITS_10);
init_minq_luts(kf_low_motion_minq_12, kf_high_motion_minq_12,
arfgf_low_motion_minq_12, arfgf_high_motion_minq_12,
- inter_minq_12, rtc_minq_12, VPX_BITS_12);
+ inter_minq_12, rtc_minq_12, AOM_BITS_12);
#endif
}
@@ -152,11 +152,11 @@
// Convert the index to a real Q value (scaled down to match old Q values)
#if CONFIG_AOM_HIGHBITDEPTH
switch (bit_depth) {
- case VPX_BITS_8: return av1_ac_quant(qindex, 0, bit_depth) / 4.0;
- case VPX_BITS_10: return av1_ac_quant(qindex, 0, bit_depth) / 16.0;
- case VPX_BITS_12: return av1_ac_quant(qindex, 0, bit_depth) / 64.0;
+ case AOM_BITS_8: return av1_ac_quant(qindex, 0, bit_depth) / 4.0;
+ case AOM_BITS_10: return av1_ac_quant(qindex, 0, bit_depth) / 16.0;
+ case AOM_BITS_12: return av1_ac_quant(qindex, 0, bit_depth) / 64.0;
default:
- assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
+ assert(0 && "bit_depth should be AOM_BITS_8, AOM_BITS_10 or AOM_BITS_12");
return -1.0;
}
#else
@@ -182,7 +182,7 @@
aom_bit_depth_t bit_depth) {
const int bpm =
(int)(av1_rc_bits_per_mb(frame_type, q, correction_factor, bit_depth));
- return VPXMAX(FRAME_OVERHEAD_BITS,
+ return AOMMAX(FRAME_OVERHEAD_BITS,
(int)((uint64_t)bpm * mbs) >> BPER_MB_NORMBITS);
}
@@ -190,7 +190,7 @@
const RATE_CONTROL *rc = &cpi->rc;
const AV1EncoderConfig *oxcf = &cpi->oxcf;
const int min_frame_target =
- VPXMAX(rc->min_frame_bandwidth, rc->avg_frame_bandwidth >> 5);
+ AOMMAX(rc->min_frame_bandwidth, rc->avg_frame_bandwidth >> 5);
if (target < min_frame_target) target = min_frame_target;
if (cpi->refresh_golden_frame && rc->is_src_frame_alt_ref) {
// If there is an active ARF at this location use the minimum
@@ -204,7 +204,7 @@
if (oxcf->rc_max_inter_bitrate_pct) {
const int max_rate =
rc->avg_frame_bandwidth * oxcf->rc_max_inter_bitrate_pct / 100;
- target = VPXMIN(target, max_rate);
+ target = AOMMIN(target, max_rate);
}
return target;
}
@@ -215,7 +215,7 @@
if (oxcf->rc_max_intra_bitrate_pct) {
const int max_rate =
rc->avg_frame_bandwidth * oxcf->rc_max_intra_bitrate_pct / 100;
- target = VPXMIN(target, max_rate);
+ target = AOMMIN(target, max_rate);
}
if (target > rc->max_frame_bandwidth) target = rc->max_frame_bandwidth;
return target;
@@ -234,7 +234,7 @@
}
// Clip the buffer level to the maximum specified buffer size.
- rc->bits_off_target = VPXMIN(rc->bits_off_target, rc->maximum_buffer_size);
+ rc->bits_off_target = AOMMIN(rc->bits_off_target, rc->maximum_buffer_size);
rc->buffer_level = rc->bits_off_target;
}
@@ -249,7 +249,7 @@
if (factor <= factor_safe)
return default_interval;
else
- return VPXMAX(default_interval,
+ return AOMMAX(default_interval,
(int)(MIN_GF_INTERVAL * factor / factor_safe + 0.5));
// Note this logic makes:
// 4K24: 5
@@ -258,15 +258,15 @@
}
int av1_rc_get_default_max_gf_interval(double framerate, int min_gf_interval) {
- int interval = VPXMIN(MAX_GF_INTERVAL, (int)(framerate * 0.75));
+ int interval = AOMMIN(MAX_GF_INTERVAL, (int)(framerate * 0.75));
interval += (interval & 0x01); // Round to even value
- return VPXMAX(interval, min_gf_interval);
+ return AOMMAX(interval, min_gf_interval);
}
void av1_rc_init(const AV1EncoderConfig *oxcf, int pass, RATE_CONTROL *rc) {
int i;
- if (pass == 0 && oxcf->rc_mode == VPX_CBR) {
+ if (pass == 0 && oxcf->rc_mode == AOM_CBR) {
rc->avg_frame_qindex[KEY_FRAME] = oxcf->worst_allowed_q;
rc->avg_frame_qindex[INTER_FRAME] = oxcf->worst_allowed_q;
} else {
@@ -369,7 +369,7 @@
} else {
if ((cpi->refresh_alt_ref_frame || cpi->refresh_golden_frame) &&
!rc->is_src_frame_alt_ref &&
- (cpi->oxcf.rc_mode != VPX_CBR || cpi->oxcf.gf_cbr_boost_pct > 20))
+ (cpi->oxcf.rc_mode != AOM_CBR || cpi->oxcf.gf_cbr_boost_pct > 20))
rcf = rc->rate_correction_factors[GF_ARF_STD];
else
rcf = rc->rate_correction_factors[INTER_NORMAL];
@@ -395,7 +395,7 @@
} else {
if ((cpi->refresh_alt_ref_frame || cpi->refresh_golden_frame) &&
!rc->is_src_frame_alt_ref &&
- (cpi->oxcf.rc_mode != VPX_CBR || cpi->oxcf.gf_cbr_boost_pct > 20))
+ (cpi->oxcf.rc_mode != AOM_CBR || cpi->oxcf.gf_cbr_boost_pct > 20))
rc->rate_correction_factors[GF_ARF_STD] = factor;
else
rc->rate_correction_factors[INTER_NORMAL] = factor;
@@ -435,7 +435,7 @@
// More heavily damped adjustment used if we have been oscillating either side
// of target.
adjustment_limit =
- 0.25 + 0.5 * VPXMIN(1, fabs(log10(0.01 * correction_factor)));
+ 0.25 + 0.5 * AOMMIN(1, fabs(log10(0.01 * correction_factor)));
cpi->rc.q_2_frame = cpi->rc.q_1_frame;
cpi->rc.q_1_frame = cm->base_qindex;
@@ -507,11 +507,11 @@
// In CBR mode, this makes sure q is between oscillating Qs to prevent
// resonance.
- if (cpi->oxcf.rc_mode == VPX_CBR &&
+ if (cpi->oxcf.rc_mode == AOM_CBR &&
(cpi->rc.rc_1_frame * cpi->rc.rc_2_frame == -1) &&
cpi->rc.q_1_frame != cpi->rc.q_2_frame) {
- q = clamp(q, VPXMIN(cpi->rc.q_1_frame, cpi->rc.q_2_frame),
- VPXMAX(cpi->rc.q_1_frame, cpi->rc.q_2_frame));
+ q = clamp(q, AOMMIN(cpi->rc.q_1_frame, cpi->rc.q_2_frame),
+ AOMMAX(cpi->rc.q_1_frame, cpi->rc.q_2_frame));
}
return q;
}
@@ -569,7 +569,7 @@
: rc->last_q[INTER_FRAME] * 2;
}
}
- return VPXMIN(active_worst_quality, rc->worst_quality);
+ return AOMMIN(active_worst_quality, rc->worst_quality);
}
// Adjust active_worst_quality level based on buffer level.
@@ -594,10 +594,10 @@
// So for first few frames following key, the qp of that key frame is weighted
// into the active_worst_quality setting.
ambient_qp = (cm->current_video_frame < 5)
- ? VPXMIN(rc->avg_frame_qindex[INTER_FRAME],
+ ? AOMMIN(rc->avg_frame_qindex[INTER_FRAME],
rc->avg_frame_qindex[KEY_FRAME])
: rc->avg_frame_qindex[INTER_FRAME];
- active_worst_quality = VPXMIN(rc->worst_quality, ambient_qp * 5 / 4);
+ active_worst_quality = AOMMIN(rc->worst_quality, ambient_qp * 5 / 4);
if (rc->buffer_level > rc->optimal_buffer_level) {
// Adjust down.
// Maximum limit for down adjustment, ~30%.
@@ -649,7 +649,7 @@
double last_boosted_q = av1_convert_qindex_to_q(qindex, cm->bit_depth);
int delta_qindex = av1_compute_qdelta(
rc, last_boosted_q, (last_boosted_q * 0.75), cm->bit_depth);
- active_best_quality = VPXMAX(qindex + delta_qindex, rc->best_quality);
+ active_best_quality = AOMMAX(qindex + delta_qindex, rc->best_quality);
} else if (cm->current_video_frame > 0) {
// not first frame of one pass and kf_boost is set
double q_adj_factor = 1.0;
@@ -743,7 +743,7 @@
const AV1EncoderConfig *const oxcf) {
static const double cq_adjust_threshold = 0.1;
int active_cq_level = oxcf->cq_level;
- if (oxcf->rc_mode == VPX_CQ && rc->total_target_bits > 0) {
+ if (oxcf->rc_mode == AOM_CQ && rc->total_target_bits > 0) {
const double x = (double)rc->total_actual_bits / rc->total_target_bits;
if (x < cq_adjust_threshold) {
active_cq_level = (int)(active_cq_level * x / cq_adjust_threshold);
@@ -766,17 +766,17 @@
ASSIGN_MINQ_TABLE(cm->bit_depth, inter_minq);
if (frame_is_intra_only(cm)) {
- if (oxcf->rc_mode == VPX_Q) {
+ if (oxcf->rc_mode == AOM_Q) {
int qindex = cq_level;
double q = av1_convert_qindex_to_q(qindex, cm->bit_depth);
int delta_qindex = av1_compute_qdelta(rc, q, q * 0.25, cm->bit_depth);
- active_best_quality = VPXMAX(qindex + delta_qindex, rc->best_quality);
+ active_best_quality = AOMMAX(qindex + delta_qindex, rc->best_quality);
} else if (rc->this_key_frame_forced) {
int qindex = rc->last_boosted_qindex;
double last_boosted_q = av1_convert_qindex_to_q(qindex, cm->bit_depth);
int delta_qindex = av1_compute_qdelta(
rc, last_boosted_q, last_boosted_q * 0.75, cm->bit_depth);
- active_best_quality = VPXMAX(qindex + delta_qindex, rc->best_quality);
+ active_best_quality = AOMMAX(qindex + delta_qindex, rc->best_quality);
} else {
// not first frame of one pass and kf_boost is set
double q_adj_factor = 1.0;
@@ -808,7 +808,7 @@
q = rc->avg_frame_qindex[KEY_FRAME];
}
// For constrained quality dont allow Q less than the cq level
- if (oxcf->rc_mode == VPX_CQ) {
+ if (oxcf->rc_mode == AOM_CQ) {
if (q < cq_level) q = cq_level;
active_best_quality = get_gf_active_quality(rc, q, cm->bit_depth);
@@ -816,7 +816,7 @@
// Constrained quality use slightly lower active best.
active_best_quality = active_best_quality * 15 / 16;
- } else if (oxcf->rc_mode == VPX_Q) {
+ } else if (oxcf->rc_mode == AOM_Q) {
int qindex = cq_level;
double q = av1_convert_qindex_to_q(qindex, cm->bit_depth);
int delta_qindex;
@@ -824,12 +824,12 @@
delta_qindex = av1_compute_qdelta(rc, q, q * 0.40, cm->bit_depth);
else
delta_qindex = av1_compute_qdelta(rc, q, q * 0.50, cm->bit_depth);
- active_best_quality = VPXMAX(qindex + delta_qindex, rc->best_quality);
+ active_best_quality = AOMMAX(qindex + delta_qindex, rc->best_quality);
} else {
active_best_quality = get_gf_active_quality(rc, q, cm->bit_depth);
}
} else {
- if (oxcf->rc_mode == VPX_Q) {
+ if (oxcf->rc_mode == AOM_Q) {
int qindex = cq_level;
double q = av1_convert_qindex_to_q(qindex, cm->bit_depth);
double delta_rate[FIXED_GF_INTERVAL] = { 0.50, 1.0, 0.85, 1.0,
@@ -837,7 +837,7 @@
int delta_qindex = av1_compute_qdelta(
rc, q, q * delta_rate[cm->current_video_frame % FIXED_GF_INTERVAL],
cm->bit_depth);
- active_best_quality = VPXMAX(qindex + delta_qindex, rc->best_quality);
+ active_best_quality = AOMMAX(qindex + delta_qindex, rc->best_quality);
} else {
// Use the lower of active_worst_quality and recent/average Q.
if (cm->current_video_frame > 1)
@@ -846,7 +846,7 @@
active_best_quality = inter_minq[rc->avg_frame_qindex[KEY_FRAME]];
// For the constrained quality mode we don't want
// q to fall below the cq level.
- if ((oxcf->rc_mode == VPX_CQ) && (active_best_quality < cq_level)) {
+ if ((oxcf->rc_mode == AOM_CQ) && (active_best_quality < cq_level)) {
active_best_quality = cq_level;
}
}
@@ -881,7 +881,7 @@
}
#endif
- if (oxcf->rc_mode == VPX_Q) {
+ if (oxcf->rc_mode == AOM_Q) {
q = active_best_quality;
// Special case code to try and match quality with forced key frames
} else if ((cm->frame_type == KEY_FRAME) && rc->this_key_frame_forced) {
@@ -947,19 +947,19 @@
int qindex;
if (cpi->twopass.last_kfgroup_zeromotion_pct >= STATIC_MOTION_THRESH) {
- qindex = VPXMIN(rc->last_kf_qindex, rc->last_boosted_qindex);
+ qindex = AOMMIN(rc->last_kf_qindex, rc->last_boosted_qindex);
active_best_quality = qindex;
last_boosted_q = av1_convert_qindex_to_q(qindex, cm->bit_depth);
delta_qindex = av1_compute_qdelta(
rc, last_boosted_q, last_boosted_q * 1.25, cm->bit_depth);
active_worst_quality =
- VPXMIN(qindex + delta_qindex, active_worst_quality);
+ AOMMIN(qindex + delta_qindex, active_worst_quality);
} else {
qindex = rc->last_boosted_qindex;
last_boosted_q = av1_convert_qindex_to_q(qindex, cm->bit_depth);
delta_qindex = av1_compute_qdelta(
rc, last_boosted_q, last_boosted_q * 0.75, cm->bit_depth);
- active_best_quality = VPXMAX(qindex + delta_qindex, rc->best_quality);
+ active_best_quality = AOMMAX(qindex + delta_qindex, rc->best_quality);
}
} else {
// Not forced keyframe.
@@ -995,7 +995,7 @@
q = active_worst_quality;
}
// For constrained quality dont allow Q less than the cq level
- if (oxcf->rc_mode == VPX_CQ) {
+ if (oxcf->rc_mode == AOM_CQ) {
if (q < cq_level) q = cq_level;
active_best_quality = get_gf_active_quality(rc, q, cm->bit_depth);
@@ -1003,13 +1003,13 @@
// Constrained quality use slightly lower active best.
active_best_quality = active_best_quality * 15 / 16;
- } else if (oxcf->rc_mode == VPX_Q) {
+ } else if (oxcf->rc_mode == AOM_Q) {
if (!cpi->refresh_alt_ref_frame) {
active_best_quality = cq_level;
} else {
active_best_quality = get_gf_active_quality(rc, q, cm->bit_depth);
- // Modify best quality for second level arfs. For mode VPX_Q this
+ // Modify best quality for second level arfs. For mode AOM_Q this
// becomes the baseline frame q.
if (gf_group->rf_level[gf_group->index] == GF_ARF_LOW)
active_best_quality = (active_best_quality + cq_level + 1) / 2;
@@ -1018,14 +1018,14 @@
active_best_quality = get_gf_active_quality(rc, q, cm->bit_depth);
}
} else {
- if (oxcf->rc_mode == VPX_Q) {
+ if (oxcf->rc_mode == AOM_Q) {
active_best_quality = cq_level;
} else {
active_best_quality = inter_minq[active_worst_quality];
// For the constrained quality mode we don't want
// q to fall below the cq level.
- if ((oxcf->rc_mode == VPX_CQ) && (active_best_quality < cq_level)) {
+ if ((oxcf->rc_mode == AOM_CQ) && (active_best_quality < cq_level)) {
active_best_quality = cq_level;
}
}
@@ -1033,7 +1033,7 @@
// Extension to max or min Q if undershoot or overshoot is outside
// the permitted range.
- if ((cpi->oxcf.rc_mode != VPX_Q) &&
+ if ((cpi->oxcf.rc_mode != AOM_Q) &&
(cpi->twopass.gf_zeromotion_pct < VLOW_MOTION_THRESHOLD)) {
if (frame_is_intra_only(cm) ||
(!rc->is_src_frame_alt_ref &&
@@ -1056,7 +1056,7 @@
int qdelta = av1_frame_type_qdelta(
cpi, gf_group->rf_level[gf_group->index], active_worst_quality);
active_worst_quality =
- VPXMAX(active_worst_quality + qdelta, active_best_quality);
+ AOMMAX(active_worst_quality + qdelta, active_best_quality);
}
#endif
@@ -1065,7 +1065,7 @@
int qdelta = av1_compute_qdelta_by_rate(
rc, cm->frame_type, active_best_quality, 2.0, cm->bit_depth);
active_best_quality =
- VPXMAX(active_best_quality + qdelta, rc->best_quality);
+ AOMMAX(active_best_quality + qdelta, rc->best_quality);
}
active_best_quality =
@@ -1073,13 +1073,13 @@
active_worst_quality =
clamp(active_worst_quality, active_best_quality, rc->worst_quality);
- if (oxcf->rc_mode == VPX_Q) {
+ if (oxcf->rc_mode == AOM_Q) {
q = active_best_quality;
// Special case code to try and match quality with forced key frames.
} else if (frame_is_intra_only(cm) && rc->this_key_frame_forced) {
// If static since last kf use better of last boosted and last kf q.
if (cpi->twopass.last_kfgroup_zeromotion_pct >= STATIC_MOTION_THRESH) {
- q = VPXMIN(rc->last_kf_qindex, rc->last_boosted_qindex);
+ q = AOMMIN(rc->last_kf_qindex, rc->last_boosted_qindex);
} else {
q = rc->last_boosted_qindex;
}
@@ -1110,7 +1110,7 @@
int *top_index) {
int q;
if (cpi->oxcf.pass == 0) {
- if (cpi->oxcf.rc_mode == VPX_CBR)
+ if (cpi->oxcf.rc_mode == AOM_CBR)
q = rc_pick_q_and_bounds_one_pass_cbr(cpi, bottom_index, top_index);
else
q = rc_pick_q_and_bounds_one_pass_vbr(cpi, bottom_index, top_index);
@@ -1124,16 +1124,16 @@
void av1_rc_compute_frame_size_bounds(const AV1_COMP *cpi, int frame_target,
int *frame_under_shoot_limit,
int *frame_over_shoot_limit) {
- if (cpi->oxcf.rc_mode == VPX_Q) {
+ if (cpi->oxcf.rc_mode == AOM_Q) {
*frame_under_shoot_limit = 0;
*frame_over_shoot_limit = INT_MAX;
} else {
// For very small rate targets where the fractional adjustment
// may be tiny make sure there is at least a minimum range.
const int tolerance = (cpi->sf.recode_tolerance * frame_target) / 100;
- *frame_under_shoot_limit = VPXMAX(frame_target - tolerance - 200, 0);
+ *frame_under_shoot_limit = AOMMAX(frame_target - tolerance - 200, 0);
*frame_over_shoot_limit =
- VPXMIN(frame_target + tolerance + 200, cpi->rc.max_frame_bandwidth);
+ AOMMIN(frame_target + tolerance + 200, cpi->rc.max_frame_bandwidth);
}
}
@@ -1369,7 +1369,7 @@
const int64_t diff = rc->optimal_buffer_level - rc->buffer_level;
const int64_t one_pct_bits = 1 + rc->optimal_buffer_level / 100;
int min_frame_target =
- VPXMAX(rc->avg_frame_bandwidth >> 4, FRAME_OVERHEAD_BITS);
+ AOMMAX(rc->avg_frame_bandwidth >> 4, FRAME_OVERHEAD_BITS);
int target;
if (oxcf->gf_cbr_boost_pct) {
@@ -1386,20 +1386,20 @@
if (diff > 0) {
// Lower the target bandwidth for this frame.
- const int pct_low = (int)VPXMIN(diff / one_pct_bits, oxcf->under_shoot_pct);
+ const int pct_low = (int)AOMMIN(diff / one_pct_bits, oxcf->under_shoot_pct);
target -= (target * pct_low) / 200;
} else if (diff < 0) {
// Increase the target bandwidth for this frame.
const int pct_high =
- (int)VPXMIN(-diff / one_pct_bits, oxcf->over_shoot_pct);
+ (int)AOMMIN(-diff / one_pct_bits, oxcf->over_shoot_pct);
target += (target * pct_high) / 200;
}
if (oxcf->rc_max_inter_bitrate_pct) {
const int max_rate =
rc->avg_frame_bandwidth * oxcf->rc_max_inter_bitrate_pct / 100;
- target = VPXMIN(target, max_rate);
+ target = AOMMIN(target, max_rate);
}
- return VPXMAX(min_frame_target, target);
+ return AOMMAX(min_frame_target, target);
}
static int calc_iframe_target_size_one_pass_cbr(const AV1_COMP *cpi) {
@@ -1413,7 +1413,7 @@
int kf_boost = 32;
double framerate = cpi->framerate;
- kf_boost = VPXMAX(kf_boost, (int)(2 * framerate - 16));
+ kf_boost = AOMMAX(kf_boost, (int)(2 * framerate - 16));
if (rc->frames_since_key < framerate / 2) {
kf_boost = (int)(kf_boost * rc->frames_since_key / (framerate / 2));
}
@@ -1519,7 +1519,7 @@
const AV1EncoderConfig *const oxcf = &cpi->oxcf;
// Special case code for 1 pass fixed Q mode tests
- if ((oxcf->pass == 0) && (oxcf->rc_mode == VPX_Q)) {
+ if ((oxcf->pass == 0) && (oxcf->rc_mode == AOM_Q)) {
rc->max_gf_interval = FIXED_GF_INTERVAL;
rc->min_gf_interval = FIXED_GF_INTERVAL;
rc->static_scene_max_gf_interval = FIXED_GF_INTERVAL;
@@ -1546,7 +1546,7 @@
rc->max_gf_interval = rc->static_scene_max_gf_interval;
// Clamp min to max
- rc->min_gf_interval = VPXMIN(rc->min_gf_interval, rc->max_gf_interval);
+ rc->min_gf_interval = AOMMIN(rc->min_gf_interval, rc->max_gf_interval);
}
}
@@ -1561,7 +1561,7 @@
(int)(rc->avg_frame_bandwidth * oxcf->two_pass_vbrmin_section / 100);
rc->min_frame_bandwidth =
- VPXMAX(rc->min_frame_bandwidth, FRAME_OVERHEAD_BITS);
+ AOMMAX(rc->min_frame_bandwidth, FRAME_OVERHEAD_BITS);
// A maximum bitrate for a frame is defined.
// The baseline for this aligns with HW implementations that
@@ -1574,7 +1574,7 @@
(int)(((int64_t)rc->avg_frame_bandwidth * oxcf->two_pass_vbrmax_section) /
100);
rc->max_frame_bandwidth =
- VPXMAX(VPXMAX((cm->MBs * MAX_MB_RATE), MAXRATE_1080P), vbr_max_bits);
+ AOMMAX(AOMMAX((cm->MBs * MAX_MB_RATE), MAXRATE_1080P), vbr_max_bits);
av1_rc_set_gf_interval_range(cpi, rc);
}
@@ -1612,12 +1612,12 @@
// Dont do it for kf,arf,gf or overlay frames.
if (!frame_is_kf_gf_arf(cpi) && !rc->is_src_frame_alt_ref &&
rc->vbr_bits_off_target_fast) {
- int one_frame_bits = VPXMAX(rc->avg_frame_bandwidth, *this_frame_target);
+ int one_frame_bits = AOMMAX(rc->avg_frame_bandwidth, *this_frame_target);
int fast_extra_bits;
- fast_extra_bits = (int)VPXMIN(rc->vbr_bits_off_target_fast, one_frame_bits);
- fast_extra_bits = (int)VPXMIN(
+ fast_extra_bits = (int)AOMMIN(rc->vbr_bits_off_target_fast, one_frame_bits);
+ fast_extra_bits = (int)AOMMIN(
fast_extra_bits,
- VPXMAX(one_frame_bits / 8, rc->vbr_bits_off_target_fast / 8));
+ AOMMAX(one_frame_bits / 8, rc->vbr_bits_off_target_fast / 8));
*this_frame_target += (int)fast_extra_bits;
rc->vbr_bits_off_target_fast -= fast_extra_bits;
}
@@ -1628,7 +1628,7 @@
int target_rate = rc->base_frame_target;
// Correction to rate target based on prior over or under shoot.
- if (cpi->oxcf.rc_mode == VPX_VBR || cpi->oxcf.rc_mode == VPX_CQ)
+ if (cpi->oxcf.rc_mode == AOM_VBR || cpi->oxcf.rc_mode == AOM_CQ)
vbr_rate_correction(cpi, &target_rate);
av1_rc_set_frame_target(cpi, target_rate);
}
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index 8b6d521..4c69857 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -141,12 +141,12 @@
void av1_init_me_luts(void) {
init_me_luts_bd(sad_per_bit16lut_8, sad_per_bit4lut_8, QINDEX_RANGE,
- VPX_BITS_8);
+ AOM_BITS_8);
#if CONFIG_AOM_HIGHBITDEPTH
init_me_luts_bd(sad_per_bit16lut_10, sad_per_bit4lut_10, QINDEX_RANGE,
- VPX_BITS_10);
+ AOM_BITS_10);
init_me_luts_bd(sad_per_bit16lut_12, sad_per_bit4lut_12, QINDEX_RANGE,
- VPX_BITS_12);
+ AOM_BITS_12);
#endif
}
@@ -160,11 +160,11 @@
#if CONFIG_AOM_HIGHBITDEPTH
int64_t rdmult = 0;
switch (cpi->common.bit_depth) {
- case VPX_BITS_8: rdmult = 88 * q * q / 24; break;
- case VPX_BITS_10: rdmult = ROUND_POWER_OF_TWO(88 * q * q / 24, 4); break;
- case VPX_BITS_12: rdmult = ROUND_POWER_OF_TWO(88 * q * q / 24, 8); break;
+ case AOM_BITS_8: rdmult = 88 * q * q / 24; break;
+ case AOM_BITS_10: rdmult = ROUND_POWER_OF_TWO(88 * q * q / 24, 4); break;
+ case AOM_BITS_12: rdmult = ROUND_POWER_OF_TWO(88 * q * q / 24, 8); break;
default:
- assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
+ assert(0 && "bit_depth should be AOM_BITS_8, AOM_BITS_10 or AOM_BITS_12");
return -1;
}
#else
@@ -173,7 +173,7 @@
if (cpi->oxcf.pass == 2 && (cpi->common.frame_type != KEY_FRAME)) {
const GF_GROUP *const gf_group = &cpi->twopass.gf_group;
const FRAME_UPDATE_TYPE frame_type = gf_group->update_type[gf_group->index];
- const int boost_index = VPXMIN(15, (cpi->rc.gfu_boost / 100));
+ const int boost_index = AOMMIN(15, (cpi->rc.gfu_boost / 100));
rdmult = (rdmult * rd_frame_type_factor[frame_type]) >> 7;
rdmult += ((rdmult * rd_boost_factor[boost_index]) >> 7);
@@ -186,38 +186,38 @@
double q;
#if CONFIG_AOM_HIGHBITDEPTH
switch (bit_depth) {
- case VPX_BITS_8: q = av1_dc_quant(qindex, 0, VPX_BITS_8) / 4.0; break;
- case VPX_BITS_10: q = av1_dc_quant(qindex, 0, VPX_BITS_10) / 16.0; break;
- case VPX_BITS_12: q = av1_dc_quant(qindex, 0, VPX_BITS_12) / 64.0; break;
+ case AOM_BITS_8: q = av1_dc_quant(qindex, 0, AOM_BITS_8) / 4.0; break;
+ case AOM_BITS_10: q = av1_dc_quant(qindex, 0, AOM_BITS_10) / 16.0; break;
+ case AOM_BITS_12: q = av1_dc_quant(qindex, 0, AOM_BITS_12) / 64.0; break;
default:
- assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
+ assert(0 && "bit_depth should be AOM_BITS_8, AOM_BITS_10 or AOM_BITS_12");
return -1;
}
#else
(void)bit_depth;
- q = av1_dc_quant(qindex, 0, VPX_BITS_8) / 4.0;
+ q = av1_dc_quant(qindex, 0, AOM_BITS_8) / 4.0;
#endif // CONFIG_AOM_HIGHBITDEPTH
// TODO(debargha): Adjust the function below.
- return VPXMAX((int)(pow(q, RD_THRESH_POW) * 5.12), 8);
+ return AOMMAX((int)(pow(q, RD_THRESH_POW) * 5.12), 8);
}
void av1_initialize_me_consts(AV1_COMP *cpi, MACROBLOCK *x, int qindex) {
#if CONFIG_AOM_HIGHBITDEPTH
switch (cpi->common.bit_depth) {
- case VPX_BITS_8:
+ case AOM_BITS_8:
x->sadperbit16 = sad_per_bit16lut_8[qindex];
x->sadperbit4 = sad_per_bit4lut_8[qindex];
break;
- case VPX_BITS_10:
+ case AOM_BITS_10:
x->sadperbit16 = sad_per_bit16lut_10[qindex];
x->sadperbit4 = sad_per_bit4lut_10[qindex];
break;
- case VPX_BITS_12:
+ case AOM_BITS_12:
x->sadperbit16 = sad_per_bit16lut_12[qindex];
x->sadperbit4 = sad_per_bit4lut_12[qindex];
break;
default:
- assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
+ assert(0 && "bit_depth should be AOM_BITS_8, AOM_BITS_10 or AOM_BITS_12");
}
#else
(void)cpi;
@@ -384,7 +384,7 @@
static const uint32_t MAX_XSQ_Q10 = 245727;
const uint64_t xsq_q10_64 =
(((uint64_t)qstep * qstep << (n_log2 + 10)) + (var >> 1)) / var;
- const int xsq_q10 = (int)VPXMIN(xsq_q10_64, MAX_XSQ_Q10);
+ const int xsq_q10 = (int)AOMMIN(xsq_q10_64, MAX_XSQ_Q10);
model_rd_norm(xsq_q10, &r_q10, &d_q10);
*rate = ROUND_POWER_OF_TWO(r_q10 << n_log2, 10 - VP9_PROB_COST_SHIFT);
*dist = (var * (int64_t)d_q10 + 512) >> 10;
@@ -460,7 +460,7 @@
if (i == 1 && near_same_nearest) continue;
fp_row = (this_mv->row + 3 + (this_mv->row >= 0)) >> 3;
fp_col = (this_mv->col + 3 + (this_mv->col >= 0)) >> 3;
- max_mv = VPXMAX(max_mv, VPXMAX(abs(this_mv->row), abs(this_mv->col)) >> 3);
+ max_mv = AOMMAX(max_mv, AOMMAX(abs(this_mv->row), abs(this_mv->col)) >> 3);
if (fp_row == 0 && fp_col == 0 && zero_seen) continue;
zero_seen |= (fp_row == 0 && fp_col == 0);
@@ -604,15 +604,15 @@
const int top_mode = bsize < BLOCK_8X8 ? MAX_REFS : MAX_MODES;
int mode;
for (mode = 0; mode < top_mode; ++mode) {
- const BLOCK_SIZE min_size = VPXMAX(bsize - 1, BLOCK_4X4);
- const BLOCK_SIZE max_size = VPXMIN(bsize + 2, BLOCK_64X64);
+ const BLOCK_SIZE min_size = AOMMAX(bsize - 1, BLOCK_4X4);
+ const BLOCK_SIZE max_size = AOMMIN(bsize + 2, BLOCK_64X64);
BLOCK_SIZE bs;
for (bs = min_size; bs <= max_size; ++bs) {
int *const fact = &factor_buf[bs][mode];
if (mode == best_mode_index) {
*fact -= (*fact >> 4);
} else {
- *fact = VPXMIN(*fact + RD_THRESH_INC, rd_thresh * RD_THRESH_MAX_FACT);
+ *fact = AOMMIN(*fact + RD_THRESH_INC, rd_thresh * RD_THRESH_MAX_FACT);
}
}
}
@@ -624,11 +624,11 @@
const int q = av1_dc_quant(qindex, qdelta, bit_depth);
#if CONFIG_AOM_HIGHBITDEPTH
switch (bit_depth) {
- case VPX_BITS_8: return 20 * q;
- case VPX_BITS_10: return 5 * q;
- case VPX_BITS_12: return ROUND_POWER_OF_TWO(5 * q, 2);
+ case AOM_BITS_8: return 20 * q;
+ case AOM_BITS_10: return 5 * q;
+ case AOM_BITS_12: return ROUND_POWER_OF_TWO(5 * q, 2);
default:
- assert(0 && "bit_depth should be VPX_BITS_8, VPX_BITS_10 or VPX_BITS_12");
+ assert(0 && "bit_depth should be AOM_BITS_8, AOM_BITS_10 or AOM_BITS_12");
return -1;
}
#else
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 170cdf2..903b076 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -190,8 +190,8 @@
const int64_t ac_thr = p->quant_thred[1] >> shift;
// The low thresholds are used to measure if the prediction errors are
// low enough so that we can skip the mode search.
- const int64_t low_dc_thr = VPXMIN(50, dc_thr >> 2);
- const int64_t low_ac_thr = VPXMIN(80, ac_thr >> 2);
+ const int64_t low_dc_thr = AOMMIN(50, dc_thr >> 2);
+ const int64_t low_ac_thr = AOMMIN(80, ac_thr >> 2);
int bw = 1 << (b_width_log2_lookup[bs] - b_width_log2_lookup[unit_size]);
int bh = 1 << (b_height_log2_lookup[bs] - b_width_log2_lookup[unit_size]);
int idx, idy;
@@ -481,7 +481,7 @@
#endif
if (tx_size != TX_32X32) dc_correct >>= 2;
- dist = VPXMAX(0, sse - dc_correct);
+ dist = AOMMAX(0, sse - dc_correct);
}
} else {
// SKIP_TXFM_AC_DC
@@ -507,7 +507,7 @@
rd2 = RDCOST(x->rdmult, x->rddiv, 0, sse);
// TODO(jingning): temporarily enabled only for luma component
- rd = VPXMIN(rd1, rd2);
+ rd = AOMMIN(rd1, rd2);
if (plane == 0)
x->zcoeff_blk[tx_size][block] =
!x->plane[plane].eobs[block] ||
@@ -579,7 +579,7 @@
int s1 = av1_cost_bit(skip_prob, 1);
const int is_inter = is_inter_block(mbmi);
- mbmi->tx_size = VPXMIN(max_tx_size, largest_tx_size);
+ mbmi->tx_size = AOMMIN(max_tx_size, largest_tx_size);
if (mbmi->tx_size < TX_32X32 && !xd->lossless[mbmi->segment_id]) {
for (tx_type = 0; tx_type < TX_TYPES; ++tx_type) {
mbmi->tx_type = tx_type;
@@ -597,7 +597,7 @@
else
this_rd = RDCOST(x->rdmult, x->rddiv, r + s0, d);
if (is_inter && !xd->lossless[mbmi->segment_id] && !s)
- this_rd = VPXMIN(this_rd, RDCOST(x->rdmult, x->rddiv, s1, psse));
+ this_rd = AOMMIN(this_rd, RDCOST(x->rdmult, x->rddiv, s1, psse));
if (this_rd < ((best_tx_type == DCT_DCT) ? ext_tx_th : 1) * best_rd) {
best_rd = this_rd;
@@ -663,7 +663,7 @@
end_tx = 0;
} else {
const TX_SIZE chosen_tx_size =
- VPXMIN(max_tx_size, tx_mode_to_biggest_tx_size[cm->tx_mode]);
+ AOMMIN(max_tx_size, tx_mode_to_biggest_tx_size[cm->tx_mode]);
start_tx = chosen_tx_size;
end_tx = chosen_tx_size;
}
@@ -715,7 +715,7 @@
if (tx_select && !(s && is_inter)) r += r_tx_size;
if (is_inter && !xd->lossless[xd->mi[0]->mbmi.segment_id] && !s)
- rd = VPXMIN(rd, RDCOST(x->rdmult, x->rddiv, s1, sse));
+ rd = AOMMIN(rd, RDCOST(x->rdmult, x->rddiv, s1, sse));
// Early termination in transform size search.
if (cpi->sf.tx_size_search_breakout &&
@@ -1384,7 +1384,7 @@
so->neighbors, cpi->sf.use_fast_coef_costing);
rd1 = RDCOST(x->rdmult, x->rddiv, thisrate, thisdistortion >> 2);
rd2 = RDCOST(x->rdmult, x->rddiv, 0, thissse >> 2);
- rd = VPXMIN(rd1, rd2);
+ rd = AOMMIN(rd1, rd2);
if (rd >= best_yrd) return INT64_MAX;
}
}
@@ -1771,7 +1771,7 @@
max_mv = x->max_mv_context[mbmi->ref_frame[0]];
else
max_mv =
- VPXMAX(abs(bsi->mvp.as_mv.row), abs(bsi->mvp.as_mv.col)) >> 3;
+ AOMMAX(abs(bsi->mvp.as_mv.row), abs(bsi->mvp.as_mv.col)) >> 3;
if (cpi->sf.mv.auto_mv_step_size && cm->show_frame) {
// Take wtd average of the step_params based on the last frame's
@@ -1789,7 +1789,7 @@
if (cpi->sf.adaptive_motion_search) {
mvp_full.row = x->pred_mv[mbmi->ref_frame[0]].row >> 3;
mvp_full.col = x->pred_mv[mbmi->ref_frame[0]].col >> 3;
- step_param = VPXMAX(step_param, 8);
+ step_param = AOMMAX(step_param, 8);
}
// adjust src pointer for this block
@@ -2151,7 +2151,7 @@
av1_set_mv_search_range(x, &ref_mv);
// Work out the size of the first step in the mv step search.
- // 0 here is maximum length first step. 1 is VPXMAX >> 1 etc.
+ // 0 here is maximum length first step. 1 is AOMMAX >> 1 etc.
if (cpi->sf.mv.auto_mv_step_size && cm->show_frame) {
// Take wtd average of the step_params based on the last frame's
// max mv magnitude and that based on the best ref mvs of the current
@@ -2166,8 +2166,8 @@
if (cpi->sf.adaptive_motion_search && bsize < BLOCK_64X64) {
int boffset =
2 * (b_width_log2_lookup[BLOCK_64X64] -
- VPXMIN(b_height_log2_lookup[bsize], b_width_log2_lookup[bsize]));
- step_param = VPXMAX(step_param, boffset);
+ AOMMIN(b_height_log2_lookup[bsize], b_width_log2_lookup[bsize]));
+ step_param = AOMMAX(step_param, boffset);
}
if (cpi->sf.adaptive_motion_search) {
@@ -2259,9 +2259,9 @@
(mode_mv[NEARMV][ref_frame].as_int == INVALID_MV)));
}
-#define LEFT_TOP_MARGIN ((VPX_ENC_BORDER_IN_PIXELS - VPX_INTERP_EXTEND) << 3)
+#define LEFT_TOP_MARGIN ((AOM_ENC_BORDER_IN_PIXELS - AOM_INTERP_EXTEND) << 3)
#define RIGHT_BOTTOM_MARGIN \
- ((VPX_ENC_BORDER_IN_PIXELS - VPX_INTERP_EXTEND) << 3)
+ ((AOM_ENC_BORDER_IN_PIXELS - AOM_INTERP_EXTEND) << 3)
// TODO(jingning): this mv clamping function should be block size dependent.
static INLINE void clamp_mv2(MV *mv, const MACROBLOCKD *xd) {
@@ -2380,7 +2380,7 @@
// motion field, where the distortion gain for a single block may not
// be enough to overcome the cost of a new mv.
if (discount_newmv_test(cpi, this_mode, tmp_mv, mode_mv, refs[0])) {
- *rate2 += VPXMAX((rate_mv / NEW_MV_DISCOUNT_FACTOR), 1);
+ *rate2 += AOMMAX((rate_mv / NEW_MV_DISCOUNT_FACTOR), 1);
} else {
*rate2 += rate_mv;
}
@@ -2416,7 +2416,7 @@
if (discount_newmv_test(cpi, this_mode, frame_mv[refs[0]], mode_mv,
refs[0])) {
*rate2 +=
- VPXMIN(cost_mv_ref(cpi, this_mode, mbmi_ext->mode_context[refs[0]]),
+ AOMMIN(cost_mv_ref(cpi, this_mode, mbmi_ext->mode_context[refs[0]]),
cost_mv_ref(cpi, NEARESTMV, mbmi_ext->mode_context[refs[0]]));
} else {
*rate2 += cost_mv_ref(cpi, this_mode, mbmi_ext->mode_context[refs[0]]);
@@ -2457,9 +2457,9 @@
rd = RDCOST(x->rdmult, x->rddiv, tmp_rate_sum, tmp_dist_sum);
filter_cache[i] = rd;
filter_cache[SWITCHABLE_FILTERS] =
- VPXMIN(filter_cache[SWITCHABLE_FILTERS], rd + rs_rd);
+ AOMMIN(filter_cache[SWITCHABLE_FILTERS], rd + rs_rd);
if (cm->interp_filter == SWITCHABLE) rd += rs_rd;
- *mask_filter = VPXMAX(*mask_filter, rd);
+ *mask_filter = AOMMAX(*mask_filter, rd);
} else {
int rate_sum = 0;
int64_t dist_sum = 0;
@@ -2488,9 +2488,9 @@
rd = RDCOST(x->rdmult, x->rddiv, rate_sum, dist_sum);
filter_cache[i] = rd;
filter_cache[SWITCHABLE_FILTERS] =
- VPXMIN(filter_cache[SWITCHABLE_FILTERS], rd + rs_rd);
+ AOMMIN(filter_cache[SWITCHABLE_FILTERS], rd + rs_rd);
if (cm->interp_filter == SWITCHABLE) rd += rs_rd;
- *mask_filter = VPXMAX(*mask_filter, rd);
+ *mask_filter = AOMMAX(*mask_filter, rd);
if (i == 0 && intpel_mv) {
tmp_rate_sum = rate_sum;
@@ -2599,7 +2599,7 @@
*distortion += distortion_y;
rdcosty = RDCOST(x->rdmult, x->rddiv, *rate2, *distortion);
- rdcosty = VPXMIN(rdcosty, RDCOST(x->rdmult, x->rddiv, 0, *psse));
+ rdcosty = AOMMIN(rdcosty, RDCOST(x->rdmult, x->rddiv, 0, *psse));
if (!super_block_uvrd(cpi, x, rate_uv, &distortion_uv, &skippable_uv,
&sseuv, bsize, ref_best_rd - rdcosty)) {
@@ -2660,7 +2660,7 @@
max_uv_tx_size = get_uv_tx_size_impl(
xd->mi[0]->mbmi.tx_size, bsize, pd[1].subsampling_x, pd[1].subsampling_y);
rd_pick_intra_sbuv_mode(cpi, x, ctx, &rate_uv, &rate_uv_tokenonly, &dist_uv,
- &uv_skip, VPXMAX(BLOCK_8X8, bsize), max_uv_tx_size);
+ &uv_skip, AOMMAX(BLOCK_8X8, bsize), max_uv_tx_size);
if (y_skip && uv_skip) {
rd_cost->rate = rate_y + rate_uv - rate_y_tokenonly - rate_uv_tokenonly +
@@ -2723,12 +2723,12 @@
// to a predictor with a low spatial complexity compared to the source.
if ((source_variance > LOW_VAR_THRESH) && (ref_frame == INTRA_FRAME) &&
(source_variance > recon_variance)) {
- var_factor = VPXMIN(absvar_diff, VPXMIN(VLOW_ADJ_MAX, var_error));
+ var_factor = AOMMIN(absvar_diff, AOMMIN(VLOW_ADJ_MAX, var_error));
// A second possible case of interest is where the source variance
// is very low and we wish to discourage false texture or motion trails.
} else if ((source_variance < (LOW_VAR_THRESH >> 1)) &&
(recon_variance > source_variance)) {
- var_factor = VPXMIN(absvar_diff, VPXMIN(VHIGH_ADJ_MAX, var_error));
+ var_factor = AOMMIN(absvar_diff, AOMMIN(VHIGH_ADJ_MAX, var_error));
}
*this_rd += (*this_rd * var_factor) / 100;
}
@@ -2757,7 +2757,7 @@
top_edge += (int)(twopass->this_frame_stats.inactive_zone_rows * 2);
bottom_edge -= (int)(twopass->this_frame_stats.inactive_zone_rows * 2);
- bottom_edge = VPXMAX(top_edge, bottom_edge);
+ bottom_edge = AOMMAX(top_edge, bottom_edge);
}
if (((top_edge >= mi_row) && (top_edge < (mi_row + mi_step))) ||
@@ -2784,7 +2784,7 @@
left_edge += (int)(twopass->this_frame_stats.inactive_zone_cols * 2);
right_edge -= (int)(twopass->this_frame_stats.inactive_zone_cols * 2);
- right_edge = VPXMAX(left_edge, right_edge);
+ right_edge = AOMMAX(left_edge, right_edge);
}
if (((left_edge >= mi_col) && (left_edge < (mi_col + mi_step))) ||
@@ -2823,8 +2823,8 @@
int_mv single_newmv[MAX_REF_FRAMES] = { { 0 } };
INTERP_FILTER single_inter_filter[MB_MODE_COUNT][MAX_REF_FRAMES];
int single_skippable[MB_MODE_COUNT][MAX_REF_FRAMES];
- static const int flag_list[4] = { 0, VPX_LAST_FLAG, VPX_GOLD_FLAG,
- VPX_ALT_FLAG };
+ static const int flag_list[4] = { 0, AOM_LAST_FLAG, AOM_GOLD_FLAG,
+ AOM_ALT_FLAG };
int64_t best_rd = best_rd_so_far;
int64_t best_pred_diff[REFERENCE_MODES];
int64_t best_pred_rd[REFERENCE_MODES];
@@ -3015,7 +3015,7 @@
}
if ((ref_frame_skip_mask[0] & (1 << ref_frame)) &&
- (ref_frame_skip_mask[1] & (1 << VPXMAX(0, second_ref_frame))))
+ (ref_frame_skip_mask[1] & (1 << AOMMAX(0, second_ref_frame))))
continue;
if (mode_skip_mask[ref_frame] & (1 << this_mode)) continue;
@@ -3187,9 +3187,9 @@
if (!disable_skip && ref_frame == INTRA_FRAME) {
for (i = 0; i < REFERENCE_MODES; ++i)
- best_pred_rd[i] = VPXMIN(best_pred_rd[i], this_rd);
+ best_pred_rd[i] = AOMMIN(best_pred_rd[i], this_rd);
for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; i++)
- best_filter_rd[i] = VPXMIN(best_filter_rd[i], this_rd);
+ best_filter_rd[i] = AOMMIN(best_filter_rd[i], this_rd);
}
// Did this mode help.. i.e. is it the new best mode
@@ -3287,7 +3287,7 @@
adj_rd = filter_cache[i] - ref;
adj_rd += this_rd;
- best_filter_rd[i] = VPXMIN(best_filter_rd[i], adj_rd);
+ best_filter_rd[i] = AOMMIN(best_filter_rd[i], adj_rd);
}
}
}
@@ -3510,8 +3510,8 @@
int comp_pred, i;
int_mv frame_mv[MB_MODE_COUNT][MAX_REF_FRAMES];
struct buf_2d yv12_mb[4][MAX_MB_PLANE];
- static const int flag_list[4] = { 0, VPX_LAST_FLAG, VPX_GOLD_FLAG,
- VPX_ALT_FLAG };
+ static const int flag_list[4] = { 0, AOM_LAST_FLAG, AOM_GOLD_FLAG,
+ AOM_ALT_FLAG };
int64_t best_rd = best_rd_so_far;
int64_t best_yrd = best_rd_so_far; // FIXME(rbultje) more precise
int64_t best_pred_diff[REFERENCE_MODES];
@@ -3610,7 +3610,7 @@
}
if ((ref_frame_skip_mask[0] & (1 << ref_frame)) &&
- (ref_frame_skip_mask[1] & (1 << VPXMAX(0, second_ref_frame))))
+ (ref_frame_skip_mask[1] & (1 << AOMMAX(0, second_ref_frame))))
continue;
// Test best rd so far against threshold for trying this mode.
@@ -3756,10 +3756,10 @@
rs_rd = RDCOST(x->rdmult, x->rddiv, rs, 0);
filter_cache[switchable_filter_index] = tmp_rd;
filter_cache[SWITCHABLE_FILTERS] =
- VPXMIN(filter_cache[SWITCHABLE_FILTERS], tmp_rd + rs_rd);
+ AOMMIN(filter_cache[SWITCHABLE_FILTERS], tmp_rd + rs_rd);
if (cm->interp_filter == SWITCHABLE) tmp_rd += rs_rd;
- mask_filter = VPXMAX(mask_filter, tmp_rd);
+ mask_filter = AOMMAX(mask_filter, tmp_rd);
newbest = (tmp_rd < tmp_best_rd);
if (newbest) {
@@ -3832,7 +3832,7 @@
compmode_cost = av1_cost_bit(comp_mode_p, comp_pred);
tmp_best_rdu =
- best_rd - VPXMIN(RDCOST(x->rdmult, x->rddiv, rate2, distortion2),
+ best_rd - AOMMIN(RDCOST(x->rdmult, x->rddiv, rate2, distortion2),
RDCOST(x->rdmult, x->rddiv, 0, total_sse));
if (tmp_best_rdu > 0) {
@@ -3891,9 +3891,9 @@
if (!disable_skip && ref_frame == INTRA_FRAME) {
for (i = 0; i < REFERENCE_MODES; ++i)
- best_pred_rd[i] = VPXMIN(best_pred_rd[i], this_rd);
+ best_pred_rd[i] = AOMMIN(best_pred_rd[i], this_rd);
for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; i++)
- best_filter_rd[i] = VPXMIN(best_filter_rd[i], this_rd);
+ best_filter_rd[i] = AOMMIN(best_filter_rd[i], this_rd);
}
// Did this mode help.. i.e. is it the new best mode
@@ -3990,7 +3990,7 @@
adj_rd = filter_cache[i] - ref;
adj_rd += this_rd;
- best_filter_rd[i] = VPXMIN(best_filter_rd[i], adj_rd);
+ best_filter_rd[i] = AOMMIN(best_filter_rd[i], adj_rd);
}
}
diff --git a/av1/encoder/skin_detection.c b/av1/encoder/skin_detection.c
index 11ff16b..7ae9ca3 100644
--- a/av1/encoder/skin_detection.c
+++ b/av1/encoder/skin_detection.c
@@ -62,7 +62,7 @@
YV12_BUFFER_CONFIG skinmap;
memset(&skinmap, 0, sizeof(YV12_BUFFER_CONFIG));
if (aom_alloc_frame_buffer(&skinmap, cm->width, cm->height, cm->subsampling_x,
- cm->subsampling_y, VPX_ENC_BORDER_IN_PIXELS,
+ cm->subsampling_y, AOM_ENC_BORDER_IN_PIXELS,
cm->byte_alignment)) {
aom_free_frame_buffer(&skinmap);
return;
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 5ef444d..1850275 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -70,7 +70,7 @@
AV1_COMMON *const cm = &cpi->common;
if (speed >= 1) {
- if (VPXMIN(cm->width, cm->height) >= 720) {
+ if (AOMMIN(cm->width, cm->height) >= 720) {
sf->disable_split_mask =
cm->show_frame ? DISABLE_ALL_SPLIT : DISABLE_ALL_INTER_SPLIT;
sf->partition_search_breakout_dist_thr = (1 << 23);
@@ -81,7 +81,7 @@
}
if (speed >= 2) {
- if (VPXMIN(cm->width, cm->height) >= 720) {
+ if (AOMMIN(cm->width, cm->height) >= 720) {
sf->disable_split_mask =
cm->show_frame ? DISABLE_ALL_SPLIT : DISABLE_ALL_INTER_SPLIT;
sf->adaptive_pred_interp_filter = 0;
@@ -96,7 +96,7 @@
}
if (speed >= 3) {
- if (VPXMIN(cm->width, cm->height) >= 720) {
+ if (AOMMIN(cm->width, cm->height) >= 720) {
sf->disable_split_mask = DISABLE_ALL_SPLIT;
sf->schedule_mode_search = cm->base_qindex < 220 ? 1 : 0;
sf->partition_search_breakout_dist_thr = (1 << 25);
@@ -120,7 +120,7 @@
}
if (speed >= 4) {
- if (VPXMIN(cm->width, cm->height) >= 720) {
+ if (AOMMIN(cm->width, cm->height) >= 720) {
sf->partition_search_breakout_dist_thr = (1 << 26);
} else {
sf->partition_search_breakout_dist_thr = (1 << 24);
@@ -233,7 +233,7 @@
AV1_COMMON *const cm = &cpi->common;
if (speed >= 1) {
- if (VPXMIN(cm->width, cm->height) >= 720) {
+ if (AOMMIN(cm->width, cm->height) >= 720) {
sf->disable_split_mask =
cm->show_frame ? DISABLE_ALL_SPLIT : DISABLE_ALL_INTER_SPLIT;
} else {
@@ -242,7 +242,7 @@
}
if (speed >= 2) {
- if (VPXMIN(cm->width, cm->height) >= 720) {
+ if (AOMMIN(cm->width, cm->height) >= 720) {
sf->disable_split_mask =
cm->show_frame ? DISABLE_ALL_SPLIT : DISABLE_ALL_INTER_SPLIT;
} else {
@@ -251,7 +251,7 @@
}
if (speed >= 5) {
- if (VPXMIN(cm->width, cm->height) >= 720) {
+ if (AOMMIN(cm->width, cm->height) >= 720) {
sf->partition_search_breakout_dist_thr = (1 << 25);
} else {
sf->partition_search_breakout_dist_thr = (1 << 23);
@@ -260,7 +260,7 @@
if (speed >= 7) {
sf->encode_breakout_thresh =
- (VPXMIN(cm->width, cm->height) >= 720) ? 800 : 300;
+ (AOMMIN(cm->width, cm->height) >= 720) ? 800 : 300;
}
}
@@ -377,7 +377,7 @@
if (!is_keyframe) {
int i;
- if (content == VPX_CONTENT_SCREEN) {
+ if (content == AOM_CONTENT_SCREEN) {
for (i = 0; i < BLOCK_SIZES; ++i)
sf->intra_y_mode_bsize_mask[i] = INTRA_DC_TM_H_V;
} else {
diff --git a/av1/encoder/temporal_filter.c b/av1/encoder/temporal_filter.c
index 31dda5b..8e89d28 100644
--- a/av1/encoder/temporal_filter.c
+++ b/av1/encoder/temporal_filter.c
@@ -193,7 +193,7 @@
xd->plane[0].pre[0].stride = stride;
step_param = mv_sf->reduce_first_step_size;
- step_param = VPXMIN(step_param, MAX_MVSEARCH_STEPS - 2);
+ step_param = AOMMIN(step_param, MAX_MVSEARCH_STEPS - 2);
// Ignore mv costing by sending NULL pointer instead of cost arrays
av1_hex_search(x, &best_ref_mv1_full, step_param, sadpb, 1,
@@ -257,19 +257,19 @@
for (mb_row = 0; mb_row < mb_rows; mb_row++) {
// Source frames are extended to 16 pixels. This is different than
- // L/A/G reference frames that have a border of 32 (VPXENCBORDERINPIXELS)
+ // L/A/G reference frames that have a border of 32 (AOMENCBORDERINPIXELS)
// A 6/8 tap filter is used for motion search. This requires 2 pixels
// before and 3 pixels after. So the largest Y mv on a border would
- // then be 16 - VPX_INTERP_EXTEND. The UV blocks are half the size of the
+ // then be 16 - AOM_INTERP_EXTEND. The UV blocks are half the size of the
// Y and therefore only extended by 8. The largest mv that a UV block
- // can support is 8 - VPX_INTERP_EXTEND. A UV mv is half of a Y mv.
- // (16 - VPX_INTERP_EXTEND) >> 1 which is greater than
- // 8 - VPX_INTERP_EXTEND.
+ // can support is 8 - AOM_INTERP_EXTEND. A UV mv is half of a Y mv.
+ // (16 - AOM_INTERP_EXTEND) >> 1 which is greater than
+ // 8 - AOM_INTERP_EXTEND.
// To keep the mv in play for both Y and UV planes the max that it
- // can be on a border is therefore 16 - (2*VPX_INTERP_EXTEND+1).
- cpi->td.mb.mv_row_min = -((mb_row * 16) + (17 - 2 * VPX_INTERP_EXTEND));
+ // can be on a border is therefore 16 - (2*AOM_INTERP_EXTEND+1).
+ cpi->td.mb.mv_row_min = -((mb_row * 16) + (17 - 2 * AOM_INTERP_EXTEND));
cpi->td.mb.mv_row_max =
- ((mb_rows - 1 - mb_row) * 16) + (17 - 2 * VPX_INTERP_EXTEND);
+ ((mb_rows - 1 - mb_row) * 16) + (17 - 2 * AOM_INTERP_EXTEND);
for (mb_col = 0; mb_col < mb_cols; mb_col++) {
int i, j, k;
@@ -278,9 +278,9 @@
memset(accumulator, 0, 16 * 16 * 3 * sizeof(accumulator[0]));
memset(count, 0, 16 * 16 * 3 * sizeof(count[0]));
- cpi->td.mb.mv_col_min = -((mb_col * 16) + (17 - 2 * VPX_INTERP_EXTEND));
+ cpi->td.mb.mv_col_min = -((mb_col * 16) + (17 - 2 * AOM_INTERP_EXTEND));
cpi->td.mb.mv_col_max =
- ((mb_cols - 1 - mb_col) * 16) + (17 - 2 * VPX_INTERP_EXTEND);
+ ((mb_cols - 1 - mb_col) * 16) + (17 - 2 * AOM_INTERP_EXTEND);
for (frame = 0; frame < frame_count; frame++) {
const int thresh_low = 10000;
diff --git a/build/make/configure.sh b/build/make/configure.sh
index 0da7cef..b7aa124 100644
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -474,8 +474,8 @@
print_webm_license ${TMP_H} "/*" " */"
cat >> ${TMP_H} << EOF
/* This file automatically generated by configure. Do not edit! */
-#ifndef VPX_CONFIG_H
-#define VPX_CONFIG_H
+#ifndef AOM_CONFIG_H
+#define AOM_CONFIG_H
#define RESTRICT ${RESTRICT}
#define INLINE ${INLINE}
EOF
@@ -483,7 +483,7 @@
print_config_h HAVE "${TMP_H}" ${HAVE_LIST}
print_config_h CONFIG "${TMP_H}" ${CONFIG_LIST}
print_config_vars_h "${TMP_H}" ${VAR_LIST}
- echo "#endif /* VPX_CONFIG_H */" >> ${TMP_H}
+ echo "#endif /* AOM_CONFIG_H */" >> ${TMP_H}
mkdir -p `dirname "$1"`
cmp "$1" ${TMP_H} >/dev/null 2>&1 || mv ${TMP_H} "$1"
}
diff --git a/build/make/iosbuild.sh b/build/make/iosbuild.sh
index bffd62e..9f39a5d 100755
--- a/build/make/iosbuild.sh
+++ b/build/make/iosbuild.sh
@@ -9,10 +9,10 @@
## be found in the AUTHORS file in the root of the source tree.
##
##
-## This script generates 'VPX.framework'. An iOS app can encode and decode VPx
-## video by including 'VPX.framework'.
+## This script generates 'AOM.framework'. An iOS app can encode and decode VPx
+## video by including 'AOM.framework'.
##
-## Run iosbuild.sh to create 'VPX.framework' in the current directory.
+## Run iosbuild.sh to create 'AOM.framework' in the current directory.
##
set -e
devnull='> /dev/null 2>&1'
@@ -23,7 +23,7 @@
--disable-libyuv
--disable-unit-tests"
DIST_DIR="_dist"
-FRAMEWORK_DIR="VPX.framework"
+FRAMEWORK_DIR="AOM.framework"
HEADER_DIR="${FRAMEWORK_DIR}/Headers/aom"
SCRIPT_DIR=$(dirname "$0")
LIBAOM_SOURCE_DIR=$(cd ${SCRIPT_DIR}/../..; pwd)
@@ -100,7 +100,7 @@
local config_file="${HEADER_DIR}/aom_config.h"
local preproc_symbol=""
local target=""
- local include_guard="VPX_FRAMEWORK_HEADERS_VPX_VPX_CONFIG_H_"
+ local include_guard="AOM_FRAMEWORK_HEADERS_AOM_AOM_CONFIG_H_"
local file_header="/*
* Copyright (c) $(date +%Y) The WebM project authors. All Rights Reserved.
@@ -123,8 +123,8 @@
for target in ${targets}; do
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/aom/${target}/aom_config.h\"\n" >> "${config_file}"
+ printf "#define AOM_FRAMEWORK_TARGET \"${target}\"\n" >> "${config_file}"
+ printf "#include \"AOM/aom/${target}/aom_config.h\"\n" >> "${config_file}"
printf "#elif defined" >> "${config_file}"
mkdir "${HEADER_DIR}/${target}"
cp -p "${BUILD_ROOT}/${target}/aom_config.h" "${HEADER_DIR}/${target}"
@@ -138,7 +138,7 @@
}
# Configures and builds each target specified by $1, and then builds
-# VPX.framework.
+# AOM.framework.
build_framework() {
local lib_list=""
local targets="$1"
@@ -167,22 +167,22 @@
cp -p "${target_dist_dir}"/include/aom/* "${HEADER_DIR}"
# Build the fat library.
- ${LIPO} -create ${lib_list} -output ${FRAMEWORK_DIR}/VPX
+ ${LIPO} -create ${lib_list} -output ${FRAMEWORK_DIR}/AOM
# Create the aom_config.h shim that allows usage of aom_config.h from
- # within VPX.framework.
+ # within AOM.framework.
create_aom_framework_config_shim "${targets}"
# Copy in aom_version.h.
cp -p "${BUILD_ROOT}/${target}/aom_version.h" "${HEADER_DIR}"
- vlog "Created fat library ${FRAMEWORK_DIR}/VPX containing:"
+ vlog "Created fat library ${FRAMEWORK_DIR}/AOM containing:"
for lib in ${lib_list}; do
vlog " $(echo ${lib} | awk -F / '{print $2, $NF}')"
done
# TODO(tomfinegan): Verify that expected targets are included within
- # VPX.framework/VPX via lipo -info.
+ # AOM.framework/AOM via lipo -info.
}
# Trap function. Cleans up the subtree used to build all targets contained in
diff --git a/examples/aom_temporal_svc_encoder.c b/examples/aom_temporal_svc_encoder.c
index bac8fb4..7867f9e 100644
--- a/examples/aom_temporal_svc_encoder.c
+++ b/examples/aom_temporal_svc_encoder.c
@@ -45,21 +45,21 @@
// For rate control encoding stats.
struct RateControlMetrics {
// Number of input frames per layer.
- int layer_input_frames[VPX_TS_MAX_LAYERS];
+ int layer_input_frames[AOM_TS_MAX_LAYERS];
// Total (cumulative) number of encoded frames per layer.
- int layer_tot_enc_frames[VPX_TS_MAX_LAYERS];
+ int layer_tot_enc_frames[AOM_TS_MAX_LAYERS];
// Number of encoded non-key frames per layer.
- int layer_enc_frames[VPX_TS_MAX_LAYERS];
+ int layer_enc_frames[AOM_TS_MAX_LAYERS];
// Framerate per layer layer (cumulative).
- double layer_framerate[VPX_TS_MAX_LAYERS];
+ double layer_framerate[AOM_TS_MAX_LAYERS];
// Target average frame size per layer (per-frame-bandwidth per layer).
- double layer_pfb[VPX_TS_MAX_LAYERS];
+ double layer_pfb[AOM_TS_MAX_LAYERS];
// Actual average frame size per layer.
- double layer_avg_frame_size[VPX_TS_MAX_LAYERS];
+ double layer_avg_frame_size[AOM_TS_MAX_LAYERS];
// Average rate mismatch per layer (|target - actual| / target).
- double layer_avg_rate_mismatch[VPX_TS_MAX_LAYERS];
+ double layer_avg_rate_mismatch[AOM_TS_MAX_LAYERS];
// Actual encoding bitrate per layer (cumulative).
- double layer_encoding_bitrate[VPX_TS_MAX_LAYERS];
+ double layer_encoding_bitrate[AOM_TS_MAX_LAYERS];
// Average of the short-time encoder actual bitrate.
// TODO(marpan): Should we add these short-time stats for each layer?
double avg_st_encoding_bitrate;
@@ -69,7 +69,7 @@
int window_size;
// Number of window measurements.
int window_count;
- int layer_target_bitrate[VPX_MAX_LAYERS];
+ int layer_target_bitrate[AOM_MAX_LAYERS];
};
// Note: these rate control metrics assume only 1 key frame in the
@@ -175,7 +175,7 @@
memcpy(cfg->ts_layer_id, ids, sizeof(ids));
// Update L only.
layer_flags[0] =
- VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_UPD_GF | VP8_EFLAG_NO_UPD_ARF;
+ AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_UPD_GF | VP8_EFLAG_NO_UPD_ARF;
break;
}
case 1: {
@@ -189,14 +189,14 @@
memcpy(cfg->ts_layer_id, ids, sizeof(ids));
#if 1
// 0=L, 1=GF, Intra-layer prediction enabled.
- layer_flags[0] = VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_UPD_GF |
+ layer_flags[0] = AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF | VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_REF_ARF;
layer_flags[1] =
VP8_EFLAG_NO_UPD_ARF | VP8_EFLAG_NO_UPD_LAST | VP8_EFLAG_NO_REF_ARF;
#else
// 0=L, 1=GF, Intra-layer prediction disabled.
- layer_flags[0] = VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_UPD_GF |
+ layer_flags[0] = AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF | VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_REF_ARF;
layer_flags[1] = VP8_EFLAG_NO_UPD_ARF | VP8_EFLAG_NO_UPD_LAST |
@@ -214,7 +214,7 @@
cfg->ts_rate_decimator[1] = 1;
memcpy(cfg->ts_layer_id, ids, sizeof(ids));
// 0=L, 1=GF, Intra-layer prediction enabled.
- layer_flags[0] = VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
+ layer_flags[0] = AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_REF_ARF | VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF;
layer_flags[1] = layer_flags[2] =
@@ -233,7 +233,7 @@
cfg->ts_rate_decimator[2] = 1;
memcpy(cfg->ts_layer_id, ids, sizeof(ids));
// 0=L, 1=GF, 2=ARF, Intra-layer prediction enabled.
- layer_flags[0] = VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
+ layer_flags[0] = AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_REF_ARF | VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF;
layer_flags[3] =
@@ -253,7 +253,7 @@
cfg->ts_rate_decimator[2] = 1;
memcpy(cfg->ts_layer_id, ids, sizeof(ids));
// 0=L, 1=GF, 2=ARF, Intra-layer prediction disabled.
- layer_flags[0] = VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
+ layer_flags[0] = AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_REF_ARF | VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF;
layer_flags[2] = VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_REF_ARF |
@@ -275,7 +275,7 @@
memcpy(cfg->ts_layer_id, ids, sizeof(ids));
// 0=L, 1=GF, 2=ARF, Intra-layer prediction enabled in layer 1, disabled
// in layer 2.
- layer_flags[0] = VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
+ layer_flags[0] = AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_REF_ARF | VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF;
layer_flags[2] =
@@ -296,7 +296,7 @@
cfg->ts_rate_decimator[2] = 1;
memcpy(cfg->ts_layer_id, ids, sizeof(ids));
// 0=L, 1=GF, 2=ARF, Intra-layer prediction enabled.
- layer_flags[0] = VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
+ layer_flags[0] = AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_REF_ARF | VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF;
layer_flags[2] =
@@ -318,7 +318,7 @@
cfg->ts_rate_decimator[3] = 2;
cfg->ts_rate_decimator[4] = 1;
memcpy(cfg->ts_layer_id, ids, sizeof(ids));
- layer_flags[0] = VPX_EFLAG_FORCE_KF;
+ layer_flags[0] = AOM_EFLAG_FORCE_KF;
layer_flags[1] = layer_flags[3] = layer_flags[5] = layer_flags[7] =
layer_flags[9] = layer_flags[11] = layer_flags[13] = layer_flags[15] =
VP8_EFLAG_NO_UPD_LAST | VP8_EFLAG_NO_UPD_GF |
@@ -345,7 +345,7 @@
// Layer 0: predict from L and ARF, update L and G.
layer_flags[0] =
- VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_UPD_ARF;
+ AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_UPD_ARF;
// Layer 1: sync point: predict from L and ARF, and update G.
layer_flags[1] =
VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_UPD_LAST | VP8_EFLAG_NO_UPD_ARF;
@@ -376,7 +376,7 @@
cfg->ts_rate_decimator[2] = 1;
memcpy(cfg->ts_layer_id, ids, sizeof(ids));
// 0=L, 1=GF, 2=ARF.
- layer_flags[0] = VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
+ layer_flags[0] = AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_REF_GF |
VP8_EFLAG_NO_REF_ARF | VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF;
layer_flags[1] = VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_REF_ARF |
@@ -409,7 +409,7 @@
// 0=L, 1=GF, 2=ARF.
// Layer 0: predict from L and ARF; update L and G.
layer_flags[0] =
- VPX_EFLAG_FORCE_KF | VP8_EFLAG_NO_UPD_ARF | VP8_EFLAG_NO_REF_GF;
+ AOM_EFLAG_FORCE_KF | VP8_EFLAG_NO_UPD_ARF | VP8_EFLAG_NO_REF_GF;
// Layer 2: sync point: predict from L and ARF; update none.
layer_flags[1] = VP8_EFLAG_NO_REF_GF | VP8_EFLAG_NO_UPD_GF |
VP8_EFLAG_NO_UPD_ARF | VP8_EFLAG_NO_UPD_LAST |
@@ -463,7 +463,7 @@
}
int main(int argc, char **argv) {
- VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = { NULL };
+ VpxVideoWriter *outfile[AOM_TS_MAX_LAYERS] = { NULL };
aom_codec_ctx_t codec;
aom_codec_enc_cfg_t cfg;
int frame_cnt = 0;
@@ -479,9 +479,9 @@
int pts = 0; // PTS starts at 0.
int frame_duration = 1; // 1 timebase tick per frame.
int layering_mode = 0;
- int layer_flags[VPX_TS_MAX_PERIODICITY] = { 0 };
+ int layer_flags[AOM_TS_MAX_PERIODICITY] = { 0 };
int flag_periodicity = 1;
-#if VPX_ENCODER_ABI_VERSION > (4 + VPX_CODEC_ABI_VERSION)
+#if AOM_ENCODER_ABI_VERSION > (4 + AOM_CODEC_ABI_VERSION)
aom_svc_layer_id_t layer_id = { 0, 0 };
#else
aom_svc_layer_id_t layer_id = { 0 };
@@ -492,7 +492,7 @@
int64_t cx_time = 0;
const int min_args_base = 11;
#if CONFIG_AOM_HIGHBITDEPTH
- aom_bit_depth_t bit_depth = VPX_BITS_8;
+ aom_bit_depth_t bit_depth = AOM_BITS_8;
int input_bit_depth = 8;
const int min_args = min_args_base + 1;
#else
@@ -543,26 +543,26 @@
#if CONFIG_AOM_HIGHBITDEPTH
switch (strtol(argv[argc - 1], NULL, 0)) {
case 8:
- bit_depth = VPX_BITS_8;
+ bit_depth = AOM_BITS_8;
input_bit_depth = 8;
break;
case 10:
- bit_depth = VPX_BITS_10;
+ bit_depth = AOM_BITS_10;
input_bit_depth = 10;
break;
case 12:
- bit_depth = VPX_BITS_12;
+ bit_depth = AOM_BITS_12;
input_bit_depth = 12;
break;
default: die("Invalid bit depth (8, 10, 12) %s", argv[argc - 1]);
}
if (!aom_img_alloc(
- &raw, bit_depth == VPX_BITS_8 ? VPX_IMG_FMT_I420 : VPX_IMG_FMT_I42016,
+ &raw, bit_depth == AOM_BITS_8 ? AOM_IMG_FMT_I420 : AOM_IMG_FMT_I42016,
width, height, 32)) {
die("Failed to allocate image", width, height);
}
#else
- if (!aom_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 32)) {
+ if (!aom_img_alloc(&raw, AOM_IMG_FMT_I420, width, height, 32)) {
die("Failed to allocate image", width, height);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
@@ -579,7 +579,7 @@
cfg.g_h = height;
#if CONFIG_AOM_HIGHBITDEPTH
- if (bit_depth != VPX_BITS_8) {
+ if (bit_depth != AOM_BITS_8) {
cfg.g_bit_depth = bit_depth;
cfg.g_input_bit_depth = input_bit_depth;
cfg.g_profile = 2;
@@ -606,7 +606,7 @@
// Real time parameters.
cfg.rc_dropframe_thresh = strtol(argv[9], NULL, 0);
- cfg.rc_end_usage = VPX_CBR;
+ cfg.rc_end_usage = AOM_CBR;
cfg.rc_min_quantizer = 2;
cfg.rc_max_quantizer = 56;
if (strncmp(encoder->name, "vp9", 3) == 0) cfg.rc_max_quantizer = 52;
@@ -625,7 +625,7 @@
// Enable error resilient mode.
cfg.g_error_resilient = 1;
cfg.g_lag_in_frames = 0;
- cfg.kf_mode = VPX_KF_AUTO;
+ cfg.kf_mode = AOM_KF_AUTO;
// Disable automatic keyframe placement.
cfg.kf_min_dist = cfg.kf_max_dist = 3000;
@@ -670,7 +670,7 @@
#if CONFIG_AOM_HIGHBITDEPTH
if (aom_codec_enc_init(
&codec, encoder->codec_interface(), &cfg,
- bit_depth == VPX_BITS_8 ? 0 : VPX_CODEC_USE_HIGHBITDEPTH))
+ bit_depth == AOM_BITS_8 ? 0 : AOM_CODEC_USE_HIGHBITDEPTH))
#else
if (aom_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
#endif // CONFIG_AOM_HIGHBITDEPTH
@@ -717,7 +717,7 @@
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)
+#if AOM_ENCODER_ABI_VERSION > (4 + AOM_CODEC_ABI_VERSION)
// Update the temporal layer_id. No spatial layers in this test.
layer_id.spatial_layer_id = 0;
#endif
@@ -735,20 +735,20 @@
if (frame_avail) ++rc.layer_input_frames[layer_id.temporal_layer_id];
aom_usec_timer_start(&timer);
if (aom_codec_encode(&codec, frame_avail ? &raw : NULL, pts, 1, flags,
- VPX_DL_REALTIME)) {
+ AOM_DL_REALTIME)) {
die_codec(&codec, "Failed to encode frame");
}
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;
+ layer_flags[0] &= ~AOM_EFLAG_FORCE_KF;
}
got_data = 0;
while ((pkt = aom_codec_get_cx_data(&codec, &iter))) {
got_data = 1;
switch (pkt->kind) {
- case VPX_CODEC_CX_FRAME_PKT:
+ case AOM_CODEC_CX_FRAME_PKT:
for (i = cfg.ts_layer_id[frame_cnt % cfg.ts_periodicity];
i < cfg.ts_number_layers; ++i) {
aom_video_writer_write_frame(outfile[i], pkt->data.frame.buf,
@@ -757,7 +757,7 @@
rc.layer_encoding_bitrate[i] += 8.0 * pkt->data.frame.sz;
// Keep count of rate control stats per layer (for non-key frames).
if (i == cfg.ts_layer_id[frame_cnt % cfg.ts_periodicity] &&
- !(pkt->data.frame.flags & VPX_FRAME_IS_KEY)) {
+ !(pkt->data.frame.flags & AOM_FRAME_IS_KEY)) {
rc.layer_avg_frame_size[i] += 8.0 * pkt->data.frame.sz;
rc.layer_avg_rate_mismatch[i] +=
fabs(8.0 * pkt->data.frame.sz - rc.layer_pfb[i]) /
diff --git a/examples/set_maps.c b/examples/set_maps.c
index bedef03..e436be8 100644
--- a/examples/set_maps.c
+++ b/examples/set_maps.c
@@ -129,14 +129,14 @@
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");
+ aom_codec_encode(codec, img, frame_index, 1, 0, AOM_DL_GOOD_QUALITY);
+ if (res != AOM_CODEC_OK) die_codec(codec, "Failed to encode frame");
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 (pkt->kind == AOM_CODEC_CX_FRAME_PKT) {
+ const int keyframe = (pkt->data.frame.flags & AOM_FRAME_IS_KEY) != 0;
if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf,
pkt->data.frame.sz,
pkt->data.frame.pts)) {
@@ -185,7 +185,7 @@
die("Invalid frame size: %dx%d", info.frame_width, info.frame_height);
}
- if (!aom_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width,
+ if (!aom_img_alloc(&raw, AOM_IMG_FMT_I420, info.frame_width,
info.frame_height, 1)) {
die("Failed to allocate image.");
}
diff --git a/examples/simple_encoder.c b/examples/simple_encoder.c
index 339816f..7f9d226 100644
--- a/examples/simple_encoder.c
+++ b/examples/simple_encoder.c
@@ -61,21 +61,21 @@
// is passed, indicating the End-Of-Stream condition to the encoder. The
// `frame_cnt` is reused as the presentation time stamp (PTS) and each
// frame is shown for one frame-time in duration. The flags parameter is
-// unused in this example. The deadline is set to VPX_DL_REALTIME to
+// unused in this example. The deadline is set to AOM_DL_REALTIME to
// make the example run as quickly as possible.
// Forced Keyframes
// ----------------
-// Keyframes can be forced by setting the VPX_EFLAG_FORCE_KF bit of the
+// Keyframes can be forced by setting the AOM_EFLAG_FORCE_KF bit of the
// 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
+// AOM_EFLAG_FORCE_KF flag because of automatic keyframe placement by the
// encoder.
//
// Processing The Encoded Data
// ---------------------------
-// Each packet of type `VPX_CODEC_CX_FRAME_PKT` contains the encoded data
+// Each packet of type `AOM_CODEC_CX_FRAME_PKT` contains the encoded data
// for this frame. We write a IVF frame header, followed by the raw data.
//
// Cleanup
@@ -122,14 +122,14 @@
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");
+ aom_codec_encode(codec, img, frame_index, 1, flags, AOM_DL_GOOD_QUALITY);
+ if (res != AOM_CODEC_OK) die_codec(codec, "Failed to encode frame");
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 (pkt->kind == AOM_CODEC_CX_FRAME_PKT) {
+ const int keyframe = (pkt->data.frame.flags & AOM_FRAME_IS_KEY) != 0;
if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf,
pkt->data.frame.sz,
pkt->data.frame.pts)) {
@@ -191,7 +191,7 @@
die("Invalid frame size: %dx%d", info.frame_width, info.frame_height);
}
- if (!aom_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width,
+ if (!aom_img_alloc(&raw, AOM_IMG_FMT_I420, info.frame_width,
info.frame_height, 1)) {
die("Failed to allocate image.");
}
@@ -224,7 +224,7 @@
while (aom_img_read(&raw, infile)) {
int flags = 0;
if (keyframe_interval > 0 && frame_count % keyframe_interval == 0)
- flags |= VPX_EFLAG_FORCE_KF;
+ flags |= AOM_EFLAG_FORCE_KF;
encode_frame(&codec, &raw, frame_count++, flags, writer);
}
diff --git a/examples/twopass_encoder.c b/examples/twopass_encoder.c
index e8acc88..f680917 100644
--- a/examples/twopass_encoder.c
+++ b/examples/twopass_encoder.c
@@ -30,11 +30,11 @@
// ----------------
// Encoding a frame in two pass mode is identical to the simple encoder
// example. To increase the quality while sacrificing encoding speed,
-// VPX_DL_BEST_QUALITY can be used in place of VPX_DL_GOOD_QUALITY.
+// AOM_DL_BEST_QUALITY can be used in place of AOM_DL_GOOD_QUALITY.
//
// Processing Statistics Packets
// -----------------------------
-// Each packet of type `VPX_CODEC_CX_FRAME_PKT` contains the encoded data
+// Each packet of type `AOM_CODEC_CX_FRAME_PKT` contains the encoded data
// for this frame. We write a IVF frame header, followed by the raw data.
//
//
@@ -74,12 +74,12 @@
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.");
+ if (res != AOM_CODEC_OK) die_codec(ctx, "Failed to get frame stats.");
while ((pkt = aom_codec_get_cx_data(ctx, &iter)) != NULL) {
got_pkts = 1;
- if (pkt->kind == VPX_CODEC_STATS_PKT) {
+ if (pkt->kind == AOM_CODEC_STATS_PKT) {
const uint8_t *const pkt_buf = pkt->data.twopass_stats.buf;
const size_t pkt_size = pkt->data.twopass_stats.sz;
stats->buf = realloc(stats->buf, stats->sz + pkt_size);
@@ -100,12 +100,12 @@
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.");
+ if (res != AOM_CODEC_OK) die_codec(ctx, "Failed to encode frame.");
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 (pkt->kind == AOM_CODEC_CX_FRAME_PKT) {
+ const int keyframe = (pkt->data.frame.flags & AOM_FRAME_IS_KEY) != 0;
if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf,
pkt->data.frame.sz,
@@ -132,12 +132,12 @@
// Calculate frame statistics.
while (aom_img_read(raw, infile)) {
++frame_count;
- get_frame_stats(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY,
+ get_frame_stats(&codec, raw, frame_count, 1, 0, AOM_DL_GOOD_QUALITY,
&stats);
}
// Flush encoder.
- while (get_frame_stats(&codec, NULL, frame_count, 1, 0, VPX_DL_GOOD_QUALITY,
+ while (get_frame_stats(&codec, NULL, frame_count, 1, 0, AOM_DL_GOOD_QUALITY,
&stats)) {
}
@@ -166,11 +166,11 @@
// Encode frames.
while (aom_img_read(raw, infile)) {
++frame_count;
- encode_frame(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY, writer);
+ encode_frame(&codec, raw, frame_count, 1, 0, AOM_DL_GOOD_QUALITY, writer);
}
// Flush encoder.
- while (encode_frame(&codec, NULL, -1, 1, 0, VPX_DL_GOOD_QUALITY, writer)) {
+ while (encode_frame(&codec, NULL, -1, 1, 0, AOM_DL_GOOD_QUALITY, writer)) {
}
printf("\n");
@@ -212,7 +212,7 @@
if (w <= 0 || h <= 0 || (w % 2) != 0 || (h % 2) != 0)
die("Invalid frame size: %dx%d", w, h);
- if (!aom_img_alloc(&raw, VPX_IMG_FMT_I420, w, h, 1))
+ if (!aom_img_alloc(&raw, AOM_IMG_FMT_I420, w, h, 1))
die("Failed to allocate image", w, h);
printf("Using %s\n", aom_codec_iface_name(encoder->codec_interface()));
@@ -231,12 +231,12 @@
die("Failed to open %s for reading", infile_arg);
// Pass 0
- cfg.g_pass = VPX_RC_FIRST_PASS;
+ cfg.g_pass = AOM_RC_FIRST_PASS;
stats = pass0(&raw, infile, encoder, &cfg);
// Pass 1
rewind(infile);
- cfg.g_pass = VPX_RC_LAST_PASS;
+ cfg.g_pass = AOM_RC_LAST_PASS;
cfg.rc_twopass_stats_in = stats;
pass1(&raw, infile, outfile_arg, encoder, &cfg);
free(stats.buf);
diff --git a/solution.mk b/solution.mk
index 22c47df..24c9abe 100644
--- a/solution.mk
+++ b/solution.mk
@@ -9,14 +9,14 @@
##
# libaom reverse dependencies (targets that depend on libaom)
-VPX_NONDEPS=$(addsuffix .$(VCPROJ_SFX),aom gtest)
-VPX_RDEPS=$(foreach vcp,\
- $(filter-out $(VPX_NONDEPS),$^), --dep=$(vcp:.$(VCPROJ_SFX)=):aom)
+AOM_NONDEPS=$(addsuffix .$(VCPROJ_SFX),aom gtest)
+AOM_RDEPS=$(foreach vcp,\
+ $(filter-out $(AOM_NONDEPS),$^), --dep=$(vcp:.$(VCPROJ_SFX)=):aom)
aom.sln: $(wildcard *.$(VCPROJ_SFX))
@echo " [CREATE] $@"
$(SRC_PATH_BARE)/build/make/gen_msvs_sln.sh \
- $(if $(filter aom.$(VCPROJ_SFX),$^),$(VPX_RDEPS)) \
+ $(if $(filter aom.$(VCPROJ_SFX),$^),$(AOM_RDEPS)) \
--dep=test_libaom:gtest \
--ver=$(CONFIG_VS_VERSION)\
--out=$@ $^
diff --git a/test/active_map_refresh_test.cc b/test/active_map_refresh_test.cc
index f53ffc8..5b4e690 100644
--- a/test/active_map_refresh_test.cc
+++ b/test/active_map_refresh_test.cc
@@ -109,8 +109,8 @@
cfg_.rc_resize_allowed = 0;
cfg_.rc_min_quantizer = 8;
cfg_.rc_max_quantizer = 30;
- cfg_.g_pass = VPX_RC_ONE_PASS;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.g_pass = AOM_RC_ONE_PASS;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.kf_max_dist = 90000;
::libaom_test::Y4mVideoSource video("desktop_credits.y4m", 0, 30);
diff --git a/test/active_map_test.cc b/test/active_map_test.cc
index d371f3d..026d690 100644
--- a/test/active_map_test.cc
+++ b/test/active_map_test.cc
@@ -69,8 +69,8 @@
cfg_.g_lag_in_frames = 0;
cfg_.rc_target_bitrate = 400;
cfg_.rc_resize_allowed = 0;
- cfg_.g_pass = VPX_RC_ONE_PASS;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.g_pass = AOM_RC_ONE_PASS;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.kf_max_dist = 90000;
::libaom_test::I420VideoSource video("hantro_odd.yuv", kWidth, kHeight, 30, 1,
diff --git a/test/aom_temporal_svc_encoder.sh b/test/aom_temporal_svc_encoder.sh
index ad6686a..c36da87 100755
--- a/test/aom_temporal_svc_encoder.sh
+++ b/test/aom_temporal_svc_encoder.sh
@@ -32,10 +32,10 @@
# aom_temporal_svc_encoder.
aom_tsvc_encoder() {
local encoder="${LIBAOM_BIN_PATH}/aom_temporal_svc_encoder"
- encoder="${encoder}${VPX_TEST_EXE_SUFFIX}"
+ encoder="${encoder}${AOM_TEST_EXE_SUFFIX}"
local codec="$1"
local output_file_base="$2"
- local output_file="${VPX_TEST_OUTPUT_DIR}/${output_file_base}"
+ local output_file="${AOM_TEST_OUTPUT_DIR}/${output_file_base}"
local timebase_num="1"
local timebase_den="1000"
local speed="6"
@@ -48,7 +48,7 @@
return 1
fi
- eval "${VPX_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT}" "${output_file}" \
+ eval "${AOM_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT}" "${output_file}" \
"${codec}" "${YUV_RAW_INPUT_WIDTH}" "${YUV_RAW_INPUT_HEIGHT}" \
"${timebase_num}" "${timebase_den}" "${speed}" "${frame_drop_thresh}" \
"$@" \
@@ -61,7 +61,7 @@
# 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() {
- local file_name="${VPX_TEST_OUTPUT_DIR}/$1"
+ local file_name="${AOM_TEST_OUTPUT_DIR}/$1"
local num_files="$(($2 - 1))"
for stream_num in $(seq 0 ${num_files}); do
[ -e "${file_name}_${stream_num}.ivf" ] || return 1
diff --git a/test/aomdec.sh b/test/aomdec.sh
index e23adff..c9b5292 100755
--- a/test/aomdec.sh
+++ b/test/aomdec.sh
@@ -36,7 +36,7 @@
local readonly decoder="$(aom_tool_path aomdec)"
local readonly input="$1"
shift
- cat "${input}" | eval "${VPX_TEST_PREFIX}" "${decoder}" - "$@" ${devnull}
+ cat "${input}" | eval "${AOM_TEST_PREFIX}" "${decoder}" - "$@" ${devnull}
}
# Wrapper function for running aomdec. Requires that LIBAOM_BIN_PATH points to
@@ -46,7 +46,7 @@
local readonly decoder="$(aom_tool_path aomdec)"
local readonly input="$1"
shift
- eval "${VPX_TEST_PREFIX}" "${decoder}" "$input" "$@" ${devnull}
+ eval "${AOM_TEST_PREFIX}" "${decoder}" "$input" "$@" ${devnull}
}
aomdec_can_decode_vp8() {
@@ -97,7 +97,7 @@
[ "$(webm_io_available)" = "yes" ]; then
local readonly decoder="$(aom_tool_path aomdec)"
local readonly expected=10
- local readonly num_frames=$(${VPX_TEST_PREFIX} "${decoder}" \
+ local readonly num_frames=$(${AOM_TEST_PREFIX} "${decoder}" \
"${VP9_LT_50_FRAMES_WEBM_FILE}" --summary --noblit 2>&1 \
| awk '/^[0-9]+ decoded frames/ { print $1 }')
if [ "$num_frames" -ne "$expected" ]; then
diff --git a/test/aomenc.sh b/test/aomenc.sh
index 1d907a6..3b5a8d8 100755
--- a/test/aomenc.sh
+++ b/test/aomenc.sh
@@ -98,7 +98,7 @@
local readonly encoder="$(aom_tool_path aomenc)"
local readonly input="$1"
shift
- cat "${input}" | eval "${VPX_TEST_PREFIX}" "${encoder}" - \
+ cat "${input}" | eval "${AOM_TEST_PREFIX}" "${encoder}" - \
--test-decode=fatal \
"$@" ${devnull}
}
@@ -110,14 +110,14 @@
local readonly encoder="$(aom_tool_path aomenc)"
local readonly input="$1"
shift
- eval "${VPX_TEST_PREFIX}" "${encoder}" "${input}" \
+ eval "${AOM_TEST_PREFIX}" "${encoder}" "${input}" \
--test-decode=fatal \
"$@" ${devnull}
}
aomenc_vp8_ivf() {
if [ "$(aomenc_can_encode_vp8)" = "yes" ]; then
- local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8.ivf"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp8.ivf"
aomenc $(yuv_input_hantro_collage) \
--codec=vp8 \
--limit="${TEST_FRAMES}" \
@@ -134,7 +134,7 @@
aomenc_vp8_webm() {
if [ "$(aomenc_can_encode_vp8)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
- local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8.webm"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp8.webm"
aomenc $(yuv_input_hantro_collage) \
--codec=vp8 \
--limit="${TEST_FRAMES}" \
@@ -150,7 +150,7 @@
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"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp8_rt.webm"
aomenc $(yuv_input_hantro_collage) \
$(aomenc_rt_params vp8) \
--output="${output}"
@@ -164,7 +164,7 @@
aomenc_vp8_webm_2pass() {
if [ "$(aomenc_can_encode_vp8)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
- local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8.webm"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp8.webm"
aomenc $(yuv_input_hantro_collage) \
--codec=vp8 \
--limit="${TEST_FRAMES}" \
@@ -183,7 +183,7 @@
[ "$(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"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp8_lag10_frames20.webm"
aomenc $(yuv_input_hantro_collage) \
--codec=vp8 \
--limit="${lag_total_frames}" \
@@ -201,7 +201,7 @@
aomenc_vp8_ivf_piped_input() {
if [ "$(aomenc_can_encode_vp8)" = "yes" ]; then
- local readonly output="${VPX_TEST_OUTPUT_DIR}/vp8_piped_input.ivf"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp8_piped_input.ivf"
aomenc_pipe $(yuv_input_hantro_collage) \
--codec=vp8 \
--limit="${TEST_FRAMES}" \
@@ -217,7 +217,7 @@
aomenc_vp9_ivf() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then
- local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.ivf"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9.ivf"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--limit="${TEST_FRAMES}" \
@@ -234,7 +234,7 @@
aomenc_vp9_webm() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
- local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.webm"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9.webm"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--limit="${TEST_FRAMES}" \
@@ -250,7 +250,7 @@
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"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_rt.webm"
aomenc $(yuv_input_hantro_collage) \
$(aomenc_rt_params vp9) \
--output="${output}"
@@ -265,7 +265,7 @@
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 output="${AOM_TEST_OUTPUT_DIR}/vp9_rt_multithread_tiled.webm"
local readonly tilethread_min=2
local readonly tilethread_max=4
local readonly num_threads="$(seq ${tilethread_min} ${tilethread_max})"
@@ -293,7 +293,7 @@
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 output="${AOM_TEST_OUTPUT_DIR}/vp9_rt_mt_t_fp.webm"
local readonly tilethread_min=2
local readonly tilethread_max=4
local readonly num_threads="$(seq ${tilethread_min} ${tilethread_max})"
@@ -322,7 +322,7 @@
aomenc_vp9_webm_2pass() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
- local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9.webm"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9.webm"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--limit="${TEST_FRAMES}" \
@@ -338,7 +338,7 @@
aomenc_vp9_ivf_lossless() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then
- local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_lossless.ivf"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_lossless.ivf"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--limit="${TEST_FRAMES}" \
@@ -355,7 +355,7 @@
aomenc_vp9_ivf_minq0_maxq0() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then
- local readonly output="${VPX_TEST_OUTPUT_DIR}/vp9_lossless_minq0_maxq0.ivf"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_lossless_minq0_maxq0.ivf"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--limit="${TEST_FRAMES}" \
@@ -376,7 +376,7 @@
[ "$(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"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_lag10_frames20.webm"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--limit="${lag_total_frames}" \
@@ -396,7 +396,7 @@
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"
+ local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_non_square_par.webm"
aomenc $(y4m_input_non_square_par) \
--codec=vp9 \
--limit="${TEST_FRAMES}" \
diff --git a/test/aq_segment_test.cc b/test/aq_segment_test.cc
index 25863aa..b7748d4 100644
--- a/test/aq_segment_test.cc
+++ b/test/aq_segment_test.cc
@@ -47,7 +47,7 @@
TEST_P(AqSegmentTest, TestNoMisMatchAQ1) {
cfg_.rc_min_quantizer = 8;
cfg_.rc_max_quantizer = 56;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_lag_in_frames = 0;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
@@ -67,7 +67,7 @@
TEST_P(AqSegmentTest, TestNoMisMatchAQ2) {
cfg_.rc_min_quantizer = 8;
cfg_.rc_max_quantizer = 56;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_lag_in_frames = 0;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
@@ -87,7 +87,7 @@
TEST_P(AqSegmentTest, TestNoMisMatchAQ3) {
cfg_.rc_min_quantizer = 8;
cfg_.rc_max_quantizer = 56;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_lag_in_frames = 0;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
diff --git a/test/arf_freq_test.cc b/test/arf_freq_test.cc
index 90d0d09..ab198e6 100644
--- a/test/arf_freq_test.cc
+++ b/test/arf_freq_test.cc
@@ -44,11 +44,11 @@
const TestVideoParam kTestVectors[] = {
// artificially increase framerate to trigger default check
- { "hantro_collage_w352h288.yuv", 352, 288, 5000, 1, 8, VPX_IMG_FMT_I420,
- VPX_BITS_8, 0 },
- { "hantro_collage_w352h288.yuv", 352, 288, 30, 1, 8, VPX_IMG_FMT_I420,
- VPX_BITS_8, 0 },
- { "rush_hour_444.y4m", 352, 288, 30, 1, 8, VPX_IMG_FMT_I444, VPX_BITS_8, 1 },
+ { "hantro_collage_w352h288.yuv", 352, 288, 5000, 1, 8, AOM_IMG_FMT_I420,
+ AOM_BITS_8, 0 },
+ { "hantro_collage_w352h288.yuv", 352, 288, 30, 1, 8, AOM_IMG_FMT_I420,
+ AOM_BITS_8, 0 },
+ { "rush_hour_444.y4m", 352, 288, 30, 1, 8, AOM_IMG_FMT_I444, AOM_BITS_8, 1 },
#if CONFIG_AOM_HIGHBITDEPTH
// Add list of profile 2/3 test videos here ...
#endif // CONFIG_AOM_HIGHBITDEPTH
@@ -90,10 +90,10 @@
SetMode(test_encode_param_.mode);
if (test_encode_param_.mode != ::libaom_test::kRealTime) {
cfg_.g_lag_in_frames = 25;
- cfg_.rc_end_usage = VPX_VBR;
+ cfg_.rc_end_usage = AOM_VBR;
} else {
cfg_.g_lag_in_frames = 0;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.rc_buf_sz = 1000;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 600;
@@ -124,7 +124,7 @@
}
virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) {
- if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) return;
+ if (pkt->kind != AOM_CODEC_CX_FRAME_PKT) return;
const int frames = GetNumFramesInPkt(pkt);
if (frames == 1) {
run_of_visible_frames_++;
@@ -185,8 +185,8 @@
cfg_.g_profile = test_video_param_.profile;
cfg_.g_input_bit_depth = test_video_param_.input_bit_depth;
cfg_.g_bit_depth = test_video_param_.bit_depth;
- init_flags_ = VPX_CODEC_USE_PSNR;
- if (cfg_.g_bit_depth > 8) init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH;
+ init_flags_ = AOM_CODEC_USE_PSNR;
+ if (cfg_.g_bit_depth > 8) init_flags_ |= AOM_CODEC_USE_HIGHBITDEPTH;
libaom_test::VideoSource *video;
if (is_extension_y4m(test_video_param_.filename)) {
diff --git a/test/borders_test.cc b/test/borders_test.cc
index 95c87fb..cc8a3e9 100644
--- a/test/borders_test.cc
+++ b/test/borders_test.cc
@@ -41,7 +41,7 @@
}
virtual void FramePktHook(const aom_codec_cx_pkt_t *pkt) {
- if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) {
+ if (pkt->data.frame.flags & AOM_FRAME_IS_KEY) {
}
}
};
diff --git a/test/codec_factory.h b/test/codec_factory.h
index 3306ce7..3c1d0c3 100644
--- a/test/codec_factory.h
+++ b/test/codec_factory.h
@@ -143,7 +143,7 @@
#if CONFIG_AV1_ENCODER
return aom_codec_enc_config_default(&aom_codec_av1_cx_algo, cfg, usage);
#else
- return VPX_CODEC_INCAPABLE;
+ return AOM_CODEC_INCAPABLE;
#endif
}
};
diff --git a/test/cpu_speed_test.cc b/test/cpu_speed_test.cc
index 71bb452..a7d2459 100644
--- a/test/cpu_speed_test.cc
+++ b/test/cpu_speed_test.cc
@@ -32,10 +32,10 @@
SetMode(encoding_mode_);
if (encoding_mode_ != ::libaom_test::kRealTime) {
cfg_.g_lag_in_frames = 25;
- cfg_.rc_end_usage = VPX_VBR;
+ cfg_.rc_end_usage = AOM_VBR;
} else {
cfg_.g_lag_in_frames = 0;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
}
}
@@ -77,7 +77,7 @@
::libaom_test::I420VideoSource video("hantro_odd.yuv", 208, 144, 30, 1, 0,
20);
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
EXPECT_GE(min_psnr_, kMaxPSNR);
@@ -92,7 +92,7 @@
cfg_.rc_max_quantizer = 0;
cfg_.rc_min_quantizer = 0;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
EXPECT_GE(min_psnr_, kMaxPSNR);
diff --git a/test/datarate_test.cc b/test/datarate_test.cc
index 7e1cbba..a8ee800 100644
--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -84,7 +84,7 @@
* show one. As noted in comment below (issue 495), this does not currently
* apply to key frames. For now exclude key frames in condition below. */
const bool key_frame =
- (pkt->data.frame.flags & VPX_FRAME_IS_KEY) ? true : false;
+ (pkt->data.frame.flags & AOM_FRAME_IS_KEY) ? true : false;
if (!key_frame) {
ASSERT_GE(bits_in_buffer_model_, 0) << "Buffer Underrun at frame "
<< pkt->data.frame.pts;
@@ -147,7 +147,7 @@
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_max_quantizer = 56;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 140);
for (int j = 1; j < 5; ++j) {
@@ -176,7 +176,7 @@
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_max_quantizer = 56;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 299);
cfg_.rc_target_bitrate = 300;
@@ -199,7 +199,7 @@
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_max_quantizer = 56;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
// 2 pass cbr datarate control has a bug hidden by the small # of
// frames selected in this encode. The problem is that even if the buffer is
// negative we produce a keyframe on a cutscene. Ignoring datarate
@@ -230,9 +230,9 @@
denoiser_on_ = 0;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_max_quantizer = 36;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.rc_target_bitrate = 200;
- cfg_.kf_mode = VPX_KF_DISABLED;
+ cfg_.kf_mode = AOM_KF_DISABLED;
const int frame_count = 40;
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
@@ -455,7 +455,7 @@
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 63;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_lag_in_frames = 0;
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
@@ -484,7 +484,7 @@
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 63;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
for (int i = 250; i < 900; i += 200) {
cfg_.rc_target_bitrate = i;
@@ -513,7 +513,7 @@
cfg_.rc_dropframe_thresh = 10;
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 50;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.rc_target_bitrate = 200;
cfg_.g_lag_in_frames = 0;
@@ -553,7 +553,7 @@
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 63;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_lag_in_frames = 0;
// 2 Temporal layers, no spatial layers: Framerate decimation (2, 1).
@@ -564,7 +564,7 @@
cfg_.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
- if (deadline_ == VPX_DL_REALTIME)
+ if (deadline_ == AOM_DL_REALTIME)
cfg_.g_error_resilient = 1;
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
@@ -595,7 +595,7 @@
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 63;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_lag_in_frames = 0;
// 3 Temporal layers, no spatial layers: Framerate decimation (4, 2, 1).
@@ -643,7 +643,7 @@
cfg_.rc_dropframe_thresh = 20;
cfg_.rc_max_quantizer = 45;
cfg_.rc_min_quantizer = 0;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_lag_in_frames = 0;
// 3 Temporal layers, no spatial layers: Framerate decimation (4, 2, 1).
@@ -708,7 +708,7 @@
::libaom_test::Encoder *encoder) {
if (video->frame() == 0) {
int i;
- for (i = 0; i < VPX_MAX_LAYERS; ++i) {
+ for (i = 0; i < AOM_MAX_LAYERS; ++i) {
svc_params_.max_quantizers[i] = 63;
svc_params_.min_quantizers[i] = 0;
}
@@ -733,7 +733,7 @@
bits_in_buffer_model_ += static_cast<int64_t>(
duration * timebase_ * cfg_.rc_target_bitrate * 1000);
const bool key_frame =
- (pkt->data.frame.flags & VPX_FRAME_IS_KEY) ? true : false;
+ (pkt->data.frame.flags & AOM_FRAME_IS_KEY) ? true : false;
if (!key_frame) {
ASSERT_GE(bits_in_buffer_model_, 0) << "Buffer Underrun at frame "
<< pkt->data.frame.pts;
@@ -786,7 +786,7 @@
unsigned int total_rate) {
int sl, spatial_layer_target;
float total = 0;
- float alloc_ratio[VPX_MAX_LAYERS] = { 0 };
+ float alloc_ratio[AOM_MAX_LAYERS] = { 0 };
for (sl = 0; sl < spatial_layers; ++sl) {
if (svc_params->scaling_factor_den[sl] > 0) {
alloc_ratio[sl] = (float)(svc_params->scaling_factor_num[sl] * 1.0 /
@@ -818,7 +818,7 @@
cfg_.rc_buf_sz = 1000;
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 63;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_lag_in_frames = 0;
cfg_.ss_number_layers = 2;
cfg_.ts_number_layers = 3;
@@ -862,7 +862,7 @@
cfg_.rc_buf_sz = 1000;
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 63;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_lag_in_frames = 0;
cfg_.ss_number_layers = 2;
cfg_.ts_number_layers = 3;
diff --git a/test/dct16x16_test.cc b/test/dct16x16_test.cc
index 0feb80f..5983bc2 100644
--- a/test/dct16x16_test.cc
+++ b/test/dct16x16_test.cc
@@ -341,7 +341,7 @@
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < kNumCoeffs; ++j) {
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
test_input_block[j] = src[j] - dst[j];
@@ -356,7 +356,7 @@
ASM_REGISTER_STATE_CHECK(
RunFwdTxfm(test_input_block, test_temp_block, pitch_));
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_AOM_HIGHBITDEPTH
} else {
@@ -368,7 +368,7 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const uint32_t diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const uint32_t diff = dst[j] - src[j];
#endif
@@ -474,7 +474,7 @@
output_ref_block[0] = (output_ref_block[0] / dc_thred) * dc_thred;
for (int j = 1; j < kNumCoeffs; ++j)
output_ref_block[j] = (output_ref_block[j] / ac_thred) * ac_thred;
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
inv_txfm_ref(output_ref_block, ref, pitch_, tx_type_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(output_ref_block, dst, pitch_));
#if CONFIG_AOM_HIGHBITDEPTH
@@ -485,7 +485,7 @@
RunInvTxfm(output_ref_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
#endif
}
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
for (int j = 0; j < kNumCoeffs; ++j) EXPECT_EQ(ref[j], dst[j]);
#if CONFIG_AOM_HIGHBITDEPTH
} else {
@@ -512,7 +512,7 @@
// Initialize a test block with input range [-255, 255].
for (int j = 0; j < kNumCoeffs; ++j) {
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
in[j] = src[j] - dst[j];
@@ -529,7 +529,7 @@
for (int j = 0; j < kNumCoeffs; ++j)
coeff[j] = static_cast<tran_low_t>(round(out_r[j]));
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, 16));
#if CONFIG_AOM_HIGHBITDEPTH
} else {
@@ -541,7 +541,7 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const uint32_t diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const uint32_t diff = dst[j] - src[j];
#endif // CONFIG_AOM_HIGHBITDEPTH
@@ -573,7 +573,7 @@
} else {
coeff[scan[j]] = 0;
}
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
dst[j] = 0;
ref[j] = 0;
#if CONFIG_AOM_HIGHBITDEPTH
@@ -583,7 +583,7 @@
#endif // CONFIG_AOM_HIGHBITDEPTH
}
}
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ref_txfm(coeff, ref, pitch_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
} else {
@@ -597,7 +597,7 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const uint32_t diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
#else
const uint32_t diff = dst[j] - ref[j];
#endif // CONFIG_AOM_HIGHBITDEPTH
@@ -632,8 +632,8 @@
mask_ = (1 << bit_depth_) - 1;
#if CONFIG_AOM_HIGHBITDEPTH
switch (bit_depth_) {
- case VPX_BITS_10: inv_txfm_ref = idct16x16_10_ref; break;
- case VPX_BITS_12: inv_txfm_ref = idct16x16_12_ref; break;
+ case AOM_BITS_10: inv_txfm_ref = idct16x16_10_ref; break;
+ case AOM_BITS_12: inv_txfm_ref = idct16x16_12_ref; break;
default: inv_txfm_ref = idct16x16_ref; break;
}
#else
@@ -684,8 +684,8 @@
mask_ = (1 << bit_depth_) - 1;
#if CONFIG_AOM_HIGHBITDEPTH
switch (bit_depth_) {
- case VPX_BITS_10: inv_txfm_ref = iht16x16_10; break;
- case VPX_BITS_12: inv_txfm_ref = iht16x16_12; break;
+ case AOM_BITS_10: inv_txfm_ref = iht16x16_10; break;
+ case AOM_BITS_12: inv_txfm_ref = iht16x16_12; break;
default: inv_txfm_ref = iht16x16_ref; break;
}
#else
@@ -754,116 +754,116 @@
INSTANTIATE_TEST_CASE_P(
C, Trans16x16DCT,
::testing::Values(
- 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)));
+ make_tuple(&aom_highbd_fdct16x16_c, &idct16x16_10, 0, AOM_BITS_10),
+ make_tuple(&aom_highbd_fdct16x16_c, &idct16x16_12, 0, AOM_BITS_12),
+ make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, 0, AOM_BITS_8)));
#else
INSTANTIATE_TEST_CASE_P(C, Trans16x16DCT,
::testing::Values(make_tuple(&aom_fdct16x16_c,
&aom_idct16x16_256_add_c,
- 0, VPX_BITS_8)));
+ 0, AOM_BITS_8)));
#endif // CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_AOM_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans16x16HT,
::testing::Values(
- make_tuple(&av1_highbd_fht16x16_c, &iht16x16_10, 0, VPX_BITS_10),
- make_tuple(&av1_highbd_fht16x16_c, &iht16x16_10, 1, VPX_BITS_10),
- make_tuple(&av1_highbd_fht16x16_c, &iht16x16_10, 2, VPX_BITS_10),
- make_tuple(&av1_highbd_fht16x16_c, &iht16x16_10, 3, VPX_BITS_10),
- make_tuple(&av1_highbd_fht16x16_c, &iht16x16_12, 0, VPX_BITS_12),
- make_tuple(&av1_highbd_fht16x16_c, &iht16x16_12, 1, VPX_BITS_12),
- make_tuple(&av1_highbd_fht16x16_c, &iht16x16_12, 2, VPX_BITS_12),
- make_tuple(&av1_highbd_fht16x16_c, &iht16x16_12, 3, VPX_BITS_12),
- make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 0, VPX_BITS_8),
- make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 1, VPX_BITS_8),
- make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 2, VPX_BITS_8),
- make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 3, VPX_BITS_8)));
+ make_tuple(&av1_highbd_fht16x16_c, &iht16x16_10, 0, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht16x16_c, &iht16x16_10, 1, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht16x16_c, &iht16x16_10, 2, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht16x16_c, &iht16x16_10, 3, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht16x16_c, &iht16x16_12, 0, AOM_BITS_12),
+ make_tuple(&av1_highbd_fht16x16_c, &iht16x16_12, 1, AOM_BITS_12),
+ make_tuple(&av1_highbd_fht16x16_c, &iht16x16_12, 2, AOM_BITS_12),
+ make_tuple(&av1_highbd_fht16x16_c, &iht16x16_12, 3, AOM_BITS_12),
+ make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 0, AOM_BITS_8),
+ make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 1, AOM_BITS_8),
+ make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 2, AOM_BITS_8),
+ make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 3, AOM_BITS_8)));
#else
INSTANTIATE_TEST_CASE_P(
C, Trans16x16HT,
::testing::Values(
- make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 0, VPX_BITS_8),
- make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 1, VPX_BITS_8),
- make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 2, VPX_BITS_8),
- make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 3, VPX_BITS_8)));
+ make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 0, AOM_BITS_8),
+ make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 1, AOM_BITS_8),
+ make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 2, AOM_BITS_8),
+ make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 3, AOM_BITS_8)));
#endif // CONFIG_AOM_HIGHBITDEPTH
#if HAVE_NEON_ASM && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, Trans16x16DCT,
::testing::Values(make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_neon,
- 0, VPX_BITS_8)));
+ 0, AOM_BITS_8)));
#endif
#if HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans16x16DCT,
::testing::Values(make_tuple(&aom_fdct16x16_sse2,
- &aom_idct16x16_256_add_sse2, 0, VPX_BITS_8)));
+ &aom_idct16x16_256_add_sse2, 0, AOM_BITS_8)));
INSTANTIATE_TEST_CASE_P(
SSE2, Trans16x16HT,
::testing::Values(make_tuple(&av1_fht16x16_sse2,
- &av1_iht16x16_256_add_sse2, 0, VPX_BITS_8),
+ &av1_iht16x16_256_add_sse2, 0, AOM_BITS_8),
make_tuple(&av1_fht16x16_sse2,
- &av1_iht16x16_256_add_sse2, 1, VPX_BITS_8),
+ &av1_iht16x16_256_add_sse2, 1, AOM_BITS_8),
make_tuple(&av1_fht16x16_sse2,
- &av1_iht16x16_256_add_sse2, 2, VPX_BITS_8),
+ &av1_iht16x16_256_add_sse2, 2, AOM_BITS_8),
make_tuple(&av1_fht16x16_sse2,
- &av1_iht16x16_256_add_sse2, 3, VPX_BITS_8)));
+ &av1_iht16x16_256_add_sse2, 3, AOM_BITS_8)));
#endif // HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans16x16DCT,
::testing::Values(
- make_tuple(&aom_highbd_fdct16x16_sse2, &idct16x16_10, 0, VPX_BITS_10),
+ make_tuple(&aom_highbd_fdct16x16_sse2, &idct16x16_10, 0, AOM_BITS_10),
make_tuple(&aom_highbd_fdct16x16_c, &idct16x16_256_add_10_sse2, 0,
- VPX_BITS_10),
- make_tuple(&aom_highbd_fdct16x16_sse2, &idct16x16_12, 0, VPX_BITS_12),
+ AOM_BITS_10),
+ make_tuple(&aom_highbd_fdct16x16_sse2, &idct16x16_12, 0, AOM_BITS_12),
make_tuple(&aom_highbd_fdct16x16_c, &idct16x16_256_add_12_sse2, 0,
- VPX_BITS_12),
+ AOM_BITS_12),
make_tuple(&aom_fdct16x16_sse2, &aom_idct16x16_256_add_c, 0,
- VPX_BITS_8)));
+ AOM_BITS_8)));
INSTANTIATE_TEST_CASE_P(
SSE2, Trans16x16HT,
::testing::Values(make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c,
- 0, VPX_BITS_8),
+ 0, AOM_BITS_8),
make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c,
- 1, VPX_BITS_8),
+ 1, AOM_BITS_8),
make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c,
- 2, VPX_BITS_8),
+ 2, AOM_BITS_8),
make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c,
- 3, VPX_BITS_8)));
+ 3, AOM_BITS_8)));
// Optimizations take effect at a threshold of 3155, so we use a value close to
// that to test both branches.
INSTANTIATE_TEST_CASE_P(
SSE2, InvTrans16x16DCT,
::testing::Values(make_tuple(&idct16x16_10_add_10_c,
- &idct16x16_10_add_10_sse2, 3167, VPX_BITS_10),
+ &idct16x16_10_add_10_sse2, 3167, AOM_BITS_10),
make_tuple(&idct16x16_10, &idct16x16_256_add_10_sse2,
- 3167, VPX_BITS_10),
+ 3167, AOM_BITS_10),
make_tuple(&idct16x16_10_add_12_c,
- &idct16x16_10_add_12_sse2, 3167, VPX_BITS_12),
+ &idct16x16_10_add_12_sse2, 3167, AOM_BITS_12),
make_tuple(&idct16x16_12, &idct16x16_256_add_12_sse2,
- 3167, VPX_BITS_12)));
+ 3167, AOM_BITS_12)));
#endif // HAVE_SSE2 && CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(MSA, Trans16x16DCT,
::testing::Values(make_tuple(&aom_fdct16x16_msa,
&aom_idct16x16_256_add_msa,
- 0, VPX_BITS_8)));
+ 0, AOM_BITS_8)));
INSTANTIATE_TEST_CASE_P(
MSA, Trans16x16HT,
::testing::Values(make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa,
- 0, VPX_BITS_8),
+ 0, AOM_BITS_8),
make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa,
- 1, VPX_BITS_8),
+ 1, AOM_BITS_8),
make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa,
- 2, VPX_BITS_8),
+ 2, AOM_BITS_8),
make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa,
- 3, VPX_BITS_8)));
+ 3, AOM_BITS_8)));
#endif // HAVE_MSA && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace
diff --git a/test/dct32x32_test.cc b/test/dct32x32_test.cc
index 92f3278..9a8306f 100644
--- a/test/dct32x32_test.cc
+++ b/test/dct32x32_test.cc
@@ -128,7 +128,7 @@
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < kNumCoeffs; ++j) {
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
test_input_block[j] = src[j] - dst[j];
@@ -142,7 +142,7 @@
}
ASM_REGISTER_STATE_CHECK(fwd_txfm_(test_input_block, test_temp_block, 32));
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block, dst, 32));
#if CONFIG_AOM_HIGHBITDEPTH
} else {
@@ -154,7 +154,7 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const uint32_t diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const uint32_t diff = dst[j] - src[j];
#endif
@@ -263,7 +263,7 @@
// Initialize a test block with input range [-255, 255]
for (int j = 0; j < kNumCoeffs; ++j) {
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
in[j] = src[j] - dst[j];
@@ -279,7 +279,7 @@
reference_32x32_dct_2d(in, out_r);
for (int j = 0; j < kNumCoeffs; ++j)
coeff[j] = static_cast<tran_low_t>(round(out_r[j]));
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, dst, 32));
#if CONFIG_AOM_HIGHBITDEPTH
} else {
@@ -289,7 +289,7 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const int diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const int diff = dst[j] - src[j];
#endif
@@ -306,71 +306,71 @@
INSTANTIATE_TEST_CASE_P(
C, Trans32x32Test,
::testing::Values(
- 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_highbd_fdct32x32_c, &idct32x32_10, 0, AOM_BITS_10),
+ make_tuple(&aom_highbd_fdct32x32_rd_c, &idct32x32_10, 1, AOM_BITS_10),
+ make_tuple(&aom_highbd_fdct32x32_c, &idct32x32_12, 0, AOM_BITS_12),
+ make_tuple(&aom_highbd_fdct32x32_rd_c, &idct32x32_12, 1, AOM_BITS_12),
+ make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, 0, AOM_BITS_8),
make_tuple(&aom_fdct32x32_rd_c, &aom_idct32x32_1024_add_c, 1,
- VPX_BITS_8)));
+ AOM_BITS_8)));
#else
INSTANTIATE_TEST_CASE_P(
C, Trans32x32Test,
::testing::Values(make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_c, 0,
- VPX_BITS_8),
+ AOM_BITS_8),
make_tuple(&aom_fdct32x32_rd_c, &aom_idct32x32_1024_add_c,
- 1, VPX_BITS_8)));
+ 1, AOM_BITS_8)));
#endif // CONFIG_AOM_HIGHBITDEPTH
#if HAVE_NEON_ASM && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, Trans32x32Test,
::testing::Values(make_tuple(&aom_fdct32x32_c, &aom_idct32x32_1024_add_neon,
- 0, VPX_BITS_8),
+ 0, AOM_BITS_8),
make_tuple(&aom_fdct32x32_rd_c,
- &aom_idct32x32_1024_add_neon, 1, VPX_BITS_8)));
+ &aom_idct32x32_1024_add_neon, 1, AOM_BITS_8)));
#endif // HAVE_NEON_ASM && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans32x32Test,
::testing::Values(make_tuple(&aom_fdct32x32_sse2,
- &aom_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
+ &aom_idct32x32_1024_add_sse2, 0, AOM_BITS_8),
make_tuple(&aom_fdct32x32_rd_sse2,
- &aom_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
+ &aom_idct32x32_1024_add_sse2, 1, AOM_BITS_8)));
#endif // HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans32x32Test,
::testing::Values(
- make_tuple(&aom_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10),
+ make_tuple(&aom_highbd_fdct32x32_sse2, &idct32x32_10, 0, AOM_BITS_10),
make_tuple(&aom_highbd_fdct32x32_rd_sse2, &idct32x32_10, 1,
- VPX_BITS_10),
- make_tuple(&aom_highbd_fdct32x32_sse2, &idct32x32_12, 0, VPX_BITS_12),
+ AOM_BITS_10),
+ make_tuple(&aom_highbd_fdct32x32_sse2, &idct32x32_12, 0, AOM_BITS_12),
make_tuple(&aom_highbd_fdct32x32_rd_sse2, &idct32x32_12, 1,
- VPX_BITS_12),
+ AOM_BITS_12),
make_tuple(&aom_fdct32x32_sse2, &aom_idct32x32_1024_add_c, 0,
- VPX_BITS_8),
+ AOM_BITS_8),
make_tuple(&aom_fdct32x32_rd_sse2, &aom_idct32x32_1024_add_c, 1,
- VPX_BITS_8)));
+ AOM_BITS_8)));
#endif // HAVE_SSE2 && CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_AVX2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
AVX2, Trans32x32Test,
::testing::Values(make_tuple(&aom_fdct32x32_avx2,
- &aom_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
+ &aom_idct32x32_1024_add_sse2, 0, AOM_BITS_8),
make_tuple(&aom_fdct32x32_rd_avx2,
- &aom_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
+ &aom_idct32x32_1024_add_sse2, 1, AOM_BITS_8)));
#endif // HAVE_AVX2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
MSA, Trans32x32Test,
::testing::Values(make_tuple(&aom_fdct32x32_msa,
- &aom_idct32x32_1024_add_msa, 0, VPX_BITS_8),
+ &aom_idct32x32_1024_add_msa, 0, AOM_BITS_8),
make_tuple(&aom_fdct32x32_rd_msa,
- &aom_idct32x32_1024_add_msa, 1, VPX_BITS_8)));
+ &aom_idct32x32_1024_add_msa, 1, AOM_BITS_8)));
#endif // HAVE_MSA && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace
diff --git a/test/decode_api_test.cc b/test/decode_api_test.cc
index 51e67aa..e92bbee 100644
--- a/test/decode_api_test.cc
+++ b/test/decode_api_test.cc
@@ -28,29 +28,29 @@
uint8_t buf[1] = { 0 };
aom_codec_ctx_t dec;
- 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,
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_dec_init(NULL, NULL, NULL, 0));
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_dec_init(&dec, NULL, NULL, 0));
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_decode(NULL, NULL, 0, NULL, 0));
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_decode(NULL, buf, 0, NULL, 0));
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
aom_codec_decode(NULL, buf, NELEMENTS(buf), NULL, 0));
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
aom_codec_decode(NULL, NULL, NELEMENTS(buf), NULL, 0));
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, aom_codec_destroy(NULL));
+ EXPECT_EQ(AOM_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,
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
aom_codec_dec_init(NULL, kCodecs[i], NULL, 0));
- EXPECT_EQ(VPX_CODEC_OK, aom_codec_dec_init(&dec, kCodecs[i], NULL, 0));
- EXPECT_EQ(VPX_CODEC_UNSUP_BITSTREAM,
+ EXPECT_EQ(AOM_CODEC_OK, aom_codec_dec_init(&dec, kCodecs[i], NULL, 0));
+ EXPECT_EQ(AOM_CODEC_UNSUP_BITSTREAM,
aom_codec_decode(&dec, buf, NELEMENTS(buf), NULL, 0));
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
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(AOM_CODEC_INVALID_PARAM, aom_codec_decode(&dec, buf, 0, NULL, 0));
- EXPECT_EQ(VPX_CODEC_OK, aom_codec_destroy(&dec));
+ EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&dec));
}
}
diff --git a/test/decode_perf_test.cc b/test/decode_perf_test.cc
index bea1dec..17ed1f1 100644
--- a/test/decode_perf_test.cc
+++ b/test/decode_perf_test.cc
@@ -133,7 +133,7 @@
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 600;
cfg_.rc_resize_allowed = 0;
- cfg_.rc_end_usage = VPX_VBR;
+ cfg_.rc_end_usage = AOM_VBR;
}
virtual void PreEncodeFrameHook(::libaom_test::VideoSource *video,
@@ -210,7 +210,7 @@
cfg_.g_timebase = timebase;
cfg_.rc_target_bitrate = kVP9EncodePerfTestVectors[i].bitrate;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
const char *video_name = kVP9EncodePerfTestVectors[i].name;
libaom_test::I420VideoSource video(
diff --git a/test/decode_test_driver.cc b/test/decode_test_driver.cc
index 8dbf842..4c5e31a 100644
--- a/test/decode_test_driver.cc
+++ b/test/decode_test_driver.cc
@@ -50,15 +50,15 @@
const bool is_vp8 = decoder->IsVP8();
if (is_vp8) {
/* Vp8's implementation of PeekStream returns an error if the frame you
- * pass it is not a keyframe, so we only expect VPX_CODEC_OK on the first
+ * pass it is not a keyframe, so we only expect AOM_CODEC_OK on the first
* frame, which must be a keyframe. */
if (video->frame_number() == 0)
- ASSERT_EQ(VPX_CODEC_OK, res_peek) << "Peek return failed: "
+ ASSERT_EQ(AOM_CODEC_OK, res_peek) << "Peek return failed: "
<< 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: "
+ ASSERT_EQ(AOM_CODEC_OK, res_peek) << "Peek return failed: "
<< aom_codec_err_to_string(res_peek);
}
}
@@ -89,7 +89,7 @@
} else {
// Signal end of the file to the decoder.
const aom_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0);
- ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
+ ASSERT_EQ(AOM_CODEC_OK, res_dec) << decoder->DecodeError();
end_of_file = true;
}
diff --git a/test/decode_test_driver.h b/test/decode_test_driver.h
index bf5c42d..347ff49 100644
--- a/test/decode_test_driver.h
+++ b/test/decode_test_driver.h
@@ -67,12 +67,12 @@
void set_deadline(unsigned long deadline) { deadline_ = deadline; }
- void Control(int ctrl_id, int arg) { Control(ctrl_id, arg, VPX_CODEC_OK); }
+ void Control(int ctrl_id, int arg) { Control(ctrl_id, arg, AOM_CODEC_OK); }
void Control(int ctrl_id, const void *arg) {
InitOnce();
const aom_codec_err_t res = aom_codec_control_(&decoder_, ctrl_id, arg);
- ASSERT_EQ(VPX_CODEC_OK, res) << DecodeError();
+ ASSERT_EQ(AOM_CODEC_OK, res) << DecodeError();
}
void Control(int ctrl_id, int arg, aom_codec_err_t expected_value) {
@@ -110,7 +110,7 @@
if (!init_done_) {
const aom_codec_err_t res =
aom_codec_dec_init(&decoder_, CodecInterface(), &cfg_, flags_);
- ASSERT_EQ(VPX_CODEC_OK, res) << DecodeError();
+ ASSERT_EQ(AOM_CODEC_OK, res) << DecodeError();
init_done_ = true;
}
}
@@ -141,8 +141,8 @@
virtual bool HandleDecodeResult(const aom_codec_err_t res_dec,
const CompressedVideoSource & /*video*/,
Decoder *decoder) {
- EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
- return VPX_CODEC_OK == res_dec;
+ EXPECT_EQ(AOM_CODEC_OK, res_dec) << decoder->DecodeError();
+ return AOM_CODEC_OK == res_dec;
}
// Hook to be called on every decompressed frame.
diff --git a/test/decode_to_md5.sh b/test/decode_to_md5.sh
index b28a2b6..1c2bd3d 100755
--- a/test/decode_to_md5.sh
+++ b/test/decode_to_md5.sh
@@ -28,18 +28,18 @@
# interpreted as codec name and used solely to name the output file. $3 is the
# expected md5 sum: It must match that of the final frame.
decode_to_md5() {
- local decoder="${LIBAOM_BIN_PATH}/decode_to_md5${VPX_TEST_EXE_SUFFIX}"
+ local decoder="${LIBAOM_BIN_PATH}/decode_to_md5${AOM_TEST_EXE_SUFFIX}"
local input_file="$1"
local codec="$2"
local expected_md5="$3"
- local output_file="${VPX_TEST_OUTPUT_DIR}/decode_to_md5_${codec}"
+ local output_file="${AOM_TEST_OUTPUT_DIR}/decode_to_md5_${codec}"
if [ ! -x "${decoder}" ]; then
elog "${decoder} does not exist or is not executable."
return 1
fi
- eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \
+ eval "${AOM_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \
${devnull}
[ -e "${output_file}" ] || return 1
diff --git a/test/decode_with_drops.sh b/test/decode_with_drops.sh
index ed48b2b..3479e69 100755
--- a/test/decode_with_drops.sh
+++ b/test/decode_with_drops.sh
@@ -28,10 +28,10 @@
# to name the output file. $3 is the drop mode, and is passed directly to
# decode_with_drops.
decode_with_drops() {
- local decoder="${LIBAOM_BIN_PATH}/decode_with_drops${VPX_TEST_EXE_SUFFIX}"
+ local decoder="${LIBAOM_BIN_PATH}/decode_with_drops${AOM_TEST_EXE_SUFFIX}"
local input_file="$1"
local codec="$2"
- local output_file="${VPX_TEST_OUTPUT_DIR}/decode_with_drops_${codec}"
+ local output_file="${AOM_TEST_OUTPUT_DIR}/decode_with_drops_${codec}"
local drop_mode="$3"
if [ ! -x "${decoder}" ]; then
@@ -39,7 +39,7 @@
return 1
fi
- eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \
+ eval "${AOM_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \
"${drop_mode}" ${devnull}
[ -e "${output_file}" ] || return 1
diff --git a/test/encode_api_test.cc b/test/encode_api_test.cc
index 09ee91a..030dd24 100644
--- a/test/encode_api_test.cc
+++ b/test/encode_api_test.cc
@@ -35,33 +35,33 @@
aom_codec_ctx_t enc;
aom_codec_enc_cfg_t cfg;
- EXPECT_EQ(&img, aom_img_wrap(&img, VPX_IMG_FMT_I420, 1, 1, 1, buf));
+ EXPECT_EQ(&img, aom_img_wrap(&img, AOM_IMG_FMT_I420, 1, 1, 1, buf));
- 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,
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_enc_init(NULL, NULL, NULL, 0));
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_enc_init(&enc, NULL, NULL, 0));
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_encode(NULL, NULL, 0, 0, 0, 0));
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_encode(NULL, &img, 0, 0, 0, 0));
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, aom_codec_destroy(NULL));
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
aom_codec_enc_config_default(NULL, NULL, 0));
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
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(aom_codec_iface_name(kCodecs[i]));
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
aom_codec_enc_init(NULL, kCodecs[i], NULL, 0));
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
aom_codec_enc_init(&enc, kCodecs[i], NULL, 0));
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM,
aom_codec_enc_config_default(kCodecs[i], &cfg, 1));
- 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(AOM_CODEC_OK, aom_codec_enc_config_default(kCodecs[i], &cfg, 0));
+ EXPECT_EQ(AOM_CODEC_OK, aom_codec_enc_init(&enc, kCodecs[i], &cfg, 0));
+ EXPECT_EQ(AOM_CODEC_OK, aom_codec_encode(&enc, NULL, 0, 0, 0, 0));
- EXPECT_EQ(VPX_CODEC_OK, aom_codec_destroy(&enc));
+ EXPECT_EQ(AOM_CODEC_OK, aom_codec_destroy(&enc));
}
}
diff --git a/test/encode_perf_test.cc b/test/encode_perf_test.cc
index a78afee..4f19100 100644
--- a/test/encode_perf_test.cc
+++ b/test/encode_perf_test.cc
@@ -77,7 +77,7 @@
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 600;
cfg_.rc_resize_allowed = 0;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_error_resilient = 1;
cfg_.g_threads = threads_;
}
@@ -139,7 +139,7 @@
cfg_.g_timebase = timebase;
cfg_.rc_target_bitrate = kVP9EncodePerfTestVectors[i].bitrate;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
const unsigned frames = kVP9EncodePerfTestVectors[i].frames;
const char *video_name = kVP9EncodePerfTestVectors[i].name;
diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc
index c6d42aa..df03a2c 100644
--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -31,7 +31,7 @@
cfg_.rc_twopass_stats_in = stats_->buf();
res = aom_codec_enc_init(&encoder_, CodecInterface(), &cfg_, init_flags_);
- ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
#if CONFIG_AV1_ENCODER
if (CodecInterface() == &aom_codec_av1_cx_algo) {
@@ -39,7 +39,7 @@
const int log2_tile_columns = 0;
res = aom_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
log2_tile_columns);
- ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
}
#endif
}
@@ -55,7 +55,7 @@
CxDataIterator iter = GetCxData();
while (const aom_codec_cx_pkt_t *pkt = iter.Next()) {
- if (pkt->kind != VPX_CODEC_STATS_PKT) continue;
+ if (pkt->kind != AOM_CODEC_STATS_PKT) continue;
stats_->Append(*pkt);
}
@@ -71,40 +71,40 @@
cfg_.g_w = img->d_w;
cfg_.g_h = img->d_h;
res = aom_codec_enc_config_set(&encoder_, &cfg_);
- ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
}
// Encode the frame
API_REGISTER_STATE_CHECK(res = aom_codec_encode(&encoder_, img, video.pts(),
video.duration(), frame_flags,
deadline_));
- ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
}
void Encoder::Flush() {
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();
+ ASSERT_EQ(AOM_CODEC_ERROR, res) << EncoderError();
else
- ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
}
void EncoderTest::InitializeConfig() {
const aom_codec_err_t res = codec_->DefaultEncoderConfig(&cfg_, 0);
dec_cfg_ = aom_codec_dec_cfg_t();
- ASSERT_EQ(VPX_CODEC_OK, res);
+ ASSERT_EQ(AOM_CODEC_OK, res);
}
void EncoderTest::SetMode(TestMode mode) {
switch (mode) {
- case kRealTime: deadline_ = VPX_DL_REALTIME; break;
+ case kRealTime: deadline_ = AOM_DL_REALTIME; break;
case kOnePassGood:
- case kTwoPassGood: deadline_ = VPX_DL_GOOD_QUALITY; break;
+ case kTwoPassGood: deadline_ = AOM_DL_GOOD_QUALITY; break;
case kOnePassBest:
- case kTwoPassBest: deadline_ = VPX_DL_BEST_QUALITY; break;
+ case kTwoPassBest: deadline_ = AOM_DL_BEST_QUALITY; break;
default: ASSERT_TRUE(false) << "Unexpected mode " << mode;
}
@@ -124,20 +124,20 @@
const unsigned int height_y = img1->d_h;
unsigned int i;
for (i = 0; i < height_y; ++i)
- match = (memcmp(img1->planes[VPX_PLANE_Y] + i * img1->stride[VPX_PLANE_Y],
- img2->planes[VPX_PLANE_Y] + i * img2->stride[VPX_PLANE_Y],
+ match = (memcmp(img1->planes[AOM_PLANE_Y] + i * img1->stride[AOM_PLANE_Y],
+ img2->planes[AOM_PLANE_Y] + i * img2->stride[AOM_PLANE_Y],
width_y) == 0) &&
match;
const unsigned int width_uv = (img1->d_w + 1) >> 1;
const unsigned int height_uv = (img1->d_h + 1) >> 1;
for (i = 0; i < height_uv; ++i)
- match = (memcmp(img1->planes[VPX_PLANE_U] + i * img1->stride[VPX_PLANE_U],
- img2->planes[VPX_PLANE_U] + i * img2->stride[VPX_PLANE_U],
+ match = (memcmp(img1->planes[AOM_PLANE_U] + i * img1->stride[AOM_PLANE_U],
+ img2->planes[AOM_PLANE_U] + i * img2->stride[AOM_PLANE_U],
width_uv) == 0) &&
match;
for (i = 0; i < height_uv; ++i)
- match = (memcmp(img1->planes[VPX_PLANE_V] + i * img1->stride[VPX_PLANE_V],
- img2->planes[VPX_PLANE_V] + i * img2->stride[VPX_PLANE_V],
+ match = (memcmp(img1->planes[AOM_PLANE_V] + i * img1->stride[AOM_PLANE_V],
+ img2->planes[AOM_PLANE_V] + i * img2->stride[AOM_PLANE_V],
width_uv) == 0) &&
match;
return match;
@@ -158,11 +158,11 @@
last_pts_ = 0;
if (passes_ == 1)
- cfg_.g_pass = VPX_RC_ONE_PASS;
+ cfg_.g_pass = AOM_RC_ONE_PASS;
else if (pass == 0)
- cfg_.g_pass = VPX_RC_FIRST_PASS;
+ cfg_.g_pass = AOM_RC_FIRST_PASS;
else
- cfg_.g_pass = VPX_RC_LAST_PASS;
+ cfg_.g_pass = AOM_RC_LAST_PASS;
BeginPassHook(pass);
Encoder *const encoder =
@@ -176,8 +176,8 @@
unsigned long dec_init_flags = 0; // NOLINT
// Use fragment decoder if encoder outputs partitions.
// NOTE: fragment decoder and partition encoder are only supported by VP8.
- if (init_flags_ & VPX_CODEC_USE_OUTPUT_PARTITION)
- dec_init_flags |= VPX_CODEC_USE_INPUT_FRAGMENTS;
+ if (init_flags_ & AOM_CODEC_USE_OUTPUT_PARTITION)
+ dec_init_flags |= AOM_CODEC_USE_INPUT_FRAGMENTS;
Decoder *const decoder = codec_->CreateDecoder(dec_cfg, dec_init_flags, 0);
bool again;
for (again = true; again; video->Next()) {
@@ -195,7 +195,7 @@
pkt = MutateEncoderOutputHook(pkt);
again = true;
switch (pkt->kind) {
- case VPX_CODEC_CX_FRAME_PKT:
+ case AOM_CODEC_CX_FRAME_PKT:
has_cxdata = true;
if (decoder && DoDecode()) {
aom_codec_err_t res_dec = decoder->DecodeFrame(
@@ -210,14 +210,14 @@
FramePktHook(pkt);
break;
- case VPX_CODEC_PSNR_PKT: PSNRPktHook(pkt); break;
+ case AOM_CODEC_PSNR_PKT: PSNRPktHook(pkt); break;
default: break;
}
}
// Flush the decoder when there are no more fragments.
- if ((init_flags_ & VPX_CODEC_USE_OUTPUT_PARTITION) && has_dxdata) {
+ if ((init_flags_ & AOM_CODEC_USE_OUTPUT_PARTITION) && has_dxdata) {
const aom_codec_err_t res_dec = decoder->DecodeFrame(NULL, 0);
if (!HandleDecodeResult(res_dec, *video, decoder)) break;
}
diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h
index a60d6df..749f305 100644
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -111,38 +111,38 @@
void Control(int ctrl_id, int arg) {
const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg);
- ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
}
void Control(int ctrl_id, int *arg) {
const aom_codec_err_t res = aom_codec_control_(&encoder_, ctrl_id, arg);
- ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
}
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();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
}
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();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
}
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();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
}
#if CONFIG_AV1_ENCODER
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();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
}
#endif
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();
+ ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
cfg_ = *cfg;
}
@@ -239,8 +239,8 @@
virtual bool HandleDecodeResult(const aom_codec_err_t res_dec,
const VideoSource & /*video*/,
Decoder *decoder) {
- EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
- return VPX_CODEC_OK == res_dec;
+ EXPECT_EQ(AOM_CODEC_OK, res_dec) << decoder->DecodeError();
+ return AOM_CODEC_OK == res_dec;
}
// Hook that can modify the encoder's output data
diff --git a/test/encoder_parms_get_to_decoder.cc b/test/encoder_parms_get_to_decoder.cc
index 602bbca..77fc476 100644
--- a/test/encoder_parms_get_to_decoder.cc
+++ b/test/encoder_parms_get_to_decoder.cc
@@ -45,10 +45,10 @@
};
const EncodeParameters kVP9EncodeParameterSet[] = {
- { 0, 0, 0, 1, 0, VPX_CR_STUDIO_RANGE, VPX_CS_BT_601 },
- { 0, 0, 0, 0, 0, VPX_CR_FULL_RANGE, VPX_CS_BT_709 },
- { 0, 0, 1, 0, 0, VPX_CR_FULL_RANGE, VPX_CS_BT_2020 },
- { 0, 2, 0, 0, 1, VPX_CR_STUDIO_RANGE, VPX_CS_UNKNOWN, { 640, 480 } },
+ { 0, 0, 0, 1, 0, AOM_CR_STUDIO_RANGE, AOM_CS_BT_601 },
+ { 0, 0, 0, 0, 0, AOM_CR_FULL_RANGE, AOM_CS_BT_709 },
+ { 0, 0, 1, 0, 0, AOM_CR_FULL_RANGE, AOM_CS_BT_2020 },
+ { 0, 2, 0, 0, 1, AOM_CR_STUDIO_RANGE, AOM_CS_UNKNOWN, { 640, 480 } },
// TODO(JBB): Test profiles (requires more work).
};
@@ -122,8 +122,8 @@
EXPECT_EQ(encode_parms.tile_cols, common->log2_tile_cols);
EXPECT_EQ(encode_parms.tile_rows, common->log2_tile_rows);
- EXPECT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();
- return VPX_CODEC_OK == res_dec;
+ EXPECT_EQ(AOM_CODEC_OK, res_dec) << decoder->DecodeError();
+ return AOM_CODEC_OK == res_dec;
}
EncodePerfTestVideo test_video_;
@@ -133,7 +133,7 @@
};
TEST_P(VpxEncoderParmsGetToDecoder, BitstreamParms) {
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
libaom_test::VideoSource *const video =
new libaom_test::Y4mVideoSource(test_video_.name, 0, test_video_.frames);
diff --git a/test/end_to_end_test.cc b/test/end_to_end_test.cc
index cae8c9a..3dbe3f3 100644
--- a/test/end_to_end_test.cc
+++ b/test/end_to_end_test.cc
@@ -40,19 +40,19 @@
} TestVideoParam;
const TestVideoParam kTestVectors[] = {
- { "park_joy_90p_8_420.y4m", 8, VPX_IMG_FMT_I420, VPX_BITS_8, 0 },
- { "park_joy_90p_8_422.y4m", 8, VPX_IMG_FMT_I422, VPX_BITS_8, 1 },
- { "park_joy_90p_8_444.y4m", 8, VPX_IMG_FMT_I444, VPX_BITS_8, 1 },
- { "park_joy_90p_8_440.yuv", 8, VPX_IMG_FMT_I440, VPX_BITS_8, 1 },
+ { "park_joy_90p_8_420.y4m", 8, AOM_IMG_FMT_I420, AOM_BITS_8, 0 },
+ { "park_joy_90p_8_422.y4m", 8, AOM_IMG_FMT_I422, AOM_BITS_8, 1 },
+ { "park_joy_90p_8_444.y4m", 8, AOM_IMG_FMT_I444, AOM_BITS_8, 1 },
+ { "park_joy_90p_8_440.yuv", 8, AOM_IMG_FMT_I440, AOM_BITS_8, 1 },
#if CONFIG_AOM_HIGHBITDEPTH
- { "park_joy_90p_10_420.y4m", 10, VPX_IMG_FMT_I42016, VPX_BITS_10, 2 },
- { "park_joy_90p_10_422.y4m", 10, VPX_IMG_FMT_I42216, VPX_BITS_10, 3 },
- { "park_joy_90p_10_444.y4m", 10, VPX_IMG_FMT_I44416, VPX_BITS_10, 3 },
- { "park_joy_90p_10_440.yuv", 10, VPX_IMG_FMT_I44016, VPX_BITS_10, 3 },
- { "park_joy_90p_12_420.y4m", 12, VPX_IMG_FMT_I42016, VPX_BITS_12, 2 },
- { "park_joy_90p_12_422.y4m", 12, VPX_IMG_FMT_I42216, VPX_BITS_12, 3 },
- { "park_joy_90p_12_444.y4m", 12, VPX_IMG_FMT_I44416, VPX_BITS_12, 3 },
- { "park_joy_90p_12_440.yuv", 12, VPX_IMG_FMT_I44016, VPX_BITS_12, 3 },
+ { "park_joy_90p_10_420.y4m", 10, AOM_IMG_FMT_I42016, AOM_BITS_10, 2 },
+ { "park_joy_90p_10_422.y4m", 10, AOM_IMG_FMT_I42216, AOM_BITS_10, 3 },
+ { "park_joy_90p_10_444.y4m", 10, AOM_IMG_FMT_I44416, AOM_BITS_10, 3 },
+ { "park_joy_90p_10_440.yuv", 10, AOM_IMG_FMT_I44016, AOM_BITS_10, 3 },
+ { "park_joy_90p_12_420.y4m", 12, AOM_IMG_FMT_I42016, AOM_BITS_12, 2 },
+ { "park_joy_90p_12_422.y4m", 12, AOM_IMG_FMT_I42216, AOM_BITS_12, 3 },
+ { "park_joy_90p_12_444.y4m", 12, AOM_IMG_FMT_I44416, AOM_BITS_12, 3 },
+ { "park_joy_90p_12_440.yuv", 12, AOM_IMG_FMT_I44016, AOM_BITS_12, 3 },
#endif // CONFIG_AOM_HIGHBITDEPTH
};
@@ -90,10 +90,10 @@
SetMode(encoding_mode_);
if (encoding_mode_ != ::libaom_test::kRealTime) {
cfg_.g_lag_in_frames = 5;
- cfg_.rc_end_usage = VPX_VBR;
+ cfg_.rc_end_usage = AOM_VBR;
} else {
cfg_.g_lag_in_frames = 0;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.rc_buf_sz = 1000;
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 600;
@@ -150,8 +150,8 @@
cfg_.g_profile = test_video_param_.profile;
cfg_.g_input_bit_depth = test_video_param_.input_bit_depth;
cfg_.g_bit_depth = test_video_param_.bit_depth;
- init_flags_ = VPX_CODEC_USE_PSNR;
- if (cfg_.g_bit_depth > 8) init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH;
+ init_flags_ = AOM_CODEC_USE_PSNR;
+ if (cfg_.g_bit_depth > 8) init_flags_ |= AOM_CODEC_USE_HIGHBITDEPTH;
libaom_test::VideoSource *video;
if (is_extension_y4m(test_video_param_.filename)) {
diff --git a/test/error_block_test.cc b/test/error_block_test.cc
index 7925ae8..f7a36cb 100644
--- a/test/error_block_test.cc
+++ b/test/error_block_test.cc
@@ -178,14 +178,14 @@
INSTANTIATE_TEST_CASE_P(
SSE2, ErrorBlockTest,
::testing::Values(make_tuple(&av1_highbd_block_error_sse2,
- &av1_highbd_block_error_c, VPX_BITS_10),
+ &av1_highbd_block_error_c, AOM_BITS_10),
make_tuple(&av1_highbd_block_error_sse2,
- &av1_highbd_block_error_c, VPX_BITS_12),
+ &av1_highbd_block_error_c, AOM_BITS_12),
make_tuple(&av1_highbd_block_error_sse2,
- &av1_highbd_block_error_c, VPX_BITS_8),
+ &av1_highbd_block_error_c, AOM_BITS_8),
make_tuple(&wrap_av1_highbd_block_error_8bit_sse2,
&wrap_av1_highbd_block_error_8bit_c,
- VPX_BITS_8)));
+ AOM_BITS_8)));
#endif // HAVE_SSE2
#if HAVE_AVX
@@ -200,7 +200,7 @@
INSTANTIATE_TEST_CASE_P(AVX, ErrorBlockTest,
::testing::Values(make_tuple(
&wrap_av1_highbd_block_error_8bit_avx,
- &wrap_av1_highbd_block_error_8bit_c, VPX_BITS_8)));
+ &wrap_av1_highbd_block_error_8bit_c, AOM_BITS_8)));
#endif // HAVE_AVX
#endif // CONFIG_USE_X86INC
diff --git a/test/error_resilience_test.cc b/test/error_resilience_test.cc
index 1b8d595..eb5336b 100644
--- a/test/error_resilience_test.cc
+++ b/test/error_resilience_test.cc
@@ -106,7 +106,7 @@
}
} else {
if (droppable_nframes_ > 0 &&
- (cfg_.g_pass == VPX_RC_LAST_PASS || cfg_.g_pass == VPX_RC_ONE_PASS)) {
+ (cfg_.g_pass == AOM_RC_LAST_PASS || cfg_.g_pass == AOM_RC_ONE_PASS)) {
for (unsigned int i = 0; i < droppable_nframes_; ++i) {
if (droppable_frames_[i] == video->frame()) {
std::cout << "Encoding droppable frame: " << droppable_frames_[i]
@@ -132,7 +132,7 @@
virtual bool DoDecode() const {
if (error_nframes_ > 0 &&
- (cfg_.g_pass == VPX_RC_LAST_PASS || cfg_.g_pass == VPX_RC_ONE_PASS)) {
+ (cfg_.g_pass == AOM_RC_LAST_PASS || cfg_.g_pass == AOM_RC_ONE_PASS)) {
for (unsigned int i = 0; i < error_nframes_; ++i) {
if (error_frames_[i] == nframes_ - 1) {
std::cout << " Skipping decoding frame: "
@@ -196,7 +196,7 @@
cfg_.rc_target_bitrate = 2000;
cfg_.g_lag_in_frames = 10;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
timebase.den, timebase.num, 0, 30);
@@ -233,14 +233,14 @@
// Currently this test only works for lag = 0
cfg_.g_lag_in_frames = 0;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
timebase.den, timebase.num, 0, 40);
// Error resilient mode ON.
cfg_.g_error_resilient = 1;
- cfg_.kf_mode = VPX_KF_DISABLED;
+ cfg_.kf_mode = AOM_KF_DISABLED;
// Set an arbitrary set of error frames same as droppable frames.
// In addition to isolated loss/drop, add a long consecutive series
@@ -293,7 +293,7 @@
cfg_.rc_target_bitrate = 500;
cfg_.g_lag_in_frames = 0;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
// 2 Temporal layers, no spatial layers, CBR mode.
cfg_.ss_number_layers = 1;
cfg_.ts_number_layers = 2;
@@ -303,14 +303,14 @@
cfg_.ts_target_bitrate[0] = 60 * cfg_.rc_target_bitrate / 100;
cfg_.ts_target_bitrate[1] = cfg_.rc_target_bitrate;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
timebase.den, timebase.num, 0, 40);
// Error resilient mode ON.
cfg_.g_error_resilient = 1;
- cfg_.kf_mode = VPX_KF_DISABLED;
+ cfg_.kf_mode = AOM_KF_DISABLED;
SetPatternSwitch(0);
// The odd frames are the enhancement layer for 2 layer pattern, so set
@@ -340,7 +340,7 @@
cfg_.rc_target_bitrate = 500;
cfg_.g_lag_in_frames = 0;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
// 2 Temporal layers, no spatial layers, CBR mode.
cfg_.ss_number_layers = 1;
cfg_.ts_number_layers = 2;
@@ -350,14 +350,14 @@
cfg_.ts_target_bitrate[0] = 60 * cfg_.rc_target_bitrate / 100;
cfg_.ts_target_bitrate[1] = cfg_.rc_target_bitrate;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
timebase.den, timebase.num, 0, 100);
// Error resilient mode ON.
cfg_.g_error_resilient = 1;
- cfg_.kf_mode = VPX_KF_DISABLED;
+ cfg_.kf_mode = AOM_KF_DISABLED;
SetPatternSwitch(60);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
@@ -530,10 +530,10 @@
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_min_quantizer = 2;
cfg_.rc_max_quantizer = 56;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.rc_dropframe_thresh = 1;
cfg_.g_lag_in_frames = 0;
- cfg_.kf_mode = VPX_KF_DISABLED;
+ cfg_.kf_mode = AOM_KF_DISABLED;
cfg_.g_error_resilient = 1;
// 3 Temporal layers. Framerate decimation (4, 2, 1).
diff --git a/test/ethread_test.cc b/test/ethread_test.cc
index aae62e9..cfb45e9 100644
--- a/test/ethread_test.cc
+++ b/test/ethread_test.cc
@@ -25,7 +25,7 @@
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;
+ init_flags_ = AOM_CODEC_USE_PSNR;
aom_codec_dec_cfg_t cfg = aom_codec_dec_cfg_t();
cfg.w = 1280;
cfg.h = 720;
@@ -41,12 +41,12 @@
if (encoding_mode_ != ::libaom_test::kRealTime) {
cfg_.g_lag_in_frames = 3;
- cfg_.rc_end_usage = VPX_VBR;
+ cfg_.rc_end_usage = AOM_VBR;
cfg_.rc_2pass_vbr_minsection_pct = 5;
cfg_.rc_2pass_vbr_minsection_pct = 2000;
} else {
cfg_.g_lag_in_frames = 0;
- cfg_.rc_end_usage = VPX_CBR;
+ cfg_.rc_end_usage = AOM_CBR;
cfg_.g_error_resilient = 1;
}
cfg_.rc_max_quantizer = 56;
@@ -79,9 +79,9 @@
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) {
+ if (res != AOM_CODEC_OK) {
abort_ = true;
- ASSERT_EQ(VPX_CODEC_OK, res);
+ ASSERT_EQ(AOM_CODEC_OK, res);
}
const aom_image_t *img = decoder_->GetDxData().Next();
@@ -109,7 +109,7 @@
// Encode using single thread.
cfg_.g_threads = 1;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
single_thr_md5 = md5_;
md5_.clear();
diff --git a/test/examples.sh b/test/examples.sh
index 1ee120a..8c0aff4 100755
--- a/test/examples.sh
+++ b/test/examples.sh
@@ -24,6 +24,6 @@
for test in ${example_tests}; do
# Source each test script so that exporting variables can be avoided.
- VPX_TEST_NAME="$(basename ${test%.*})"
+ AOM_TEST_NAME="$(basename ${test%.*})"
. "${test}"
done
diff --git a/test/fdct4x4_test.cc b/test/fdct4x4_test.cc
index 81d0e38..dd3f678 100644
--- a/test/fdct4x4_test.cc
+++ b/test/fdct4x4_test.cc
@@ -113,7 +113,7 @@
// Initialize a test block with input range [-255, 255].
for (int j = 0; j < kNumCoeffs; ++j) {
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
test_input_block[j] = src[j] - dst[j];
@@ -128,7 +128,7 @@
ASM_REGISTER_STATE_CHECK(
RunFwdTxfm(test_input_block, test_temp_block, pitch_));
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_AOM_HIGHBITDEPTH
} else {
@@ -140,9 +140,9 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const uint32_t diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
- ASSERT_EQ(VPX_BITS_8, bit_depth_);
+ ASSERT_EQ(AOM_BITS_8, bit_depth_);
const uint32_t diff = dst[j] - src[j];
#endif
const uint32_t error = diff * diff;
@@ -226,7 +226,7 @@
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < kNumCoeffs; ++j) {
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
in[j] = src[j] - dst[j];
@@ -241,7 +241,7 @@
fwd_txfm_ref(in, coeff, pitch_, tx_type_);
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
#if CONFIG_AOM_HIGHBITDEPTH
} else {
@@ -253,7 +253,7 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const uint32_t diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const uint32_t diff = dst[j] - src[j];
#endif
@@ -385,71 +385,71 @@
INSTANTIATE_TEST_CASE_P(
C, Trans4x4DCT,
::testing::Values(
- 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)));
+ make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_10, 0, AOM_BITS_10),
+ make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_12, 0, AOM_BITS_12),
+ make_tuple(&aom_fdct4x4_c, &aom_idct4x4_16_add_c, 0, AOM_BITS_8)));
#else
INSTANTIATE_TEST_CASE_P(C, Trans4x4DCT,
::testing::Values(make_tuple(&aom_fdct4x4_c,
&aom_idct4x4_16_add_c, 0,
- VPX_BITS_8)));
+ AOM_BITS_8)));
#endif // CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_AOM_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans4x4HT,
::testing::Values(
- make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 0, VPX_BITS_10),
- make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 1, VPX_BITS_10),
- make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 2, VPX_BITS_10),
- make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 3, VPX_BITS_10),
- make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 0, VPX_BITS_12),
- make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 1, VPX_BITS_12),
- make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 2, VPX_BITS_12),
- make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 3, VPX_BITS_12),
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 0, VPX_BITS_8),
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 1, VPX_BITS_8),
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 2, VPX_BITS_8),
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 3, VPX_BITS_8)));
+ make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 0, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 1, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 2, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht4x4_c, &iht4x4_10, 3, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 0, AOM_BITS_12),
+ make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 1, AOM_BITS_12),
+ make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 2, AOM_BITS_12),
+ make_tuple(&av1_highbd_fht4x4_c, &iht4x4_12, 3, AOM_BITS_12),
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 0, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 1, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 2, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 3, AOM_BITS_8)));
#else
INSTANTIATE_TEST_CASE_P(
C, Trans4x4HT,
::testing::Values(
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 0, VPX_BITS_8),
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 1, VPX_BITS_8),
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 2, VPX_BITS_8),
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 3, VPX_BITS_8)));
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 0, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 1, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 2, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_c, 3, AOM_BITS_8)));
#endif // CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_AOM_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans4x4WHT,
::testing::Values(
- make_tuple(&av1_highbd_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10),
- make_tuple(&av1_highbd_fwht4x4_c, &iwht4x4_12, 0, VPX_BITS_12),
- make_tuple(&av1_fwht4x4_c, &aom_iwht4x4_16_add_c, 0, VPX_BITS_8)));
+ make_tuple(&av1_highbd_fwht4x4_c, &iwht4x4_10, 0, AOM_BITS_10),
+ make_tuple(&av1_highbd_fwht4x4_c, &iwht4x4_12, 0, AOM_BITS_12),
+ make_tuple(&av1_fwht4x4_c, &aom_iwht4x4_16_add_c, 0, AOM_BITS_8)));
#else
INSTANTIATE_TEST_CASE_P(C, Trans4x4WHT,
::testing::Values(make_tuple(&av1_fwht4x4_c,
&aom_iwht4x4_16_add_c, 0,
- VPX_BITS_8)));
+ AOM_BITS_8)));
#endif // CONFIG_AOM_HIGHBITDEPTH
#if HAVE_NEON_ASM && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(NEON, Trans4x4DCT,
::testing::Values(make_tuple(&aom_fdct4x4_c,
&aom_idct4x4_16_add_neon,
- 0, VPX_BITS_8)));
+ 0, AOM_BITS_8)));
#endif // HAVE_NEON_ASM && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, Trans4x4HT,
::testing::Values(
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 0, VPX_BITS_8),
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 1, VPX_BITS_8),
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 2, VPX_BITS_8),
- make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 3, VPX_BITS_8)));
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 0, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 1, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 2, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_c, &av1_iht4x4_16_add_neon, 3, AOM_BITS_8)));
#endif // HAVE_NEON && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if CONFIG_USE_X86INC && HAVE_MMX && !CONFIG_AOM_HIGHBITDEPTH && \
@@ -457,7 +457,7 @@
INSTANTIATE_TEST_CASE_P(MMX, Trans4x4WHT,
::testing::Values(make_tuple(&av1_fwht4x4_mmx,
&aom_iwht4x4_16_add_c, 0,
- VPX_BITS_8)));
+ AOM_BITS_8)));
#endif
#if CONFIG_USE_X86INC && HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && \
@@ -465,54 +465,54 @@
INSTANTIATE_TEST_CASE_P(SSE2, Trans4x4WHT,
::testing::Values(make_tuple(&av1_fwht4x4_c,
&aom_iwht4x4_16_add_sse2,
- 0, VPX_BITS_8)));
+ 0, AOM_BITS_8)));
#endif
#if HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(SSE2, Trans4x4DCT,
::testing::Values(make_tuple(&aom_fdct4x4_sse2,
&aom_idct4x4_16_add_sse2,
- 0, VPX_BITS_8)));
+ 0, AOM_BITS_8)));
INSTANTIATE_TEST_CASE_P(
SSE2, Trans4x4HT,
::testing::Values(
- make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 0, VPX_BITS_8),
- make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 1, VPX_BITS_8),
- make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 2, VPX_BITS_8),
+ make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 0, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 1, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 2, AOM_BITS_8),
make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_sse2, 3,
- VPX_BITS_8)));
+ AOM_BITS_8)));
#endif // HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans4x4DCT,
::testing::Values(
- 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)));
+ make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_10_sse2, 0, AOM_BITS_10),
+ make_tuple(&aom_highbd_fdct4x4_sse2, &idct4x4_10_sse2, 0, AOM_BITS_10),
+ make_tuple(&aom_highbd_fdct4x4_c, &idct4x4_12_sse2, 0, AOM_BITS_12),
+ make_tuple(&aom_highbd_fdct4x4_sse2, &idct4x4_12_sse2, 0, AOM_BITS_12),
+ make_tuple(&aom_fdct4x4_sse2, &aom_idct4x4_16_add_c, 0, AOM_BITS_8)));
INSTANTIATE_TEST_CASE_P(
SSE2, Trans4x4HT,
::testing::Values(
- make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 0, VPX_BITS_8),
- make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 1, VPX_BITS_8),
- make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 2, VPX_BITS_8),
- make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 3, VPX_BITS_8)));
+ make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 0, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 1, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 2, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_sse2, &av1_iht4x4_16_add_c, 3, AOM_BITS_8)));
#endif // HAVE_SSE2 && CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(MSA, Trans4x4DCT,
::testing::Values(make_tuple(&aom_fdct4x4_msa,
&aom_idct4x4_16_add_msa, 0,
- VPX_BITS_8)));
+ AOM_BITS_8)));
INSTANTIATE_TEST_CASE_P(
MSA, Trans4x4HT,
::testing::Values(
- make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 0, VPX_BITS_8),
- make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 1, VPX_BITS_8),
- make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 2, VPX_BITS_8),
- make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 3, VPX_BITS_8)));
+ make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 0, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 1, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 2, AOM_BITS_8),
+ make_tuple(&av1_fht4x4_msa, &av1_iht4x4_16_add_msa, 3, AOM_BITS_8)));
#endif // HAVE_MSA && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace
diff --git a/test/fdct8x8_test.cc b/test/fdct8x8_test.cc
index 20a9f75..84786ab 100644
--- a/test/fdct8x8_test.cc
+++ b/test/fdct8x8_test.cc
@@ -219,7 +219,7 @@
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < 64; ++j) {
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
test_input_block[j] = src[j] - dst[j];
@@ -245,7 +245,7 @@
test_temp_block[j] *= 4;
}
}
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_AOM_HIGHBITDEPTH
} else {
@@ -257,7 +257,7 @@
for (int j = 0; j < 64; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const int diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const int diff = dst[j] - src[j];
#endif
@@ -295,7 +295,7 @@
for (int i = 0; i < count_test_block; ++i) {
// Initialize a test block with input range [-mask_, mask_].
for (int j = 0; j < 64; ++j) {
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
if (i == 0) {
src[j] = 255;
dst[j] = 0;
@@ -328,7 +328,7 @@
RunFwdTxfm(test_input_block, test_temp_block, pitch_));
ASM_REGISTER_STATE_CHECK(
fwd_txfm_ref(test_input_block, ref_temp_block, pitch_, tx_type_));
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_AOM_HIGHBITDEPTH
} else {
@@ -340,7 +340,7 @@
for (int j = 0; j < 64; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const int diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const int diff = dst[j] - src[j];
#endif
@@ -383,7 +383,7 @@
// Initialize a test block with input range [-255, 255].
for (int j = 0; j < kNumCoeffs; ++j) {
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
src[j] = rnd.Rand8() % 2 ? 255 : 0;
dst[j] = src[j] > 0 ? 0 : 255;
in[j] = src[j] - dst[j];
@@ -400,7 +400,7 @@
for (int j = 0; j < kNumCoeffs; ++j)
coeff[j] = static_cast<tran_low_t>(round(out_r[j]));
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
#if CONFIG_AOM_HIGHBITDEPTH
} else {
@@ -412,7 +412,7 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const uint32_t diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
const uint32_t diff = dst[j] - src[j];
#endif
@@ -472,7 +472,7 @@
} else {
coeff[scan[j]] = 0;
}
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
dst[j] = 0;
ref[j] = 0;
#if CONFIG_AOM_HIGHBITDEPTH
@@ -482,7 +482,7 @@
#endif
}
}
- if (bit_depth_ == VPX_BITS_8) {
+ if (bit_depth_ == AOM_BITS_8) {
ref_txfm(coeff, ref, pitch_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
#if CONFIG_AOM_HIGHBITDEPTH
@@ -496,7 +496,7 @@
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_AOM_HIGHBITDEPTH
const uint32_t diff =
- bit_depth_ == VPX_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
+ bit_depth_ == AOM_BITS_8 ? dst[j] - ref[j] : dst16[j] - ref16[j];
#else
const uint32_t diff = dst[j] - ref[j];
#endif
@@ -624,95 +624,95 @@
INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8DCT,
::testing::Values(
- 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)));
+ make_tuple(&aom_fdct8x8_c, &aom_idct8x8_64_add_c, 0, AOM_BITS_8),
+ make_tuple(&aom_highbd_fdct8x8_c, &idct8x8_10, 0, AOM_BITS_10),
+ make_tuple(&aom_highbd_fdct8x8_c, &idct8x8_12, 0, AOM_BITS_12)));
#else
INSTANTIATE_TEST_CASE_P(C, FwdTrans8x8DCT,
::testing::Values(make_tuple(&aom_fdct8x8_c,
&aom_idct8x8_64_add_c, 0,
- VPX_BITS_8)));
+ AOM_BITS_8)));
#endif // CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_AOM_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8HT,
::testing::Values(
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 0, VPX_BITS_8),
- make_tuple(&av1_highbd_fht8x8_c, &iht8x8_10, 0, VPX_BITS_10),
- make_tuple(&av1_highbd_fht8x8_c, &iht8x8_10, 1, VPX_BITS_10),
- make_tuple(&av1_highbd_fht8x8_c, &iht8x8_10, 2, VPX_BITS_10),
- make_tuple(&av1_highbd_fht8x8_c, &iht8x8_10, 3, VPX_BITS_10),
- make_tuple(&av1_highbd_fht8x8_c, &iht8x8_12, 0, VPX_BITS_12),
- make_tuple(&av1_highbd_fht8x8_c, &iht8x8_12, 1, VPX_BITS_12),
- make_tuple(&av1_highbd_fht8x8_c, &iht8x8_12, 2, VPX_BITS_12),
- make_tuple(&av1_highbd_fht8x8_c, &iht8x8_12, 3, VPX_BITS_12),
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 1, VPX_BITS_8),
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 2, VPX_BITS_8),
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 3, VPX_BITS_8)));
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 0, AOM_BITS_8),
+ make_tuple(&av1_highbd_fht8x8_c, &iht8x8_10, 0, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht8x8_c, &iht8x8_10, 1, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht8x8_c, &iht8x8_10, 2, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht8x8_c, &iht8x8_10, 3, AOM_BITS_10),
+ make_tuple(&av1_highbd_fht8x8_c, &iht8x8_12, 0, AOM_BITS_12),
+ make_tuple(&av1_highbd_fht8x8_c, &iht8x8_12, 1, AOM_BITS_12),
+ make_tuple(&av1_highbd_fht8x8_c, &iht8x8_12, 2, AOM_BITS_12),
+ make_tuple(&av1_highbd_fht8x8_c, &iht8x8_12, 3, AOM_BITS_12),
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 1, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 2, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 3, AOM_BITS_8)));
#else
INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8HT,
::testing::Values(
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 0, VPX_BITS_8),
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 1, VPX_BITS_8),
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 2, VPX_BITS_8),
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 3, VPX_BITS_8)));
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 0, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 1, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 2, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_c, 3, AOM_BITS_8)));
#endif // CONFIG_AOM_HIGHBITDEPTH
#if HAVE_NEON_ASM && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(NEON, FwdTrans8x8DCT,
::testing::Values(make_tuple(&aom_fdct8x8_neon,
&aom_idct8x8_64_add_neon,
- 0, VPX_BITS_8)));
+ 0, AOM_BITS_8)));
#endif // HAVE_NEON_ASM && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, FwdTrans8x8HT,
::testing::Values(
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_neon, 0, VPX_BITS_8),
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_neon, 1, VPX_BITS_8),
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_neon, 2, VPX_BITS_8),
- make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_neon, 3, VPX_BITS_8)));
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_neon, 0, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_neon, 1, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_neon, 2, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_c, &av1_iht8x8_64_add_neon, 3, AOM_BITS_8)));
#endif // HAVE_NEON && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(SSE2, FwdTrans8x8DCT,
::testing::Values(make_tuple(&aom_fdct8x8_sse2,
&aom_idct8x8_64_add_sse2,
- 0, VPX_BITS_8)));
+ 0, AOM_BITS_8)));
INSTANTIATE_TEST_CASE_P(
SSE2, FwdTrans8x8HT,
::testing::Values(
- make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_sse2, 0, VPX_BITS_8),
- make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_sse2, 1, VPX_BITS_8),
- make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_sse2, 2, VPX_BITS_8),
+ make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_sse2, 0, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_sse2, 1, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_sse2, 2, AOM_BITS_8),
make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_sse2, 3,
- VPX_BITS_8)));
+ AOM_BITS_8)));
#endif // HAVE_SSE2 && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, FwdTrans8x8DCT,
::testing::Values(make_tuple(&aom_fdct8x8_sse2, &aom_idct8x8_64_add_c, 0,
- VPX_BITS_8),
+ AOM_BITS_8),
make_tuple(&aom_highbd_fdct8x8_c, &idct8x8_64_add_10_sse2,
- 12, VPX_BITS_10),
+ 12, AOM_BITS_10),
make_tuple(&aom_highbd_fdct8x8_sse2,
- &idct8x8_64_add_10_sse2, 12, VPX_BITS_10),
+ &idct8x8_64_add_10_sse2, 12, AOM_BITS_10),
make_tuple(&aom_highbd_fdct8x8_c, &idct8x8_64_add_12_sse2,
- 12, VPX_BITS_12),
+ 12, AOM_BITS_12),
make_tuple(&aom_highbd_fdct8x8_sse2,
- &idct8x8_64_add_12_sse2, 12, VPX_BITS_12)));
+ &idct8x8_64_add_12_sse2, 12, AOM_BITS_12)));
INSTANTIATE_TEST_CASE_P(
SSE2, FwdTrans8x8HT,
::testing::Values(
- make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_c, 0, VPX_BITS_8),
- make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_c, 1, VPX_BITS_8),
- make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_c, 2, VPX_BITS_8),
- make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_c, 3, VPX_BITS_8)));
+ make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_c, 0, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_c, 1, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_c, 2, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_sse2, &av1_iht8x8_64_add_c, 3, AOM_BITS_8)));
// Optimizations take effect at a threshold of 6201, so we use a value close to
// that to test both branches.
@@ -720,11 +720,11 @@
SSE2, InvTrans8x8DCT,
::testing::Values(
make_tuple(&idct8x8_10_add_10_c, &idct8x8_10_add_10_sse2, 6225,
- VPX_BITS_10),
- make_tuple(&idct8x8_10, &idct8x8_64_add_10_sse2, 6225, VPX_BITS_10),
+ AOM_BITS_10),
+ make_tuple(&idct8x8_10, &idct8x8_64_add_10_sse2, 6225, AOM_BITS_10),
make_tuple(&idct8x8_10_add_12_c, &idct8x8_10_add_12_sse2, 6225,
- VPX_BITS_12),
- make_tuple(&idct8x8_12, &idct8x8_64_add_12_sse2, 6225, VPX_BITS_12)));
+ AOM_BITS_12),
+ make_tuple(&idct8x8_12, &idct8x8_64_add_12_sse2, 6225, AOM_BITS_12)));
#endif // HAVE_SSE2 && CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \
@@ -732,20 +732,20 @@
INSTANTIATE_TEST_CASE_P(SSSE3, FwdTrans8x8DCT,
::testing::Values(make_tuple(&aom_fdct8x8_ssse3,
&aom_idct8x8_64_add_ssse3,
- 0, VPX_BITS_8)));
+ 0, AOM_BITS_8)));
#endif
#if HAVE_MSA && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(MSA, FwdTrans8x8DCT,
::testing::Values(make_tuple(&aom_fdct8x8_msa,
&aom_idct8x8_64_add_msa, 0,
- VPX_BITS_8)));
+ AOM_BITS_8)));
INSTANTIATE_TEST_CASE_P(
MSA, FwdTrans8x8HT,
::testing::Values(
- make_tuple(&av1_fht8x8_msa, &av1_iht8x8_64_add_msa, 0, VPX_BITS_8),
- make_tuple(&av1_fht8x8_msa, &av1_iht8x8_64_add_msa, 1, VPX_BITS_8),
- make_tuple(&av1_fht8x8_msa, &av1_iht8x8_64_add_msa, 2, VPX_BITS_8),
- make_tuple(&av1_fht8x8_msa, &av1_iht8x8_64_add_msa, 3, VPX_BITS_8)));
+ make_tuple(&av1_fht8x8_msa, &av1_iht8x8_64_add_msa, 0, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_msa, &av1_iht8x8_64_add_msa, 1, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_msa, &av1_iht8x8_64_add_msa, 2, AOM_BITS_8),
+ make_tuple(&av1_fht8x8_msa, &av1_iht8x8_64_add_msa, 3, AOM_BITS_8)));
#endif // HAVE_MSA && !CONFIG_AOM_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace
diff --git a/test/frame_size_tests.cc b/test/frame_size_tests.cc
index df49a2c..84ad4d2 100644
--- a/test/frame_size_tests.cc
+++ b/test/frame_size_tests.cc
@@ -17,7 +17,7 @@
public ::testing::Test {
protected:
VP9FrameSizeTestsLarge()
- : EncoderTest(&::libaom_test::kAV1), expected_res_(VPX_CODEC_OK) {}
+ : EncoderTest(&::libaom_test::kAV1), expected_res_(AOM_CODEC_OK) {}
virtual ~VP9FrameSizeTestsLarge() {}
virtual void SetUp() {
@@ -52,7 +52,7 @@
#if CONFIG_SIZE_LIMIT
video.SetSize(DECODE_WIDTH_LIMIT + 16, DECODE_HEIGHT_LIMIT + 16);
video.set_limit(2);
- expected_res_ = VPX_CODEC_CORRUPT_FRAME;
+ expected_res_ = AOM_CODEC_CORRUPT_FRAME;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
#endif
}
@@ -63,7 +63,7 @@
#if CONFIG_SIZE_LIMIT
video.SetSize(DECODE_WIDTH_LIMIT, DECODE_HEIGHT_LIMIT);
video.set_limit(2);
- expected_res_ = VPX_CODEC_OK;
+ expected_res_ = AOM_CODEC_OK;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
#else
// This test produces a pretty large single frame allocation, (roughly
@@ -79,7 +79,7 @@
video.SetSize(4096, 4096);
#endif
video.set_limit(2);
- expected_res_ = VPX_CODEC_OK;
+ expected_res_ = AOM_CODEC_OK;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
#endif
}
@@ -89,7 +89,7 @@
video.SetSize(1, 1);
video.set_limit(2);
- expected_res_ = VPX_CODEC_OK;
+ expected_res_ = AOM_CODEC_OK;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
} // namespace
diff --git a/test/i420_video_source.h b/test/i420_video_source.h
index 8450bce..0825296 100644
--- a/test/i420_video_source.h
+++ b/test/i420_video_source.h
@@ -25,7 +25,7 @@
I420VideoSource(const std::string &file_name, unsigned int width,
unsigned int height, int rate_numerator, int rate_denominator,
unsigned int start, int limit)
- : YUVVideoSource(file_name, VPX_IMG_FMT_I420, width, height,
+ : YUVVideoSource(file_name, AOM_IMG_FMT_I420, width, height,
rate_numerator, rate_denominator, start, limit) {}
};
diff --git a/test/lossless_test.cc b/test/lossless_test.cc
index 53895e9..4c2a147 100644
--- a/test/lossless_test.cc
+++ b/test/lossless_test.cc
@@ -72,7 +72,7 @@
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 0;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
// intentionally changed the dimension for better testing coverage
libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
@@ -92,7 +92,7 @@
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 0;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
const double psnr_lossless = GetMinPsnr();
@@ -109,7 +109,7 @@
cfg_.rc_min_quantizer = 10;
cfg_.rc_max_quantizer = 20;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
timebase.den, timebase.num, 0, 10);
diff --git a/test/md5_helper.h b/test/md5_helper.h
index 4e71301..8c9d4f7 100644
--- a/test/md5_helper.h
+++ b/test/md5_helper.h
@@ -28,7 +28,7 @@
// we are shifting by 1 (chroma_shift) we add 1 before doing the shift.
// This works only for chroma_shift of 0 and 1.
const int bytes_per_sample =
- (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1;
+ (img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 2 : 1;
const int h =
plane ? (img->d_h + img->y_chroma_shift) >> img->y_chroma_shift
: img->d_h;
diff --git a/test/quantize_test.cc b/test/quantize_test.cc
index 0418509..a9a1b3e 100644
--- a/test/quantize_test.cc
+++ b/test/quantize_test.cc
@@ -327,19 +327,19 @@
INSTANTIATE_TEST_CASE_P(
SSE2, VP9QuantizeTest,
::testing::Values(make_tuple(&aom_highbd_quantize_b_sse2,
- &aom_highbd_quantize_b_c, VPX_BITS_8),
+ &aom_highbd_quantize_b_c, AOM_BITS_8),
make_tuple(&aom_highbd_quantize_b_sse2,
- &aom_highbd_quantize_b_c, VPX_BITS_10),
+ &aom_highbd_quantize_b_c, AOM_BITS_10),
make_tuple(&aom_highbd_quantize_b_sse2,
- &aom_highbd_quantize_b_c, VPX_BITS_12)));
+ &aom_highbd_quantize_b_c, AOM_BITS_12)));
INSTANTIATE_TEST_CASE_P(
SSE2, VP9Quantize32Test,
::testing::Values(make_tuple(&aom_highbd_quantize_b_32x32_sse2,
- &aom_highbd_quantize_b_32x32_c, VPX_BITS_8),
+ &aom_highbd_quantize_b_32x32_c, AOM_BITS_8),
make_tuple(&aom_highbd_quantize_b_32x32_sse2,
- &aom_highbd_quantize_b_32x32_c, VPX_BITS_10),
+ &aom_highbd_quantize_b_32x32_c, AOM_BITS_10),
make_tuple(&aom_highbd_quantize_b_32x32_sse2,
- &aom_highbd_quantize_b_32x32_c, VPX_BITS_12)));
+ &aom_highbd_quantize_b_32x32_c, AOM_BITS_12)));
#endif // HAVE_SSE2
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_AOM_QM
diff --git a/test/resize_test.cc b/test/resize_test.cc
index 8ddd08c..2dc2a60 100644
--- a/test/resize_test.cc
+++ b/test/resize_test.cc
@@ -66,7 +66,7 @@
char header[12];
aom_codec_pts_t pts;
- if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) return;
+ if (pkt->kind != AOM_CODEC_CX_FRAME_PKT) return;
pts = pkt->data.frame.pts;
mem_put_le32(header, static_cast<unsigned int>(pkt->data.frame.sz));
@@ -241,7 +241,7 @@
TEST_P(ResizeInternalTest, TestInternalResizeWorks) {
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 10);
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
change_config_ = false;
// q picked such that initial keyframe on this clip is ~30dB PSNR
@@ -316,8 +316,8 @@
cfg_.rc_max_quantizer = 56;
cfg_.rc_undershoot_pct = 50;
cfg_.rc_overshoot_pct = 50;
- cfg_.rc_end_usage = VPX_CBR;
- cfg_.kf_mode = VPX_KF_AUTO;
+ cfg_.rc_end_usage = AOM_CBR;
+ cfg_.kf_mode = AOM_KF_AUTO;
cfg_.g_lag_in_frames = 0;
cfg_.kf_min_dist = cfg_.kf_max_dist = 3000;
// Enable dropped frames.
@@ -427,9 +427,9 @@
}
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;
+ if (frame < 10) return AOM_IMG_FMT_I420;
+ if (frame < 20) return AOM_IMG_FMT_I444;
+ return AOM_IMG_FMT_I420;
}
class ResizeCspTest : public ResizeTest {
@@ -462,12 +462,12 @@
virtual void PreEncodeFrameHook(libaom_test::VideoSource *video,
libaom_test::Encoder *encoder) {
- if (CspForFrameNumber(video->frame()) != VPX_IMG_FMT_I420 &&
+ if (CspForFrameNumber(video->frame()) != AOM_IMG_FMT_I420 &&
cfg_.g_profile != 1) {
cfg_.g_profile = 1;
encoder->Config(&cfg_);
}
- if (CspForFrameNumber(video->frame()) == VPX_IMG_FMT_I420 &&
+ if (CspForFrameNumber(video->frame()) == AOM_IMG_FMT_I420 &&
cfg_.g_profile != 0) {
cfg_.g_profile = 0;
encoder->Config(&cfg_);
@@ -518,7 +518,7 @@
TEST_P(ResizeCspTest, TestResizeCspWorks) {
ResizingCspVideoSource video;
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
cfg_.rc_min_quantizer = cfg_.rc_max_quantizer = 48;
cfg_.g_lag_in_frames = 0;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
diff --git a/test/resize_util.sh b/test/resize_util.sh
index 5faac95..a5ca7c5 100755
--- a/test/resize_util.sh
+++ b/test/resize_util.sh
@@ -26,8 +26,8 @@
# Resizes $YUV_RAW_INPUT using the resize_util example. $1 is the output
# dimensions that will be passed to resize_util.
resize_util() {
- local resizer="${LIBAOM_BIN_PATH}/resize_util${VPX_TEST_EXE_SUFFIX}"
- local output_file="${VPX_TEST_OUTPUT_DIR}/resize_util.raw"
+ local resizer="${LIBAOM_BIN_PATH}/resize_util${AOM_TEST_EXE_SUFFIX}"
+ local output_file="${AOM_TEST_OUTPUT_DIR}/resize_util.raw"
local frames_to_resize="10"
local target_dimensions="$1"
@@ -38,7 +38,7 @@
return 1
fi
- eval "${VPX_TEST_PREFIX}" "${resizer}" "${YUV_RAW_INPUT}" \
+ eval "${AOM_TEST_PREFIX}" "${resizer}" "${YUV_RAW_INPUT}" \
"${YUV_RAW_INPUT_WIDTH}x${YUV_RAW_INPUT_HEIGHT}" \
"${target_dimensions}" "${output_file}" ${frames_to_resize} \
${devnull}
diff --git a/test/sad_test.cc b/test/sad_test.cc
index 218d02c..5a0f362 100644
--- a/test/sad_test.cc
+++ b/test/sad_test.cc
@@ -87,7 +87,7 @@
virtual void SetUp() {
if (bd_ == -1) {
use_high_bit_depth_ = false;
- bit_depth_ = VPX_BITS_8;
+ bit_depth_ = AOM_BITS_8;
source_data_ = source_data8_;
reference_data_ = reference_data8_;
second_pred_ = second_pred8_;
diff --git a/test/set_maps.sh b/test/set_maps.sh
index 637b96a..f85bc8d 100755
--- a/test/set_maps.sh
+++ b/test/set_maps.sh
@@ -32,9 +32,9 @@
set_maps() {
local encoder="$(aom_tool_path set_maps)"
local codec="$1"
- local output_file="${VPX_TEST_OUTPUT_DIR}/set_maps_${codec}.ivf"
+ local output_file="${AOM_TEST_OUTPUT_DIR}/set_maps_${codec}.ivf"
- eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
+ eval "${AOM_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
${devnull}
diff --git a/test/simple_decoder.sh b/test/simple_decoder.sh
index 5f62728..e28d594 100755
--- a/test/simple_decoder.sh
+++ b/test/simple_decoder.sh
@@ -27,17 +27,17 @@
# Runs simple_decoder using $1 as input file. $2 is the codec name, and is used
# solely to name the output file.
simple_decoder() {
- local decoder="${LIBAOM_BIN_PATH}/simple_decoder${VPX_TEST_EXE_SUFFIX}"
+ local decoder="${LIBAOM_BIN_PATH}/simple_decoder${AOM_TEST_EXE_SUFFIX}"
local input_file="$1"
local codec="$2"
- local output_file="${VPX_TEST_OUTPUT_DIR}/simple_decoder_${codec}.raw"
+ local output_file="${AOM_TEST_OUTPUT_DIR}/simple_decoder_${codec}.raw"
if [ ! -x "${decoder}" ]; then
elog "${decoder} does not exist or is not executable."
return 1
fi
- eval "${VPX_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \
+ eval "${AOM_TEST_PREFIX}" "${decoder}" "${input_file}" "${output_file}" \
${devnull}
[ -e "${output_file}" ] || return 1
diff --git a/test/simple_encoder.sh b/test/simple_encoder.sh
index e3a9864..62b6fc4 100755
--- a/test/simple_encoder.sh
+++ b/test/simple_encoder.sh
@@ -25,16 +25,16 @@
# Runs simple_encoder using the codec specified by $1.
simple_encoder() {
- local encoder="${LIBAOM_BIN_PATH}/simple_encoder${VPX_TEST_EXE_SUFFIX}"
+ local encoder="${LIBAOM_BIN_PATH}/simple_encoder${AOM_TEST_EXE_SUFFIX}"
local codec="$1"
- local output_file="${VPX_TEST_OUTPUT_DIR}/simple_encoder_${codec}.ivf"
+ local output_file="${AOM_TEST_OUTPUT_DIR}/simple_encoder_${codec}.ivf"
if [ ! -x "${encoder}" ]; then
elog "${encoder} does not exist or is not executable."
return 1
fi
- eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
+ eval "${AOM_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" 9999 \
${devnull}
diff --git a/test/superframe_test.cc b/test/superframe_test.cc
index 19ebcfd..f4e7cac 100644
--- a/test/superframe_test.cc
+++ b/test/superframe_test.cc
@@ -51,7 +51,7 @@
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;
+ if (pkt->kind != AOM_CODEC_CX_FRAME_PKT) return pkt;
const uint8_t *buffer = reinterpret_cast<uint8_t *>(pkt->data.frame.buf);
const uint8_t marker = buffer[pkt->data.frame.sz - 1];
diff --git a/test/svc_test.cc b/test/svc_test.cc
index dc5ec68..d2e6d95 100644
--- a/test/svc_test.cc
+++ b/test/svc_test.cc
@@ -49,7 +49,7 @@
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);
+ EXPECT_EQ(AOM_CODEC_OK, res);
codec_enc_.g_w = kWidth;
codec_enc_.g_h = kHeight;
@@ -74,7 +74,7 @@
void InitializeEncoder() {
const aom_codec_err_t res =
aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
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_);
@@ -92,7 +92,7 @@
const aom_codec_cx_pkt_t *cx_pkt;
while ((cx_pkt = aom_codec_get_cx_data(&codec_, &iter)) != NULL) {
- if (cx_pkt->kind == VPX_CODEC_STATS_PKT) {
+ if (cx_pkt->kind == AOM_CODEC_STATS_PKT) {
EXPECT_GT(cx_pkt->data.twopass_stats.sz, 0U);
ASSERT_TRUE(cx_pkt->data.twopass_stats.buf != NULL);
stats_buf->append(static_cast<char *>(cx_pkt->data.twopass_stats.buf),
@@ -108,7 +108,7 @@
ASSERT_GT(n, 0);
ASSERT_GT(layers, 0);
svc_.spatial_layers = layers;
- codec_enc_.g_pass = VPX_RC_FIRST_PASS;
+ codec_enc_.g_pass = AOM_RC_FIRST_PASS;
InitializeEncoder();
libaom_test::I420VideoSource video(
@@ -118,16 +118,16 @@
for (int i = 0; i < n; ++i) {
res = aom_svc_encode(&svc_, &codec_, video.img(), video.pts(),
- video.duration(), VPX_DL_GOOD_QUALITY);
- ASSERT_EQ(VPX_CODEC_OK, res);
+ video.duration(), AOM_DL_GOOD_QUALITY);
+ ASSERT_EQ(AOM_CODEC_OK, res);
GetStatsData(stats_buf);
video.Next();
}
// Flush encoder and test EOS packet.
res = aom_svc_encode(&svc_, &codec_, NULL, video.pts(), video.duration(),
- VPX_DL_GOOD_QUALITY);
- ASSERT_EQ(VPX_CODEC_OK, res);
+ AOM_DL_GOOD_QUALITY);
+ ASSERT_EQ(AOM_CODEC_OK, res);
GetStatsData(stats_buf);
ReleaseEncoder();
@@ -140,7 +140,7 @@
const aom_codec_cx_pkt_t *cx_pkt;
while ((cx_pkt = aom_codec_get_cx_data(&codec_, &iter)) != NULL) {
- if (cx_pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
+ if (cx_pkt->kind == AOM_CODEC_CX_FRAME_PKT) {
const size_t frame_size = cx_pkt->data.frame.sz;
EXPECT_GT(frame_size, 0U);
@@ -148,7 +148,7 @@
ASSERT_LT(*frame_received, max_frame_received);
if (*frame_received == 0)
- EXPECT_EQ(1, !!(cx_pkt->data.frame.flags & VPX_FRAME_IS_KEY));
+ EXPECT_EQ(1, !!(cx_pkt->data.frame.flags & AOM_FRAME_IS_KEY));
outputs[*frame_received].buf = malloc(frame_size + 16);
ASSERT_TRUE(outputs[*frame_received].buf != NULL);
@@ -171,7 +171,7 @@
ASSERT_GT(layers, 0);
svc_.spatial_layers = layers;
codec_enc_.rc_target_bitrate = 500;
- if (codec_enc_.g_pass == VPX_RC_LAST_PASS) {
+ if (codec_enc_.g_pass == AOM_RC_LAST_PASS) {
ASSERT_TRUE(stats_buf != NULL);
ASSERT_GT(stats_buf->size(), 0U);
codec_enc_.rc_twopass_stats_in.buf = &(*stats_buf)[0];
@@ -186,16 +186,16 @@
for (int i = 0; i < n; ++i) {
res = aom_svc_encode(&svc_, &codec_, video.img(), video.pts(),
- video.duration(), VPX_DL_GOOD_QUALITY);
- ASSERT_EQ(VPX_CODEC_OK, res);
+ video.duration(), AOM_DL_GOOD_QUALITY);
+ ASSERT_EQ(AOM_CODEC_OK, res);
StoreFrames(n, outputs, &frame_received);
video.Next();
}
// Flush encoder.
res = aom_svc_encode(&svc_, &codec_, NULL, 0, video.duration(),
- VPX_DL_GOOD_QUALITY);
- EXPECT_EQ(VPX_CODEC_OK, res);
+ AOM_DL_GOOD_QUALITY);
+ EXPECT_EQ(AOM_CODEC_OK, res);
StoreFrames(n, outputs, &frame_received);
EXPECT_EQ(frame_received, static_cast<size_t>(n));
@@ -215,7 +215,7 @@
ASSERT_GT(inputs[i].sz, 0U);
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();
+ ASSERT_EQ(AOM_CODEC_OK, res_dec) << decoder_->DecodeError();
++decoded_frames;
DxDataIterator dec_iter = decoder_->GetDxData();
@@ -245,7 +245,7 @@
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);
+ ASSERT_EQ(AOM_CODEC_OK, res);
if (frame_count == 0) {
// There's no super frame but only a single frame.
@@ -317,22 +317,22 @@
TEST_F(SvcTest, SvcInit) {
// test missing parameters
aom_codec_err_t res = aom_svc_init(NULL, &codec_, codec_iface_, &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_init(&svc_, NULL, codec_iface_, &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_init(&svc_, &codec_, NULL, &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_init(&svc_, &codec_, codec_iface_, NULL);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
svc_.spatial_layers = 6; // too many layers
res = aom_svc_init(&svc_, &codec_, codec_iface_, &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
svc_.spatial_layers = 0; // use default layers
InitializeEncoder();
- EXPECT_EQ(VPX_SS_DEFAULT_LAYERS, svc_.spatial_layers);
+ EXPECT_EQ(AOM_SS_DEFAULT_LAYERS, svc_.spatial_layers);
}
TEST_F(SvcTest, InitTwoLayers) {
@@ -342,17 +342,17 @@
TEST_F(SvcTest, InvalidOptions) {
aom_codec_err_t res = aom_svc_set_options(&svc_, NULL);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_set_options(&svc_, "not-an-option=1");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
}
TEST_F(SvcTest, SetLayersOption) {
aom_codec_err_t res = aom_svc_set_options(&svc_, "spatial-layers=3");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
InitializeEncoder();
EXPECT_EQ(3, svc_.spatial_layers);
}
@@ -360,7 +360,7 @@
TEST_F(SvcTest, SetMultipleOptions) {
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);
+ EXPECT_EQ(AOM_CODEC_OK, res);
InitializeEncoder();
EXPECT_EQ(2, svc_.spatial_layers);
}
@@ -369,51 +369,51 @@
svc_.spatial_layers = 2;
aom_codec_err_t res =
aom_svc_set_options(&svc_, "scale-factors=not-scale-factors");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_set_options(&svc_, "scale-factors=1/3, 3*3");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_set_options(&svc_, "scale-factors=1/3");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_set_options(&svc_, "scale-factors=1/3,2/3");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
InitializeEncoder();
}
TEST_F(SvcTest, SetQuantizersOption) {
svc_.spatial_layers = 2;
aom_codec_err_t res = aom_svc_set_options(&svc_, "max-quantizers=nothing");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_set_options(&svc_, "min-quantizers=nothing");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_set_options(&svc_, "max-quantizers=40");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_set_options(&svc_, "min-quantizers=40");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_set_options(&svc_, "max-quantizers=30,30 min-quantizers=40,40");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_set_options(&svc_, "max-quantizers=40,40 min-quantizers=30,30");
InitializeEncoder();
@@ -422,14 +422,14 @@
TEST_F(SvcTest, SetAutoAltRefOption) {
svc_.spatial_layers = 5;
aom_codec_err_t res = aom_svc_set_options(&svc_, "auto-alt-refs=none");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
res = aom_svc_set_options(&svc_, "auto-alt-refs=1,1,1,1,0");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
aom_svc_set_options(&svc_, "auto-alt-refs=0,1,1,1,0");
InitializeEncoder();
@@ -437,7 +437,7 @@
// 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;
+ codec_enc_.g_pass = AOM_RC_ONE_PASS;
aom_fixed_buf output = { 0 };
Pass2EncodeNFrames(NULL, 1, 2, &output);
DecodeNFrames(&output, 1);
@@ -445,7 +445,7 @@
}
TEST_F(SvcTest, OnePassEncodeThreeFrames) {
- codec_enc_.g_pass = VPX_RC_ONE_PASS;
+ codec_enc_.g_pass = AOM_RC_ONE_PASS;
codec_enc_.g_lag_in_frames = 0;
aom_fixed_buf outputs[3];
memset(&outputs[0], 0, sizeof(outputs));
@@ -460,7 +460,7 @@
Pass1EncodeNFrames(10, 2, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
aom_fixed_buf outputs[10];
memset(&outputs[0], 0, sizeof(outputs));
Pass2EncodeNFrames(&stats_buf, 10, 2, &outputs[0]);
@@ -474,7 +474,7 @@
Pass1EncodeNFrames(20, 2, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
aom_svc_set_options(&svc_, "auto-alt-refs=1,1");
aom_fixed_buf outputs[20];
memset(&outputs[0], 0, sizeof(outputs));
@@ -489,7 +489,7 @@
Pass1EncodeNFrames(10, 2, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
aom_svc_set_options(&svc_, "auto-alt-refs=1,1");
aom_fixed_buf outputs[10];
memset(&outputs[0], 0, sizeof(outputs));
@@ -505,7 +505,7 @@
Pass1EncodeNFrames(10, 5, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
aom_svc_set_options(&svc_, "auto-alt-refs=0,1,1,1,0");
aom_fixed_buf outputs[10];
memset(&outputs[0], 0, sizeof(outputs));
@@ -531,7 +531,7 @@
Pass1EncodeNFrames(20, 2, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
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));
@@ -547,7 +547,7 @@
Pass1EncodeNFrames(20, 3, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
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));
@@ -564,9 +564,9 @@
TEST_F(SvcTest, SetMultipleFrameContextsOption) {
svc_.spatial_layers = 5;
aom_codec_err_t res = aom_svc_set_options(&svc_, "multi-frame-contexts=1");
- EXPECT_EQ(VPX_CODEC_OK, res);
+ EXPECT_EQ(AOM_CODEC_OK, res);
res = aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
- EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
+ EXPECT_EQ(AOM_CODEC_INVALID_PARAM, res);
svc_.spatial_layers = 2;
res = aom_svc_set_options(&svc_, "multi-frame-contexts=1");
@@ -579,7 +579,7 @@
Pass1EncodeNFrames(10, 2, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
codec_enc_.g_error_resilient = 0;
aom_svc_set_options(&svc_, "auto-alt-refs=1,1 multi-frame-contexts=1");
aom_fixed_buf outputs[10];
@@ -596,7 +596,7 @@
Pass1EncodeNFrames(10, 2, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
codec_enc_.g_error_resilient = 0;
aom_svc_set_options(&svc_, "auto-alt-refs=1,1 multi-frame-contexts=1");
aom_fixed_buf outputs[10];
@@ -614,7 +614,7 @@
Pass1EncodeNFrames(10, 2, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
codec_enc_.g_error_resilient = 0;
aom_svc_set_options(&svc_,
"auto-alt-refs=1,1 scale-factors=1/1,1/1 "
@@ -634,7 +634,7 @@
Pass1EncodeNFrames(10, 3, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
codec_enc_.g_error_resilient = 0;
aom_svc_set_options(&svc_,
"auto-alt-refs=1,1,1 scale-factors=1/1,1/1,1/1 "
@@ -660,7 +660,7 @@
Pass1EncodeNFrames(10, 1, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
svc_.temporal_layers = 2;
aom_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1");
aom_fixed_buf outputs[10];
@@ -678,7 +678,7 @@
Pass1EncodeNFrames(10, 1, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
svc_.temporal_layers = 2;
codec_enc_.g_error_resilient = 0;
aom_svc_set_options(&svc_,
@@ -699,7 +699,7 @@
Pass1EncodeNFrames(10, 1, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
svc_.temporal_layers = 2;
aom_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1");
aom_fixed_buf outputs[10];
@@ -722,7 +722,7 @@
Pass1EncodeNFrames(10, 1, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
svc_.temporal_layers = 2;
codec_enc_.g_error_resilient = 0;
aom_svc_set_options(&svc_,
@@ -747,7 +747,7 @@
Pass1EncodeNFrames(10, 1, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
svc_.temporal_layers = 2;
aom_svc_set_options(&svc_, "auto-alt-refs=1 scale-factors=1/1");
codec_enc_.g_w = 704;
@@ -769,7 +769,7 @@
Pass1EncodeNFrames(10, 1, &stats_buf);
// Second pass encode
- codec_enc_.g_pass = VPX_RC_LAST_PASS;
+ codec_enc_.g_pass = AOM_RC_LAST_PASS;
svc_.temporal_layers = 2;
codec_enc_.g_error_resilient = 0;
codec_enc_.g_w = 704;
diff --git a/test/test_intra_pred_speed.cc b/test/test_intra_pred_speed.cc
index a38b491..49db732 100644
--- a/test/test_intra_pred_speed.cc
+++ b/test/test_intra_pred_speed.cc
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-// Test and time VPX intra-predictor functions
+// Test and time AOM intra-predictor functions
#include <stdio.h>
#include <string.h>
diff --git a/test/tile_independence_test.cc b/test/tile_independence_test.cc
index dad2dcd..15ad23a 100644
--- a/test/tile_independence_test.cc
+++ b/test/tile_independence_test.cc
@@ -26,7 +26,7 @@
TileIndependenceTest()
: EncoderTest(GET_PARAM(0)), md5_fw_order_(), md5_inv_order_(),
n_tiles_(GET_PARAM(1)) {
- init_flags_ = VPX_CODEC_USE_PSNR;
+ init_flags_ = AOM_CODEC_USE_PSNR;
aom_codec_dec_cfg_t cfg = aom_codec_dec_cfg_t();
cfg.w = 704;
cfg.h = 144;
@@ -57,9 +57,9 @@
::libaom_test::MD5 *md5) {
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) {
+ if (res != AOM_CODEC_OK) {
abort_ = true;
- ASSERT_EQ(VPX_CODEC_OK, res);
+ ASSERT_EQ(AOM_CODEC_OK, res);
}
const aom_image_t *img = dec->GetDxData().Next();
md5->Add(img);
@@ -85,7 +85,7 @@
cfg_.g_timebase = timebase;
cfg_.rc_target_bitrate = 500;
cfg_.g_lag_in_frames = 25;
- cfg_.rc_end_usage = VPX_VBR;
+ cfg_.rc_end_usage = AOM_VBR;
libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 704, 144,
timebase.den, timebase.num, 0, 30);
diff --git a/test/tools_common.sh b/test/tools_common.sh
index b931e34..9bc1811 100755
--- a/test/tools_common.sh
+++ b/test/tools_common.sh
@@ -10,39 +10,39 @@
##
## This file contains shell code shared by test scripts for libaom tools.
-# Use $VPX_TEST_TOOLS_COMMON_SH as a pseudo include guard.
-if [ -z "${VPX_TEST_TOOLS_COMMON_SH}" ]; then
-VPX_TEST_TOOLS_COMMON_SH=included
+# Use $AOM_TEST_TOOLS_COMMON_SH as a pseudo include guard.
+if [ -z "${AOM_TEST_TOOLS_COMMON_SH}" ]; then
+AOM_TEST_TOOLS_COMMON_SH=included
set -e
devnull='> /dev/null 2>&1'
-VPX_TEST_PREFIX=""
+AOM_TEST_PREFIX=""
elog() {
echo "$@" 1>&2
}
vlog() {
- if [ "${VPX_TEST_VERBOSE_OUTPUT}" = "yes" ]; then
+ if [ "${AOM_TEST_VERBOSE_OUTPUT}" = "yes" ]; then
echo "$@"
fi
}
-# Sets $VPX_TOOL_TEST to the name specified by positional parameter one.
+# Sets $AOM_TOOL_TEST to the name specified by positional parameter one.
test_begin() {
- VPX_TOOL_TEST="${1}"
+ AOM_TOOL_TEST="${1}"
}
-# Clears the VPX_TOOL_TEST variable after confirming that $VPX_TOOL_TEST matches
+# Clears the AOM_TOOL_TEST variable after confirming that $AOM_TOOL_TEST matches
# positional parameter one.
test_end() {
- if [ "$1" != "${VPX_TOOL_TEST}" ]; then
+ if [ "$1" != "${AOM_TOOL_TEST}" ]; then
echo "FAIL completed test mismatch!."
echo " completed test: ${1}"
- echo " active test: ${VPX_TOOL_TEST}."
+ echo " active test: ${AOM_TOOL_TEST}."
return 1
fi
- VPX_TOOL_TEST='<unset>'
+ AOM_TOOL_TEST='<unset>'
}
# Echoes the target configuration being tested.
@@ -55,14 +55,14 @@
}
# Trap function used for failure reports and tool output directory removal.
-# When the contents of $VPX_TOOL_TEST do not match the string '<unset>', reports
-# failure of test stored in $VPX_TOOL_TEST.
+# When the contents of $AOM_TOOL_TEST do not match the string '<unset>', reports
+# failure of test stored in $AOM_TOOL_TEST.
cleanup() {
- if [ -n "${VPX_TOOL_TEST}" ] && [ "${VPX_TOOL_TEST}" != '<unset>' ]; then
- echo "FAIL: $VPX_TOOL_TEST"
+ if [ -n "${AOM_TOOL_TEST}" ] && [ "${AOM_TOOL_TEST}" != '<unset>' ]; then
+ echo "FAIL: $AOM_TOOL_TEST"
fi
- if [ -n "${VPX_TEST_OUTPUT_DIR}" ] && [ -d "${VPX_TEST_OUTPUT_DIR}" ]; then
- rm -rf "${VPX_TEST_OUTPUT_DIR}"
+ if [ -n "${AOM_TEST_OUTPUT_DIR}" ] && [ -d "${AOM_TEST_OUTPUT_DIR}" ]; then
+ rm -rf "${AOM_TEST_OUTPUT_DIR}"
fi
}
@@ -151,11 +151,11 @@
# returns.
aom_tool_path() {
local readonly tool_name="$1"
- local tool_path="${LIBAOM_BIN_PATH}/${tool_name}${VPX_TEST_EXE_SUFFIX}"
+ local tool_path="${LIBAOM_BIN_PATH}/${tool_name}${AOM_TEST_EXE_SUFFIX}"
if [ ! -x "${tool_path}" ]; then
# Try one directory up: when running via examples.sh the tool could be in
# the parent directory of $LIBAOM_BIN_PATH.
- tool_path="${LIBAOM_BIN_PATH}/../${tool_name}${VPX_TEST_EXE_SUFFIX}"
+ tool_path="${LIBAOM_BIN_PATH}/../${tool_name}${AOM_TEST_EXE_SUFFIX}"
fi
if [ ! -x "${tool_path}" ]; then
@@ -168,7 +168,7 @@
# in LIBAOM_BIN_PATH, and is executable.
aom_tool_available() {
local tool_name="$1"
- local tool="${LIBAOM_BIN_PATH}/${tool_name}${VPX_TEST_EXE_SUFFIX}"
+ local tool="${LIBAOM_BIN_PATH}/${tool_name}${AOM_TEST_EXE_SUFFIX}"
[ -x "${tool}" ] && echo yes
}
@@ -225,24 +225,24 @@
run_tests() {
local env_tests="verify_aom_test_environment $1"
local tests_to_filter="$2"
- local test_name="${VPX_TEST_NAME}"
+ local test_name="${AOM_TEST_NAME}"
if [ -z "${test_name}" ]; then
test_name="$(basename "${0%.*}")"
fi
- if [ "${VPX_TEST_RUN_DISABLED_TESTS}" != "yes" ]; then
+ if [ "${AOM_TEST_RUN_DISABLED_TESTS}" != "yes" ]; then
# Filter out DISABLED tests.
tests_to_filter=$(filter_strings "${tests_to_filter}" ^DISABLED exclude)
fi
- if [ -n "${VPX_TEST_FILTER}" ]; then
+ if [ -n "${AOM_TEST_FILTER}" ]; then
# Remove tests not matching the user's filter.
- tests_to_filter=$(filter_strings "${tests_to_filter}" ${VPX_TEST_FILTER})
+ tests_to_filter=$(filter_strings "${tests_to_filter}" ${AOM_TEST_FILTER})
fi
# User requested test listing: Dump test names and return.
- if [ "${VPX_TEST_LIST_TESTS}" = "yes" ]; then
+ if [ "${AOM_TEST_LIST_TESTS}" = "yes" ]; then
for test_name in $tests_to_filter; do
echo ${test_name}
done
@@ -319,11 +319,11 @@
shift
;;
--filter)
- VPX_TEST_FILTER="$2"
+ AOM_TEST_FILTER="$2"
shift
;;
--run-disabled-tests)
- VPX_TEST_RUN_DISABLED_TESTS=yes
+ AOM_TEST_RUN_DISABLED_TESTS=yes
;;
--help)
aom_test_usage
@@ -334,17 +334,17 @@
shift
;;
--prefix)
- VPX_TEST_PREFIX="$2"
+ AOM_TEST_PREFIX="$2"
shift
;;
--verbose)
- VPX_TEST_VERBOSE_OUTPUT=yes
+ AOM_TEST_VERBOSE_OUTPUT=yes
;;
--show-program-output)
devnull=
;;
--list-tests)
- VPX_TEST_LIST_TESTS=yes
+ AOM_TEST_LIST_TESTS=yes
;;
*)
aom_test_usage
@@ -362,24 +362,24 @@
# Create a temporary directory for output files, and a trap to clean it up.
if [ -n "${TMPDIR}" ]; then
- VPX_TEST_TEMP_ROOT="${TMPDIR}"
+ AOM_TEST_TEMP_ROOT="${TMPDIR}"
elif [ -n "${TEMPDIR}" ]; then
- VPX_TEST_TEMP_ROOT="${TEMPDIR}"
+ AOM_TEST_TEMP_ROOT="${TEMPDIR}"
else
- VPX_TEST_TEMP_ROOT=/tmp
+ AOM_TEST_TEMP_ROOT=/tmp
fi
-VPX_TEST_OUTPUT_DIR="${VPX_TEST_TEMP_ROOT}/aom_test_$$"
+AOM_TEST_OUTPUT_DIR="${AOM_TEST_TEMP_ROOT}/aom_test_$$"
-if ! mkdir -p "${VPX_TEST_OUTPUT_DIR}" || \
- [ ! -d "${VPX_TEST_OUTPUT_DIR}" ]; then
+if ! mkdir -p "${AOM_TEST_OUTPUT_DIR}" || \
+ [ ! -d "${AOM_TEST_OUTPUT_DIR}" ]; then
echo "${0##*/}: Cannot create output directory, giving up."
- echo "${0##*/}: VPX_TEST_OUTPUT_DIR=${VPX_TEST_OUTPUT_DIR}"
+ echo "${0##*/}: AOM_TEST_OUTPUT_DIR=${AOM_TEST_OUTPUT_DIR}"
exit 1
fi
if [ "$(is_windows_target)" = "yes" ]; then
- VPX_TEST_EXE_SUFFIX=".exe"
+ AOM_TEST_EXE_SUFFIX=".exe"
fi
# Variables shared by tests.
@@ -407,18 +407,18 @@
VP8_IVF_FILE=${VP8_IVF_FILE}
VP9_IVF_FILE=${VP9_IVF_FILE}
VP9_WEBM_FILE=${VP9_WEBM_FILE}
- VPX_TEST_EXE_SUFFIX=${VPX_TEST_EXE_SUFFIX}
- VPX_TEST_FILTER=${VPX_TEST_FILTER}
- VPX_TEST_LIST_TESTS=${VPX_TEST_LIST_TESTS}
- VPX_TEST_OUTPUT_DIR=${VPX_TEST_OUTPUT_DIR}
- VPX_TEST_PREFIX=${VPX_TEST_PREFIX}
- VPX_TEST_RUN_DISABLED_TESTS=${VPX_TEST_RUN_DISABLED_TESTS}
- VPX_TEST_SHOW_PROGRAM_OUTPUT=${VPX_TEST_SHOW_PROGRAM_OUTPUT}
- VPX_TEST_TEMP_ROOT=${VPX_TEST_TEMP_ROOT}
- VPX_TEST_VERBOSE_OUTPUT=${VPX_TEST_VERBOSE_OUTPUT}
+ AOM_TEST_EXE_SUFFIX=${AOM_TEST_EXE_SUFFIX}
+ AOM_TEST_FILTER=${AOM_TEST_FILTER}
+ AOM_TEST_LIST_TESTS=${AOM_TEST_LIST_TESTS}
+ AOM_TEST_OUTPUT_DIR=${AOM_TEST_OUTPUT_DIR}
+ AOM_TEST_PREFIX=${AOM_TEST_PREFIX}
+ AOM_TEST_RUN_DISABLED_TESTS=${AOM_TEST_RUN_DISABLED_TESTS}
+ AOM_TEST_SHOW_PROGRAM_OUTPUT=${AOM_TEST_SHOW_PROGRAM_OUTPUT}
+ AOM_TEST_TEMP_ROOT=${AOM_TEST_TEMP_ROOT}
+ AOM_TEST_VERBOSE_OUTPUT=${AOM_TEST_VERBOSE_OUTPUT}
YUV_RAW_INPUT=${YUV_RAW_INPUT}
YUV_RAW_INPUT_WIDTH=${YUV_RAW_INPUT_WIDTH}
YUV_RAW_INPUT_HEIGHT=${YUV_RAW_INPUT_HEIGHT}
Y4M_NOSQ_PAR_INPUT=${Y4M_NOSQ_PAR_INPUT}"
-fi # End $VPX_TEST_TOOLS_COMMON_SH pseudo include guard.
+fi # End $AOM_TEST_TOOLS_COMMON_SH pseudo include guard.
diff --git a/test/twopass_encoder.sh b/test/twopass_encoder.sh
index 3b4eb5c..bd59189 100755
--- a/test/twopass_encoder.sh
+++ b/test/twopass_encoder.sh
@@ -25,16 +25,16 @@
# Runs twopass_encoder using the codec specified by $1.
twopass_encoder() {
- local encoder="${LIBAOM_BIN_PATH}/twopass_encoder${VPX_TEST_EXE_SUFFIX}"
+ local encoder="${LIBAOM_BIN_PATH}/twopass_encoder${AOM_TEST_EXE_SUFFIX}"
local codec="$1"
- local output_file="${VPX_TEST_OUTPUT_DIR}/twopass_encoder_${codec}.ivf"
+ local output_file="${AOM_TEST_OUTPUT_DIR}/twopass_encoder_${codec}.ivf"
if [ ! -x "${encoder}" ]; then
elog "${encoder} does not exist or is not executable."
return 1
fi
- eval "${VPX_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
+ eval "${AOM_TEST_PREFIX}" "${encoder}" "${codec}" "${YUV_RAW_INPUT_WIDTH}" \
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
${devnull}
diff --git a/test/util.h b/test/util.h
index 28e5cf0..f63fda1 100644
--- a/test/util.h
+++ b/test/util.h
@@ -31,8 +31,8 @@
int64_t sqrerr = 0;
for (i = 0; i < height_y; ++i)
for (j = 0; j < width_y; ++j) {
- int64_t d = img1->planes[VPX_PLANE_Y][i * img1->stride[VPX_PLANE_Y] + j] -
- img2->planes[VPX_PLANE_Y][i * img2->stride[VPX_PLANE_Y] + j];
+ int64_t d = img1->planes[AOM_PLANE_Y][i * img1->stride[AOM_PLANE_Y] + j] -
+ img2->planes[AOM_PLANE_Y][i * img2->stride[AOM_PLANE_Y] + j];
sqrerr += d * d;
}
double mse = static_cast<double>(sqrerr) / (width_y * height_y);
diff --git a/test/variance_test.cc b/test/variance_test.cc
index d8da018..2f5694b 100644
--- a/test/variance_test.cc
+++ b/test/variance_test.cc
@@ -51,15 +51,15 @@
// (bit_depth - 8) for se
static void RoundHighBitDepth(int bit_depth, int64_t *se, uint64_t *sse) {
switch (bit_depth) {
- case VPX_BITS_12:
+ case AOM_BITS_12:
*sse = (*sse + 128) >> 8;
*se = (*se + 8) >> 4;
break;
- case VPX_BITS_10:
+ case AOM_BITS_10:
*sse = (*sse + 8) >> 4;
*se = (*se + 2) >> 2;
break;
- case VPX_BITS_8:
+ case AOM_BITS_8:
default: break;
}
}
@@ -216,7 +216,7 @@
bit_depth_ = static_cast<aom_bit_depth_t>(get<3>(params));
use_high_bit_depth_ = true;
} else {
- bit_depth_ = VPX_BITS_8;
+ bit_depth_ = AOM_BITS_8;
use_high_bit_depth_ = false;
}
mask_ = (1 << bit_depth_) - 1;
@@ -430,7 +430,7 @@
const int stride_coeff = 1;
ASM_REGISTER_STATE_CHECK(mse_(src_, width_, ref_, width_, &sse1));
variance_ref(src_, ref_, log2width_, log2height_, stride_coeff,
- stride_coeff, &sse2, false, VPX_BITS_8);
+ stride_coeff, &sse2, false, AOM_BITS_8);
EXPECT_EQ(sse1, sse2);
}
}
@@ -447,7 +447,7 @@
const int stride_coeff = 1;
ASM_REGISTER_STATE_CHECK(var1 = mse_(src_, width_, ref_, width_));
variance_ref(src_, ref_, log2width_, log2height_, stride_coeff,
- stride_coeff, &sse2, false, VPX_BITS_8);
+ stride_coeff, &sse2, false, AOM_BITS_8);
EXPECT_EQ(var1, sse2);
}
}
@@ -543,7 +543,7 @@
bit_depth_ = (aom_bit_depth_t)get<3>(params);
use_high_bit_depth_ = true;
} else {
- bit_depth_ = VPX_BITS_8;
+ bit_depth_ = AOM_BITS_8;
use_high_bit_depth_ = false;
}
mask_ = (1 << bit_depth_) - 1;
diff --git a/test/video_source.h b/test/video_source.h
index 2cd5753..e986ffb 100644
--- a/test/video_source.h
+++ b/test/video_source.h
@@ -133,7 +133,7 @@
public:
DummyVideoSource()
: img_(NULL), limit_(100), width_(80), height_(64),
- format_(VPX_IMG_FMT_I420) {
+ format_(AOM_IMG_FMT_I420) {
ReallocImage();
}
diff --git a/test/vp8_multi_resolution_encoder.sh b/test/vp8_multi_resolution_encoder.sh
index fbe61a4..a64d6ea 100755
--- a/test/vp8_multi_resolution_encoder.sh
+++ b/test/vp8_multi_resolution_encoder.sh
@@ -39,13 +39,13 @@
return 1
fi
- eval "${VPX_TEST_PREFIX}" "${encoder}" "$@" ${devnull}
+ eval "${AOM_TEST_PREFIX}" "${encoder}" "$@" ${devnull}
}
vp8_multi_resolution_encoder_three_formats() {
- local readonly output_files="${VPX_TEST_OUTPUT_DIR}/vp8_mre_0.ivf
- ${VPX_TEST_OUTPUT_DIR}/vp8_mre_1.ivf
- ${VPX_TEST_OUTPUT_DIR}/vp8_mre_2.ivf"
+ local readonly output_files="${AOM_TEST_OUTPUT_DIR}/vp8_mre_0.ivf
+ ${AOM_TEST_OUTPUT_DIR}/vp8_mre_1.ivf
+ ${AOM_TEST_OUTPUT_DIR}/vp8_mre_2.ivf"
if [ "$(aom_config_option_enabled CONFIG_MULTI_RES_ENCODING)" = "yes" ]; then
if [ "$(vp8_encode_available)" = "yes" ]; then
diff --git a/test/vp8cx_set_ref.sh b/test/vp8cx_set_ref.sh
index fa30ffb..c42ec4c 100755
--- a/test/vp8cx_set_ref.sh
+++ b/test/vp8cx_set_ref.sh
@@ -29,9 +29,9 @@
# TODO(tomfinegan): Pass the codec param once the example is updated to support
# VP9.
aom_set_ref() {
- local encoder="${LIBAOM_BIN_PATH}/vp8cx_set_ref${VPX_TEST_EXE_SUFFIX}"
+ local encoder="${LIBAOM_BIN_PATH}/vp8cx_set_ref${AOM_TEST_EXE_SUFFIX}"
local codec="$1"
- local output_file="${VPX_TEST_OUTPUT_DIR}/vp8cx_set_ref_${codec}.ivf"
+ local output_file="${AOM_TEST_OUTPUT_DIR}/vp8cx_set_ref_${codec}.ivf"
local ref_frame_num=90
if [ ! -x "${encoder}" ]; then
@@ -39,7 +39,7 @@
return 1
fi
- eval "${VPX_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT_WIDTH}" \
+ eval "${AOM_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT_WIDTH}" \
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
"${ref_frame_num}" ${devnull}
diff --git a/test/vp9_spatial_svc_encoder.sh b/test/vp9_spatial_svc_encoder.sh
index 94ea43c..6b94458 100755
--- a/test/vp9_spatial_svc_encoder.sh
+++ b/test/vp9_spatial_svc_encoder.sh
@@ -26,10 +26,10 @@
# Runs vp9_spatial_svc_encoder. $1 is the test name.
vp9_spatial_svc_encoder() {
local readonly \
- encoder="${LIBAOM_BIN_PATH}/vp9_spatial_svc_encoder${VPX_TEST_EXE_SUFFIX}"
+ encoder="${LIBAOM_BIN_PATH}/vp9_spatial_svc_encoder${AOM_TEST_EXE_SUFFIX}"
local readonly test_name="$1"
local readonly \
- output_file="${VPX_TEST_OUTPUT_DIR}/vp9_ssvc_encoder${test_name}.ivf"
+ output_file="${AOM_TEST_OUTPUT_DIR}/vp9_ssvc_encoder${test_name}.ivf"
local readonly frames_to_encode=10
local readonly max_kf=9999
@@ -40,7 +40,7 @@
return 1
fi
- eval "${VPX_TEST_PREFIX}" "${encoder}" -w "${YUV_RAW_INPUT_WIDTH}" \
+ eval "${AOM_TEST_PREFIX}" "${encoder}" -w "${YUV_RAW_INPUT_WIDTH}" \
-h "${YUV_RAW_INPUT_HEIGHT}" -k "${max_kf}" -f "${frames_to_encode}" \
"$@" "${YUV_RAW_INPUT}" "${output_file}" ${devnull}
diff --git a/test/y4m_test.cc b/test/y4m_test.cc
index 095e231..5389470 100644
--- a/test/y4m_test.cc
+++ b/test/y4m_test.cc
@@ -34,23 +34,23 @@
};
const Y4mTestParam kY4mTestVectors[] = {
- { "park_joy_90p_8_420.y4m", 8, VPX_IMG_FMT_I420,
+ { "park_joy_90p_8_420.y4m", 8, AOM_IMG_FMT_I420,
"e5406275b9fc6bb3436c31d4a05c1cab" },
- { "park_joy_90p_8_422.y4m", 8, VPX_IMG_FMT_I422,
+ { "park_joy_90p_8_422.y4m", 8, AOM_IMG_FMT_I422,
"284a47a47133b12884ec3a14e959a0b6" },
- { "park_joy_90p_8_444.y4m", 8, VPX_IMG_FMT_I444,
+ { "park_joy_90p_8_444.y4m", 8, AOM_IMG_FMT_I444,
"90517ff33843d85de712fd4fe60dbed0" },
- { "park_joy_90p_10_420.y4m", 10, VPX_IMG_FMT_I42016,
+ { "park_joy_90p_10_420.y4m", 10, AOM_IMG_FMT_I42016,
"63f21f9f717d8b8631bd2288ee87137b" },
- { "park_joy_90p_10_422.y4m", 10, VPX_IMG_FMT_I42216,
+ { "park_joy_90p_10_422.y4m", 10, AOM_IMG_FMT_I42216,
"48ab51fb540aed07f7ff5af130c9b605" },
- { "park_joy_90p_10_444.y4m", 10, VPX_IMG_FMT_I44416,
+ { "park_joy_90p_10_444.y4m", 10, AOM_IMG_FMT_I44416,
"067bfd75aa85ff9bae91fa3e0edd1e3e" },
- { "park_joy_90p_12_420.y4m", 12, VPX_IMG_FMT_I42016,
+ { "park_joy_90p_12_420.y4m", 12, AOM_IMG_FMT_I42016,
"9e6d8f6508c6e55625f6b697bc461cef" },
- { "park_joy_90p_12_422.y4m", 12, VPX_IMG_FMT_I42216,
+ { "park_joy_90p_12_422.y4m", 12, AOM_IMG_FMT_I42216,
"b239c6b301c0b835485be349ca83a7e3" },
- { "park_joy_90p_12_444.y4m", 12, VPX_IMG_FMT_I44416,
+ { "park_joy_90p_12_444.y4m", 12, AOM_IMG_FMT_I44416,
"5a6481a550821dab6d0192f5c63845e9" },
};
@@ -59,7 +59,7 @@
for (plane = 0; plane < 3; ++plane) {
const unsigned char *buf = img->planes[plane];
const int stride = img->stride[plane];
- const int bytes_per_sample = (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1;
+ const int bytes_per_sample = (img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 2 : 1;
const int h =
(plane ? (img->d_h + img->y_chroma_shift) >> img->y_chroma_shift
: img->d_h);
@@ -97,17 +97,17 @@
ASSERT_EQ(img()->d_h, kHeight);
ASSERT_EQ(y4m_.bit_depth, bit_depth);
ASSERT_EQ(y4m_.aom_fmt, fmt);
- if (fmt == VPX_IMG_FMT_I420 || fmt == VPX_IMG_FMT_I42016) {
+ if (fmt == AOM_IMG_FMT_I420 || fmt == AOM_IMG_FMT_I42016) {
ASSERT_EQ(y4m_.bps, (int)y4m_.bit_depth * 3 / 2);
ASSERT_EQ(img()->x_chroma_shift, 1U);
ASSERT_EQ(img()->y_chroma_shift, 1U);
}
- if (fmt == VPX_IMG_FMT_I422 || fmt == VPX_IMG_FMT_I42216) {
+ if (fmt == AOM_IMG_FMT_I422 || fmt == AOM_IMG_FMT_I42216) {
ASSERT_EQ(y4m_.bps, (int)y4m_.bit_depth * 2);
ASSERT_EQ(img()->x_chroma_shift, 1U);
ASSERT_EQ(img()->y_chroma_shift, 0U);
}
- if (fmt == VPX_IMG_FMT_I444 || fmt == VPX_IMG_FMT_I44416) {
+ if (fmt == AOM_IMG_FMT_I444 || fmt == AOM_IMG_FMT_I44416) {
ASSERT_EQ(y4m_.bps, (int)y4m_.bit_depth * 3);
ASSERT_EQ(img()->x_chroma_shift, 0U);
ASSERT_EQ(img()->y_chroma_shift, 0U);
diff --git a/test/yuv_video_source.h b/test/yuv_video_source.h
index c24c1ba..9ff76a8 100644
--- a/test/yuv_video_source.h
+++ b/test/yuv_video_source.h
@@ -30,7 +30,7 @@
int rate_denominator, unsigned int start, int limit)
: file_name_(file_name), input_file_(NULL), img_(NULL), start_(start),
limit_(limit), frame_(0), width_(0), height_(0),
- format_(VPX_IMG_FMT_NONE), framerate_numerator_(rate_numerator),
+ format_(AOM_IMG_FMT_NONE), framerate_numerator_(rate_numerator),
framerate_denominator_(rate_denominator) {
// This initializes format_, raw_size_, width_, height_ and allocates img.
SetSize(width, height, format);
@@ -84,14 +84,14 @@
height_ = height;
format_ = format;
switch (format) {
- case VPX_IMG_FMT_I420: raw_size_ = width * height * 3 / 2; break;
- case VPX_IMG_FMT_I422: raw_size_ = width * height * 2; break;
- case VPX_IMG_FMT_I440: raw_size_ = width * height * 2; break;
- case VPX_IMG_FMT_I444: raw_size_ = width * height * 3; break;
- case VPX_IMG_FMT_I42016: raw_size_ = width * height * 3; break;
- case VPX_IMG_FMT_I42216: raw_size_ = width * height * 4; break;
- case VPX_IMG_FMT_I44016: raw_size_ = width * height * 4; break;
- case VPX_IMG_FMT_I44416: raw_size_ = width * height * 6; break;
+ case AOM_IMG_FMT_I420: raw_size_ = width * height * 3 / 2; break;
+ case AOM_IMG_FMT_I422: raw_size_ = width * height * 2; break;
+ case AOM_IMG_FMT_I440: raw_size_ = width * height * 2; break;
+ case AOM_IMG_FMT_I444: raw_size_ = width * height * 3; break;
+ case AOM_IMG_FMT_I42016: raw_size_ = width * height * 3; break;
+ case AOM_IMG_FMT_I42216: raw_size_ = width * height * 4; break;
+ case AOM_IMG_FMT_I44016: raw_size_ = width * height * 4; break;
+ case AOM_IMG_FMT_I44416: raw_size_ = width * height * 6; break;
default: ASSERT_TRUE(0);
}
}
diff --git a/tools_common.c b/tools_common.c
index 8d2c764..f497ad8 100644
--- a/tools_common.c
+++ b/tools_common.c
@@ -80,7 +80,7 @@
struct FileTypeDetectionBuffer *detect = &input_ctx->detect;
int plane = 0;
int shortread = 0;
- const int bytespp = (yuv_frame->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1;
+ const int bytespp = (yuv_frame->fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 2 : 1;
for (plane = 0; plane < 3; ++plane) {
uint8_t *ptr;
@@ -95,13 +95,13 @@
switch (plane) {
case 1:
ptr =
- yuv_frame->planes[yuv_frame->fmt == VPX_IMG_FMT_YV12 ? VPX_PLANE_V
- : VPX_PLANE_U];
+ yuv_frame->planes[yuv_frame->fmt == AOM_IMG_FMT_YV12 ? AOM_PLANE_V
+ : AOM_PLANE_U];
break;
case 2:
ptr =
- yuv_frame->planes[yuv_frame->fmt == VPX_IMG_FMT_YV12 ? VPX_PLANE_U
- : VPX_PLANE_V];
+ yuv_frame->planes[yuv_frame->fmt == AOM_IMG_FMT_YV12 ? AOM_PLANE_U
+ : AOM_PLANE_V];
break;
default: ptr = yuv_frame->planes[plane];
}
@@ -216,7 +216,7 @@
const unsigned char *buf = img->planes[plane];
const int stride = img->stride[plane];
const int w = aom_img_plane_width(img, plane) *
- ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1);
+ ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 2 : 1);
const int h = aom_img_plane_height(img, plane);
int y;
@@ -234,7 +234,7 @@
unsigned char *buf = img->planes[plane];
const int stride = img->stride[plane];
const int w = aom_img_plane_width(img, plane) *
- ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1);
+ ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 2 : 1);
const int h = aom_img_plane_height(img, plane);
int y;
@@ -273,10 +273,10 @@
fatal("Unsupported image conversion");
}
switch (src->fmt) {
- case VPX_IMG_FMT_I42016:
- case VPX_IMG_FMT_I42216:
- case VPX_IMG_FMT_I44416:
- case VPX_IMG_FMT_I44016: break;
+ case AOM_IMG_FMT_I42016:
+ case AOM_IMG_FMT_I42216:
+ case AOM_IMG_FMT_I44416:
+ case AOM_IMG_FMT_I44016: break;
default: fatal("Unsupported image conversion"); break;
}
for (plane = 0; plane < 3; plane++) {
@@ -305,14 +305,14 @@
if (dst->d_w != src->d_w || dst->d_h != src->d_h ||
dst->x_chroma_shift != src->x_chroma_shift ||
dst->y_chroma_shift != src->y_chroma_shift ||
- dst->fmt != src->fmt + VPX_IMG_FMT_HIGHBITDEPTH || input_shift < 0) {
+ dst->fmt != src->fmt + AOM_IMG_FMT_HIGHBITDEPTH || input_shift < 0) {
fatal("Unsupported image conversion");
}
switch (src->fmt) {
- case VPX_IMG_FMT_I420:
- case VPX_IMG_FMT_I422:
- case VPX_IMG_FMT_I444:
- case VPX_IMG_FMT_I440: break;
+ case AOM_IMG_FMT_I420:
+ case AOM_IMG_FMT_I422:
+ case AOM_IMG_FMT_I444:
+ case AOM_IMG_FMT_I440: break;
default: fatal("Unsupported image conversion"); break;
}
for (plane = 0; plane < 3; plane++) {
@@ -335,7 +335,7 @@
}
void aom_img_upshift(aom_image_t *dst, aom_image_t *src, int input_shift) {
- if (src->fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
+ if (src->fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
highbd_img_upshift(dst, src, input_shift);
} else {
lowbd_img_upshift(dst, src, input_shift);
@@ -344,16 +344,16 @@
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 ||
+ if (dst->fmt + AOM_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 ||
dst->y_chroma_shift != src->y_chroma_shift) {
fatal("Unsupported image conversion");
}
switch (dst->fmt) {
- case VPX_IMG_FMT_I420:
- case VPX_IMG_FMT_I422:
- case VPX_IMG_FMT_I444:
- case VPX_IMG_FMT_I440: break;
+ case AOM_IMG_FMT_I420:
+ case AOM_IMG_FMT_I422:
+ case AOM_IMG_FMT_I444:
+ case AOM_IMG_FMT_I440: break;
default: fatal("Unsupported image conversion"); break;
}
for (plane = 0; plane < 3; plane++) {
@@ -385,10 +385,10 @@
fatal("Unsupported image conversion");
}
switch (src->fmt) {
- case VPX_IMG_FMT_I42016:
- case VPX_IMG_FMT_I42216:
- case VPX_IMG_FMT_I44416:
- case VPX_IMG_FMT_I44016: break;
+ case AOM_IMG_FMT_I42016:
+ case AOM_IMG_FMT_I42216:
+ case AOM_IMG_FMT_I44416:
+ case AOM_IMG_FMT_I44016: break;
default: fatal("Unsupported image conversion"); break;
}
for (plane = 0; plane < 3; plane++) {
@@ -415,14 +415,14 @@
if (dst->d_w != src->d_w || dst->d_h != src->d_h ||
dst->x_chroma_shift != src->x_chroma_shift ||
dst->y_chroma_shift != src->y_chroma_shift ||
- src->fmt != dst->fmt + VPX_IMG_FMT_HIGHBITDEPTH || down_shift < 0) {
+ src->fmt != dst->fmt + AOM_IMG_FMT_HIGHBITDEPTH || down_shift < 0) {
fatal("Unsupported image conversion");
}
switch (dst->fmt) {
- case VPX_IMG_FMT_I420:
- case VPX_IMG_FMT_I422:
- case VPX_IMG_FMT_I444:
- case VPX_IMG_FMT_I440: break;
+ case AOM_IMG_FMT_I420:
+ case AOM_IMG_FMT_I422:
+ case AOM_IMG_FMT_I444:
+ case AOM_IMG_FMT_I440: break;
default: fatal("Unsupported image conversion"); break;
}
for (plane = 0; plane < 3; plane++) {
@@ -445,7 +445,7 @@
}
void aom_img_downshift(aom_image_t *dst, aom_image_t *src, int down_shift) {
- if (dst->fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
+ if (dst->fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
highbd_img_downshift(dst, src, down_shift);
} else {
lowbd_img_downshift(dst, src, down_shift);
diff --git a/tools_common.h b/tools_common.h
index 1fd39d1..e7c16c4 100644
--- a/tools_common.h
+++ b/tools_common.h
@@ -107,24 +107,24 @@
#endif
#if defined(__GNUC__)
-#define VPX_NO_RETURN __attribute__((noreturn))
+#define AOM_NO_RETURN __attribute__((noreturn))
#else
-#define VPX_NO_RETURN
+#define AOM_NO_RETURN
#endif
/* Sets a stdio stream into binary mode */
FILE *set_binary_mode(FILE *stream);
-void die(const char *fmt, ...) VPX_NO_RETURN;
-void fatal(const char *fmt, ...) VPX_NO_RETURN;
+void die(const char *fmt, ...) AOM_NO_RETURN;
+void fatal(const char *fmt, ...) AOM_NO_RETURN;
void warn(const char *fmt, ...);
-void die_codec(aom_codec_ctx_t *ctx, const char *s) VPX_NO_RETURN;
+void die_codec(aom_codec_ctx_t *ctx, const char *s) AOM_NO_RETURN;
/* The tool including this file must define usage_exit() */
-void usage_exit(void) VPX_NO_RETURN;
+void usage_exit(void) AOM_NO_RETURN;
-#undef VPX_NO_RETURN
+#undef AOM_NO_RETURN
int read_yuv_frame(struct VpxInputContext *input_ctx, aom_image_t *yuv_frame);
diff --git a/usage.dox b/usage.dox
index 7e6d4c8..59239e8 100644
--- a/usage.dox
+++ b/usage.dox
@@ -55,7 +55,7 @@
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 aom_codec_get_caps() method. Attempts to invoke features not supported
- by an algorithm will generally result in #VPX_CODEC_INCAPABLE.
+ by an algorithm will generally result in #AOM_CODEC_INCAPABLE.
\if decoder
Currently defined decoder features include:
@@ -72,8 +72,8 @@
the ABI is versioned. The ABI version number must be passed at
initialization time to ensure the application is using a header file that
matches the library. The current ABI version number is stored in the
- preprocessor macros #VPX_CODEC_ABI_VERSION, #VPX_ENCODER_ABI_VERSION, and
- #VPX_DECODER_ABI_VERSION. For convenience, each initialization function has
+ preprocessor macros #AOM_CODEC_ABI_VERSION, #AOM_ENCODER_ABI_VERSION, and
+ #AOM_DECODER_ABI_VERSION. For convenience, each initialization function has
a wrapper macro that inserts the correct version number. These macros are
named like the initialization methods, but without the _ver suffix.
diff --git a/warnings.c b/warnings.c
index db7bd51..4238a17 100644
--- a/warnings.c
+++ b/warnings.c
@@ -79,7 +79,7 @@
static void check_lag_in_frames_realtime_deadline(
int lag_in_frames, int deadline, struct WarningList *warning_list) {
- if (deadline == VPX_DL_REALTIME && lag_in_frames != 0)
+ if (deadline == AOM_DL_REALTIME && lag_in_frames != 0)
add_warning(lag_in_frames_with_realtime, warning_list);
}
diff --git a/webmenc.cc b/webmenc.cc
index 75cceeb..a51a409 100644
--- a/webmenc.cc
+++ b/webmenc.cc
@@ -80,7 +80,7 @@
segment->AddFrame(static_cast<uint8_t *>(pkt->data.frame.buf),
pkt->data.frame.sz, kVideoTrackNumber, pts_ns,
- pkt->data.frame.flags & VPX_FRAME_IS_KEY);
+ pkt->data.frame.flags & AOM_FRAME_IS_KEY);
}
void write_webm_file_footer(struct EbmlGlobal *glob) {
diff --git a/y4menc.c b/y4menc.c
index ffa8dc6..4067f34 100644
--- a/y4menc.c
+++ b/y4menc.c
@@ -18,40 +18,40 @@
const char *color;
switch (bit_depth) {
case 8:
- color = fmt == VPX_IMG_FMT_444A
+ color = fmt == AOM_IMG_FMT_444A
? "C444alpha\n"
- : fmt == VPX_IMG_FMT_I444 ? "C444\n" : fmt == VPX_IMG_FMT_I422
+ : fmt == AOM_IMG_FMT_I444 ? "C444\n" : fmt == AOM_IMG_FMT_I422
? "C422\n"
: "C420jpeg\n";
break;
case 9:
- color = fmt == VPX_IMG_FMT_I44416
+ color = fmt == AOM_IMG_FMT_I44416
? "C444p9 XYSCSS=444P9\n"
- : fmt == VPX_IMG_FMT_I42216 ? "C422p9 XYSCSS=422P9\n"
+ : fmt == AOM_IMG_FMT_I42216 ? "C422p9 XYSCSS=422P9\n"
: "C420p9 XYSCSS=420P9\n";
break;
case 10:
- color = fmt == VPX_IMG_FMT_I44416
+ color = fmt == AOM_IMG_FMT_I44416
? "C444p10 XYSCSS=444P10\n"
- : fmt == VPX_IMG_FMT_I42216 ? "C422p10 XYSCSS=422P10\n"
+ : fmt == AOM_IMG_FMT_I42216 ? "C422p10 XYSCSS=422P10\n"
: "C420p10 XYSCSS=420P10\n";
break;
case 12:
- color = fmt == VPX_IMG_FMT_I44416
+ color = fmt == AOM_IMG_FMT_I44416
? "C444p12 XYSCSS=444P12\n"
- : fmt == VPX_IMG_FMT_I42216 ? "C422p12 XYSCSS=422P12\n"
+ : fmt == AOM_IMG_FMT_I42216 ? "C422p12 XYSCSS=422P12\n"
: "C420p12 XYSCSS=420P12\n";
break;
case 14:
- color = fmt == VPX_IMG_FMT_I44416
+ color = fmt == AOM_IMG_FMT_I44416
? "C444p14 XYSCSS=444P14\n"
- : fmt == VPX_IMG_FMT_I42216 ? "C422p14 XYSCSS=422P14\n"
+ : fmt == AOM_IMG_FMT_I42216 ? "C422p14 XYSCSS=422P14\n"
: "C420p14 XYSCSS=420P14\n";
break;
case 16:
- color = fmt == VPX_IMG_FMT_I44416
+ color = fmt == AOM_IMG_FMT_I44416
? "C444p16 XYSCSS=444P16\n"
- : fmt == VPX_IMG_FMT_I42216 ? "C422p16 XYSCSS=422P16\n"
+ : fmt == AOM_IMG_FMT_I42216 ? "C422p16 XYSCSS=422P16\n"
: "C420p16 XYSCSS=420P16\n";
break;
default: color = NULL; assert(0);
diff --git a/y4minput.c b/y4minput.c
index f7ff3d5..1919189 100644
--- a/y4minput.c
+++ b/y4minput.c
@@ -806,7 +806,7 @@
"Only progressive scan handled.\n");
return -1;
}
- _y4m->aom_fmt = VPX_IMG_FMT_I420;
+ _y4m->aom_fmt = AOM_IMG_FMT_I420;
_y4m->bps = 12;
_y4m->bit_depth = 8;
if (strcmp(_y4m->chroma_type, "420") == 0 ||
@@ -832,7 +832,7 @@
_y4m->convert = y4m_convert_null;
_y4m->bit_depth = 10;
_y4m->bps = 15;
- _y4m->aom_fmt = VPX_IMG_FMT_I42016;
+ _y4m->aom_fmt = AOM_IMG_FMT_I42016;
if (only_420) {
fprintf(stderr, "Unsupported conversion from 420p10 to 420jpeg\n");
return -1;
@@ -850,7 +850,7 @@
_y4m->convert = y4m_convert_null;
_y4m->bit_depth = 12;
_y4m->bps = 18;
- _y4m->aom_fmt = VPX_IMG_FMT_I42016;
+ _y4m->aom_fmt = AOM_IMG_FMT_I42016;
if (only_420) {
fprintf(stderr, "Unsupported conversion from 420p12 to 420jpeg\n");
return -1;
@@ -898,7 +898,7 @@
_y4m->aux_buf_read_sz + ((_y4m->pic_w + 1) / 2) * _y4m->pic_h;
_y4m->convert = y4m_convert_422_420jpeg;
} else {
- _y4m->aom_fmt = VPX_IMG_FMT_I422;
+ _y4m->aom_fmt = AOM_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 @@
} else if (strcmp(_y4m->chroma_type, "422p10") == 0) {
_y4m->src_c_dec_h = 2;
_y4m->src_c_dec_v = 1;
- _y4m->aom_fmt = VPX_IMG_FMT_I42216;
+ _y4m->aom_fmt = AOM_IMG_FMT_I42216;
_y4m->bps = 20;
_y4m->bit_depth = 10;
_y4m->dst_c_dec_h = _y4m->src_c_dec_h;
@@ -927,7 +927,7 @@
} else if (strcmp(_y4m->chroma_type, "422p12") == 0) {
_y4m->src_c_dec_h = 2;
_y4m->src_c_dec_v = 1;
- _y4m->aom_fmt = VPX_IMG_FMT_I42216;
+ _y4m->aom_fmt = AOM_IMG_FMT_I42216;
_y4m->bps = 24;
_y4m->bit_depth = 12;
_y4m->dst_c_dec_h = _y4m->src_c_dec_h;
@@ -968,7 +968,7 @@
_y4m->aux_buf_read_sz + ((_y4m->pic_w + 1) / 2) * _y4m->pic_h;
_y4m->convert = y4m_convert_444_420jpeg;
} else {
- _y4m->aom_fmt = VPX_IMG_FMT_I444;
+ _y4m->aom_fmt = AOM_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 @@
} else if (strcmp(_y4m->chroma_type, "444p10") == 0) {
_y4m->src_c_dec_h = 1;
_y4m->src_c_dec_v = 1;
- _y4m->aom_fmt = VPX_IMG_FMT_I44416;
+ _y4m->aom_fmt = AOM_IMG_FMT_I44416;
_y4m->bps = 30;
_y4m->bit_depth = 10;
_y4m->dst_c_dec_h = _y4m->src_c_dec_h;
@@ -995,7 +995,7 @@
} else if (strcmp(_y4m->chroma_type, "444p12") == 0) {
_y4m->src_c_dec_h = 1;
_y4m->src_c_dec_v = 1;
- _y4m->aom_fmt = VPX_IMG_FMT_I44416;
+ _y4m->aom_fmt = AOM_IMG_FMT_I44416;
_y4m->bps = 36;
_y4m->bit_depth = 12;
_y4m->dst_c_dec_h = _y4m->src_c_dec_h;
@@ -1022,7 +1022,7 @@
_y4m->aux_buf_sz = _y4m->aux_buf_read_sz = 3 * _y4m->pic_w * _y4m->pic_h;
_y4m->convert = y4m_convert_444_420jpeg;
} else {
- _y4m->aom_fmt = VPX_IMG_FMT_444A;
+ _y4m->aom_fmt = AOM_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;
@@ -1116,12 +1116,12 @@
c_w *= bytes_per_sample;
c_h = (_y4m->pic_h + _y4m->dst_c_dec_v - 1) / _y4m->dst_c_dec_v;
c_sz = c_w * c_h;
- _img->stride[VPX_PLANE_Y] = _img->stride[VPX_PLANE_ALPHA] =
+ _img->stride[AOM_PLANE_Y] = _img->stride[AOM_PLANE_ALPHA] =
_y4m->pic_w * bytes_per_sample;
- _img->stride[VPX_PLANE_U] = _img->stride[VPX_PLANE_V] = c_w;
- _img->planes[VPX_PLANE_Y] = _y4m->dst_buf;
- _img->planes[VPX_PLANE_U] = _y4m->dst_buf + pic_sz;
- _img->planes[VPX_PLANE_V] = _y4m->dst_buf + pic_sz + c_sz;
- _img->planes[VPX_PLANE_ALPHA] = _y4m->dst_buf + pic_sz + 2 * c_sz;
+ _img->stride[AOM_PLANE_U] = _img->stride[AOM_PLANE_V] = c_w;
+ _img->planes[AOM_PLANE_Y] = _y4m->dst_buf;
+ _img->planes[AOM_PLANE_U] = _y4m->dst_buf + pic_sz;
+ _img->planes[AOM_PLANE_V] = _y4m->dst_buf + pic_sz + c_sz;
+ _img->planes[AOM_PLANE_ALPHA] = _y4m->dst_buf + pic_sz + 2 * c_sz;
return 1;
}