Change "VPX" to "AOM"
Change-Id: I6593a44de3b571193c2a4c8787ddf3b2fc24a268
This commit is contained in:
Родитель
01dee0bba5
Коммит
ff00fc0f24
|
@ -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.
|
||||
|
|
|
@ -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 @@ extern "C" {
|
|||
* 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 @@ typedef enum {
|
|||
* 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 @@ typedef enum {
|
|||
* 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 @@ typedef enum {
|
|||
* ::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 @@ typedef struct aom_codec_ctx {
|
|||
* 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 @@ typedef enum aom_bit_depth {
|
|||
*
|
||||
*/
|
||||
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 @@ const char *aom_codec_error_detail(aom_codec_ctx_t *ctx);
|
|||
*
|
||||
* \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 @@ aom_codec_caps_t aom_codec_get_caps(aom_codec_iface_t *iface);
|
|||
*
|
||||
* 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 @@ aom_codec_caps_t aom_codec_get_caps(aom_codec_iface_t *iface);
|
|||
* \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 @@ aom_codec_err_t aom_codec_control_(aom_codec_ctx_t *ctx, int ctrl_id, ...);
|
|||
* 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 @@ aom_codec_err_t aom_codec_control_(aom_codec_ctx_t *ctx, int ctrl_id, ...);
|
|||
|
||||
/*!\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 @@ aom_codec_err_t aom_codec_control_(aom_codec_ctx_t *ctx, int ctrl_id, ...);
|
|||
* 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 @@ aom_codec_err_t aom_codec_control_(aom_codec_ctx_t *ctx, int ctrl_id, ...);
|
|||
* 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 @@ aom_codec_err_t aom_codec_control_(aom_codec_ctx_t *ctx, int ctrl_id, ...);
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // VPX_VPX_CODEC_H_
|
||||
#endif // AOM_AOM_CODEC_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 @@ extern "C" {
|
|||
* 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 @@ extern "C" {
|
|||
* ::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 @@ extern "C" {
|
|||
* 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 @@ typedef struct aom_codec_dec_cfg {
|
|||
* \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 @@ aom_codec_err_t aom_codec_dec_init_ver(aom_codec_ctx_t *ctx,
|
|||
* 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 @@ aom_codec_err_t aom_codec_dec_init_ver(aom_codec_ctx_t *ctx,
|
|||
* 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 @@ aom_codec_err_t aom_codec_peek_stream_info(aom_codec_iface_t *iface,
|
|||
* 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 @@ aom_codec_err_t aom_codec_get_stream_info(aom_codec_ctx_t *ctx,
|
|||
* 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 @@ aom_codec_err_t aom_codec_get_stream_info(aom_codec_ctx_t *ctx,
|
|||
*
|
||||
* \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 @@ aom_codec_err_t aom_codec_get_stream_info(aom_codec_ctx_t *ctx,
|
|||
* \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 @@ aom_image_t *aom_codec_get_frame(aom_codec_ctx_t *ctx, aom_codec_iter_t *iter);
|
|||
/*!\defgroup cap_put_frame Frame-Based Decoding Functions
|
||||
*
|
||||
* 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 @@ typedef void (*aom_codec_put_frame_cb_fn_t)(void *user_priv,
|
|||
* \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 @@ aom_codec_err_t aom_codec_register_put_frame_cb(aom_codec_ctx_t *ctx,
|
|||
/*!\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 @@ typedef void (*aom_codec_put_slice_cb_fn_t)(void *user_priv,
|
|||
* \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 @@ aom_codec_err_t aom_codec_register_put_slice_cb(aom_codec_ctx_t *ctx,
|
|||
/*!\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 @@ aom_codec_err_t aom_codec_register_put_slice_cb(aom_codec_ctx_t *ctx,
|
|||
* \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 @@ aom_codec_err_t aom_codec_set_frame_buffer_functions(
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // VPX_VPX_DECODER_H_
|
||||
#endif // 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_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 @@ extern "C" {
|
|||
/*! 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 @@ extern "C" {
|
|||
* 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 @@ extern "C" {
|
|||
* 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 @@ typedef int64_t aom_codec_pts_t;
|
|||
* 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 @@ typedef uint32_t aom_codec_frame_flags_t;
|
|||
* 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 @@ typedef uint32_t aom_codec_er_flags_t;
|
|||
* 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 @@ typedef struct aom_codec_cx_pkt {
|
|||
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 @@ typedef struct aom_rational {
|
|||
|
||||
/*!\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 @@ typedef struct aom_codec_enc_cfg {
|
|||
/*!\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 @@ typedef struct aom_codec_enc_cfg {
|
|||
* 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 @@ typedef struct aom_codec_enc_cfg {
|
|||
* 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 @@ typedef struct aom_codec_enc_cfg {
|
|||
* 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 @@ typedef struct aom_codec_enc_cfg {
|
|||
* 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_codec_enc_cfg {
|
|||
*
|
||||
*/
|
||||
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 @@ typedef struct aom_svc_parameters {
|
|||
* \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 @@ aom_codec_err_t aom_codec_enc_init_ver(aom_codec_ctx_t *ctx,
|
|||
* 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 @@ aom_codec_err_t aom_codec_enc_init_ver(aom_codec_ctx_t *ctx,
|
|||
* \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 @@ aom_codec_err_t aom_codec_enc_init_multi_ver(
|
|||
*/
|
||||
#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 @@ aom_codec_err_t aom_codec_enc_init_multi_ver(
|
|||
* \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 @@ aom_codec_err_t aom_codec_enc_config_default(aom_codec_iface_t *iface,
|
|||
* \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_codec_err_t aom_codec_enc_config_set(aom_codec_ctx_t *ctx,
|
|||
*/
|
||||
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 @@ aom_fixed_buf_t *aom_codec_get_global_headers(aom_codec_ctx_t *ctx);
|
|||
* 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 @@ aom_fixed_buf_t *aom_codec_get_global_headers(aom_codec_ctx_t *ctx);
|
|||
* \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 @@ aom_codec_err_t aom_codec_encode(aom_codec_ctx_t *ctx, const aom_image_t *img,
|
|||
*
|
||||
* 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 @@ aom_codec_err_t aom_codec_encode(aom_codec_ctx_t *ctx, const aom_image_t *img,
|
|||
* \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 @@ aom_codec_err_t aom_codec_set_cx_data_buf(aom_codec_ctx_t *ctx,
|
|||
* 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 @@ const aom_image_t *aom_codec_get_preview_frame(aom_codec_ctx_t *ctx);
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // VPX_VPX_ENCODER_H_
|
||||
#endif // AOM_AOM_ENCODER_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 @@ extern "C" {
|
|||
* 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 @@ typedef int (*aom_release_frame_buffer_cb_fn_t)(void *priv,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_VPX_FRAME_BUFFER_H_
|
||||
#endif // AOM_AOM_FRAME_BUFFER_H_
|
||||
|
|
100
aom/aom_image.h
100
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 @@ extern "C" {
|
|||
* 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 @@ typedef struct aom_image {
|
|||
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 @@ void aom_img_free(aom_image_t *img);
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_VPX_IMAGE_H_
|
||||
#endif // AOM_AOM_IMAGE_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 @@ typedef size_t uintptr_t;
|
|||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#endif // VPX_VPX_INTEGER_H_
|
||||
#endif // AOM_AOM_INTEGER_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 @@ extern "C" {
|
|||
* 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 @@ typedef struct aom_codec_priv_enc_mr_cfg aom_codec_priv_enc_mr_cfg_t;
|
|||
* 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 @@ typedef aom_codec_err_t (*aom_codec_init_fn_t)(
|
|||
* 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 @@ typedef aom_codec_err_t (*aom_codec_destroy_fn_t)(aom_codec_alg_priv_t *ctx);
|
|||
* 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 @@ typedef aom_codec_err_t (*aom_codec_peek_si_fn_t)(const uint8_t *data,
|
|||
* 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 @@ typedef aom_codec_err_t (*aom_codec_get_si_fn_t)(aom_codec_alg_priv_t *ctx,
|
|||
* \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 @@ typedef const struct aom_codec_ctrl_fn_map {
|
|||
/*!\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 @@ typedef aom_image_t *(*aom_codec_get_frame_fn_t)(aom_codec_alg_priv_t *ctx,
|
|||
* \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 @@ struct aom_codec_priv_enc_mr_cfg {
|
|||
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 @@ void aom_internal_error(struct aom_internal_error_info *info,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_INTERNAL_VPX_CODEC_INTERNAL_H_
|
||||
#endif // AOM_INTERNAL_AOM_CODEC_INTERNAL_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 @@ double aom_sse_to_psnr(double samples, double peak, double sse);
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_INTERNAL_VPX_PSNR_H_
|
||||
#endif // AOM_INTERNAL_AOM_PSNR_H_
|
||||
|
|
|
@ -33,19 +33,19 @@ const char *aom_codec_iface_name(aom_codec_iface_t *iface) {
|
|||
|
||||
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_err_to_string(aom_codec_err_t err) {
|
|||
|
||||
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 aom_codec_destroy(aom_codec_ctx_t *ctx) {
|
|||
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 aom_codec_control_(aom_codec_ctx_t *ctx, int ctrl_id, ...) {
|
|||
aom_codec_err_t res;
|
||||
|
||||
if (!ctx || !ctrl_id)
|
||||
res = VPX_CODEC_INVALID_PARAM;
|
||||
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) {
|
||||
|
|
|
@ -28,23 +28,23 @@ aom_codec_err_t aom_codec_dec_init_ver(aom_codec_ctx_t *ctx,
|
|||
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 @@ aom_codec_err_t aom_codec_peek_stream_info(aom_codec_iface_t *iface,
|
|||
|
||||
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 aom_codec_get_stream_info(aom_codec_ctx_t *ctx,
|
|||
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 @@ aom_codec_err_t aom_codec_decode(aom_codec_ctx_t *ctx, const uint8_t *data,
|
|||
/* 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 aom_codec_register_put_frame_cb(aom_codec_ctx_t *ctx,
|
|||
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 aom_codec_register_put_slice_cb(aom_codec_ctx_t *ctx,
|
|||
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 aom_codec_set_frame_buffer_functions(
|
|||
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);
|
||||
|
|
|
@ -30,19 +30,19 @@ aom_codec_err_t aom_codec_enc_init_ver(aom_codec_ctx_t *ctx,
|
|||
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_ver(aom_codec_ctx_t *ctx,
|
|||
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 @@ aom_codec_err_t aom_codec_enc_init_multi_ver(
|
|||
/* 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 @@ aom_codec_err_t aom_codec_enc_init_multi_ver(
|
|||
* 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 @@ aom_codec_err_t aom_codec_enc_config_default(aom_codec_iface_t *iface,
|
|||
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_err_t aom_codec_encode(aom_codec_ctx_t *ctx, const aom_image_t *img,
|
|||
aom_codec_pts_t pts, unsigned long duration,
|
||||
aom_enc_frame_flags_t flags,
|
||||
unsigned long deadline) {
|
||||
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 @@ const aom_codec_cx_pkt_t *aom_codec_get_cx_data(aom_codec_ctx_t *ctx,
|
|||
|
||||
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 @@ aom_codec_err_t aom_codec_set_cx_data_buf(aom_codec_ctx_t *ctx,
|
|||
const aom_fixed_buf_t *buf,
|
||||
unsigned int pad_before,
|
||||
unsigned int pad_after) {
|
||||
if (!ctx || !ctx->priv) return VPX_CODEC_INVALID_PARAM;
|
||||
if (!ctx || !ctx->priv) return AOM_CODEC_INVALID_PARAM;
|
||||
|
||||
if (buf) {
|
||||
ctx->priv->enc.cx_data_dst_buf = *buf;
|
||||
|
@ -300,7 +300,7 @@ aom_codec_err_t aom_codec_set_cx_data_buf(aom_codec_ctx_t *ctx,
|
|||
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 @@ const aom_image_t *aom_codec_get_preview_frame(aom_codec_ctx_t *ctx) {
|
|||
|
||||
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 @@ aom_fixed_buf_t *aom_codec_get_global_headers(aom_codec_ctx_t *ctx) {
|
|||
|
||||
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 aom_codec_enc_config_set(aom_codec_ctx_t *ctx,
|
|||
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);
|
||||
|
||||
|
|
|
@ -39,53 +39,53 @@ static aom_image_t *img_alloc_helper(aom_image_t *img, aom_img_fmt_t fmt,
|
|||
|
||||
/* 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 @@ static aom_image_t *img_alloc_helper(aom_image_t *img, aom_img_fmt_t fmt,
|
|||
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 @@ static aom_image_t *img_alloc_helper(aom_image_t *img, aom_img_fmt_t fmt,
|
|||
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 @@ static aom_image_t *img_alloc_helper(aom_image_t *img, aom_img_fmt_t fmt,
|
|||
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 @@ static aom_image_t *img_alloc_helper(aom_image_t *img, aom_img_fmt_t fmt,
|
|||
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 @@ int aom_img_set_rect(aom_image_t *img, unsigned int x, unsigned int y,
|
|||
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 @@ void aom_img_flip(aom_image_t *img) {
|
|||
* 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) {
|
||||
|
|
|
@ -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 @@ _CRTIMP char *__cdecl strtok_s(char *str, const char *delim, char **context);
|
|||
|
||||
#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 @@ static aom_codec_err_t extract_option(LAYER_OPTION_TYPE type, char *input,
|
|||
int *value0, int *value1) {
|
||||
if (type == SCALE_FACTOR) {
|
||||
*value0 = strtol(input, &input, 10);
|
||||
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 @@ static aom_codec_err_t extract_option(LAYER_OPTION_TYPE type, char *input,
|
|||
*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 @@ static aom_codec_err_t parse_layer_options_from_string(SvcContext *svc_ctx,
|
|||
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 @@ static aom_codec_err_t parse_layer_options_from_string(SvcContext *svc_ctx,
|
|||
|
||||
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 @@ static aom_codec_err_t parse_options(SvcContext *svc_ctx, const char *options) {
|
|||
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 @@ static aom_codec_err_t parse_options(SvcContext *svc_ctx, const char *options) {
|
|||
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 @@ static aom_codec_err_t parse_options(SvcContext *svc_ctx, const char *options) {
|
|||
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 @@ static aom_codec_err_t parse_options(SvcContext *svc_ctx, const char *options) {
|
|||
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 @@ static aom_codec_err_t parse_options(SvcContext *svc_ctx, const char *options) {
|
|||
"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 @@ static aom_codec_err_t parse_options(SvcContext *svc_ctx, const char *options) {
|
|||
aom_codec_err_t aom_svc_set_options(SvcContext *svc_ctx, const char *options) {
|
||||
SvcInternal_t *const si = get_svc_internal(svc_ctx);
|
||||
if (svc_ctx == NULL || options == NULL || si == NULL) {
|
||||
return VPX_CODEC_INVALID_PARAM;
|
||||
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 @@ void assign_layer_bitrates(const SvcContext *svc_ctx,
|
|||
}
|
||||
} 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 @@ void assign_layer_bitrates(const SvcContext *svc_ctx,
|
|||
}
|
||||
} 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 @@ void assign_layer_bitrates(const SvcContext *svc_ctx,
|
|||
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 @@ aom_codec_err_t aom_svc_init(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
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 @@ aom_codec_err_t aom_svc_init(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
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 @@ aom_codec_err_t aom_svc_init(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
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 @@ aom_codec_err_t aom_svc_init(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
// 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 @@ aom_codec_err_t aom_svc_init(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
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 @@ aom_codec_err_t aom_svc_init(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
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_err_t aom_svc_init(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
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 @@ aom_codec_err_t aom_svc_encode(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
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 @@ aom_codec_err_t aom_svc_encode(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
++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 @@ aom_codec_err_t aom_svc_encode(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
}
|
||||
}
|
||||
|
||||
return VPX_CODEC_OK;
|
||||
return AOM_CODEC_OK;
|
||||
}
|
||||
|
||||
const char *aom_svc_get_message(const SvcContext *svc_ctx) {
|
||||
|
|
|
@ -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 @@ typedef struct SvcInternal {
|
|||
|
||||
// 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 @@ const char *aom_svc_get_message(const SvcContext *svc_ctx);
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_SVC_CONTEXT_H_
|
||||
#endif // AOM_SVC_CONTEXT_H_
|
||||
|
|
38
aom/vp8.h
38
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 @@ typedef struct vp9_ref_frame {
|
|||
*
|
||||
* 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 @@ VPX_CTRL_USE_TYPE(VP9_GET_REFERENCE, vp9_ref_frame_t *)
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_VP8_H_
|
||||
#endif // AOM_VP8_H_
|
||||
|
|
216
aom/vp8cx.h
216
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 @@ enum vp8e_enc_control_id {
|
|||
/*!\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 @@ enum vp8e_enc_control_id {
|
|||
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 @@ enum vp8e_enc_control_id {
|
|||
|
||||
/*!\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 @@ typedef enum aom_scaling_mode_1d {
|
|||
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_active_map {
|
|||
*
|
||||
*/
|
||||
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 @@ typedef enum {
|
|||
|
||||
/*!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 @@ typedef enum {
|
|||
* 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_layer_id {
|
|||
*
|
||||
*/
|
||||
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 @@ typedef struct aom_svc_ref_frame_config {
|
|||
*
|
||||
*/
|
||||
|
||||
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 @@ VPX_CTRL_USE_TYPE(VP9E_SET_RENDER_SIZE, int *)
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_VP8CX_H_
|
||||
#endif // AOM_VP8CX_H_
|
||||
|
|
48
aom/vp8dx.h
48
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 @@ enum vp8_dec_control_id {
|
|||
* 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 @@ enum vp8_dec_control_id {
|
|||
};
|
||||
|
||||
/** 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 @@ typedef aom_decrypt_init vp8_decrypt_init;
|
|||
*
|
||||
*/
|
||||
|
||||
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 @@ VPX_CTRL_USE_TYPE(VP9_INVERT_TILE_DECODE_ORDER, int)
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_VP8DX_H_
|
||||
#endif // AOM_VP8DX_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 @@ typedef void (*highbd_convolve_fn_t)(const uint8_t *src, ptrdiff_t src_stride,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_VPX_CONVOLVE_H_
|
||||
#endif // AOM_DSP_AOM_CONVOLVE_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 @@ static INLINE uint16_t clip_pixel_highbd(int val, int bd) {
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_COMMON_H_
|
||||
#endif // AOM_DSP_COMMON_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 @@ typedef int16_t InterpKernel[SUBPEL_TAPS];
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_VPX_FILTER_H_
|
||||
#endif // AOM_DSP_AOM_FILTER_H_
|
||||
|
|
|
@ -47,7 +47,7 @@ void aom_reader_fill(aom_reader *r) {
|
|||
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;
|
||||
|
|
|
@ -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 @@ static INLINE int aom_read_tree(aom_reader *r, const aom_tree_index *tree,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_BITREADER_H_
|
||||
#endif // AOM_DSP_BITREADER_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 @@ int aom_rb_read_inv_signed_literal(struct aom_read_bit_buffer *rb, int bits);
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_BITREADER_BUFFER_H_
|
||||
#endif // AOM_DSP_BITREADER_BUFFER_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 @@ static INLINE void aom_write_literal(aom_writer *w, int data, int bits) {
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_BITWRITER_H_
|
||||
#endif // AOM_DSP_BITWRITER_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 @@ void aom_wb_write_inv_signed_literal(struct aom_write_bit_buffer *wb, int data,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_BITWRITER_BUFFER_H_
|
||||
#endif // AOM_DSP_BITWRITER_BUFFER_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 @@ static INLINE tran_high_t fdct_round_shift(tran_high_t input) {
|
|||
}
|
||||
|
||||
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_
|
||||
|
|
|
@ -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 @@ static INLINE uint8_t clip_pixel_add(uint8_t dest, tran_high_t trans) {
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_INV_TXFM_H_
|
||||
#endif // AOM_DSP_INV_TXFM_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 @@ extern const uint8_t mc_filt_mask_arr[16 * 3];
|
|||
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_ */
|
||||
|
|
|
@ -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 @@ static INLINE void prefetch_store_streamed(unsigned char *dst) {
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_COMMON_MIPS_DSPR2_H_
|
||||
#endif // AOM_COMMON_MIPS_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 @@ void aom_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_MIPS_VPX_COMMON_DSPR2_H_
|
||||
#endif // AOM_DSP_MIPS_AOM_COMMON_DSPR2_H_
|
||||
|
|
|
@ -187,9 +187,9 @@ void aom_fdct4x4_msa(const int16_t *input, int16_t *output,
|
|||
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 @@ void aom_fdct8x8_msa(const int16_t *input, int16_t *output,
|
|||
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);
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -190,16 +190,16 @@ void aom_idct16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst,
|
|||
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 @@ void aom_iadst16_1d_rows_msa(const int16_t *input, int16_t *output) {
|
|||
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 @@ void aom_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst,
|
|||
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 @@ void aom_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst,
|
|||
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 @@ void aom_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst,
|
|||
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 @@ void aom_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst,
|
|||
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 @@ void aom_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst,
|
|||
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 @@ void aom_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst,
|
|||
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);
|
||||
|
|
|
@ -554,11 +554,11 @@ static void idct8x32_column_butterfly_addblk(int16_t *tmp_eve_buf,
|
|||
|
||||
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 @@ static void idct8x32_column_butterfly_addblk(int16_t *tmp_eve_buf,
|
|||
|
||||
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 @@ static void idct8x32_column_butterfly_addblk(int16_t *tmp_eve_buf,
|
|||
|
||||
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 @@ static void idct8x32_column_butterfly_addblk(int16_t *tmp_eve_buf,
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -76,10 +76,10 @@ void aom_idct4x4_16_add_msa(const int16_t *input, uint8_t *dst,
|
|||
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);
|
||||
|
|
|
@ -22,21 +22,21 @@ void aom_idct8x8_64_add_msa(const int16_t *input, uint8_t *dst,
|
|||
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 @@ void aom_idct8x8_12_add_msa(const int16_t *input, uint8_t *dst,
|
|||
|
||||
/* 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 @@ void aom_idct8x8_12_add_msa(const int16_t *input, uint8_t *dst,
|
|||
|
||||
/* 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 @@ void aom_idct8x8_12_add_msa(const int16_t *input, uint8_t *dst,
|
|||
/* 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 @@ void aom_idct8x8_12_add_msa(const int16_t *input, uint8_t *dst,
|
|||
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 @@ void aom_idct8x8_12_add_msa(const int16_t *input, uint8_t *dst,
|
|||
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 @@ void aom_idct8x8_1_add_msa(const int16_t *input, uint8_t *dst,
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -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 @@ void iadst16_dspr2(const int16_t *input, int16_t *output);
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_MIPS_INV_TXFM_DSPR2_H_
|
||||
#endif // 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_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_idct16_1d_rows_msa(const int16_t *input, int16_t *output);
|
|||
void aom_iadst16_1d_columns_addblk_msa(int16_t *input, uint8_t *dst,
|
||||
int32_t dst_stride);
|
||||
void 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_
|
||||
|
|
|
@ -35,8 +35,8 @@ int32_t aom_hz_lpf_t4_and_t8_16w(uint8_t *src, int32_t pitch, uint8_t *filter48,
|
|||
/* 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 @@ int32_t aom_hz_lpf_t4_and_t8_16w(uint8_t *src, int32_t pitch, uint8_t *filter48,
|
|||
} 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 @@ void aom_hz_lpf_t16_16w(uint8_t *src, int32_t pitch, uint8_t *filter48) {
|
|||
|
||||
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 @@ void aom_lpf_horizontal_16_msa(uint8_t *src, int32_t pitch,
|
|||
|
||||
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 @@ void aom_lpf_horizontal_16_msa(uint8_t *src, int32_t pitch,
|
|||
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 @@ void aom_lpf_horizontal_16_msa(uint8_t *src, int32_t pitch,
|
|||
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 @@ int32_t aom_vt_lpf_t4_and_t8_8w(uint8_t *src, uint8_t *filter48,
|
|||
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 @@ int32_t aom_vt_lpf_t4_and_t8_8w(uint8_t *src, uint8_t *filter48,
|
|||
} 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 @@ int32_t aom_vt_lpf_t16_8w(uint8_t *src, uint8_t *src_org, int32_t pitch,
|
|||
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 @@ int32_t aom_vt_lpf_t4_and_t8_16w(uint8_t *src, uint8_t *filter48,
|
|||
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 @@ int32_t aom_vt_lpf_t4_and_t8_16w(uint8_t *src, uint8_t *filter48,
|
|||
} 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 @@ int32_t aom_vt_lpf_t16_16w(uint8_t *src, uint8_t *src_org, int32_t pitch,
|
|||
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;
|
||||
|
|
|
@ -30,7 +30,7 @@ void aom_lpf_horizontal_4_msa(uint8_t *src, int32_t pitch,
|
|||
|
||||
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 @@ void aom_lpf_horizontal_4_dual_msa(uint8_t *src, int32_t pitch,
|
|||
|
||||
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 @@ void aom_lpf_vertical_4_msa(uint8_t *src, int32_t pitch,
|
|||
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 @@ void aom_lpf_vertical_4_dual_msa(uint8_t *src, int32_t pitch,
|
|||
|
||||
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);
|
||||
|
|
|
@ -34,8 +34,8 @@ void aom_lpf_horizontal_8_msa(uint8_t *src, int32_t pitch,
|
|||
|
||||
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 @@ void aom_lpf_horizontal_8_msa(uint8_t *src, int32_t 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_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 @@ void aom_lpf_horizontal_8_dual_msa(
|
|||
/* 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 @@ void aom_lpf_vertical_8_msa(uint8_t *src, int32_t pitch,
|
|||
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 @@ void aom_lpf_vertical_8_msa(uint8_t *src, int32_t 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);
|
||||
/* 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 @@ void aom_lpf_vertical_8_dual_msa(uint8_t *src, int32_t pitch,
|
|||
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 @@ void aom_lpf_vertical_8_dual_msa(uint8_t *src, int32_t 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);
|
||||
|
||||
/* 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 */
|
||||
|
|
|
@ -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 @@ static INLINE void wide_mbfilter_dspr2(
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_MIPS_LOOPFILTER_FILTERS_DSPR2_H_
|
||||
#endif // 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_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" {
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_MIPS_LOOPFILTER_MACROS_DSPR2_H_
|
||||
#endif // 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_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 @@ static INLINE void flatmask5(uint32_t p4, uint32_t p3, uint32_t p2, uint32_t p1,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_H_
|
||||
#endif // AOM_DSP_MIPS_LOOPFILTER_MASKS_DSPR2_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_ */
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -1260,142 +1260,142 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride,
|
|||
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 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride,
|
|||
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 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride,
|
|||
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 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride,
|
|||
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 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride,
|
|||
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 @@ static uint32_t avgsad_64width_msa(const uint8_t *src, int32_t src_stride,
|
|||
|
||||
/* 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 */
|
||||
|
|
|
@ -1618,7 +1618,7 @@ static uint32_t sub_pixel_avg_sse_diff_64width_hv_msa(
|
|||
#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 @@ static uint32_t sub_pixel_avg_sse_diff_64width_hv_msa(
|
|||
}
|
||||
|
||||
/* 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 @@ VPX_SUB_PIXEL_VARIANCE_WDXHT_MSA(64, 64)
|
|||
}
|
||||
|
||||
/* 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 @@ uint32_t aom_sub_pixel_avg_variance32x64_msa(const uint8_t *src_ptr,
|
|||
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 @@ uint32_t aom_sub_pixel_avg_variance32x64_msa(const uint8_t *src_ptr,
|
|||
}
|
||||
|
||||
/* 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 */
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -528,7 +528,7 @@ uint32_t aom_get4x4sse_cs_msa(const uint8_t *src_ptr, int32_t src_stride,
|
|||
#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 @@ uint32_t aom_get4x4sse_cs_msa(const uint8_t *src_ptr, int32_t src_stride,
|
|||
}
|
||||
|
||||
/* 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,
|
||||
|
|
|
@ -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 @@ static INLINE aom_prob merge_probs(aom_prob pre_prob, const unsigned int ct[2],
|
|||
unsigned int count_sat,
|
||||
unsigned int max_update_factor) {
|
||||
const 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 @@ static INLINE aom_prob mode_mv_merge_probs(aom_prob pre_prob,
|
|||
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 @@ DECLARE_ALIGNED(16, extern const uint8_t, aom_norm[256]);
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_PROB_H_
|
||||
#endif // AOM_DSP_PROB_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 @@ void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_QUANTIZE_H_
|
||||
#endif // AOM_DSP_QUANTIZE_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 @@ double aom_highbd_calc_ssimg(const YV12_BUFFER_CONFIG *source,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_SSIM_H_
|
||||
#endif // AOM_DSP_SSIM_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_2_9 = 9929;
|
|||
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_
|
||||
|
|
|
@ -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 @@ typedef struct aom_variance_vtable {
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_VARIANCE_H_
|
||||
#endif // AOM_DSP_VARIANCE_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 @@ typedef void highbd_filter8_1dfunction(const uint16_t *src_ptr,
|
|||
}
|
||||
#endif // CONFIG_AOM_HIGHBITDEPTH
|
||||
|
||||
#endif // VPX_DSP_X86_CONVOLVE_H_
|
||||
#endif // AOM_DSP_X86_CONVOLVE_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 @@ static INLINE void transpose_and_output8x8(
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_DSP_X86_FWD_TXFM_SSE2_H_
|
||||
#endif // 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_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 iadst4_sse2(__m128i *in);
|
|||
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_
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 @@ void *aom_memset16(void *dest, int val, size_t length);
|
|||
|
||||
#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_
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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 @@ static void once(void (*func)(void)) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // VPX_PORTS_VPX_ONCE_H_
|
||||
#endif // 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_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 @@ static INLINE int aom_usec_timer_elapsed(struct aom_usec_timer *t) { return 0; }
|
|||
|
||||
#endif /* CONFIG_OS_SUPPORT */
|
||||
|
||||
#endif // VPX_PORTS_VPX_TIMER_H_
|
||||
#endif // AOM_PORTS_AOM_TIMER_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 @@ int arm_cpu_caps(void);
|
|||
// 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_
|
||||
|
|
|
@ -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_flags(int *flags) {
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 @@ static INLINE int get_msb(unsigned int n) {
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_PORTS_BITOPS_H_
|
||||
#endif // AOM_PORTS_BITOPS_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_
|
||||
|
|
|
@ -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 @@ extern __inline __m128d
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // VPX_PORTS_EMMINTRIN_COMPAT_H_
|
||||
#endif // AOM_PORTS_EMMINTRIN_COMPAT_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_
|
||||
|
|
|
@ -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 @@ static unsigned MEM_VALUE_T mem_get_le32(const void *vmem) {
|
|||
}
|
||||
|
||||
#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 @@ mem_get_s_generic(be, 16)
|
|||
|
||||
#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 @@ mem_get_s_generic(be, 16)
|
|||
|
||||
#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 @@ static VPX_INLINE void mem_put_be24(void *vmem, MEM_VALUE_T val) {
|
|||
|
||||
#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 @@ static VPX_INLINE void mem_put_be32(void *vmem, MEM_VALUE_T val) {
|
|||
|
||||
#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 @@ static VPX_INLINE void mem_put_le16(void *vmem, MEM_VALUE_T val) {
|
|||
|
||||
#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 @@ static VPX_INLINE void mem_put_le24(void *vmem, MEM_VALUE_T val) {
|
|||
|
||||
#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 @@ static VPX_INLINE void mem_put_le32(void *vmem, MEM_VALUE_T val) {
|
|||
mem[3] = (val >> 24) & 0xff;
|
||||
}
|
||||
|
||||
#endif // VPX_PORTS_MEM_OPS_H_
|
||||
#endif // 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_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 @@ mem_get_be_aligned_generic(16)
|
|||
#undef swap_endian_16_se
|
||||
#undef swap_endian_32_se
|
||||
|
||||
#endif // VPX_PORTS_MEM_OPS_ALIGNED_H_
|
||||
#endif // 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_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 @@ static INLINE double round(double x) {
|
|||
#endif // _MSC_VER < 1800
|
||||
|
||||
#endif // _MSC_VER
|
||||
#endif // VPX_PORTS_MSVC_H_
|
||||
#endif // AOM_PORTS_MSVC_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 @@ void aom_reset_mmx_state(void);
|
|||
#else
|
||||
#define aom_clear_system_state()
|
||||
#endif // ARCH_X86 || ARCH_X86_64
|
||||
#endif // VPX_PORTS_SYSTEM_STATE_H_
|
||||
#endif // AOM_PORTS_SYSTEM_STATE_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 @@ extern "C" {
|
|||
#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 @@ static INLINE int x86_simd_caps(void) {
|
|||
(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 void aom_reset_mmx_state(void);
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_PORTS_X86_H_
|
||||
#endif // AOM_PORTS_X86_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 @@ extern void aom_scale_frame(YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst,
|
|||
unsigned int vscale, unsigned int vratio,
|
||||
unsigned int interlaced);
|
||||
|
||||
#endif // VPX_SCALE_VPX_SCALE_H_
|
||||
#endif // AOM_SCALE_AOM_SCALE_H_
|
||||
|
|
|
@ -191,8 +191,8 @@ void aom_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf) {
|
|||
}
|
||||
|
||||
void aom_extend_frame_inner_borders_c(YV12_BUFFER_CONFIG *ybf) {
|
||||
const int inner_bw = (ybf->border > VPXINNERBORDERINPIXELS)
|
||||
? VPXINNERBORDERINPIXELS
|
||||
const int inner_bw = (ybf->border > AOMINNERBORDERINPIXELS)
|
||||
? AOMINNERBORDERINPIXELS
|
||||
: ybf->border;
|
||||
extend_frame(ybf, inner_bw);
|
||||
}
|
||||
|
|
|
@ -131,8 +131,8 @@ void aom_extend_frame_borders_dspr2(YV12_BUFFER_CONFIG *ybf) {
|
|||
}
|
||||
|
||||
void aom_extend_frame_inner_borders_dspr2(YV12_BUFFER_CONFIG *ybf) {
|
||||
const int inner_bw = (ybf->border > VPXINNERBORDERINPIXELS)
|
||||
? VPXINNERBORDERINPIXELS
|
||||
const int inner_bw = (ybf->border > AOMINNERBORDERINPIXELS)
|
||||
? AOMINNERBORDERINPIXELS
|
||||
: ybf->border;
|
||||
extend_frame(ybf, inner_bw);
|
||||
}
|
||||
|
|
|
@ -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 @@ extern "C" {
|
|||
#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 @@ int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // VPX_SCALE_YV12CONFIG_H_
|
||||
#endif // AOM_SCALE_YV12CONFIG_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 @@ const VPxWorkerInterface *aom_get_worker_interface(void);
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPX_THREAD_H_
|
||||
#endif // AOM_THREAD_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 uint16_t BSwap16(uint16_t x) {
|
|||
}
|
||||
|
||||
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 @@ static INLINE uint64_t BSwap64(uint64_t x) {
|
|||
#endif // HAVE_BUILTIN_BSWAP64
|
||||
}
|
||||
|
||||
#endif // VPX_UTIL_ENDIAN_INL_H_
|
||||
#endif // AOM_UTIL_ENDIAN_INL_H_
|
||||
|
|
62
aomdec.c
62
aomdec.c
|
@ -111,26 +111,26 @@ static const arg_def_t *all_args[] = {
|
|||
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 @@ static void update_image_md5(const aom_image_t *img, const int planes[3],
|
|||
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 @@ static void write_image_file(const aom_image_t *img, const int planes[3],
|
|||
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 @@ static int main_loop(int argc, const char **argv_) {
|
|||
|
||||
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 @@ static int main_loop(int argc, const char **argv_) {
|
|||
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 @@ static int main_loop(int argc, const char **argv_) {
|
|||
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 @@ static int main_loop(int argc, const char **argv_) {
|
|||
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 @@ static int main_loop(int argc, const char **argv_) {
|
|||
// 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;
|
||||
|
|
254
aomenc.c
254
aomenc.c
|
@ -286,10 +286,10 @@ static const arg_def_t resize_up_thresh =
|
|||
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 @@ static const arg_def_t arnr_strength =
|
|||
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 @@ static const arg_def_t max_gf_interval = ARG_DEF(
|
|||
"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 @@ static const arg_def_t input_color_space =
|
|||
|
||||
#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 @@ static const arg_def_t inbitdeptharg =
|
|||
#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 @@ static void find_mismatch_high(const aom_image_t *const img1,
|
|||
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 @@ static void find_mismatch_high(const aom_image_t *const img1,
|
|||
}
|
||||
|
||||
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 @@ static void find_mismatch_high(const aom_image_t *const img1,
|
|||
}
|
||||
|
||||
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 @@ static void find_mismatch(const aom_image_t *const img1,
|
|||
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 @@ static void find_mismatch(const aom_image_t *const img1,
|
|||
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 @@ static void find_mismatch(const aom_image_t *const img1,
|
|||
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 @@ static int compare_img(const aom_image_t *const img1,
|
|||
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 @@ static void parse_global_config(struct VpxEncoderConfig *global, char **argv) {
|
|||
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 @@ static void parse_global_config(struct VpxEncoderConfig *global, char **argv) {
|
|||
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 @@ static void parse_global_config(struct VpxEncoderConfig *global, char **argv) {
|
|||
// 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 @@ static void parse_global_config(struct VpxEncoderConfig *global, char **argv) {
|
|||
#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 @@ static struct stream_state *new_stream(struct VpxEncoderConfig *global,
|
|||
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 @@ static int parse_stream_params(struct VpxEncoderConfig *global,
|
|||
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 @@ static int parse_stream_params(struct VpxEncoderConfig *global,
|
|||
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 *file_type_to_string(enum VideoFileType t) {
|
|||
|
||||
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 @@ static void open_output_file(struct stream_state *stream,
|
|||
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 @@ static void close_output_file(struct stream_state *stream,
|
|||
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 @@ static void setup_pass(struct stream_state *stream,
|
|||
#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 @@ static void initialize_encoder(struct stream_state *stream,
|
|||
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 @@ static void encode_frame(struct stream_state *stream,
|
|||
/* 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 @@ static void encode_frame(struct stream_state *stream,
|
|||
}
|
||||
#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 encode_frame(struct stream_state *stream,
|
|||
}
|
||||
|
||||
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 void get_cx_data(struct stream_state *stream,
|
|||
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 @@ static void get_cx_data(struct stream_state *stream,
|
|||
} 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 @@ static void get_cx_data(struct stream_state *stream,
|
|||
}
|
||||
#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 @@ static void test_decode(struct stream_state *stream,
|
|||
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 @@ static void test_decode(struct stream_state *stream,
|
|||
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 @@ int main(int argc, const char **argv_) {
|
|||
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 @@ int main(int argc, const char **argv_) {
|
|||
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 @@ int main(int argc, const char **argv_) {
|
|||
// 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 @@ int main(int argc, const char **argv_) {
|
|||
}
|
||||
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 @@ int main(int argc, const char **argv_) {
|
|||
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));
|
||||
|
|
6
aomenc.h
6
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 @@ struct VpxEncoderConfig {
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPXENC_H_
|
||||
#endif // AOMENC_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 @@ aom_fixed_buf_t stats_get(stats_io_t *stats);
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // VPXSTATS_H_
|
||||
#endif // AOMSTATS_H_
|
||||
|
|
|
@ -68,7 +68,7 @@ static struct av1_extracfg default_extra_cfg = {
|
|||
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 @@ static struct av1_extracfg default_extra_cfg = {
|
|||
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 @@ struct aom_codec_alg_priv {
|
|||
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 @@ static aom_codec_err_t update_error_state(
|
|||
#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 @@ static aom_codec_err_t validate_config(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t validate_config(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t validate_config(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t validate_config(aom_codec_alg_priv_t *ctx,
|
|||
}
|
||||
#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 @@ static aom_codec_err_t validate_img(aom_codec_alg_priv_t *ctx,
|
|||
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 int get_image_bps(const aom_image_t *img) {
|
|||
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 @@ static aom_codec_err_t set_encoder_config(
|
|||
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 @@ static aom_codec_err_t set_encoder_config(
|
|||
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 @@ static aom_codec_err_t set_encoder_config(
|
|||
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 @@ static aom_codec_err_t encoder_set_config(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t encoder_set_config(aom_codec_alg_priv_t *ctx,
|
|||
|
||||
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 @@ static aom_codec_err_t encoder_set_config(aom_codec_alg_priv_t *ctx,
|
|||
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 encoder_set_config(aom_codec_alg_priv_t *ctx,
|
|||
static aom_codec_err_t ctrl_get_quantizer(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
int *const arg = va_arg(args, int *);
|
||||
if (arg == NULL) return VPX_CODEC_INVALID_PARAM;
|
||||
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 @@ static aom_codec_err_t ctrl_set_arnr_type(aom_codec_alg_priv_t *ctx,
|
|||
va_list args) {
|
||||
(void)ctx;
|
||||
(void)args;
|
||||
return VPX_CODEC_OK;
|
||||
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 ctrl_set_frame_periodic_boost(aom_codec_alg_priv_t *ctx,
|
|||
|
||||
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 @@ static aom_codec_err_t encoder_init(aom_codec_ctx_t *ctx,
|
|||
|
||||
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 @@ static aom_codec_err_t encoder_destroy(aom_codec_alg_priv_t *ctx) {
|
|||
#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 @@ static void pick_quickcompress_mode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static void pick_quickcompress_mode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_frame_flags_t get_frame_pkt_flags(const AV1_COMP *cpi,
|
|||
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 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
|
|||
*/
|
||||
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 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx,
|
|||
}
|
||||
|
||||
// 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 @@ static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_get_reference(aom_codec_alg_priv_t *ctx,
|
|||
|
||||
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 @@ static aom_codec_err_t ctrl_set_previewpp(aom_codec_alg_priv_t *ctx,
|
|||
va_list args) {
|
||||
(void)ctx;
|
||||
(void)args;
|
||||
return VPX_CODEC_INCAPABLE;
|
||||
return AOM_CODEC_INCAPABLE;
|
||||
}
|
||||
|
||||
static aom_image_t *encoder_get_preview(aom_codec_alg_priv_t *ctx) {
|
||||
|
@ -1157,7 +1157,7 @@ static aom_codec_err_t ctrl_set_roi_map(aom_codec_alg_priv_t *ctx,
|
|||
(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 @@ static aom_codec_err_t ctrl_set_active_map(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_get_active_map(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_set_scale_mode(aom_codec_alg_priv_t *ctx,
|
|||
|
||||
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 @@ static aom_codec_err_t ctrl_register_cx_callback(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_enc_cfg_map_t encoder_usage_cfg_map[] = {
|
|||
|
||||
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 @@ static aom_codec_enc_cfg_map_t encoder_usage_cfg_map[] = {
|
|||
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 @@ static aom_codec_enc_cfg_map_t encoder_usage_cfg_map[] = {
|
|||
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 @@ static aom_codec_enc_cfg_map_t encoder_usage_cfg_map[] = {
|
|||
#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
|
||||
|
|
|
@ -89,7 +89,7 @@ static aom_codec_err_t decoder_init(aom_codec_ctx_t *ctx,
|
|||
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 @@ static aom_codec_err_t decoder_init(aom_codec_ctx_t *ctx,
|
|||
// 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 @@ static aom_codec_err_t decoder_init(aom_codec_ctx_t *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ static aom_codec_err_t decoder_destroy(aom_codec_alg_priv_t *ctx) {
|
|||
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 @@ static int parse_bitdepth_colorspace_sampling(BITSTREAM_PROFILE profile,
|
|||
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 @@ static aom_codec_err_t decoder_peek_si_internal(
|
|||
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 @@ static aom_codec_err_t decoder_peek_si_internal(
|
|||
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 @@ static aom_codec_err_t decoder_peek_si_internal(
|
|||
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 @@ static aom_codec_err_t decoder_peek_si_internal(
|
|||
}
|
||||
}
|
||||
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 @@ static aom_codec_err_t decoder_get_si(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static void init_buffer_callbacks(aom_codec_alg_priv_t *ctx) {
|
|||
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 @@ static aom_codec_err_t init_decoder(aom_codec_alg_priv_t *ctx) {
|
|||
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 @@ static aom_codec_err_t init_decoder(aom_codec_alg_priv_t *ctx) {
|
|||
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 @@ static aom_codec_err_t init_decoder(aom_codec_alg_priv_t *ctx) {
|
|||
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 @@ static aom_codec_err_t init_decoder(aom_codec_alg_priv_t *ctx) {
|
|||
#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 @@ static aom_codec_err_t init_decoder(aom_codec_alg_priv_t *ctx) {
|
|||
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 @@ static aom_codec_err_t decode_one(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t decode_one(aom_codec_alg_priv_t *ctx,
|
|||
(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 @@ static aom_codec_err_t decode_one(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t decoder_decode(aom_codec_alg_priv_t *ctx,
|
|||
|
||||
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 @@ static aom_codec_err_t decoder_decode(aom_codec_alg_priv_t *ctx,
|
|||
// 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 @@ static aom_codec_err_t decoder_decode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t decoder_decode(aom_codec_alg_priv_t *ctx,
|
|||
} 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 @@ static aom_codec_err_t decoder_decode(aom_codec_alg_priv_t *ctx,
|
|||
} 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 @@ static aom_codec_err_t decoder_decode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t decoder_decode(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t decoder_set_fb_fn(
|
|||
aom_codec_alg_priv_t *ctx, aom_get_frame_buffer_cb_fn_t cb_get,
|
||||
aom_release_frame_buffer_cb_fn_t cb_release, void *cb_priv) {
|
||||
if (cb_get == NULL || cb_release == NULL) {
|
||||
return VPX_CODEC_INVALID_PARAM;
|
||||
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 @@ static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx,
|
|||
// 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 @@ static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx,
|
|||
// 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 @@ static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_get_reference(aom_codec_alg_priv_t *ctx,
|
|||
// 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 @@ static aom_codec_err_t ctrl_get_reference(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_set_postproc(aom_codec_alg_priv_t *ctx,
|
|||
va_list args) {
|
||||
(void)ctx;
|
||||
(void)args;
|
||||
return VPX_CODEC_INCAPABLE;
|
||||
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 @@ static aom_codec_err_t ctrl_get_last_ref_updates(aom_codec_alg_priv_t *ctx,
|
|||
// 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 @@ static aom_codec_err_t ctrl_get_last_ref_updates(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_get_frame_corrupted(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_get_frame_size(aom_codec_alg_priv_t *ctx,
|
|||
// 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 @@ static aom_codec_err_t ctrl_get_frame_size(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_get_render_size(aom_codec_alg_priv_t *ctx,
|
|||
// 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 @@ static aom_codec_err_t ctrl_get_render_size(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_get_bit_depth(aom_codec_alg_priv_t *ctx,
|
|||
(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 @@ static aom_codec_err_t ctrl_set_decryptor(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_set_byte_alignment(aom_codec_alg_priv_t *ctx,
|
|||
(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 @@ static aom_codec_err_t ctrl_set_byte_alignment(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_err_t ctrl_set_skip_loop_filter(aom_codec_alg_priv_t *ctx,
|
|||
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 @@ static aom_codec_ctrl_fn_map_t decoder_ctrl_maps[] = {
|
|||
{ 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 @@ static aom_codec_ctrl_fn_map_t decoder_ctrl_maps[] = {
|
|||
#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
|
||||
|
|
|
@ -22,18 +22,18 @@ static void yuvconfig2image(aom_image_t *img, const YV12_BUFFER_CONFIG *yv12,
|
|||
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 @@ static void yuvconfig2image(aom_image_t *img, const YV12_BUFFER_CONFIG *yv12,
|
|||
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 void yuvconfig2image(aom_image_t *img, const YV12_BUFFER_CONFIG *yv12,
|
|||
|
||||
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 @@ static aom_codec_err_t image2yuvconfig(const aom_image_t *img,
|
|||
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 @@ static aom_codec_err_t image2yuvconfig(const aom_image_t *img,
|
|||
}
|
||||
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_
|
||||
|
|
|
@ -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 @@ static INLINE uint8_t clip_pixel_add(uint8_t dest, tran_high_t trans) {
|
|||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
#endif // VPX_DSP_INV_TXFM_H_
|
||||
#endif // AOM_DSP_INV_TXFM_H_
|
||||
|
|
|
@ -249,7 +249,7 @@ static INLINE TX_SIZE get_uv_tx_size_impl(TX_SIZE y_tx_size, BLOCK_SIZE bsize,
|
|||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ static INLINE int get_unsigned_bits(unsigned int num_values) {
|
|||
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 @@ static INLINE int get_unsigned_bits(unsigned int num_values) {
|
|||
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 @@ static INLINE int get_unsigned_bits(unsigned int num_values) {
|
|||
#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"
|
||||
|
|
|
@ -43,7 +43,7 @@ static const uint8_t num_8x8_blocks_high_lookup[BLOCK_SIZES] = {
|
|||
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 };
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
|
|||
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 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
|
|||
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;
|
||||
|
|
|
@ -101,10 +101,10 @@ typedef enum {
|
|||
#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;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ int av1_alloc_internal_frame_buffers(InternalFrameBufferList *list) {
|
|||
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);
|
||||
|
|
|
@ -1576,7 +1576,7 @@ void av1_loop_filter_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
|
|||
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);
|
||||
|
|
|
@ -25,31 +25,31 @@ void av1_iht4x4_16_add_msa(const int16_t *input, uint8_t *dst,
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -27,42 +27,42 @@ void av1_iht8x8_64_add_msa(const int16_t *input, uint8_t *dst,
|
|||
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 @@ void av1_iht8x8_64_add_msa(const int16_t *input, uint8_t *dst,
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ extern uint32_t OD_DIVU_SMALL_CONSTS[OD_DIVU_DMAX][2];
|
|||
# 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)
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче