Change "VP9" to "AV1"
Change-Id: I6f40ab4725f59bee3d05e3989c1510dfd847b7f9
This commit is contained in:
Родитель
d1a11fb9dd
Коммит
80edfa0132
34
CHANGELOG
34
CHANGELOG
|
@ -1,49 +1,49 @@
|
|||
2015-11-09 v1.5.0 "Javan Whistling Duck"
|
||||
This release improves upon the VP9 encoder and speeds up the encoding and
|
||||
This release improves upon the AV1 encoder and speeds up the encoding and
|
||||
decoding processes.
|
||||
|
||||
- Upgrading:
|
||||
This release is ABI incompatible with 1.4.0. It drops deprecated AOM
|
||||
controls and adds a variety of VP9 controls for testing.
|
||||
controls and adds a variety of AV1 controls for testing.
|
||||
|
||||
The aomenc utility now prefers VP9 by default.
|
||||
The aomenc utility now prefers AV1 by default.
|
||||
|
||||
- Enhancements:
|
||||
Faster VP9 encoding and decoding
|
||||
Smaller library size by combining functions used by AOM and VP9
|
||||
Faster AV1 encoding and decoding
|
||||
Smaller library size by combining functions used by AOM and AV1
|
||||
|
||||
- Bug Fixes:
|
||||
A variety of fuzzing issues
|
||||
|
||||
2015-04-03 v1.4.0 "Indian Runner Duck"
|
||||
This release includes significant improvements to the VP9 codec.
|
||||
This release includes significant improvements to the AV1 codec.
|
||||
|
||||
- Upgrading:
|
||||
This release is ABI incompatible with 1.3.0. It drops the compatibility
|
||||
layer, requiring AOM_IMG_FMT_* instead of IMG_FMT_*, and adds several codec
|
||||
controls for VP9.
|
||||
controls for AV1.
|
||||
|
||||
- Enhancements:
|
||||
Faster VP9 encoding and decoding
|
||||
Multithreaded VP9 decoding (tile and frame-based)
|
||||
Multithreaded VP9 encoding - on by default
|
||||
YUV 4:2:2 and 4:4:4 support in VP9
|
||||
10 and 12bit support in VP9
|
||||
Faster AV1 encoding and decoding
|
||||
Multithreaded AV1 decoding (tile and frame-based)
|
||||
Multithreaded AV1 encoding - on by default
|
||||
YUV 4:2:2 and 4:4:4 support in AV1
|
||||
10 and 12bit support in AV1
|
||||
64bit ARM support by replacing ARM assembly with intrinsics
|
||||
|
||||
- Bug Fixes:
|
||||
Fixes a VP9 bitstream issue in Profile 1. This only affected non-YUV 4:2:0
|
||||
Fixes a AV1 bitstream issue in Profile 1. This only affected non-YUV 4:2:0
|
||||
files.
|
||||
|
||||
- Known Issues:
|
||||
Frame Parallel decoding fails for segmented and non-420 files.
|
||||
|
||||
2013-11-15 v1.3.0 "Forest"
|
||||
This release introduces the VP9 codec in a backward-compatible way.
|
||||
This release introduces the AV1 codec in a backward-compatible way.
|
||||
All existing users of AOM can continue to use the library without
|
||||
modification. However, some AOM options do not map to VP9 in the same manner.
|
||||
modification. However, some AOM options do not map to AV1 in the same manner.
|
||||
|
||||
The VP9 encoder in this release is not feature complete. Users interested in
|
||||
The AV1 encoder in this release is not feature complete. Users interested in
|
||||
the encoder are advised to use the git master branch and discuss issues on
|
||||
libaom mailing lists.
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
|||
Add encoding option --static-thresh
|
||||
|
||||
- Speed:
|
||||
Miscellaneous speed optimizations for AOM and VP9.
|
||||
Miscellaneous speed optimizations for AOM and AV1.
|
||||
|
||||
- Quality:
|
||||
In general, quality is consistent with the Eider release.
|
||||
|
|
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
|
||||
*
|
||||
* This source code is subject to the terms of the BSD 2 Clause License and
|
||||
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
|
||||
* was not distributed with this source code in the LICENSE file, you can
|
||||
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!\defgroup vp8 AOM
|
||||
* \ingroup codecs
|
||||
* AOM is aom's newest video compression algorithm that uses motion
|
||||
* compensated prediction, Discrete Cosine Transform (DCT) coding of the
|
||||
* prediction error signal and context dependent entropy coding techniques
|
||||
* based on arithmetic principles. It features:
|
||||
* - YUV 4:2:0 image format
|
||||
* - Macro-block based coding (16x16 luma plus two 8x8 chroma)
|
||||
* - 1/4 (1/8) pixel accuracy motion compensated prediction
|
||||
* - 4x4 DCT transform
|
||||
* - 128 level linear quantizer
|
||||
* - In loop deblocking filter
|
||||
* - Context-based entropy coding
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
/*!\file
|
||||
* \brief Provides controls common to both the AOM encoder and decoder.
|
||||
*/
|
||||
#ifndef AOM_AOM_H_
|
||||
#define AOM_AOM_H_
|
||||
|
||||
#include "./aom_codec.h"
|
||||
#include "./aom_image.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*!\brief Control functions
|
||||
*
|
||||
* The set of macros define the control functions of AOM interface
|
||||
*/
|
||||
enum vp8_com_control_id {
|
||||
AOM_SET_REFERENCE =
|
||||
1, /**< pass in an external frame into decoder to be used as reference
|
||||
frame */
|
||||
AOM_COPY_REFERENCE = 2, /**< get a copy of reference frame from the decoder */
|
||||
AOM_SET_POSTPROC = 3, /**< set the decoder's post processing settings */
|
||||
AOM_SET_DBG_COLOR_REF_FRAME =
|
||||
4, /**< set the reference frames to color for each macroblock */
|
||||
AOM_SET_DBG_COLOR_MB_MODES = 5, /**< set which macro block modes to color */
|
||||
AOM_SET_DBG_COLOR_B_MODES = 6, /**< set which blocks modes to color */
|
||||
AOM_SET_DBG_DISPLAY_MV = 7, /**< set which motion vector modes to draw */
|
||||
|
||||
/* TODO(jkoleszar): The encoder incorrectly reuses some of these values (5+)
|
||||
* for its control ids. These should be migrated to something like the
|
||||
* AOM_DECODER_CTRL_ID_START range next time we're ready to break the ABI.
|
||||
*/
|
||||
AV1_GET_REFERENCE = 128, /**< get a pointer to a reference frame */
|
||||
AOM_COMMON_CTRL_ID_MAX,
|
||||
AOM_DECODER_CTRL_ID_START = 256
|
||||
};
|
||||
|
||||
/*!\brief post process flags
|
||||
*
|
||||
* The set of macros define AOM decoder post processing flags
|
||||
*/
|
||||
enum vp8_postproc_level {
|
||||
AOM_NOFILTERING = 0,
|
||||
AOM_DEBLOCK = 1 << 0,
|
||||
AOM_DEMACROBLOCK = 1 << 1,
|
||||
AOM_ADDNOISE = 1 << 2,
|
||||
AOM_DEBUG_TXT_FRAME_INFO = 1 << 3, /**< print frame information */
|
||||
AOM_DEBUG_TXT_MBLK_MODES =
|
||||
1 << 4, /**< print macro block modes over each macro block */
|
||||
AOM_DEBUG_TXT_DC_DIFF = 1 << 5, /**< print dc diff for each macro block */
|
||||
AOM_DEBUG_TXT_RATE_INFO = 1 << 6, /**< print video rate info (encoder only) */
|
||||
AOM_MFQE = 1 << 10
|
||||
};
|
||||
|
||||
/*!\brief post process flags
|
||||
*
|
||||
* This define a structure that describe the post processing settings. For
|
||||
* the best objective measure (using the PSNR metric) set post_proc_flag
|
||||
* to AOM_DEBLOCK and deblocking_level to 1.
|
||||
*/
|
||||
|
||||
typedef struct vp8_postproc_cfg {
|
||||
int post_proc_flag; /**< the types of post processing to be done, should be
|
||||
combination of "vp8_postproc_level" */
|
||||
int deblocking_level; /**< the strength of deblocking, valid range [0, 16] */
|
||||
int noise_level; /**< the strength of additive noise, valid range [0, 16] */
|
||||
} vp8_postproc_cfg_t;
|
||||
|
||||
/*!\brief reference frame type
|
||||
*
|
||||
* The set of macros define the type of AOM reference frames
|
||||
*/
|
||||
typedef enum aom_ref_frame_type {
|
||||
AOM_LAST_FRAME = 1,
|
||||
AOM_GOLD_FRAME = 2,
|
||||
AOM_ALTR_FRAME = 4
|
||||
} aom_ref_frame_type_t;
|
||||
|
||||
/*!\brief reference frame data struct
|
||||
*
|
||||
* Define the data struct to access vp8 reference frames.
|
||||
*/
|
||||
typedef struct aom_ref_frame {
|
||||
aom_ref_frame_type_t frame_type; /**< which reference frame */
|
||||
aom_image_t img; /**< reference frame data in image format */
|
||||
} aom_ref_frame_t;
|
||||
|
||||
/*!\brief AV1 specific reference frame data struct
|
||||
*
|
||||
* Define the data struct to access vp9 reference frames.
|
||||
*/
|
||||
typedef struct vp9_ref_frame {
|
||||
int idx; /**< frame index to get (input) */
|
||||
aom_image_t img; /**< img structure to populate (output) */
|
||||
} vp9_ref_frame_t;
|
||||
|
||||
/*!\cond */
|
||||
/*!\brief vp8 decoder control function parameter type
|
||||
*
|
||||
* defines the data type for each of AOM decoder control function requires
|
||||
*/
|
||||
AOM_CTRL_USE_TYPE(AOM_SET_REFERENCE, aom_ref_frame_t *)
|
||||
#define AOM_CTRL_AOM_SET_REFERENCE
|
||||
AOM_CTRL_USE_TYPE(AOM_COPY_REFERENCE, aom_ref_frame_t *)
|
||||
#define AOM_CTRL_AOM_COPY_REFERENCE
|
||||
AOM_CTRL_USE_TYPE(AOM_SET_POSTPROC, vp8_postproc_cfg_t *)
|
||||
#define AOM_CTRL_AOM_SET_POSTPROC
|
||||
AOM_CTRL_USE_TYPE(AOM_SET_DBG_COLOR_REF_FRAME, int)
|
||||
#define AOM_CTRL_AOM_SET_DBG_COLOR_REF_FRAME
|
||||
AOM_CTRL_USE_TYPE(AOM_SET_DBG_COLOR_MB_MODES, int)
|
||||
#define AOM_CTRL_AOM_SET_DBG_COLOR_MB_MODES
|
||||
AOM_CTRL_USE_TYPE(AOM_SET_DBG_COLOR_B_MODES, int)
|
||||
#define AOM_CTRL_AOM_SET_DBG_COLOR_B_MODES
|
||||
AOM_CTRL_USE_TYPE(AOM_SET_DBG_DISPLAY_MV, int)
|
||||
#define AOM_CTRL_AOM_SET_DBG_DISPLAY_MV
|
||||
AOM_CTRL_USE_TYPE(AV1_GET_REFERENCE, vp9_ref_frame_t *)
|
||||
#define AOM_CTRL_AV1_GET_REFERENCE
|
||||
|
||||
/*!\endcond */
|
||||
/*! @} - end defgroup vp8 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // AOM_AOM_H_
|
|
@ -322,7 +322,7 @@ aom_codec_err_t aom_codec_register_put_slice_cb(aom_codec_ctx_t *ctx,
|
|||
* will result in an error code being returned, usually AOM_CODEC_ERROR.
|
||||
*
|
||||
* \note
|
||||
* Currently this only works with VP9.
|
||||
* Currently this only works with AV1.
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@ -348,7 +348,7 @@ aom_codec_err_t aom_codec_register_put_slice_cb(aom_codec_ctx_t *ctx,
|
|||
* using external frame buffers.
|
||||
*
|
||||
* \note
|
||||
* When decoding VP9, the application may be required to pass in at least
|
||||
* When decoding AV1, the application may be required to pass in at least
|
||||
* #AOM_MAXIMUM_WORK_BUFFERS external frame
|
||||
* buffers.
|
||||
*/
|
||||
|
|
|
@ -702,7 +702,7 @@ typedef struct aom_codec_enc_cfg {
|
|||
/*!\brief Temporal layering mode indicating which temporal layering scheme to
|
||||
* use.
|
||||
*
|
||||
* The value (refer to VP9E_TEMPORAL_LAYERING_MODE) specifies the
|
||||
* The value (refer to AV1E_TEMPORAL_LAYERING_MODE) specifies the
|
||||
* temporal layering mode to use.
|
||||
*
|
||||
*/
|
||||
|
@ -798,7 +798,7 @@ aom_codec_err_t aom_codec_enc_init_multi_ver(
|
|||
*
|
||||
* \param[in] iface Pointer to the algorithm interface to use.
|
||||
* \param[out] cfg Configuration buffer to populate.
|
||||
* \param[in] reserved Must set to 0 for AOM and VP9.
|
||||
* \param[in] reserved Must set to 0 for AOM and AV1.
|
||||
*
|
||||
* \retval #AOM_CODEC_OK
|
||||
* The configuration was populated.
|
||||
|
|
|
@ -29,7 +29,7 @@ extern "C" {
|
|||
*/
|
||||
#define AOM_MAXIMUM_WORK_BUFFERS 8
|
||||
|
||||
/*!\brief The maximum number of reference buffers that a VP9 encoder may use.
|
||||
/*!\brief The maximum number of reference buffers that a AV1 encoder may use.
|
||||
*/
|
||||
#define AOM_MAXIMUM_REF_BUFFERS 8
|
||||
|
||||
|
|
|
@ -0,0 +1,844 @@
|
|||
/*
|
||||
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
|
||||
*
|
||||
* This source code is subject to the terms of the BSD 2 Clause License and
|
||||
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
|
||||
* was not distributed with this source code in the LICENSE file, you can
|
||||
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
|
||||
* 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 AOM_AOMCX_H_
|
||||
#define AOM_AOMCX_H_
|
||||
|
||||
/*!\defgroup vp8_encoder WebM AOM/AV1 Encoder
|
||||
* \ingroup vp8
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
#include "./aom.h"
|
||||
#include "./aom_encoder.h"
|
||||
|
||||
/*!\file
|
||||
* \brief Provides definitions for using AOM or AV1 encoder algorithm within the
|
||||
* aom Codec Interface.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*!\name Algorithm interface for AV1
|
||||
*
|
||||
* This interface provides the capability to encode raw AV1 streams.
|
||||
* @{
|
||||
*/
|
||||
extern aom_codec_iface_t aom_codec_av1_cx_algo;
|
||||
extern aom_codec_iface_t *aom_codec_av1_cx(void);
|
||||
/*!@} - end algorithm interface member group*/
|
||||
|
||||
/*
|
||||
* Algorithm Flags
|
||||
*/
|
||||
|
||||
/*!\brief Don't reference the last frame
|
||||
*
|
||||
* When this flag is set, the encoder will not use the last frame as a
|
||||
* predictor. When not set, the encoder will choose whether to use the
|
||||
* last frame or not automatically.
|
||||
*/
|
||||
#define AOM_EFLAG_NO_REF_LAST (1 << 16)
|
||||
|
||||
/*!\brief Don't reference the golden frame
|
||||
*
|
||||
* When this flag is set, the encoder will not use the golden frame as a
|
||||
* predictor. When not set, the encoder will choose whether to use the
|
||||
* golden frame or not automatically.
|
||||
*/
|
||||
#define AOM_EFLAG_NO_REF_GF (1 << 17)
|
||||
|
||||
/*!\brief Don't reference the alternate reference frame
|
||||
*
|
||||
* When this flag is set, the encoder will not use the alt ref frame as a
|
||||
* predictor. When not set, the encoder will choose whether to use the
|
||||
* alt ref frame or not automatically.
|
||||
*/
|
||||
#define AOM_EFLAG_NO_REF_ARF (1 << 21)
|
||||
|
||||
/*!\brief Don't update the last frame
|
||||
*
|
||||
* When this flag is set, the encoder will not update the last frame with
|
||||
* the contents of the current frame.
|
||||
*/
|
||||
#define AOM_EFLAG_NO_UPD_LAST (1 << 18)
|
||||
|
||||
/*!\brief Don't update the golden frame
|
||||
*
|
||||
* When this flag is set, the encoder will not update the golden frame with
|
||||
* the contents of the current frame.
|
||||
*/
|
||||
#define AOM_EFLAG_NO_UPD_GF (1 << 22)
|
||||
|
||||
/*!\brief Don't update the alternate reference frame
|
||||
*
|
||||
* When this flag is set, the encoder will not update the alt ref frame with
|
||||
* the contents of the current frame.
|
||||
*/
|
||||
#define AOM_EFLAG_NO_UPD_ARF (1 << 23)
|
||||
|
||||
/*!\brief Force golden frame update
|
||||
*
|
||||
* When this flag is set, the encoder copy the contents of the current frame
|
||||
* to the golden frame buffer.
|
||||
*/
|
||||
#define AOM_EFLAG_FORCE_GF (1 << 19)
|
||||
|
||||
/*!\brief Force alternate reference frame update
|
||||
*
|
||||
* When this flag is set, the encoder copy the contents of the current frame
|
||||
* to the alternate reference frame buffer.
|
||||
*/
|
||||
#define AOM_EFLAG_FORCE_ARF (1 << 24)
|
||||
|
||||
/*!\brief Disable entropy update
|
||||
*
|
||||
* When this flag is set, the encoder will not update its internal entropy
|
||||
* model based on the entropy of this frame.
|
||||
*/
|
||||
#define AOM_EFLAG_NO_UPD_ENTROPY (1 << 20)
|
||||
|
||||
/*!\brief VPx encoder control functions
|
||||
*
|
||||
* This set of macros define the control functions available for VPx
|
||||
* encoder interface.
|
||||
*
|
||||
* \sa #aom_codec_control
|
||||
*/
|
||||
enum vp8e_enc_control_id {
|
||||
/*!\brief Codec control function to pass an ROI map to encoder.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_ROI_MAP = 8,
|
||||
|
||||
/*!\brief Codec control function to pass an Active map to encoder.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_ACTIVEMAP,
|
||||
|
||||
/*!\brief Codec control function to set encoder scaling mode.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_SCALEMODE = 11,
|
||||
|
||||
/*!\brief Codec control function to set encoder internal speed settings.
|
||||
*
|
||||
* Changes in this value influences, among others, the encoder's selection
|
||||
* of motion estimation methods. Values greater than 0 will increase encoder
|
||||
* speed at the expense of quality.
|
||||
*
|
||||
* \note Valid range for AOM: -16..16
|
||||
* \note Valid range for AV1: -8..8
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_CPUUSED = 13,
|
||||
|
||||
/*!\brief Codec control function to enable automatic set and use alf frames.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_ENABLEAUTOALTREF,
|
||||
|
||||
/*!\brief control function to set noise sensitivity
|
||||
*
|
||||
* 0: off, 1: OnYOnly, 2: OnYUV,
|
||||
* 3: OnYUVAggressive, 4: Adaptive
|
||||
*
|
||||
* Supported in codecs: AOM
|
||||
*/
|
||||
AOME_SET_NOISE_SENSITIVITY,
|
||||
|
||||
/*!\brief Codec control function to set sharpness.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_SHARPNESS,
|
||||
|
||||
/*!\brief Codec control function to set the threshold for MBs treated static.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_STATIC_THRESHOLD,
|
||||
|
||||
/*!\brief Codec control function to set the number of token partitions.
|
||||
*
|
||||
* Supported in codecs: AOM
|
||||
*/
|
||||
AOME_SET_TOKEN_PARTITIONS,
|
||||
|
||||
/*!\brief Codec control function to get last quantizer chosen by the encoder.
|
||||
*
|
||||
* Return value uses internal quantizer scale defined by the codec.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_GET_LAST_QUANTIZER,
|
||||
|
||||
/*!\brief Codec control function to get last quantizer chosen by the encoder.
|
||||
*
|
||||
* Return value uses the 0..63 scale as used by the rc_*_quantizer config
|
||||
* parameters.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_GET_LAST_QUANTIZER_64,
|
||||
|
||||
/*!\brief Codec control function to set the max no of frames to create arf.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_ARNR_MAXFRAMES,
|
||||
|
||||
/*!\brief Codec control function to set the filter strength for the arf.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_ARNR_STRENGTH,
|
||||
|
||||
/*!\deprecated control function to set the filter type to use for the arf. */
|
||||
AOME_SET_ARNR_TYPE,
|
||||
|
||||
/*!\brief Codec control function to set visual tuning.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_TUNING,
|
||||
|
||||
/*!\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 #AOM_CQ.
|
||||
* \note Valid range: 0..63
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_CQ_LEVEL,
|
||||
|
||||
/*!\brief Codec control function to set Max data rate for Intra frames.
|
||||
*
|
||||
* This value controls additional clamping on the maximum size of a
|
||||
* keyframe. It is expressed as a percentage of the average
|
||||
* per-frame bitrate, with the special (and default) value 0 meaning
|
||||
* unlimited, or no additional clamping beyond the codec's built-in
|
||||
* algorithm.
|
||||
*
|
||||
* For example, to allocate no more than 4.5 frames worth of bitrate
|
||||
* to a keyframe, set this to 450.
|
||||
*
|
||||
* Supported in codecs: AOM, AV1
|
||||
*/
|
||||
AOME_SET_MAX_INTRA_BITRATE_PCT,
|
||||
|
||||
/*!\brief Codec control function to set reference and update frame flags.
|
||||
*
|
||||
* Supported in codecs: AOM
|
||||
*/
|
||||
AOME_SET_FRAME_FLAGS,
|
||||
|
||||
/*!\brief Codec control function to set max data rate for Inter frames.
|
||||
*
|
||||
* This value controls additional clamping on the maximum size of an
|
||||
* inter frame. It is expressed as a percentage of the average
|
||||
* per-frame bitrate, with the special (and default) value 0 meaning
|
||||
* unlimited, or no additional clamping beyond the codec's built-in
|
||||
* algorithm.
|
||||
*
|
||||
* For example, to allow no more than 4.5 frames worth of bitrate
|
||||
* to an inter frame, set this to 450.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_MAX_INTER_BITRATE_PCT,
|
||||
|
||||
/*!\brief Boost percentage for Golden Frame in CBR mode.
|
||||
*
|
||||
* This value controls the amount of boost given to Golden Frame in
|
||||
* CBR mode. It is expressed as a percentage of the average
|
||||
* per-frame bitrate, with the special (and default) value 0 meaning
|
||||
* the feature is off, i.e., no golden frame boost in CBR mode and
|
||||
* average bitrate target is used.
|
||||
*
|
||||
* For example, to allow 100% more bits, i.e, 2X, in a golden frame
|
||||
* than average frame, set this to 100.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_GF_CBR_BOOST_PCT,
|
||||
|
||||
/*!\brief Codec control function to set the temporal layer id.
|
||||
*
|
||||
* For temporal scalability: this control allows the application to set the
|
||||
* layer id for each frame to be encoded. Note that this control must be set
|
||||
* for every frame prior to encoding. The usage of this control function
|
||||
* supersedes the internal temporal pattern counter, which is now deprecated.
|
||||
*
|
||||
* Supported in codecs: AOM
|
||||
*/
|
||||
AOME_SET_TEMPORAL_LAYER_ID,
|
||||
|
||||
/*!\brief Codec control function to set encoder screen content mode.
|
||||
*
|
||||
* 0: off, 1: On, 2: On with more aggressive rate control.
|
||||
*
|
||||
* Supported in codecs: AOM
|
||||
*/
|
||||
AOME_SET_SCREEN_CONTENT_MODE,
|
||||
|
||||
/*!\brief Codec control function to set lossless encoding mode.
|
||||
*
|
||||
* AV1 can operate in lossless encoding mode, in which the bitstream
|
||||
* produced will be able to decode and reconstruct a perfect copy of
|
||||
* input source. This control function provides a mean to switch encoder
|
||||
* into lossless coding mode(1) or normal coding mode(0) that may be lossy.
|
||||
* 0 = lossy coding mode
|
||||
* 1 = lossless coding mode
|
||||
*
|
||||
* By default, encoder operates in normal coding mode (maybe lossy).
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_LOSSLESS,
|
||||
#if CONFIG_AOM_QM
|
||||
/*!\brief Codec control function to encode with quantisation matrices.
|
||||
*
|
||||
* AOM can operate with default quantisation matrices dependent on
|
||||
* quantisation level and block type.
|
||||
* 0 = do not use quantisation matrices
|
||||
* 1 = use quantisation matrices
|
||||
*
|
||||
* By default, the encoder operates without quantisation matrices.
|
||||
*
|
||||
* Supported in codecs: AOM
|
||||
*/
|
||||
|
||||
AV1E_SET_ENABLE_QM,
|
||||
|
||||
/*!\brief Codec control function to set the min quant matrix flatness.
|
||||
*
|
||||
* AOM can operate with different ranges of quantisation matrices.
|
||||
* As quantisation levels increase, the matrices get flatter. This
|
||||
* control sets the minimum level of flatness from which the matrices
|
||||
* are determined.
|
||||
*
|
||||
* By default, the encoder sets this minimum at half the available
|
||||
* range.
|
||||
*
|
||||
* Supported in codecs: AOM
|
||||
*/
|
||||
AV1E_SET_QM_MIN,
|
||||
|
||||
/*!\brief Codec control function to set the max quant matrix flatness.
|
||||
*
|
||||
* AOM can operate with different ranges of quantisation matrices.
|
||||
* As quantisation levels increase, the matrices get flatter. This
|
||||
* control sets the maximum level of flatness possible.
|
||||
*
|
||||
* By default, the encoder sets this maximum at the top of the
|
||||
* available range.
|
||||
*
|
||||
* Supported in codecs: AOM
|
||||
*/
|
||||
AV1E_SET_QM_MAX,
|
||||
#endif
|
||||
|
||||
/*!\brief Codec control function to set number of tile columns.
|
||||
*
|
||||
* In encoding and decoding, AV1 allows an input image frame be partitioned
|
||||
* into separated vertical tile columns, which can be encoded or decoded
|
||||
* independently. This enables easy implementation of parallel encoding and
|
||||
* decoding. This control requests the encoder to use column tiles in
|
||||
* encoding an input frame, with number of tile columns (in Log2 unit) as
|
||||
* the parameter:
|
||||
* 0 = 1 tile column
|
||||
* 1 = 2 tile columns
|
||||
* 2 = 4 tile columns
|
||||
* .....
|
||||
* n = 2**n tile columns
|
||||
* The requested tile columns will be capped by encoder based on image size
|
||||
* limitation (The minimum width of a tile column is 256 pixel, the maximum
|
||||
* is 4096).
|
||||
*
|
||||
* By default, the value is 0, i.e. one single column tile for entire image.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_TILE_COLUMNS,
|
||||
|
||||
/*!\brief Codec control function to set number of tile rows.
|
||||
*
|
||||
* In encoding and decoding, AV1 allows an input image frame be partitioned
|
||||
* into separated horizontal tile rows. Tile rows are encoded or decoded
|
||||
* sequentially. Even though encoding/decoding of later tile rows depends on
|
||||
* earlier ones, this allows the encoder to output data packets for tile rows
|
||||
* prior to completely processing all tile rows in a frame, thereby reducing
|
||||
* the latency in processing between input and output. The parameter
|
||||
* for this control describes the number of tile rows, which has a valid
|
||||
* range [0, 2]:
|
||||
* 0 = 1 tile row
|
||||
* 1 = 2 tile rows
|
||||
* 2 = 4 tile rows
|
||||
*
|
||||
* By default, the value is 0, i.e. one single row tile for entire image.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_TILE_ROWS,
|
||||
|
||||
/*!\brief Codec control function to enable frame parallel decoding feature.
|
||||
*
|
||||
* AV1 has a bitstream feature to reduce decoding dependency between frames
|
||||
* by turning off backward update of probability context used in encoding
|
||||
* and decoding. This allows staged parallel processing of more than one
|
||||
* video frames in the decoder. This control function provides a mean to
|
||||
* turn this feature on or off for bitstreams produced by encoder.
|
||||
*
|
||||
* By default, this feature is off.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_FRAME_PARALLEL_DECODING,
|
||||
|
||||
/*!\brief Codec control function to set adaptive quantization mode.
|
||||
*
|
||||
* AV1 has a segment based feature that allows encoder to adaptively change
|
||||
* quantization parameter for each segment within a frame to improve the
|
||||
* subjective quality. This control makes encoder operate in one of the
|
||||
* several AQ_modes supported.
|
||||
*
|
||||
* By default, encoder operates with AQ_Mode 0(adaptive quantization off).
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_AQ_MODE,
|
||||
|
||||
/*!\brief Codec control function to enable/disable periodic Q boost.
|
||||
*
|
||||
* One AV1 encoder speed feature is to enable quality boost by lowering
|
||||
* frame level Q periodically. This control function provides a mean to
|
||||
* turn on/off this feature.
|
||||
* 0 = off
|
||||
* 1 = on
|
||||
*
|
||||
* By default, the encoder is allowed to use this feature for appropriate
|
||||
* encoding modes.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_FRAME_PERIODIC_BOOST,
|
||||
|
||||
/*!\brief Codec control function to set noise sensitivity.
|
||||
*
|
||||
* 0: off, 1: On(YOnly)
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_NOISE_SENSITIVITY,
|
||||
|
||||
/*!\brief Codec control function to turn on/off SVC in encoder.
|
||||
* \note Return value is AOM_CODEC_INVALID_PARAM if the encoder does not
|
||||
* support SVC in its current encoding mode
|
||||
* 0: off, 1: on
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_SVC,
|
||||
|
||||
/*!\brief Codec control function to set parameters for SVC.
|
||||
* \note Parameters contain min_q, max_q, scaling factor for each of the
|
||||
* SVC layers.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_SVC_PARAMETERS,
|
||||
|
||||
/*!\brief Codec control function to set svc layer for spatial and temporal.
|
||||
* \note Valid ranges: 0..#aom_codec_enc_cfg::ss_number_layers for spatial
|
||||
* layer and 0..#aom_codec_enc_cfg::ts_number_layers for
|
||||
* temporal layer.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_SVC_LAYER_ID,
|
||||
|
||||
/*!\brief Codec control function to set content type.
|
||||
* \note Valid parameter range:
|
||||
* AOM_CONTENT_DEFAULT = Regular video content (Default)
|
||||
* AOM_CONTENT_SCREEN = Screen capture content
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_TUNE_CONTENT,
|
||||
|
||||
/*!\brief Codec control function to get svc layer ID.
|
||||
* \note The layer ID returned is for the data packet from the registered
|
||||
* callback function.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_GET_SVC_LAYER_ID,
|
||||
|
||||
/*!\brief Codec control function to register callback to get per layer packet.
|
||||
* \note Parameter for this control function is a structure with a callback
|
||||
* function and a pointer to private data used by the callback.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_REGISTER_CX_CALLBACK,
|
||||
|
||||
/*!\brief Codec control function to set color space info.
|
||||
* \note Valid ranges: 0..7, default is "UNKNOWN".
|
||||
* 0 = UNKNOWN,
|
||||
* 1 = BT_601
|
||||
* 2 = BT_709
|
||||
* 3 = SMPTE_170
|
||||
* 4 = SMPTE_240
|
||||
* 5 = BT_2020
|
||||
* 6 = RESERVED
|
||||
* 7 = SRGB
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_COLOR_SPACE,
|
||||
|
||||
/*!\brief Codec control function to set temporal layering mode.
|
||||
* \note Valid ranges: 0..3, default is "0"
|
||||
* (AV1E_TEMPORAL_LAYERING_MODE_NOLAYERING).
|
||||
* 0 = AV1E_TEMPORAL_LAYERING_MODE_NOLAYERING
|
||||
* 1 = AV1E_TEMPORAL_LAYERING_MODE_BYPASS
|
||||
* 2 = AV1E_TEMPORAL_LAYERING_MODE_0101
|
||||
* 3 = AV1E_TEMPORAL_LAYERING_MODE_0212
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_TEMPORAL_LAYERING_MODE,
|
||||
|
||||
/*!\brief Codec control function to set minimum interval between GF/ARF frames
|
||||
*
|
||||
* By default the value is set as 4.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_MIN_GF_INTERVAL,
|
||||
|
||||
/*!\brief Codec control function to set minimum interval between GF/ARF frames
|
||||
*
|
||||
* By default the value is set as 16.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_MAX_GF_INTERVAL,
|
||||
|
||||
/*!\brief Codec control function to get an Active map back from the encoder.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_GET_ACTIVEMAP,
|
||||
|
||||
/*!\brief Codec control function to set color range bit.
|
||||
* \note Valid ranges: 0..1, default is 0
|
||||
* 0 = Limited range (16..235 or HBD equivalent)
|
||||
* 1 = Full range (0..255 or HBD equivalent)
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_COLOR_RANGE,
|
||||
|
||||
/*!\brief Codec control function to set the frame flags and buffer indices
|
||||
* for spatial layers. The frame flags and buffer indices are set using the
|
||||
* struct #aom_svc_ref_frame_config defined below.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_SVC_REF_FRAME_CONFIG,
|
||||
|
||||
/*!\brief Codec control function to set intended rendering image size.
|
||||
*
|
||||
* By default, this is identical to the image size in pixels.
|
||||
*
|
||||
* Supported in codecs: AV1
|
||||
*/
|
||||
AV1E_SET_RENDER_SIZE,
|
||||
};
|
||||
|
||||
/*!\brief aom 1-D scaling mode
|
||||
*
|
||||
* This set of constants define 1-D aom scaling modes
|
||||
*/
|
||||
typedef enum aom_scaling_mode_1d {
|
||||
AOME_NORMAL = 0,
|
||||
AOME_FOURFIVE = 1,
|
||||
AOME_THREEFIVE = 2,
|
||||
AOME_ONETWO = 3
|
||||
} AOM_SCALING_MODE;
|
||||
|
||||
/*!\brief Temporal layering mode enum for AV1 SVC.
|
||||
*
|
||||
* This set of macros define the different temporal layering modes.
|
||||
* Supported codecs: AV1 (in SVC mode)
|
||||
*
|
||||
*/
|
||||
typedef enum vp9e_temporal_layering_mode {
|
||||
/*!\brief No temporal layering.
|
||||
* Used when only spatial layering is used.
|
||||
*/
|
||||
AV1E_TEMPORAL_LAYERING_MODE_NOLAYERING = 0,
|
||||
|
||||
/*!\brief Bypass mode.
|
||||
* Used when application needs to control temporal layering.
|
||||
* This will only work when the number of spatial layers equals 1.
|
||||
*/
|
||||
AV1E_TEMPORAL_LAYERING_MODE_BYPASS = 1,
|
||||
|
||||
/*!\brief 0-1-0-1... temporal layering scheme with two temporal layers.
|
||||
*/
|
||||
AV1E_TEMPORAL_LAYERING_MODE_0101 = 2,
|
||||
|
||||
/*!\brief 0-2-1-2... temporal layering scheme with three temporal layers.
|
||||
*/
|
||||
AV1E_TEMPORAL_LAYERING_MODE_0212 = 3
|
||||
} AV1E_TEMPORAL_LAYERING_MODE;
|
||||
|
||||
/*!\brief aom region of interest map
|
||||
*
|
||||
* These defines the data structures for the region of interest map
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct aom_roi_map {
|
||||
/*! An id between 0 and 3 for each 16x16 region within a frame. */
|
||||
unsigned char *roi_map;
|
||||
unsigned int rows; /**< Number of rows. */
|
||||
unsigned int cols; /**< Number of columns. */
|
||||
// TODO(paulwilkins): broken for AV1 which has 8 segments
|
||||
// q and loop filter deltas for each segment
|
||||
// (see MAX_MB_SEGMENTS)
|
||||
int delta_q[4]; /**< Quantizer deltas. */
|
||||
int delta_lf[4]; /**< Loop filter deltas. */
|
||||
/*! Static breakout threshold for each segment. */
|
||||
unsigned int static_threshold[4];
|
||||
} aom_roi_map_t;
|
||||
|
||||
/*!\brief aom active region map
|
||||
*
|
||||
* These defines the data structures for active region map
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct aom_active_map {
|
||||
unsigned char
|
||||
*active_map; /**< specify an on (1) or off (0) each 16x16 region within a
|
||||
frame */
|
||||
unsigned int rows; /**< number of rows */
|
||||
unsigned int cols; /**< number of cols */
|
||||
} aom_active_map_t;
|
||||
|
||||
/*!\brief aom image scaling mode
|
||||
*
|
||||
* This defines the data structure for image scaling mode
|
||||
*
|
||||
*/
|
||||
typedef struct aom_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 AOM token partition mode
|
||||
*
|
||||
* This defines AOM partitioning mode for compressed data, i.e., the number of
|
||||
* sub-streams in the bitstream. Used for parallelized decoding.
|
||||
*
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
AOM_ONE_TOKENPARTITION = 0,
|
||||
AOM_TWO_TOKENPARTITION = 1,
|
||||
AOM_FOUR_TOKENPARTITION = 2,
|
||||
AOM_EIGHT_TOKENPARTITION = 3
|
||||
} vp8e_token_partitions;
|
||||
|
||||
/*!brief AV1 encoder content type */
|
||||
typedef enum {
|
||||
AOM_CONTENT_DEFAULT,
|
||||
AOM_CONTENT_SCREEN,
|
||||
AOM_CONTENT_INVALID
|
||||
} aom_tune_content;
|
||||
|
||||
/*!\brief AOM model tuning parameters
|
||||
*
|
||||
* Changes the encoder to tune for certain types of input material.
|
||||
*
|
||||
*/
|
||||
typedef enum { AOM_TUNE_PSNR, AOM_TUNE_SSIM } aom_tune_metric;
|
||||
|
||||
/*!\brief vp9 svc layer parameters
|
||||
*
|
||||
* This defines the spatial and temporal layer id numbers for svc encoding.
|
||||
* This is used with the #AV1E_SET_SVC_LAYER_ID control to set the spatial and
|
||||
* temporal layer id for the current frame.
|
||||
*
|
||||
*/
|
||||
typedef struct aom_svc_layer_id {
|
||||
int spatial_layer_id; /**< Spatial layer id number. */
|
||||
int temporal_layer_id; /**< Temporal layer id number. */
|
||||
} aom_svc_layer_id_t;
|
||||
|
||||
/*!\brief vp9 svc frame flag parameters.
|
||||
*
|
||||
* This defines the frame flags and buffer indices for each spatial layer for
|
||||
* svc encoding.
|
||||
* This is used with the #AV1E_SET_SVC_REF_FRAME_CONFIG control to set frame
|
||||
* flags and buffer indices for each spatial layer for the current (super)frame.
|
||||
*
|
||||
*/
|
||||
typedef struct aom_svc_ref_frame_config {
|
||||
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 */
|
||||
/*!\brief AOM encoder control function parameter type
|
||||
*
|
||||
* Defines the data types that AOME control functions take. Note that
|
||||
* additional common controls are defined in aom.h
|
||||
*
|
||||
*/
|
||||
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_FRAME_FLAGS, int)
|
||||
#define AOM_CTRL_AOME_SET_FRAME_FLAGS
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_TEMPORAL_LAYER_ID, int)
|
||||
#define AOM_CTRL_AOME_SET_TEMPORAL_LAYER_ID
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_ROI_MAP, aom_roi_map_t *)
|
||||
#define AOM_CTRL_AOME_SET_ROI_MAP
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_ACTIVEMAP, aom_active_map_t *)
|
||||
#define AOM_CTRL_AOME_SET_ACTIVEMAP
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_SCALEMODE, aom_scaling_mode_t *)
|
||||
#define AOM_CTRL_AOME_SET_SCALEMODE
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_SVC, int)
|
||||
#define AOM_CTRL_AV1E_SET_SVC
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_SVC_PARAMETERS, void *)
|
||||
#define AOM_CTRL_AV1E_SET_SVC_PARAMETERS
|
||||
AOM_CTRL_USE_TYPE(AV1E_REGISTER_CX_CALLBACK, void *)
|
||||
#define AOM_CTRL_AV1E_REGISTER_CX_CALLBACK
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_SVC_LAYER_ID, aom_svc_layer_id_t *)
|
||||
#define AOM_CTRL_AV1E_SET_SVC_LAYER_ID
|
||||
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_CPUUSED, int)
|
||||
#define AOM_CTRL_AOME_SET_CPUUSED
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_ENABLEAUTOALTREF, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_ENABLEAUTOALTREF
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_NOISE_SENSITIVITY, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_NOISE_SENSITIVITY
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_SHARPNESS, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_SHARPNESS
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_STATIC_THRESHOLD, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_STATIC_THRESHOLD
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_TOKEN_PARTITIONS, int) /* vp8e_token_partitions */
|
||||
#define AOM_CTRL_AOME_SET_TOKEN_PARTITIONS
|
||||
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_ARNR_MAXFRAMES, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_ARNR_MAXFRAMES
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_ARNR_STRENGTH, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_ARNR_STRENGTH
|
||||
AOM_CTRL_USE_TYPE_DEPRECATED(AOME_SET_ARNR_TYPE, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_ARNR_TYPE
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_TUNING, int) /* aom_tune_metric */
|
||||
#define AOM_CTRL_AOME_SET_TUNING
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_CQ_LEVEL, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_CQ_LEVEL
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_TILE_COLUMNS, int)
|
||||
#define AOM_CTRL_AV1E_SET_TILE_COLUMNS
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_TILE_ROWS, int)
|
||||
#define AOM_CTRL_AV1E_SET_TILE_ROWS
|
||||
|
||||
AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER, int *)
|
||||
#define AOM_CTRL_AOME_GET_LAST_QUANTIZER
|
||||
AOM_CTRL_USE_TYPE(AOME_GET_LAST_QUANTIZER_64, int *)
|
||||
#define AOM_CTRL_AOME_GET_LAST_QUANTIZER_64
|
||||
AOM_CTRL_USE_TYPE(AV1E_GET_SVC_LAYER_ID, aom_svc_layer_id_t *)
|
||||
#define AOM_CTRL_AV1E_GET_SVC_LAYER_ID
|
||||
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTRA_BITRATE_PCT, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_MAX_INTRA_BITRATE_PCT
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_MAX_INTER_BITRATE_PCT, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_MAX_INTER_BITRATE_PCT
|
||||
|
||||
AOM_CTRL_USE_TYPE(AOME_SET_SCREEN_CONTENT_MODE, unsigned int)
|
||||
#define AOM_CTRL_AOME_SET_SCREEN_CONTENT_MODE
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_GF_CBR_BOOST_PCT, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_GF_CBR_BOOST_PCT
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_LOSSLESS, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_LOSSLESS
|
||||
|
||||
#if CONFIG_AOM_QM
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_ENABLE_QM, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_ENABLE_QM
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_QM_MIN, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_QM_MIN
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_QM_MAX, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_QM_MAX
|
||||
#endif
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_FRAME_PARALLEL_DECODING, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_FRAME_PARALLEL_DECODING
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_AQ_MODE, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_AQ_MODE
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_FRAME_PERIODIC_BOOST, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_FRAME_PERIODIC_BOOST
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_NOISE_SENSITIVITY, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_NOISE_SENSITIVITY
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_TUNE_CONTENT, int) /* aom_tune_content */
|
||||
#define AOM_CTRL_AV1E_SET_TUNE_CONTENT
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_SPACE, int)
|
||||
#define AOM_CTRL_AV1E_SET_COLOR_SPACE
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_MIN_GF_INTERVAL, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_MIN_GF_INTERVAL
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_MAX_GF_INTERVAL, unsigned int)
|
||||
#define AOM_CTRL_AV1E_SET_MAX_GF_INTERVAL
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_GET_ACTIVEMAP, aom_active_map_t *)
|
||||
#define AOM_CTRL_AV1E_GET_ACTIVEMAP
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_COLOR_RANGE, int)
|
||||
#define AOM_CTRL_AV1E_SET_COLOR_RANGE
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_SVC_REF_FRAME_CONFIG, aom_svc_ref_frame_config_t *)
|
||||
#define AOM_CTRL_AV1E_SET_SVC_REF_FRAME_CONFIG
|
||||
|
||||
AOM_CTRL_USE_TYPE(AV1E_SET_RENDER_SIZE, int *)
|
||||
#define AOM_CTRL_AV1E_SET_RENDER_SIZE
|
||||
|
||||
/*!\endcond */
|
||||
/*! @} - end defgroup vp8_encoder */
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // AOM_AOMCX_H_
|
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
|
||||
*
|
||||
* This source code is subject to the terms of the BSD 2 Clause License and
|
||||
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
|
||||
* was not distributed with this source code in the LICENSE file, you can
|
||||
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!\defgroup vp8_decoder WebM AOM/AV1 Decoder
|
||||
* \ingroup vp8
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
/*!\file
|
||||
* \brief Provides definitions for using AOM or AV1 within the aom Decoder
|
||||
* interface.
|
||||
*/
|
||||
#ifndef AOM_AOMDX_H_
|
||||
#define AOM_AOMDX_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Include controls common to both the encoder and decoder */
|
||||
#include "./aom.h"
|
||||
|
||||
/*!\name Algorithm interface for AV1
|
||||
*
|
||||
* This interface provides the capability to decode AV1 streams.
|
||||
* @{
|
||||
*/
|
||||
extern aom_codec_iface_t aom_codec_av1_dx_algo;
|
||||
extern aom_codec_iface_t *aom_codec_av1_dx(void);
|
||||
/*!@} - end algorithm interface member group*/
|
||||
|
||||
/*!\enum vp8_dec_control_id
|
||||
* \brief AOM decoder control functions
|
||||
*
|
||||
* This set of macros define the control functions available for the AOM
|
||||
* decoder interface.
|
||||
*
|
||||
* \sa #aom_codec_control
|
||||
*/
|
||||
enum vp8_dec_control_id {
|
||||
/** control function to get info on which reference frames were updated
|
||||
* by the last decode
|
||||
*/
|
||||
AOMD_GET_LAST_REF_UPDATES = AOM_DECODER_CTRL_ID_START,
|
||||
|
||||
/** check if the indicated frame is corrupted */
|
||||
AOMD_GET_FRAME_CORRUPTED,
|
||||
|
||||
/** control function to get info on which reference frames were used
|
||||
* by the last decode
|
||||
*/
|
||||
AOMD_GET_LAST_REF_USED,
|
||||
|
||||
/** decryption function to decrypt encoded buffer data immediately
|
||||
* before decoding. Takes a aom_decrypt_init, which contains
|
||||
* a callback function and opaque context pointer.
|
||||
*/
|
||||
AOMD_SET_DECRYPTOR,
|
||||
// AOMD_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
|
||||
* specified in the wrapper or frame header (see AV1D_GET_DISPLAY_SIZE). */
|
||||
AV1D_GET_FRAME_SIZE,
|
||||
|
||||
/** control function to get the current frame's intended display dimensions
|
||||
* (as specified in the wrapper or frame header). This may be different to
|
||||
* the decoded dimensions of this frame (see AV1D_GET_FRAME_SIZE). */
|
||||
AV1D_GET_DISPLAY_SIZE,
|
||||
|
||||
/** control function to get the bit depth of the stream. */
|
||||
AV1D_GET_BIT_DEPTH,
|
||||
|
||||
/** control function to set the byte alignment of the planes in the reference
|
||||
* buffers. Valid values are power of 2, from 32 to 1024. A value of 0 sets
|
||||
* legacy alignment. I.e. Y plane is aligned to 32 bytes, U plane directly
|
||||
* follows Y plane, and V plane directly follows U plane. Default value is 0.
|
||||
*/
|
||||
AV1_SET_BYTE_ALIGNMENT,
|
||||
|
||||
/** control function to invert the decoding order to from right to left. The
|
||||
* function is used in a test to confirm the decoding independence of tile
|
||||
* columns. The function may be used in application where this order
|
||||
* of decoding is desired.
|
||||
*
|
||||
* TODO(yaowu): Rework the unit test that uses this control, and in a future
|
||||
* release, this test-only control shall be removed.
|
||||
*/
|
||||
AV1_INVERT_TILE_DECODE_ORDER,
|
||||
|
||||
/** control function to set the skip loop filter flag. Valid values are
|
||||
* integers. The decoder will skip the loop filter when its value is set to
|
||||
* nonzero. If the loop filter is skipped the decoder may accumulate decode
|
||||
* artifacts. The default value is 0.
|
||||
*/
|
||||
AV1_SET_SKIP_LOOP_FILTER,
|
||||
|
||||
AOM_DECODER_CTRL_ID_MAX
|
||||
};
|
||||
|
||||
/** Decrypt n bytes of data from input -> output, using the decrypt_state
|
||||
* passed in AOMD_SET_DECRYPTOR.
|
||||
*/
|
||||
typedef void (*aom_decrypt_cb)(void *decrypt_state, const unsigned char *input,
|
||||
unsigned char *output, int count);
|
||||
|
||||
/*!\brief Structure to hold decryption state
|
||||
*
|
||||
* Defines a structure to hold the decryption state and access function.
|
||||
*/
|
||||
typedef struct aom_decrypt_init {
|
||||
/*! Decrypt callback. */
|
||||
aom_decrypt_cb decrypt_cb;
|
||||
|
||||
/*! Decryption state. */
|
||||
void *decrypt_state;
|
||||
} aom_decrypt_init;
|
||||
|
||||
/*!\brief A deprecated alias for aom_decrypt_init.
|
||||
*/
|
||||
typedef aom_decrypt_init vp8_decrypt_init;
|
||||
|
||||
/*!\cond */
|
||||
/*!\brief AOM decoder control function parameter type
|
||||
*
|
||||
* Defines the data types that AOMD control functions take. Note that
|
||||
* additional common controls are defined in aom.h
|
||||
*
|
||||
*/
|
||||
|
||||
AOM_CTRL_USE_TYPE(AOMD_GET_LAST_REF_UPDATES, int *)
|
||||
#define AOM_CTRL_AOMD_GET_LAST_REF_UPDATES
|
||||
AOM_CTRL_USE_TYPE(AOMD_GET_FRAME_CORRUPTED, int *)
|
||||
#define AOM_CTRL_AOMD_GET_FRAME_CORRUPTED
|
||||
AOM_CTRL_USE_TYPE(AOMD_GET_LAST_REF_USED, int *)
|
||||
#define AOM_CTRL_AOMD_GET_LAST_REF_USED
|
||||
AOM_CTRL_USE_TYPE(AOMD_SET_DECRYPTOR, aom_decrypt_init *)
|
||||
#define AOM_CTRL_AOMD_SET_DECRYPTOR
|
||||
//AOM_CTRL_USE_TYPE(AOMD_SET_DECRYPTOR, aom_decrypt_init *)
|
||||
//#define AOM_CTRL_AOMD_SET_DECRYPTOR
|
||||
AOM_CTRL_USE_TYPE(AV1D_GET_DISPLAY_SIZE, int *)
|
||||
#define AOM_CTRL_AV1D_GET_DISPLAY_SIZE
|
||||
AOM_CTRL_USE_TYPE(AV1D_GET_BIT_DEPTH, unsigned int *)
|
||||
#define AOM_CTRL_AV1D_GET_BIT_DEPTH
|
||||
AOM_CTRL_USE_TYPE(AV1D_GET_FRAME_SIZE, int *)
|
||||
#define AOM_CTRL_AV1D_GET_FRAME_SIZE
|
||||
AOM_CTRL_USE_TYPE(AV1_INVERT_TILE_DECODE_ORDER, int)
|
||||
#define AOM_CTRL_AV1_INVERT_TILE_DECODE_ORDER
|
||||
|
||||
/*!\endcond */
|
||||
/*! @} - end defgroup vp8_decoder */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // AOM_AOMDX_H_
|
|
@ -240,7 +240,7 @@ typedef aom_image_t *(*aom_codec_get_frame_fn_t)(aom_codec_alg_priv_t *ctx,
|
|||
* using external frame buffers.
|
||||
*
|
||||
* \note
|
||||
* When decoding VP9, the application may be required to pass in at least
|
||||
* When decoding AV1, the application may be required to pass in at least
|
||||
* #AOM_MAXIMUM_WORK_BUFFERS external frame
|
||||
* buffers.
|
||||
*/
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
/**
|
||||
* @file
|
||||
* VP9 SVC encoding support via libaom
|
||||
* AV1 SVC encoding support via libaom
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -492,8 +492,8 @@ aom_codec_err_t aom_svc_init(SvcContext *svc_ctx, aom_codec_ctx_t *codec_ctx,
|
|||
return res;
|
||||
}
|
||||
if (svc_ctx->spatial_layers > 1 || svc_ctx->temporal_layers > 1) {
|
||||
aom_codec_control(codec_ctx, VP9E_SET_SVC, 1);
|
||||
aom_codec_control(codec_ctx, VP9E_SET_SVC_PARAMETERS, &si->svc_params);
|
||||
aom_codec_control(codec_ctx, AV1E_SET_SVC, 1);
|
||||
aom_codec_control(codec_ctx, AV1E_SET_SVC_PARAMETERS, &si->svc_params);
|
||||
}
|
||||
return AOM_CODEC_OK;
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
; w%4 == 0
|
||||
; h%4 == 0
|
||||
; taps == 8
|
||||
; VP9_FILTER_WEIGHT == 128
|
||||
; VP9_FILTER_SHIFT == 7
|
||||
; AV1_FILTER_WEIGHT == 128
|
||||
; AV1_FILTER_SHIFT == 7
|
||||
|
||||
EXPORT |aom_convolve8_avg_horiz_neon|
|
||||
EXPORT |aom_convolve8_avg_vert_neon|
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
; w%4 == 0
|
||||
; h%4 == 0
|
||||
; taps == 8
|
||||
; VP9_FILTER_WEIGHT == 128
|
||||
; VP9_FILTER_SHIFT == 7
|
||||
; AV1_FILTER_WEIGHT == 128
|
||||
; AV1_FILTER_SHIFT == 7
|
||||
|
||||
EXPORT |aom_convolve8_horiz_neon|
|
||||
EXPORT |aom_convolve8_vert_neon|
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "aom_dsp/mips/txfm_macros_msa.h"
|
||||
#include "aom_dsp/txfm_common.h"
|
||||
|
||||
#define VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, \
|
||||
#define AV1_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, \
|
||||
out3, out4, out5, out6, out7) \
|
||||
{ \
|
||||
v8i16 cnst0_m, cnst1_m, cnst2_m, cnst3_m, cnst4_m; \
|
||||
|
@ -182,7 +182,7 @@
|
|||
PCKEV_H2_SH(int2_m, int2_m, int3_m, int3_m, out2, out3); \
|
||||
}
|
||||
|
||||
#define VP9_SET_CONST_PAIR(mask_h, idx1_h, idx2_h) \
|
||||
#define AV1_SET_CONST_PAIR(mask_h, idx1_h, idx2_h) \
|
||||
({ \
|
||||
v8i16 c0_m, c1_m; \
|
||||
\
|
||||
|
@ -193,7 +193,7 @@
|
|||
})
|
||||
|
||||
/* multiply and add macro */
|
||||
#define VP9_MADD(inp0, inp1, inp2, inp3, cst0, cst1, cst2, cst3, out0, out1, \
|
||||
#define AV1_MADD(inp0, inp1, inp2, inp3, cst0, cst1, cst2, cst3, out0, out1, \
|
||||
out2, out3) \
|
||||
{ \
|
||||
v8i16 madd_s0_m, madd_s1_m, madd_s2_m, madd_s3_m; \
|
||||
|
@ -221,13 +221,13 @@
|
|||
v8i16 mask_m = { cospi_28_64, cospi_4_64, cospi_20_64, cospi_12_64, \
|
||||
cospi_16_64, -cospi_4_64, -cospi_20_64, -cospi_16_64 }; \
|
||||
\
|
||||
k0_m = VP9_SET_CONST_PAIR(mask_m, 0, 5); \
|
||||
k1_m = VP9_SET_CONST_PAIR(mask_m, 1, 0); \
|
||||
k2_m = VP9_SET_CONST_PAIR(mask_m, 6, 3); \
|
||||
k3_m = VP9_SET_CONST_PAIR(mask_m, 3, 2); \
|
||||
VP9_MADD(in1, in7, in3, in5, k0_m, k1_m, k2_m, k3_m, in1, in7, in3, in5); \
|
||||
k0_m = AV1_SET_CONST_PAIR(mask_m, 0, 5); \
|
||||
k1_m = AV1_SET_CONST_PAIR(mask_m, 1, 0); \
|
||||
k2_m = AV1_SET_CONST_PAIR(mask_m, 6, 3); \
|
||||
k3_m = AV1_SET_CONST_PAIR(mask_m, 3, 2); \
|
||||
AV1_MADD(in1, in7, in3, in5, k0_m, k1_m, k2_m, k3_m, in1, in7, in3, in5); \
|
||||
SUB2(in1, in3, in7, in5, res0_m, res1_m); \
|
||||
k0_m = VP9_SET_CONST_PAIR(mask_m, 4, 7); \
|
||||
k0_m = AV1_SET_CONST_PAIR(mask_m, 4, 7); \
|
||||
k1_m = __msa_splati_h(mask_m, 4); \
|
||||
\
|
||||
ILVRL_H2_SH(res0_m, res1_m, res2_m, res3_m); \
|
||||
|
@ -239,13 +239,13 @@
|
|||
tp7_m = in7 + in5; \
|
||||
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); \
|
||||
AV1_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, \
|
||||
out1, out2, out3, out4, out5, out6, out7); \
|
||||
}
|
||||
|
||||
#define VP9_IADST8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \
|
||||
#define AV1_IADST8x8_1D(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, \
|
||||
out2, out3, out4, out5, out6, out7) \
|
||||
{ \
|
||||
v4i32 r0_m, r1_m, r2_m, r3_m, r4_m, r5_m, r6_m, r7_m; \
|
||||
|
@ -259,13 +259,13 @@
|
|||
-cospi_24_64, cospi_8_64, cospi_16_64, -cospi_16_64, 0, 0, 0, 0 \
|
||||
}; \
|
||||
\
|
||||
k0_m = VP9_SET_CONST_PAIR(mask1_m, 0, 1); \
|
||||
k1_m = VP9_SET_CONST_PAIR(mask1_m, 1, 2); \
|
||||
k0_m = AV1_SET_CONST_PAIR(mask1_m, 0, 1); \
|
||||
k1_m = AV1_SET_CONST_PAIR(mask1_m, 1, 2); \
|
||||
ILVRL_H2_SH(in1, in0, in_s1, in_s0); \
|
||||
DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, r0_m, \
|
||||
r1_m, r2_m, r3_m); \
|
||||
k0_m = VP9_SET_CONST_PAIR(mask1_m, 6, 7); \
|
||||
k1_m = VP9_SET_CONST_PAIR(mask2_m, 0, 1); \
|
||||
k0_m = AV1_SET_CONST_PAIR(mask1_m, 6, 7); \
|
||||
k1_m = AV1_SET_CONST_PAIR(mask2_m, 0, 1); \
|
||||
ILVRL_H2_SH(in5, in4, in_s1, in_s0); \
|
||||
DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, r4_m, \
|
||||
r5_m, r6_m, r7_m); \
|
||||
|
@ -277,13 +277,13 @@
|
|||
m3_m); \
|
||||
SRARI_W4_SW(m0_m, m1_m, m2_m, m3_m, DCT_CONST_BITS); \
|
||||
PCKEV_H2_SW(m1_m, m0_m, m3_m, m2_m, t0_m, t1_m); \
|
||||
k0_m = VP9_SET_CONST_PAIR(mask1_m, 3, 4); \
|
||||
k1_m = VP9_SET_CONST_PAIR(mask1_m, 4, 5); \
|
||||
k0_m = AV1_SET_CONST_PAIR(mask1_m, 3, 4); \
|
||||
k1_m = AV1_SET_CONST_PAIR(mask1_m, 4, 5); \
|
||||
ILVRL_H2_SH(in3, in2, in_s1, in_s0); \
|
||||
DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, r0_m, \
|
||||
r1_m, r2_m, r3_m); \
|
||||
k0_m = VP9_SET_CONST_PAIR(mask2_m, 2, 3); \
|
||||
k1_m = VP9_SET_CONST_PAIR(mask2_m, 3, 4); \
|
||||
k0_m = AV1_SET_CONST_PAIR(mask2_m, 2, 3); \
|
||||
k1_m = AV1_SET_CONST_PAIR(mask2_m, 3, 4); \
|
||||
ILVRL_H2_SH(in7, in6, in_s1, in_s0); \
|
||||
DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, r4_m, \
|
||||
r5_m, r6_m, r7_m); \
|
||||
|
@ -297,12 +297,12 @@
|
|||
PCKEV_H2_SW(m1_m, m0_m, m3_m, m2_m, r2_m, r3_m); \
|
||||
ILVRL_H2_SW(r3_m, r2_m, m2_m, m3_m); \
|
||||
BUTTERFLY_4(res0_m, res1_m, res3_m, res2_m, out0, in7, in4, in3); \
|
||||
k0_m = VP9_SET_CONST_PAIR(mask2_m, 5, 6); \
|
||||
k1_m = VP9_SET_CONST_PAIR(mask2_m, 6, 7); \
|
||||
k0_m = AV1_SET_CONST_PAIR(mask2_m, 5, 6); \
|
||||
k1_m = AV1_SET_CONST_PAIR(mask2_m, 6, 7); \
|
||||
ILVRL_H2_SH(t1_m, t0_m, in_s1, in_s0); \
|
||||
DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, r0_m, \
|
||||
r1_m, r2_m, r3_m); \
|
||||
k1_m = VP9_SET_CONST_PAIR(mask3_m, 0, 1); \
|
||||
k1_m = AV1_SET_CONST_PAIR(mask3_m, 0, 1); \
|
||||
DOTP_SH4_SW(m2_m, m3_m, m2_m, m3_m, k0_m, k0_m, k1_m, k1_m, r4_m, r5_m, \
|
||||
r6_m, r7_m); \
|
||||
ADD4(r0_m, r6_m, r1_m, r7_m, r2_m, r4_m, r3_m, r5_m, m0_m, m1_m, m2_m, \
|
||||
|
@ -313,8 +313,8 @@
|
|||
m3_m); \
|
||||
SRARI_W4_SW(m0_m, m1_m, m2_m, m3_m, DCT_CONST_BITS); \
|
||||
PCKEV_H2_SH(m1_m, m0_m, m3_m, m2_m, in2, in5); \
|
||||
k0_m = VP9_SET_CONST_PAIR(mask3_m, 2, 2); \
|
||||
k1_m = VP9_SET_CONST_PAIR(mask3_m, 2, 3); \
|
||||
k0_m = AV1_SET_CONST_PAIR(mask3_m, 2, 2); \
|
||||
k1_m = AV1_SET_CONST_PAIR(mask3_m, 2, 3); \
|
||||
ILVRL_H2_SH(in4, in3, in_s1, in_s0); \
|
||||
DOTP_SH4_SW(in_s1, in_s0, in_s1, in_s0, k0_m, k0_m, k1_m, k1_m, m0_m, \
|
||||
m1_m, m2_m, m3_m); \
|
||||
|
|
2
aomdec.c
2
aomdec.c
|
@ -777,7 +777,7 @@ static int main_loop(int argc, const char **argv_) {
|
|||
int render_height = aom_input_ctx.height;
|
||||
if (!render_width || !render_height) {
|
||||
int render_size[2];
|
||||
if (aom_codec_control(&decoder, VP9D_GET_DISPLAY_SIZE,
|
||||
if (aom_codec_control(&decoder, AV1D_GET_DISPLAY_SIZE,
|
||||
render_size)) {
|
||||
// As last resort use size of first frame as display size.
|
||||
render_width = img->d_w;
|
||||
|
|
30
aomenc.c
30
aomenc.c
|
@ -452,20 +452,20 @@ static const arg_def_t *av1_args[] = {
|
|||
static const int av1_arg_ctrl_map[] = {
|
||||
AOME_SET_CPUUSED, AOME_SET_ENABLEAUTOALTREF,
|
||||
AOME_SET_SHARPNESS, AOME_SET_STATIC_THRESHOLD,
|
||||
VP9E_SET_TILE_COLUMNS, VP9E_SET_TILE_ROWS,
|
||||
AV1E_SET_TILE_COLUMNS, AV1E_SET_TILE_ROWS,
|
||||
AOME_SET_ARNR_MAXFRAMES, AOME_SET_ARNR_STRENGTH,
|
||||
AOME_SET_ARNR_TYPE, AOME_SET_TUNING,
|
||||
AOME_SET_CQ_LEVEL, AOME_SET_MAX_INTRA_BITRATE_PCT,
|
||||
VP9E_SET_MAX_INTER_BITRATE_PCT, VP9E_SET_GF_CBR_BOOST_PCT,
|
||||
VP9E_SET_LOSSLESS,
|
||||
AV1E_SET_MAX_INTER_BITRATE_PCT, AV1E_SET_GF_CBR_BOOST_PCT,
|
||||
AV1E_SET_LOSSLESS,
|
||||
#if CONFIG_AOM_QM
|
||||
VP9E_SET_ENABLE_QM, VP9E_SET_QM_MIN,
|
||||
VP9E_SET_QM_MAX,
|
||||
AV1E_SET_ENABLE_QM, AV1E_SET_QM_MIN,
|
||||
AV1E_SET_QM_MAX,
|
||||
#endif
|
||||
VP9E_SET_FRAME_PARALLEL_DECODING, VP9E_SET_AQ_MODE,
|
||||
VP9E_SET_FRAME_PERIODIC_BOOST, VP9E_SET_NOISE_SENSITIVITY,
|
||||
VP9E_SET_TUNE_CONTENT, VP9E_SET_COLOR_SPACE,
|
||||
VP9E_SET_MIN_GF_INTERVAL, VP9E_SET_MAX_GF_INTERVAL,
|
||||
AV1E_SET_FRAME_PARALLEL_DECODING, AV1E_SET_AQ_MODE,
|
||||
AV1E_SET_FRAME_PERIODIC_BOOST, AV1E_SET_NOISE_SENSITIVITY,
|
||||
AV1E_SET_TUNE_CONTENT, AV1E_SET_COLOR_SPACE,
|
||||
AV1E_SET_MIN_GF_INTERVAL, AV1E_SET_MAX_GF_INTERVAL,
|
||||
0
|
||||
};
|
||||
/* clang-format on */
|
||||
|
@ -899,7 +899,7 @@ static void parse_global_config(struct VpxEncoderConfig *global, char **argv) {
|
|||
/* Validate global config */
|
||||
if (global->passes == 0) {
|
||||
#if CONFIG_AV1_ENCODER
|
||||
// Make default VP9 passes = 2 until there is a better quality 1-pass
|
||||
// Make default AV1 passes = 2 until there is a better quality 1-pass
|
||||
// encoder
|
||||
if (global->codec != NULL && global->codec->name != NULL)
|
||||
global->passes = (strcmp(global->codec->name, "vp9") == 0 &&
|
||||
|
@ -1040,7 +1040,7 @@ static int parse_stream_params(struct VpxEncoderConfig *global,
|
|||
if (0) {
|
||||
#if CONFIG_AV1_ENCODER
|
||||
} else if (strcmp(global->codec->name, "av1") == 0) {
|
||||
// TODO(jingning): Reuse VP9 specific encoder configuration parameters.
|
||||
// TODO(jingning): Reuse AV1 specific encoder configuration parameters.
|
||||
// Consider to expand this set for AV1 encoder control.
|
||||
ctrl_args = av1_args;
|
||||
ctrl_args_map = av1_arg_ctrl_map;
|
||||
|
@ -1717,9 +1717,9 @@ static void test_decode(struct stream_state *stream,
|
|||
|
||||
ref_enc.idx = 0;
|
||||
ref_dec.idx = 0;
|
||||
aom_codec_control(&stream->encoder, VP9_GET_REFERENCE, &ref_enc);
|
||||
aom_codec_control(&stream->encoder, AV1_GET_REFERENCE, &ref_enc);
|
||||
enc_img = ref_enc.img;
|
||||
aom_codec_control(&stream->decoder, VP9_GET_REFERENCE, &ref_dec);
|
||||
aom_codec_control(&stream->decoder, AV1_GET_REFERENCE, &ref_dec);
|
||||
dec_img = ref_dec.img;
|
||||
#if CONFIG_AOM_HIGHBITDEPTH
|
||||
if ((enc_img.fmt & AOM_IMG_FMT_HIGHBITDEPTH) !=
|
||||
|
@ -1857,7 +1857,7 @@ int main(int argc, const char **argv_) {
|
|||
if (!input.filename) usage_exit();
|
||||
|
||||
/* Decide if other chroma subsamplings than 4:2:0 are supported */
|
||||
if (global.codec->fourcc == VP9_FOURCC || global.codec->fourcc == AV1_FOURCC)
|
||||
if (global.codec->fourcc == AV1_FOURCC)
|
||||
input.only_i420 = 0;
|
||||
|
||||
for (pass = global.pass ? global.pass - 1 : 0; pass < global.passes; pass++) {
|
||||
|
@ -2118,7 +2118,7 @@ int main(int argc, const char **argv_) {
|
|||
}
|
||||
|
||||
if (global.show_psnr) {
|
||||
if (global.codec->fourcc == VP9_FOURCC) {
|
||||
if (global.codec->fourcc == AV1_FOURCC) {
|
||||
FOREACH_STREAM(
|
||||
show_psnr(stream, (1 << stream->config.cfg.g_input_bit_depth) - 1));
|
||||
} else {
|
||||
|
|
|
@ -552,7 +552,7 @@ static aom_codec_err_t ctrl_set_enable_auto_alt_ref(aom_codec_alg_priv_t *ctx,
|
|||
static aom_codec_err_t ctrl_set_noise_sensitivity(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.noise_sensitivity = CAST(VP9E_SET_NOISE_SENSITIVITY, args);
|
||||
extra_cfg.noise_sensitivity = CAST(AV1E_SET_NOISE_SENSITIVITY, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
|
@ -573,14 +573,14 @@ static aom_codec_err_t ctrl_set_static_thresh(aom_codec_alg_priv_t *ctx,
|
|||
static aom_codec_err_t ctrl_set_tile_columns(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.tile_columns = CAST(VP9E_SET_TILE_COLUMNS, args);
|
||||
extra_cfg.tile_columns = CAST(AV1E_SET_TILE_COLUMNS, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
static aom_codec_err_t ctrl_set_tile_rows(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.tile_rows = CAST(VP9E_SET_TILE_ROWS, args);
|
||||
extra_cfg.tile_rows = CAST(AV1E_SET_TILE_ROWS, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
|
@ -638,14 +638,14 @@ static aom_codec_err_t ctrl_set_rc_max_inter_bitrate_pct(
|
|||
static aom_codec_err_t ctrl_set_rc_gf_cbr_boost_pct(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.gf_cbr_boost_pct = CAST(VP9E_SET_GF_CBR_BOOST_PCT, args);
|
||||
extra_cfg.gf_cbr_boost_pct = CAST(AV1E_SET_GF_CBR_BOOST_PCT, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
static aom_codec_err_t ctrl_set_lossless(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.lossless = CAST(VP9E_SET_LOSSLESS, args);
|
||||
extra_cfg.lossless = CAST(AV1E_SET_LOSSLESS, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
|
@ -653,21 +653,21 @@ static aom_codec_err_t ctrl_set_lossless(aom_codec_alg_priv_t *ctx,
|
|||
static aom_codec_err_t ctrl_set_enable_qm(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.enable_qm = CAST(VP9E_SET_ENABLE_QM, args);
|
||||
extra_cfg.enable_qm = CAST(AV1E_SET_ENABLE_QM, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
static aom_codec_err_t ctrl_set_qm_min(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.qm_min = CAST(VP9E_SET_QM_MIN, args);
|
||||
extra_cfg.qm_min = CAST(AV1E_SET_QM_MIN, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
static aom_codec_err_t ctrl_set_qm_max(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.qm_max = CAST(VP9E_SET_QM_MAX, args);
|
||||
extra_cfg.qm_max = CAST(AV1E_SET_QM_MAX, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
#endif
|
||||
|
@ -676,35 +676,35 @@ static aom_codec_err_t ctrl_set_frame_parallel_decoding_mode(
|
|||
aom_codec_alg_priv_t *ctx, va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.frame_parallel_decoding_mode =
|
||||
CAST(VP9E_SET_FRAME_PARALLEL_DECODING, args);
|
||||
CAST(AV1E_SET_FRAME_PARALLEL_DECODING, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
static aom_codec_err_t ctrl_set_aq_mode(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.aq_mode = CAST(VP9E_SET_AQ_MODE, args);
|
||||
extra_cfg.aq_mode = CAST(AV1E_SET_AQ_MODE, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
static aom_codec_err_t ctrl_set_min_gf_interval(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.min_gf_interval = CAST(VP9E_SET_MIN_GF_INTERVAL, args);
|
||||
extra_cfg.min_gf_interval = CAST(AV1E_SET_MIN_GF_INTERVAL, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
static aom_codec_err_t ctrl_set_max_gf_interval(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.max_gf_interval = CAST(VP9E_SET_MAX_GF_INTERVAL, args);
|
||||
extra_cfg.max_gf_interval = CAST(AV1E_SET_MAX_GF_INTERVAL, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
static aom_codec_err_t ctrl_set_frame_periodic_boost(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.frame_periodic_boost = CAST(VP9E_SET_FRAME_PERIODIC_BOOST, args);
|
||||
extra_cfg.frame_periodic_boost = CAST(AV1E_SET_FRAME_PERIODIC_BOOST, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
|
@ -1217,21 +1217,21 @@ static aom_codec_err_t ctrl_register_cx_callback(aom_codec_alg_priv_t *ctx,
|
|||
static aom_codec_err_t ctrl_set_tune_content(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.content = CAST(VP9E_SET_TUNE_CONTENT, args);
|
||||
extra_cfg.content = CAST(AV1E_SET_TUNE_CONTENT, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
static aom_codec_err_t ctrl_set_color_space(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.color_space = CAST(VP9E_SET_COLOR_SPACE, args);
|
||||
extra_cfg.color_space = CAST(AV1E_SET_COLOR_SPACE, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
static aom_codec_err_t ctrl_set_color_range(aom_codec_alg_priv_t *ctx,
|
||||
va_list args) {
|
||||
struct av1_extracfg extra_cfg = ctx->extra_cfg;
|
||||
extra_cfg.color_range = CAST(VP9E_SET_COLOR_RANGE, args);
|
||||
extra_cfg.color_range = CAST(AV1E_SET_COLOR_RANGE, args);
|
||||
return update_extra_cfg(ctx, &extra_cfg);
|
||||
}
|
||||
|
||||
|
@ -1257,39 +1257,39 @@ static aom_codec_ctrl_fn_map_t encoder_ctrl_maps[] = {
|
|||
{ AOME_SET_ENABLEAUTOALTREF, ctrl_set_enable_auto_alt_ref },
|
||||
{ AOME_SET_SHARPNESS, ctrl_set_sharpness },
|
||||
{ AOME_SET_STATIC_THRESHOLD, ctrl_set_static_thresh },
|
||||
{ VP9E_SET_TILE_COLUMNS, ctrl_set_tile_columns },
|
||||
{ VP9E_SET_TILE_ROWS, ctrl_set_tile_rows },
|
||||
{ AV1E_SET_TILE_COLUMNS, ctrl_set_tile_columns },
|
||||
{ AV1E_SET_TILE_ROWS, ctrl_set_tile_rows },
|
||||
{ AOME_SET_ARNR_MAXFRAMES, ctrl_set_arnr_max_frames },
|
||||
{ AOME_SET_ARNR_STRENGTH, ctrl_set_arnr_strength },
|
||||
{ AOME_SET_ARNR_TYPE, ctrl_set_arnr_type },
|
||||
{ AOME_SET_TUNING, ctrl_set_tuning },
|
||||
{ AOME_SET_CQ_LEVEL, ctrl_set_cq_level },
|
||||
{ AOME_SET_MAX_INTRA_BITRATE_PCT, ctrl_set_rc_max_intra_bitrate_pct },
|
||||
{ VP9E_SET_MAX_INTER_BITRATE_PCT, ctrl_set_rc_max_inter_bitrate_pct },
|
||||
{ VP9E_SET_GF_CBR_BOOST_PCT, ctrl_set_rc_gf_cbr_boost_pct },
|
||||
{ VP9E_SET_LOSSLESS, ctrl_set_lossless },
|
||||
{ AV1E_SET_MAX_INTER_BITRATE_PCT, ctrl_set_rc_max_inter_bitrate_pct },
|
||||
{ AV1E_SET_GF_CBR_BOOST_PCT, ctrl_set_rc_gf_cbr_boost_pct },
|
||||
{ AV1E_SET_LOSSLESS, ctrl_set_lossless },
|
||||
#if CONFIG_AOM_QM
|
||||
{ VP9E_SET_ENABLE_QM, ctrl_set_enable_qm },
|
||||
{ VP9E_SET_QM_MIN, ctrl_set_qm_min },
|
||||
{ VP9E_SET_QM_MAX, ctrl_set_qm_max },
|
||||
{ AV1E_SET_ENABLE_QM, ctrl_set_enable_qm },
|
||||
{ AV1E_SET_QM_MIN, ctrl_set_qm_min },
|
||||
{ AV1E_SET_QM_MAX, ctrl_set_qm_max },
|
||||
#endif
|
||||
{ VP9E_SET_FRAME_PARALLEL_DECODING, ctrl_set_frame_parallel_decoding_mode },
|
||||
{ VP9E_SET_AQ_MODE, ctrl_set_aq_mode },
|
||||
{ VP9E_SET_FRAME_PERIODIC_BOOST, ctrl_set_frame_periodic_boost },
|
||||
{ VP9E_REGISTER_CX_CALLBACK, ctrl_register_cx_callback },
|
||||
{ VP9E_SET_TUNE_CONTENT, ctrl_set_tune_content },
|
||||
{ VP9E_SET_COLOR_SPACE, ctrl_set_color_space },
|
||||
{ VP9E_SET_COLOR_RANGE, ctrl_set_color_range },
|
||||
{ VP9E_SET_NOISE_SENSITIVITY, ctrl_set_noise_sensitivity },
|
||||
{ VP9E_SET_MIN_GF_INTERVAL, ctrl_set_min_gf_interval },
|
||||
{ VP9E_SET_MAX_GF_INTERVAL, ctrl_set_max_gf_interval },
|
||||
{ VP9E_SET_RENDER_SIZE, ctrl_set_render_size },
|
||||
{ AV1E_SET_FRAME_PARALLEL_DECODING, ctrl_set_frame_parallel_decoding_mode },
|
||||
{ AV1E_SET_AQ_MODE, ctrl_set_aq_mode },
|
||||
{ AV1E_SET_FRAME_PERIODIC_BOOST, ctrl_set_frame_periodic_boost },
|
||||
{ AV1E_REGISTER_CX_CALLBACK, ctrl_register_cx_callback },
|
||||
{ AV1E_SET_TUNE_CONTENT, ctrl_set_tune_content },
|
||||
{ AV1E_SET_COLOR_SPACE, ctrl_set_color_space },
|
||||
{ AV1E_SET_COLOR_RANGE, ctrl_set_color_range },
|
||||
{ AV1E_SET_NOISE_SENSITIVITY, ctrl_set_noise_sensitivity },
|
||||
{ AV1E_SET_MIN_GF_INTERVAL, ctrl_set_min_gf_interval },
|
||||
{ AV1E_SET_MAX_GF_INTERVAL, ctrl_set_max_gf_interval },
|
||||
{ AV1E_SET_RENDER_SIZE, ctrl_set_render_size },
|
||||
|
||||
// Getters
|
||||
{ AOME_GET_LAST_QUANTIZER, ctrl_get_quantizer },
|
||||
{ AOME_GET_LAST_QUANTIZER_64, ctrl_get_quantizer64 },
|
||||
{ VP9_GET_REFERENCE, ctrl_get_reference },
|
||||
{ VP9E_GET_ACTIVEMAP, ctrl_get_active_map },
|
||||
{ AV1_GET_REFERENCE, ctrl_get_reference },
|
||||
{ AV1E_GET_ACTIVEMAP, ctrl_get_active_map },
|
||||
|
||||
{ -1, NULL },
|
||||
};
|
||||
|
|
|
@ -1026,18 +1026,18 @@ static aom_codec_ctrl_fn_map_t decoder_ctrl_maps[] = {
|
|||
{ AOM_SET_DBG_COLOR_MB_MODES, ctrl_set_dbg_options },
|
||||
{ AOM_SET_DBG_COLOR_B_MODES, ctrl_set_dbg_options },
|
||||
{ AOM_SET_DBG_DISPLAY_MV, ctrl_set_dbg_options },
|
||||
{ VP9_INVERT_TILE_DECODE_ORDER, ctrl_set_invert_tile_order },
|
||||
{ AV1_INVERT_TILE_DECODE_ORDER, ctrl_set_invert_tile_order },
|
||||
{ AOMD_SET_DECRYPTOR, ctrl_set_decryptor },
|
||||
{ VP9_SET_BYTE_ALIGNMENT, ctrl_set_byte_alignment },
|
||||
{ VP9_SET_SKIP_LOOP_FILTER, ctrl_set_skip_loop_filter },
|
||||
{ AV1_SET_BYTE_ALIGNMENT, ctrl_set_byte_alignment },
|
||||
{ AV1_SET_SKIP_LOOP_FILTER, ctrl_set_skip_loop_filter },
|
||||
|
||||
// Getters
|
||||
{ AOMD_GET_LAST_REF_UPDATES, ctrl_get_last_ref_updates },
|
||||
{ AOMD_GET_FRAME_CORRUPTED, ctrl_get_frame_corrupted },
|
||||
{ VP9_GET_REFERENCE, ctrl_get_reference },
|
||||
{ VP9D_GET_DISPLAY_SIZE, ctrl_get_render_size },
|
||||
{ VP9D_GET_BIT_DEPTH, ctrl_get_bit_depth },
|
||||
{ VP9D_GET_FRAME_SIZE, ctrl_get_frame_size },
|
||||
{ AV1_GET_REFERENCE, ctrl_get_reference },
|
||||
{ AV1D_GET_DISPLAY_SIZE, ctrl_get_render_size },
|
||||
{ AV1D_GET_BIT_DEPTH, ctrl_get_bit_depth },
|
||||
{ AV1D_GET_FRAME_SIZE, ctrl_get_frame_size },
|
||||
|
||||
{ -1, NULL },
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#include "av1/encoder/cost.h"
|
||||
|
||||
/* round(-log2(i/256.) * (1 << VP9_PROB_COST_SHIFT))
|
||||
/* round(-log2(i/256.) * (1 << AV1_PROB_COST_SHIFT))
|
||||
Begins and ends with a bogus entry to satisfy use of prob=0 in the firstpass.
|
||||
https://code.google.com/p/webm/issues/detail?id=1089 */
|
||||
const uint16_t av1_prob_cost[257] = {
|
||||
|
|
|
@ -22,7 +22,7 @@ extern "C" {
|
|||
extern const uint16_t av1_prob_cost[257];
|
||||
|
||||
// The factor to scale from cost in bits to cost in av1_prob_cost units.
|
||||
#define VP9_PROB_COST_SHIFT 9
|
||||
#define AV1_PROB_COST_SHIFT 9
|
||||
|
||||
#define av1_cost_zero(prob) (av1_prob_cost[prob])
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ static void encode_superblock(AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
|
|||
// purposes of activity masking.
|
||||
// Eventually this should be replaced by custom no-reference routines,
|
||||
// which will be faster.
|
||||
static const uint8_t VP9_VAR_OFFS[64] = {
|
||||
static const uint8_t AV1_VAR_OFFS[64] = {
|
||||
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
|
||||
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
|
||||
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
|
||||
|
@ -64,7 +64,7 @@ static const uint8_t VP9_VAR_OFFS[64] = {
|
|||
};
|
||||
|
||||
#if CONFIG_AOM_HIGHBITDEPTH
|
||||
static const uint16_t VP9_HIGH_VAR_OFFS_8[64] = {
|
||||
static const uint16_t AV1_HIGH_VAR_OFFS_8[64] = {
|
||||
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
|
||||
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
|
||||
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
|
||||
|
@ -72,7 +72,7 @@ static const uint16_t VP9_HIGH_VAR_OFFS_8[64] = {
|
|||
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128
|
||||
};
|
||||
|
||||
static const uint16_t VP9_HIGH_VAR_OFFS_10[64] = {
|
||||
static const uint16_t AV1_HIGH_VAR_OFFS_10[64] = {
|
||||
128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4,
|
||||
128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4,
|
||||
128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4,
|
||||
|
@ -83,7 +83,7 @@ static const uint16_t VP9_HIGH_VAR_OFFS_10[64] = {
|
|||
128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4, 128 * 4
|
||||
};
|
||||
|
||||
static const uint16_t VP9_HIGH_VAR_OFFS_12[64] = {
|
||||
static const uint16_t AV1_HIGH_VAR_OFFS_12[64] = {
|
||||
128 * 16, 128 * 16, 128 * 16, 128 * 16, 128 * 16, 128 * 16, 128 * 16,
|
||||
128 * 16, 128 * 16, 128 * 16, 128 * 16, 128 * 16, 128 * 16, 128 * 16,
|
||||
128 * 16, 128 * 16, 128 * 16, 128 * 16, 128 * 16, 128 * 16, 128 * 16,
|
||||
|
@ -102,7 +102,7 @@ unsigned int av1_get_sby_perpixel_variance(AV1_COMP *cpi,
|
|||
BLOCK_SIZE bs) {
|
||||
unsigned int sse;
|
||||
const unsigned int var =
|
||||
cpi->fn_ptr[bs].vf(ref->buf, ref->stride, VP9_VAR_OFFS, 0, &sse);
|
||||
cpi->fn_ptr[bs].vf(ref->buf, ref->stride, AV1_VAR_OFFS, 0, &sse);
|
||||
return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]);
|
||||
}
|
||||
|
||||
|
@ -115,18 +115,18 @@ unsigned int av1_high_get_sby_perpixel_variance(AV1_COMP *cpi,
|
|||
case 10:
|
||||
var =
|
||||
cpi->fn_ptr[bs].vf(ref->buf, ref->stride,
|
||||
CONVERT_TO_BYTEPTR(VP9_HIGH_VAR_OFFS_10), 0, &sse);
|
||||
CONVERT_TO_BYTEPTR(AV1_HIGH_VAR_OFFS_10), 0, &sse);
|
||||
break;
|
||||
case 12:
|
||||
var =
|
||||
cpi->fn_ptr[bs].vf(ref->buf, ref->stride,
|
||||
CONVERT_TO_BYTEPTR(VP9_HIGH_VAR_OFFS_12), 0, &sse);
|
||||
CONVERT_TO_BYTEPTR(AV1_HIGH_VAR_OFFS_12), 0, &sse);
|
||||
break;
|
||||
case 8:
|
||||
default:
|
||||
var =
|
||||
cpi->fn_ptr[bs].vf(ref->buf, ref->stride,
|
||||
CONVERT_TO_BYTEPTR(VP9_HIGH_VAR_OFFS_8), 0, &sse);
|
||||
CONVERT_TO_BYTEPTR(AV1_HIGH_VAR_OFFS_8), 0, &sse);
|
||||
break;
|
||||
}
|
||||
return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]);
|
||||
|
@ -729,15 +729,15 @@ static int choose_partitioning(AV1_COMP *cpi, const TileInfo *const tile,
|
|||
}
|
||||
}
|
||||
} else {
|
||||
d = VP9_VAR_OFFS;
|
||||
d = AV1_VAR_OFFS;
|
||||
dp = 0;
|
||||
#if CONFIG_AOM_HIGHBITDEPTH
|
||||
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
|
||||
switch (xd->bd) {
|
||||
case 10: d = CONVERT_TO_BYTEPTR(VP9_HIGH_VAR_OFFS_10); break;
|
||||
case 12: d = CONVERT_TO_BYTEPTR(VP9_HIGH_VAR_OFFS_12); break;
|
||||
case 10: d = CONVERT_TO_BYTEPTR(AV1_HIGH_VAR_OFFS_10); break;
|
||||
case 12: d = CONVERT_TO_BYTEPTR(AV1_HIGH_VAR_OFFS_12); break;
|
||||
case 8:
|
||||
default: d = CONVERT_TO_BYTEPTR(VP9_HIGH_VAR_OFFS_8); break;
|
||||
default: d = CONVERT_TO_BYTEPTR(AV1_HIGH_VAR_OFFS_8); break;
|
||||
}
|
||||
}
|
||||
#endif // CONFIG_AOM_HIGHBITDEPTH
|
||||
|
|
|
@ -51,8 +51,8 @@ void av1_subtract_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
|
|||
}
|
||||
|
||||
#define RDTRUNC(RM, DM, R, D) \
|
||||
(((1 << (VP9_PROB_COST_SHIFT - 1)) + (R) * (RM)) & \
|
||||
((1 << VP9_PROB_COST_SHIFT) - 1))
|
||||
(((1 << (AV1_PROB_COST_SHIFT - 1)) + (R) * (RM)) & \
|
||||
((1 << AV1_PROB_COST_SHIFT) - 1))
|
||||
|
||||
typedef struct av1_token_state {
|
||||
int rate;
|
||||
|
|
|
@ -84,7 +84,7 @@ static int mv_err_cost(const MV *mv, const MV *ref, const int *mvjcost,
|
|||
// accuracy in either bit cost or error cost will cause it to overflow.
|
||||
return ROUND_POWER_OF_TWO(
|
||||
(unsigned)mv_cost(&diff, mvjcost, mvcost) * error_per_bit,
|
||||
RDDIV_BITS + VP9_PROB_COST_SHIFT - RD_EPB_SHIFT +
|
||||
RDDIV_BITS + AV1_PROB_COST_SHIFT - RD_EPB_SHIFT +
|
||||
PIXEL_TRANSFORM_ERROR_SCALE);
|
||||
}
|
||||
return 0;
|
||||
|
@ -95,7 +95,7 @@ static int mvsad_err_cost(const MACROBLOCK *x, const MV *mv, const MV *ref,
|
|||
const MV diff = { mv->row - ref->row, mv->col - ref->col };
|
||||
return ROUND_POWER_OF_TWO(
|
||||
(unsigned)mv_cost(&diff, x->nmvjointsadcost, x->nmvsadcost) * sad_per_bit,
|
||||
VP9_PROB_COST_SHIFT);
|
||||
AV1_PROB_COST_SHIFT);
|
||||
}
|
||||
|
||||
void av1_init_dsmotion_compensation(search_site_config *cfg, int stride) {
|
||||
|
|
|
@ -386,7 +386,7 @@ void av1_model_rd_from_var_lapndz(unsigned int var, unsigned int n_log2,
|
|||
(((uint64_t)qstep * qstep << (n_log2 + 10)) + (var >> 1)) / var;
|
||||
const int xsq_q10 = (int)AOMMIN(xsq_q10_64, MAX_XSQ_Q10);
|
||||
model_rd_norm(xsq_q10, &r_q10, &d_q10);
|
||||
*rate = ROUND_POWER_OF_TWO(r_q10 << n_log2, 10 - VP9_PROB_COST_SHIFT);
|
||||
*rate = ROUND_POWER_OF_TWO(r_q10 << n_log2, 10 - AV1_PROB_COST_SHIFT);
|
||||
*dist = (var * (int64_t)d_q10 + 512) >> 10;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ extern "C" {
|
|||
#define RD_EPB_SHIFT 6
|
||||
|
||||
#define RDCOST(RM, DM, R, D) \
|
||||
(ROUND_POWER_OF_TWO(((int64_t)R) * (RM), VP9_PROB_COST_SHIFT) + (D << DM))
|
||||
(ROUND_POWER_OF_TWO(((int64_t)R) * (RM), AV1_PROB_COST_SHIFT) + (D << DM))
|
||||
#define QIDX_SKIP_THRESH 115
|
||||
|
||||
#define MV_COST_WEIGHT 108
|
||||
|
|
|
@ -243,7 +243,7 @@ static void model_rd_for_sb(AV1_COMP *cpi, BLOCK_SIZE bsize, MACROBLOCK *x,
|
|||
int quantizer = (pd->dequant[1] >> dequant_shift);
|
||||
|
||||
if (quantizer < 120)
|
||||
rate = (square_error * (280 - quantizer)) >> (16 - VP9_PROB_COST_SHIFT);
|
||||
rate = (square_error * (280 - quantizer)) >> (16 - AV1_PROB_COST_SHIFT);
|
||||
else
|
||||
rate = 0;
|
||||
dist = (square_error * quantizer) >> 8;
|
||||
|
|
|
@ -85,7 +85,7 @@ static int remap_prob(int v, int m) {
|
|||
|
||||
static int prob_diff_update_cost(aom_prob newp, aom_prob oldp) {
|
||||
int delp = remap_prob(newp, oldp);
|
||||
return update_bits[delp] << VP9_PROB_COST_SHIFT;
|
||||
return update_bits[delp] << AV1_PROB_COST_SHIFT;
|
||||
}
|
||||
|
||||
static void encode_uniform(aom_writer *w, int v) {
|
||||
|
|
|
@ -630,7 +630,7 @@ int main(int argc, char **argv) {
|
|||
// Disable automatic keyframe placement.
|
||||
cfg.kf_min_dist = cfg.kf_max_dist = 3000;
|
||||
|
||||
cfg.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||
cfg.temporal_layering_mode = AV1E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||
|
||||
set_temporal_layer_pattern(layering_mode, &cfg, layer_flags,
|
||||
&flag_periodicity);
|
||||
|
@ -683,13 +683,13 @@ int main(int argc, char **argv) {
|
|||
} else if (strncmp(encoder->name, "vp9", 3) == 0) {
|
||||
aom_svc_extra_cfg_t svc_params;
|
||||
aom_codec_control(&codec, AOME_SET_CPUUSED, speed);
|
||||
aom_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
||||
aom_codec_control(&codec, VP9E_SET_FRAME_PERIODIC_BOOST, 0);
|
||||
aom_codec_control(&codec, VP9E_SET_NOISE_SENSITIVITY, 0);
|
||||
aom_codec_control(&codec, AV1E_SET_AQ_MODE, 3);
|
||||
aom_codec_control(&codec, AV1E_SET_FRAME_PERIODIC_BOOST, 0);
|
||||
aom_codec_control(&codec, AV1E_SET_NOISE_SENSITIVITY, 0);
|
||||
aom_codec_control(&codec, AOME_SET_STATIC_THRESHOLD, 1);
|
||||
aom_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);
|
||||
aom_codec_control(&codec, VP9E_SET_TILE_COLUMNS, (cfg.g_threads >> 1));
|
||||
if (aom_codec_control(&codec, VP9E_SET_SVC, layering_mode > 0 ? 1 : 0))
|
||||
aom_codec_control(&codec, AV1E_SET_TUNE_CONTENT, 0);
|
||||
aom_codec_control(&codec, AV1E_SET_TILE_COLUMNS, (cfg.g_threads >> 1));
|
||||
if (aom_codec_control(&codec, AV1E_SET_SVC, layering_mode > 0 ? 1 : 0))
|
||||
die_codec(&codec, "Failed to set SVC");
|
||||
for (i = 0; i < cfg.ts_number_layers; ++i) {
|
||||
svc_params.max_quantizers[i] = cfg.rc_max_quantizer;
|
||||
|
@ -697,7 +697,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
svc_params.scaling_factor_num[0] = cfg.g_h;
|
||||
svc_params.scaling_factor_den[0] = cfg.g_h;
|
||||
aom_codec_control(&codec, VP9E_SET_SVC_PARAMETERS, &svc_params);
|
||||
aom_codec_control(&codec, AV1E_SET_SVC_PARAMETERS, &svc_params);
|
||||
}
|
||||
if (strncmp(encoder->name, "vp8", 3) == 0) {
|
||||
aom_codec_control(&codec, AOME_SET_SCREEN_CONTENT_MODE, 0);
|
||||
|
@ -724,7 +724,7 @@ int main(int argc, char **argv) {
|
|||
layer_id.temporal_layer_id =
|
||||
cfg.ts_layer_id[frame_cnt % cfg.ts_periodicity];
|
||||
if (strncmp(encoder->name, "vp9", 3) == 0) {
|
||||
aom_codec_control(&codec, VP9E_SET_SVC_LAYER_ID, &layer_id);
|
||||
aom_codec_control(&codec, AV1E_SET_SVC_LAYER_ID, &layer_id);
|
||||
} else if (strncmp(encoder->name, "vp8", 3) == 0) {
|
||||
aom_codec_control(&codec, AOME_SET_TEMPORAL_LAYER_ID,
|
||||
layer_id.temporal_layer_id);
|
||||
|
|
|
@ -216,7 +216,7 @@ int main(int argc, char **argv) {
|
|||
while (aom_img_read(&raw, infile)) {
|
||||
++frame_count;
|
||||
|
||||
if (frame_count == 22 && encoder->fourcc == AOM_FOURCC) {
|
||||
if (frame_count == 22 && encoder->fourcc == AV1_FOURCC) {
|
||||
set_roi_map(&cfg, &codec);
|
||||
} else if (frame_count == 33) {
|
||||
set_active_map(&cfg, &codec);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
\section main_intro Introduction
|
||||
Welcome to the WebM Codec SDK. This SDK allows you to integrate your
|
||||
applications with the AOM and VP9 video codecs, high quality, royalty free,
|
||||
applications with the AOM and AV1 video codecs, high quality, royalty free,
|
||||
open source codecs deployed on billions of computers and devices worldwide.
|
||||
|
||||
This distribution of the WebM Codec SDK includes the following support:
|
||||
|
|
|
@ -75,7 +75,7 @@ class ActiveMapRefreshTest
|
|||
static_cast<libaom_test::Y4mVideoSource *>(video);
|
||||
if (video->frame() == 1) {
|
||||
encoder->Control(AOME_SET_CPUUSED, cpu_used_);
|
||||
encoder->Control(VP9E_SET_AQ_MODE, kAqModeCyclicRefresh);
|
||||
encoder->Control(AV1E_SET_AQ_MODE, kAqModeCyclicRefresh);
|
||||
} else if (video->frame() >= 2 && video->img()) {
|
||||
aom_image_t *current = video->img();
|
||||
aom_image_t *previous = y4m_holder_->img();
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
#!/bin/sh
|
||||
##
|
||||
## Copyright (c) 2014 The WebM project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
## This file tests the libaom vp8_multi_resolution_encoder example. To add new
|
||||
## tests to this file, do the following:
|
||||
## 1. Write a shell function (this is your test).
|
||||
## 2. Add the function to vp8_mre_tests (on a new line).
|
||||
##
|
||||
. $(dirname $0)/tools_common.sh
|
||||
|
||||
# Environment check: $YUV_RAW_INPUT is required.
|
||||
vp8_multi_resolution_encoder_verify_environment() {
|
||||
if [ "$(aom_config_option_enabled CONFIG_MULTI_RES_ENCODING)" = "yes" ]; then
|
||||
if [ ! -e "${YUV_RAW_INPUT}" ]; then
|
||||
elog "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
|
||||
return 1
|
||||
fi
|
||||
local readonly app="vp8_multi_resolution_encoder"
|
||||
if [ -z "$(aom_tool_path "${app}")" ]; then
|
||||
elog "${app} not found. It must exist in LIBAOM_BIN_PATH or its parent."
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Runs vp8_multi_resolution_encoder. Simply forwards all arguments to
|
||||
# vp8_multi_resolution_encoder after building path to the executable.
|
||||
vp8_mre() {
|
||||
local readonly encoder="$(aom_tool_path vp8_multi_resolution_encoder)"
|
||||
if [ ! -x "${encoder}" ]; then
|
||||
elog "${encoder} does not exist or is not executable."
|
||||
return 1
|
||||
fi
|
||||
|
||||
eval "${AOM_TEST_PREFIX}" "${encoder}" "$@" ${devnull}
|
||||
}
|
||||
|
||||
vp8_multi_resolution_encoder_three_formats() {
|
||||
local readonly output_files="${AOM_TEST_OUTPUT_DIR}/vp8_mre_0.ivf
|
||||
${AOM_TEST_OUTPUT_DIR}/vp8_mre_1.ivf
|
||||
${AOM_TEST_OUTPUT_DIR}/vp8_mre_2.ivf"
|
||||
|
||||
if [ "$(aom_config_option_enabled CONFIG_MULTI_RES_ENCODING)" = "yes" ]; then
|
||||
if [ "$(vp8_encode_available)" = "yes" ]; then
|
||||
# Param order:
|
||||
# Input width
|
||||
# Input height
|
||||
# Input file path
|
||||
# Output file names
|
||||
# Output PSNR
|
||||
vp8_mre "${YUV_RAW_INPUT_WIDTH}" \
|
||||
"${YUV_RAW_INPUT_HEIGHT}" \
|
||||
"${YUV_RAW_INPUT}" \
|
||||
${output_files} \
|
||||
0
|
||||
|
||||
for output_file in ${output_files}; do
|
||||
if [ ! -e "${output_file}" ]; then
|
||||
elog "Missing output file: ${output_file}"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
vp8_mre_tests="vp8_multi_resolution_encoder_three_formats"
|
||||
run_tests vp8_multi_resolution_encoder_verify_environment "${vp8_mre_tests}"
|
|
@ -0,0 +1,57 @@
|
|||
#!/bin/sh
|
||||
##
|
||||
## Copyright (c) 2014 The WebM project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
## This file tests the libaom vp8cx_set_ref example. To add new tests to this
|
||||
## file, do the following:
|
||||
## 1. Write a shell function (this is your test).
|
||||
## 2. Add the function to vp8cx_set_ref_tests (on a new line).
|
||||
##
|
||||
. $(dirname $0)/tools_common.sh
|
||||
|
||||
# Environment check: $YUV_RAW_INPUT is required.
|
||||
vp8cx_set_ref_verify_environment() {
|
||||
if [ ! -e "${YUV_RAW_INPUT}" ]; then
|
||||
echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Runs vp8cx_set_ref and updates the reference frame before encoding frame 90.
|
||||
# $1 is the codec name, which vp8cx_set_ref does not support at present: It's
|
||||
# currently used only to name the output file.
|
||||
# TODO(tomfinegan): Pass the codec param once the example is updated to support
|
||||
# AV1.
|
||||
aom_set_ref() {
|
||||
local encoder="${LIBAOM_BIN_PATH}/vp8cx_set_ref${AOM_TEST_EXE_SUFFIX}"
|
||||
local codec="$1"
|
||||
local output_file="${AOM_TEST_OUTPUT_DIR}/vp8cx_set_ref_${codec}.ivf"
|
||||
local ref_frame_num=90
|
||||
|
||||
if [ ! -x "${encoder}" ]; then
|
||||
elog "${encoder} does not exist or is not executable."
|
||||
return 1
|
||||
fi
|
||||
|
||||
eval "${AOM_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT_WIDTH}" \
|
||||
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
|
||||
"${ref_frame_num}" ${devnull}
|
||||
|
||||
[ -e "${output_file}" ] || return 1
|
||||
}
|
||||
|
||||
vp8cx_set_ref_vp8() {
|
||||
if [ "$(vp8_encode_available)" = "yes" ]; then
|
||||
aom_set_ref vp8 || return 1
|
||||
fi
|
||||
}
|
||||
|
||||
vp8cx_set_ref_tests="vp8cx_set_ref_vp8"
|
||||
|
||||
run_tests vp8cx_set_ref_verify_environment "${vp8cx_set_ref_tests}"
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
# Environment check: Make sure input is available.
|
||||
aomdec_verify_environment() {
|
||||
if [ ! -e "${AOM_IVF_FILE}" ] || [ ! -e "${VP9_WEBM_FILE}" ] || \
|
||||
[ ! -e "${VP9_FPM_WEBM_FILE}" ] || \
|
||||
[ ! -e "${VP9_LT_50_FRAMES_WEBM_FILE}" ] ; then
|
||||
if [ ! -e "${AOM_IVF_FILE}" ] || [ ! -e "${AV1_WEBM_FILE}" ] || \
|
||||
[ ! -e "${AV1_FPM_WEBM_FILE}" ] || \
|
||||
[ ! -e "${AV1_LT_50_FRAMES_WEBM_FILE}" ] ; then
|
||||
elog "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
|
||||
return 1
|
||||
fi
|
||||
|
@ -76,7 +76,7 @@ aomdec_vp8_ivf_pipe_input() {
|
|||
aomdec_vp9_webm() {
|
||||
if [ "$(aomdec_can_decode_vp9)" = "yes" ] && \
|
||||
[ "$(webm_io_available)" = "yes" ]; then
|
||||
aomdec "${VP9_WEBM_FILE}" --summary --noblit
|
||||
aomdec "${AV1_WEBM_FILE}" --summary --noblit
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ aomdec_vp9_webm_frame_parallel() {
|
|||
if [ "$(aomdec_can_decode_vp9)" = "yes" ] && \
|
||||
[ "$(webm_io_available)" = "yes" ]; then
|
||||
for threads in 2 3 4 5 6 7 8; do
|
||||
aomdec "${VP9_FPM_WEBM_FILE}" --summary --noblit --threads=$threads \
|
||||
aomdec "${AV1_FPM_WEBM_FILE}" --summary --noblit --threads=$threads \
|
||||
--frame-parallel
|
||||
done
|
||||
fi
|
||||
|
@ -98,7 +98,7 @@ aomdec_vp9_webm_less_than_50_frames() {
|
|||
local readonly decoder="$(aom_tool_path aomdec)"
|
||||
local readonly expected=10
|
||||
local readonly num_frames=$(${AOM_TEST_PREFIX} "${decoder}" \
|
||||
"${VP9_LT_50_FRAMES_WEBM_FILE}" --summary --noblit 2>&1 \
|
||||
"${AV1_LT_50_FRAMES_WEBM_FILE}" --summary --noblit 2>&1 \
|
||||
| awk '/^[0-9]+ decoded frames/ { print $1 }')
|
||||
if [ "$num_frames" -ne "$expected" ]; then
|
||||
elog "Output frames ($num_frames) != expected ($expected)"
|
||||
|
|
|
@ -33,7 +33,7 @@ class AqSegmentTest
|
|||
::libaom_test::Encoder *encoder) {
|
||||
if (video->frame() == 1) {
|
||||
encoder->Control(AOME_SET_CPUUSED, set_cpu_used_);
|
||||
encoder->Control(VP9E_SET_AQ_MODE, aq_mode_);
|
||||
encoder->Control(AV1E_SET_AQ_MODE, aq_mode_);
|
||||
encoder->Control(AOME_SET_MAX_INTRA_BITRATE_PCT, 100);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -145,10 +145,10 @@ class ArfFreqTest
|
|||
virtual void PreEncodeFrameHook(::libaom_test::VideoSource *video,
|
||||
::libaom_test::Encoder *encoder) {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, 4);
|
||||
encoder->Control(AV1E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
encoder->Control(AV1E_SET_TILE_COLUMNS, 4);
|
||||
encoder->Control(AOME_SET_CPUUSED, test_encode_param_.cpu_used);
|
||||
encoder->Control(VP9E_SET_MIN_GF_INTERVAL, min_arf_requested_);
|
||||
encoder->Control(AV1E_SET_MIN_GF_INTERVAL, min_arf_requested_);
|
||||
if (test_encode_param_.mode != ::libaom_test::kRealTime) {
|
||||
encoder->Control(AOME_SET_ENABLEAUTOALTREF, 1);
|
||||
encoder->Control(AOME_SET_ARNR_MAXFRAMES, 7);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
## This file tests the libaom vp9_spatial_svc_encoder example. To add new
|
||||
## This file tests the libaom av1_spatial_svc_encoder example. To add new
|
||||
## tests to to this file, do the following:
|
||||
## 1. Write a shell function (this is your test).
|
||||
## 2. Add the function to vp9_spatial_svc_tests (on a new line).
|
||||
|
@ -16,17 +16,17 @@
|
|||
. $(dirname $0)/tools_common.sh
|
||||
|
||||
# Environment check: $YUV_RAW_INPUT is required.
|
||||
vp9_spatial_svc_encoder_verify_environment() {
|
||||
av1_spatial_svc_encoder_verify_environment() {
|
||||
if [ ! -e "${YUV_RAW_INPUT}" ]; then
|
||||
echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Runs vp9_spatial_svc_encoder. $1 is the test name.
|
||||
vp9_spatial_svc_encoder() {
|
||||
# Runs av1_spatial_svc_encoder. $1 is the test name.
|
||||
av1_spatial_svc_encoder() {
|
||||
local readonly \
|
||||
encoder="${LIBAOM_BIN_PATH}/vp9_spatial_svc_encoder${AOM_TEST_EXE_SUFFIX}"
|
||||
encoder="${LIBAOM_BIN_PATH}/av1_spatial_svc_encoder${AOM_TEST_EXE_SUFFIX}"
|
||||
local readonly test_name="$1"
|
||||
local readonly \
|
||||
output_file="${AOM_TEST_OUTPUT_DIR}/vp9_ssvc_encoder${test_name}.ivf"
|
||||
|
@ -54,7 +54,7 @@ vp9_spatial_svc() {
|
|||
if [ "$(vp9_encode_available)" = "yes" ]; then
|
||||
local readonly test_name="vp9_spatial_svc"
|
||||
for layers in $(seq 1 ${vp9_ssvc_test_layers}); do
|
||||
vp9_spatial_svc_encoder "${test_name}" -sl ${layers}
|
||||
av1_spatial_svc_encoder "${test_name}" -sl ${layers}
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
@ -67,6 +67,6 @@ readonly vp9_spatial_svc_tests="DISABLED_vp9_spatial_svc_mode_i
|
|||
|
||||
if [ "$(aom_config_option_enabled CONFIG_SPATIAL_SVC)" = "yes" ]; then
|
||||
run_tests \
|
||||
vp9_spatial_svc_encoder_verify_environment \
|
||||
av1_spatial_svc_encoder_verify_environment \
|
||||
"${vp9_spatial_svc_tests}"
|
||||
fi
|
|
@ -68,8 +68,8 @@ struct ConvolveFunctions {
|
|||
typedef std::tr1::tuple<int, int, const ConvolveFunctions *> ConvolveParam;
|
||||
|
||||
// Reference 8-tap subpixel filter, slightly modified to fit into this test.
|
||||
#define VP9_FILTER_WEIGHT 128
|
||||
#define VP9_FILTER_SHIFT 7
|
||||
#define AV1_FILTER_WEIGHT 128
|
||||
#define AV1_FILTER_SHIFT 7
|
||||
uint8_t clip_pixel(int x) { return x < 0 ? 0 : x > 255 ? 255 : x; }
|
||||
|
||||
void filter_block2d_8_c(const uint8_t *src_ptr, const unsigned int src_stride,
|
||||
|
@ -106,10 +106,10 @@ void filter_block2d_8_c(const uint8_t *src_ptr, const unsigned int src_stride,
|
|||
(src_ptr[2] * HFilter[2]) + (src_ptr[3] * HFilter[3]) +
|
||||
(src_ptr[4] * HFilter[4]) + (src_ptr[5] * HFilter[5]) +
|
||||
(src_ptr[6] * HFilter[6]) + (src_ptr[7] * HFilter[7]) +
|
||||
(VP9_FILTER_WEIGHT >> 1); // Rounding
|
||||
(AV1_FILTER_WEIGHT >> 1); // Rounding
|
||||
|
||||
// Normalize back to 0-255...
|
||||
*output_ptr = clip_pixel(temp >> VP9_FILTER_SHIFT);
|
||||
*output_ptr = clip_pixel(temp >> AV1_FILTER_SHIFT);
|
||||
++src_ptr;
|
||||
output_ptr += intermediate_height;
|
||||
}
|
||||
|
@ -127,10 +127,10 @@ void filter_block2d_8_c(const uint8_t *src_ptr, const unsigned int src_stride,
|
|||
(src_ptr[2] * VFilter[2]) + (src_ptr[3] * VFilter[3]) +
|
||||
(src_ptr[4] * VFilter[4]) + (src_ptr[5] * VFilter[5]) +
|
||||
(src_ptr[6] * VFilter[6]) + (src_ptr[7] * VFilter[7]) +
|
||||
(VP9_FILTER_WEIGHT >> 1); // Rounding
|
||||
(AV1_FILTER_WEIGHT >> 1); // Rounding
|
||||
|
||||
// Normalize back to 0-255...
|
||||
*dst_ptr++ = clip_pixel(temp >> VP9_FILTER_SHIFT);
|
||||
*dst_ptr++ = clip_pixel(temp >> AV1_FILTER_SHIFT);
|
||||
src_ptr += intermediate_height;
|
||||
}
|
||||
src_ptr += intermediate_next_stride;
|
||||
|
@ -203,10 +203,10 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
|
|||
(src_ptr[2] * HFilter[2]) + (src_ptr[3] * HFilter[3]) +
|
||||
(src_ptr[4] * HFilter[4]) + (src_ptr[5] * HFilter[5]) +
|
||||
(src_ptr[6] * HFilter[6]) + (src_ptr[7] * HFilter[7]) +
|
||||
(VP9_FILTER_WEIGHT >> 1); // Rounding
|
||||
(AV1_FILTER_WEIGHT >> 1); // Rounding
|
||||
|
||||
// Normalize back to 0-255...
|
||||
*output_ptr = clip_pixel_highbd(temp >> VP9_FILTER_SHIFT, bd);
|
||||
*output_ptr = clip_pixel_highbd(temp >> AV1_FILTER_SHIFT, bd);
|
||||
++src_ptr;
|
||||
output_ptr += intermediate_height;
|
||||
}
|
||||
|
@ -227,10 +227,10 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
|
|||
(src_ptr[2] * VFilter[2]) + (src_ptr[3] * VFilter[3]) +
|
||||
(src_ptr[4] * VFilter[4]) + (src_ptr[5] * VFilter[5]) +
|
||||
(src_ptr[6] * VFilter[6]) + (src_ptr[7] * VFilter[7]) +
|
||||
(VP9_FILTER_WEIGHT >> 1); // Rounding
|
||||
(AV1_FILTER_WEIGHT >> 1); // Rounding
|
||||
|
||||
// Normalize back to 0-255...
|
||||
*dst_ptr++ = clip_pixel_highbd(temp >> VP9_FILTER_SHIFT, bd);
|
||||
*dst_ptr++ = clip_pixel_highbd(temp >> AV1_FILTER_SHIFT, bd);
|
||||
src_ptr += intermediate_height;
|
||||
}
|
||||
src_ptr += intermediate_next_stride;
|
||||
|
|
|
@ -255,14 +255,14 @@ TEST_P(DatarateTestLarge, ChangingDropFrameThresh) {
|
|||
}
|
||||
}
|
||||
|
||||
class DatarateTestVP9Large
|
||||
class DatarateTestAV1Large
|
||||
: public ::libaom_test::EncoderTest,
|
||||
public ::libaom_test::CodecTestWith2Params<libaom_test::TestMode, int> {
|
||||
public:
|
||||
DatarateTestVP9Large() : EncoderTest(GET_PARAM(0)) {}
|
||||
DatarateTestAV1Large() : EncoderTest(GET_PARAM(0)) {}
|
||||
|
||||
protected:
|
||||
virtual ~DatarateTestVP9Large() {}
|
||||
virtual ~DatarateTestAV1Large() {}
|
||||
|
||||
virtual void SetUp() {
|
||||
InitializeConfig();
|
||||
|
@ -364,18 +364,18 @@ class DatarateTestVP9Large
|
|||
}
|
||||
}
|
||||
|
||||
encoder->Control(VP9E_SET_NOISE_SENSITIVITY, denoiser_on_);
|
||||
encoder->Control(AV1E_SET_NOISE_SENSITIVITY, denoiser_on_);
|
||||
|
||||
if (cfg_.ts_number_layers > 1) {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP9E_SET_SVC, 1);
|
||||
encoder->Control(AV1E_SET_SVC, 1);
|
||||
}
|
||||
aom_svc_layer_id_t layer_id;
|
||||
layer_id.spatial_layer_id = 0;
|
||||
frame_flags_ = SetFrameFlags(video->frame(), cfg_.ts_number_layers);
|
||||
layer_id.temporal_layer_id =
|
||||
SetLayerId(video->frame(), cfg_.ts_number_layers);
|
||||
encoder->Control(VP9E_SET_SVC_LAYER_ID, &layer_id);
|
||||
encoder->Control(AV1E_SET_SVC_LAYER_ID, &layer_id);
|
||||
}
|
||||
const aom_rational_t tb = video->timebase();
|
||||
timebase_ = static_cast<double>(tb.num) / tb.den;
|
||||
|
@ -448,7 +448,7 @@ class DatarateTestVP9Large
|
|||
};
|
||||
|
||||
// Check basic rate targeting,
|
||||
TEST_P(DatarateTestVP9Large, BasicRateTargeting) {
|
||||
TEST_P(DatarateTestAV1Large, BasicRateTargeting) {
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
|
@ -472,7 +472,7 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting) {
|
|||
}
|
||||
|
||||
// Check basic rate targeting,
|
||||
TEST_P(DatarateTestVP9Large, BasicRateTargeting444) {
|
||||
TEST_P(DatarateTestAV1Large, BasicRateTargeting444) {
|
||||
::libaom_test::Y4mVideoSource video("rush_hour_444.y4m", 0, 140);
|
||||
|
||||
cfg_.g_profile = 1;
|
||||
|
@ -504,7 +504,7 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting444) {
|
|||
// as the drop frame threshold is increased, and (2) that the total number of
|
||||
// frame drops does not decrease as we increase frame drop threshold.
|
||||
// Use a lower qp-max to force some frame drops.
|
||||
TEST_P(DatarateTestVP9Large, ChangingDropFrameThresh) {
|
||||
TEST_P(DatarateTestAV1Large, ChangingDropFrameThresh) {
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
|
@ -546,7 +546,7 @@ TEST_P(DatarateTestVP9Large, ChangingDropFrameThresh) {
|
|||
|
||||
// Check basic rate targeting for 2 temporal layers.
|
||||
#if 0 // AV1 does not support multiple layers yet
|
||||
TEST_P(DatarateTestVP9Large, BasicRateTargeting2TemporalLayers) {
|
||||
TEST_P(DatarateTestAV1Large, BasicRateTargeting2TemporalLayers) {
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
|
@ -562,7 +562,7 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting2TemporalLayers) {
|
|||
cfg_.ts_rate_decimator[0] = 2;
|
||||
cfg_.ts_rate_decimator[1] = 1;
|
||||
|
||||
cfg_.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||
cfg_.temporal_layering_mode = AV1E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||
|
||||
if (deadline_ == AOM_DL_REALTIME)
|
||||
cfg_.g_error_resilient = 1;
|
||||
|
@ -588,7 +588,7 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting2TemporalLayers) {
|
|||
}
|
||||
|
||||
// Check basic rate targeting for 3 temporal layers.
|
||||
TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayers) {
|
||||
TEST_P(DatarateTestAV1Large, BasicRateTargeting3TemporalLayers) {
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
|
@ -605,7 +605,7 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayers) {
|
|||
cfg_.ts_rate_decimator[1] = 2;
|
||||
cfg_.ts_rate_decimator[2] = 1;
|
||||
|
||||
cfg_.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||
cfg_.temporal_layering_mode = AV1E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||
|
||||
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||
30, 1, 0, 200);
|
||||
|
@ -635,7 +635,7 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayers) {
|
|||
// Check basic rate targeting for 3 temporal layers, with frame dropping.
|
||||
// Only for one (low) bitrate with lower max_quantizer, and somewhat higher
|
||||
// frame drop threshold, to force frame dropping.
|
||||
TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayersFrameDropping) {
|
||||
TEST_P(DatarateTestAV1Large, BasicRateTargeting3TemporalLayersFrameDropping) {
|
||||
cfg_.rc_buf_initial_sz = 500;
|
||||
cfg_.rc_buf_optimal_sz = 500;
|
||||
cfg_.rc_buf_sz = 1000;
|
||||
|
@ -653,7 +653,7 @@ TEST_P(DatarateTestVP9Large, BasicRateTargeting3TemporalLayersFrameDropping) {
|
|||
cfg_.ts_rate_decimator[1] = 2;
|
||||
cfg_.ts_rate_decimator[2] = 1;
|
||||
|
||||
cfg_.temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||
cfg_.temporal_layering_mode = AV1E_TEMPORAL_LAYERING_MODE_BYPASS;
|
||||
|
||||
::libaom_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
|
||||
30, 1, 0, 200);
|
||||
|
@ -716,12 +716,12 @@ class DatarateOnePassCbrSvc
|
|||
svc_params_.scaling_factor_den[0] = 288;
|
||||
svc_params_.scaling_factor_num[1] = 288;
|
||||
svc_params_.scaling_factor_den[1] = 288;
|
||||
encoder->Control(VP9E_SET_SVC, 1);
|
||||
encoder->Control(VP9E_SET_SVC_PARAMETERS, &svc_params_);
|
||||
encoder->Control(AV1E_SET_SVC, 1);
|
||||
encoder->Control(AV1E_SET_SVC_PARAMETERS, &svc_params_);
|
||||
encoder->Control(AOME_SET_CPUUSED, speed_setting_);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, 0);
|
||||
encoder->Control(AV1E_SET_TILE_COLUMNS, 0);
|
||||
encoder->Control(AOME_SET_MAX_INTRA_BITRATE_PCT, 300);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, (cfg_.g_threads >> 1));
|
||||
encoder->Control(AV1E_SET_TILE_COLUMNS, (cfg_.g_threads >> 1));
|
||||
}
|
||||
const aom_rational_t tb = video->timebase();
|
||||
timebase_ = static_cast<double>(tb.num) / tb.den;
|
||||
|
@ -894,7 +894,7 @@ TEST_P(DatarateOnePassCbrSvc, OnePassCbrSvc4threads) {
|
|||
EXPECT_EQ(GetMismatchFrames(), (unsigned int)0);
|
||||
}
|
||||
|
||||
AV1_INSTANTIATE_TEST_CASE(DatarateTestVP9Large,
|
||||
AV1_INSTANTIATE_TEST_CASE(DatarateTestAV1Large,
|
||||
::testing::Values(::libaom_test::kOnePassGood,
|
||||
::libaom_test::kRealTime),
|
||||
::testing::Range(2, 7));
|
||||
|
|
|
@ -37,7 +37,7 @@ const char kNewEncodeOutputFile[] = "new_encode.ivf";
|
|||
*/
|
||||
typedef std::tr1::tuple<const char *, unsigned> DecodePerfParam;
|
||||
|
||||
const DecodePerfParam kVP9DecodePerfVectors[] = {
|
||||
const DecodePerfParam kAV1DecodePerfVectors[] = {
|
||||
make_tuple("vp90-2-bbb_426x240_tile_1x1_180kbps.webm", 1),
|
||||
make_tuple("vp90-2-bbb_640x360_tile_1x2_337kbps.webm", 2),
|
||||
make_tuple("vp90-2-bbb_854x480_tile_1x2_651kbps.webm", 2),
|
||||
|
@ -81,7 +81,7 @@ TEST_P(DecodePerfTest, PerfTest) {
|
|||
|
||||
aom_codec_dec_cfg_t cfg = aom_codec_dec_cfg_t();
|
||||
cfg.threads = threads;
|
||||
libaom_test::VP9Decoder decoder(cfg, 0);
|
||||
libaom_test::AV1Decoder decoder(cfg, 0);
|
||||
|
||||
aom_usec_timer t;
|
||||
aom_usec_timer_start(&t);
|
||||
|
@ -106,18 +106,18 @@ TEST_P(DecodePerfTest, PerfTest) {
|
|||
printf("}\n");
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(VP9, DecodePerfTest,
|
||||
::testing::ValuesIn(kVP9DecodePerfVectors));
|
||||
INSTANTIATE_TEST_CASE_P(AV1, DecodePerfTest,
|
||||
::testing::ValuesIn(kAV1DecodePerfVectors));
|
||||
|
||||
class VP9NewEncodeDecodePerfTest
|
||||
class AV1NewEncodeDecodePerfTest
|
||||
: public ::libaom_test::EncoderTest,
|
||||
public ::libaom_test::CodecTestWithParam<libaom_test::TestMode> {
|
||||
protected:
|
||||
VP9NewEncodeDecodePerfTest()
|
||||
AV1NewEncodeDecodePerfTest()
|
||||
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)), speed_(0),
|
||||
outfile_(0), out_frames_(0) {}
|
||||
|
||||
virtual ~VP9NewEncodeDecodePerfTest() {}
|
||||
virtual ~AV1NewEncodeDecodePerfTest() {}
|
||||
|
||||
virtual void SetUp() {
|
||||
InitializeConfig();
|
||||
|
@ -140,8 +140,8 @@ class VP9NewEncodeDecodePerfTest
|
|||
::libaom_test::Encoder *encoder) {
|
||||
if (video->frame() == 1) {
|
||||
encoder->Control(AOME_SET_CPUUSED, speed_);
|
||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, 2);
|
||||
encoder->Control(AV1E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
encoder->Control(AV1E_SET_TILE_COLUMNS, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ class VP9NewEncodeDecodePerfTest
|
|||
virtual void EndPassHook() {
|
||||
if (outfile_ != NULL) {
|
||||
if (!fseek(outfile_, 0, SEEK_SET))
|
||||
ivf_write_file_header(outfile_, &cfg_, VP9_FOURCC, out_frames_);
|
||||
ivf_write_file_header(outfile_, &cfg_, AV1_FOURCC, out_frames_);
|
||||
fclose(outfile_);
|
||||
outfile_ = NULL;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ class VP9NewEncodeDecodePerfTest
|
|||
|
||||
// Write initial file header if first frame.
|
||||
if (pkt->data.frame.pts == 0)
|
||||
ivf_write_file_header(outfile_, &cfg_, VP9_FOURCC, out_frames_);
|
||||
ivf_write_file_header(outfile_, &cfg_, AV1_FOURCC, out_frames_);
|
||||
|
||||
// Write frame header and data.
|
||||
ivf_write_frame_header(outfile_, out_frames_, pkt->data.frame.sz);
|
||||
|
@ -197,26 +197,26 @@ struct EncodePerfTestVideo {
|
|||
int frames;
|
||||
};
|
||||
|
||||
const EncodePerfTestVideo kVP9EncodePerfTestVectors[] = {
|
||||
const EncodePerfTestVideo kAV1EncodePerfTestVectors[] = {
|
||||
EncodePerfTestVideo("niklas_1280_720_30.yuv", 1280, 720, 600, 470),
|
||||
};
|
||||
|
||||
TEST_P(VP9NewEncodeDecodePerfTest, PerfTest) {
|
||||
TEST_P(AV1NewEncodeDecodePerfTest, PerfTest) {
|
||||
SetUp();
|
||||
|
||||
// TODO(JBB): Make this work by going through the set of given files.
|
||||
const int i = 0;
|
||||
const aom_rational timebase = { 33333333, 1000000000 };
|
||||
cfg_.g_timebase = timebase;
|
||||
cfg_.rc_target_bitrate = kVP9EncodePerfTestVectors[i].bitrate;
|
||||
cfg_.rc_target_bitrate = kAV1EncodePerfTestVectors[i].bitrate;
|
||||
|
||||
init_flags_ = AOM_CODEC_USE_PSNR;
|
||||
|
||||
const char *video_name = kVP9EncodePerfTestVectors[i].name;
|
||||
const char *video_name = kAV1EncodePerfTestVectors[i].name;
|
||||
libaom_test::I420VideoSource video(
|
||||
video_name, kVP9EncodePerfTestVectors[i].width,
|
||||
kVP9EncodePerfTestVectors[i].height, timebase.den, timebase.num, 0,
|
||||
kVP9EncodePerfTestVectors[i].frames);
|
||||
video_name, kAV1EncodePerfTestVectors[i].width,
|
||||
kAV1EncodePerfTestVectors[i].height, timebase.den, timebase.num, 0,
|
||||
kAV1EncodePerfTestVectors[i].frames);
|
||||
set_speed(2);
|
||||
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
|
@ -228,7 +228,7 @@ TEST_P(VP9NewEncodeDecodePerfTest, PerfTest) {
|
|||
|
||||
aom_codec_dec_cfg_t cfg = aom_codec_dec_cfg_t();
|
||||
cfg.threads = threads;
|
||||
libaom_test::VP9Decoder decoder(cfg, 0);
|
||||
libaom_test::AV1Decoder decoder(cfg, 0);
|
||||
|
||||
aom_usec_timer t;
|
||||
aom_usec_timer_start(&t);
|
||||
|
@ -255,6 +255,6 @@ TEST_P(VP9NewEncodeDecodePerfTest, PerfTest) {
|
|||
printf("}\n");
|
||||
}
|
||||
|
||||
AV1_INSTANTIATE_TEST_CASE(VP9NewEncodeDecodePerfTest,
|
||||
AV1_INSTANTIATE_TEST_CASE(AV1NewEncodeDecodePerfTest,
|
||||
::testing::Values(::libaom_test::kTwoPassGood));
|
||||
} // namespace
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
. $(dirname $0)/tools_common.sh
|
||||
|
||||
# Environment check: Make sure input is available:
|
||||
# $AOM_IVF_FILE and $VP9_IVF_FILE are required.
|
||||
# $AOM_IVF_FILE and $AV1_IVF_FILE are required.
|
||||
decode_to_md5_verify_environment() {
|
||||
if [ ! -e "${AOM_IVF_FILE}" ] || [ ! -e "${VP9_IVF_FILE}" ]; then
|
||||
if [ ! -e "${AOM_IVF_FILE}" ] || [ ! -e "${AV1_IVF_FILE}" ]; then
|
||||
echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
|
||||
return 1
|
||||
fi
|
||||
|
@ -63,7 +63,7 @@ decode_to_md5_vp9() {
|
|||
local expected_md5="2952c0eae93f3dadd1aa84c50d3fd6d2"
|
||||
|
||||
if [ "$(vp9_decode_available)" = "yes" ]; then
|
||||
decode_to_md5 "${VP9_IVF_FILE}" "vp9" "${expected_md5}"
|
||||
decode_to_md5 "${AV1_IVF_FILE}" "vp9" "${expected_md5}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
. $(dirname $0)/tools_common.sh
|
||||
|
||||
# Environment check: Make sure input is available:
|
||||
# $AOM_IVF_FILE and $VP9_IVF_FILE are required.
|
||||
# $AOM_IVF_FILE and $AV1_IVF_FILE are required.
|
||||
decode_with_drops_verify_environment() {
|
||||
if [ ! -e "${AOM_IVF_FILE}" ] || [ ! -e "${VP9_IVF_FILE}" ]; then
|
||||
if [ ! -e "${AOM_IVF_FILE}" ] || [ ! -e "${AV1_IVF_FILE}" ]; then
|
||||
echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
|
||||
return 1
|
||||
fi
|
||||
|
@ -59,17 +59,17 @@ decode_with_drops_vp8() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Decodes $VP9_IVF_FILE while dropping frames, twice: once in sequence mode,
|
||||
# Decodes $AV1_IVF_FILE while dropping frames, twice: once in sequence mode,
|
||||
# and once in pattern mode.
|
||||
# Note: This test assumes that $VP9_IVF_FILE has exactly 20 frames, and could
|
||||
# Note: This test assumes that $AV1_IVF_FILE has exactly 20 frames, and could
|
||||
# break if the file is modified.
|
||||
decode_with_drops_vp9() {
|
||||
if [ "$(vp9_decode_available)" = "yes" ]; then
|
||||
# Test sequence mode: Drop frames 2-28.
|
||||
decode_with_drops "${VP9_IVF_FILE}" "vp9" "2-19"
|
||||
decode_with_drops "${AV1_IVF_FILE}" "vp9" "2-19"
|
||||
|
||||
# Test pattern mode: Drop 3 of every 4 frames.
|
||||
decode_with_drops "${VP9_IVF_FILE}" "vp9" "3/4"
|
||||
decode_with_drops "${AV1_IVF_FILE}" "vp9" "3/4"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ using libaom_test::ACMRandom;
|
|||
namespace {
|
||||
|
||||
const int kNumPixels = 64 * 64;
|
||||
class VP9DenoiserTest : public ::testing::TestWithParam<BLOCK_SIZE> {
|
||||
class AV1DenoiserTest : public ::testing::TestWithParam<BLOCK_SIZE> {
|
||||
public:
|
||||
virtual ~VP9DenoiserTest() {}
|
||||
virtual ~AV1DenoiserTest() {}
|
||||
|
||||
virtual void SetUp() { bs_ = GetParam(); }
|
||||
|
||||
|
@ -41,7 +41,7 @@ class VP9DenoiserTest : public ::testing::TestWithParam<BLOCK_SIZE> {
|
|||
BLOCK_SIZE bs_;
|
||||
};
|
||||
|
||||
TEST_P(VP9DenoiserTest, BitexactCheck) {
|
||||
TEST_P(AV1DenoiserTest, BitexactCheck) {
|
||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||
const int count_test_block = 4000;
|
||||
|
||||
|
@ -90,7 +90,7 @@ TEST_P(VP9DenoiserTest, BitexactCheck) {
|
|||
}
|
||||
|
||||
// Test for all block size.
|
||||
INSTANTIATE_TEST_CASE_P(SSE2, VP9DenoiserTest,
|
||||
INSTANTIATE_TEST_CASE_P(SSE2, AV1DenoiserTest,
|
||||
::testing::Values(BLOCK_4X4, BLOCK_4X8, BLOCK_8X4,
|
||||
BLOCK_8X8, BLOCK_8X16, BLOCK_16X8,
|
||||
BLOCK_16X16, BLOCK_16X32, BLOCK_32X16,
|
||||
|
|
|
@ -20,12 +20,6 @@ namespace {
|
|||
|
||||
TEST(EncodeAPI, InvalidParams) {
|
||||
static const aom_codec_iface_t *kCodecs[] = {
|
||||
#if CONFIG_AOM_ENCODER
|
||||
&aom_codec_vp8_cx_algo,
|
||||
#endif
|
||||
#if CONFIG_VP9_ENCODER
|
||||
&aom_codec_vp9_cx_algo,
|
||||
#endif
|
||||
#if CONFIG_AV1_ENCODER
|
||||
&aom_codec_av1_cx_algo,
|
||||
#endif
|
||||
|
|
|
@ -35,7 +35,7 @@ struct EncodePerfTestVideo {
|
|||
int frames;
|
||||
};
|
||||
|
||||
const EncodePerfTestVideo kVP9EncodePerfTestVectors[] = {
|
||||
const EncodePerfTestVideo kAV1EncodePerfTestVectors[] = {
|
||||
EncodePerfTestVideo("desktop_640_360_30.yuv", 640, 360, 200, 2484),
|
||||
EncodePerfTestVideo("kirland_640_480_30.yuv", 640, 480, 200, 300),
|
||||
EncodePerfTestVideo("macmarcomoving_640_480_30.yuv", 640, 480, 200, 987),
|
||||
|
@ -53,15 +53,15 @@ const int kEncodePerfTestThreads[] = { 1, 2, 4 };
|
|||
|
||||
#define NELEMENTS(x) (sizeof((x)) / sizeof((x)[0]))
|
||||
|
||||
class VP9EncodePerfTest
|
||||
class AV1EncodePerfTest
|
||||
: public ::libaom_test::EncoderTest,
|
||||
public ::libaom_test::CodecTestWithParam<libaom_test::TestMode> {
|
||||
protected:
|
||||
VP9EncodePerfTest()
|
||||
AV1EncodePerfTest()
|
||||
: EncoderTest(GET_PARAM(0)), min_psnr_(kMaxPsnr), nframes_(0),
|
||||
encoding_mode_(GET_PARAM(1)), speed_(0), threads_(1) {}
|
||||
|
||||
virtual ~VP9EncodePerfTest() {}
|
||||
virtual ~AV1EncodePerfTest() {}
|
||||
|
||||
virtual void SetUp() {
|
||||
InitializeConfig();
|
||||
|
@ -87,8 +87,8 @@ class VP9EncodePerfTest
|
|||
if (video->frame() == 0) {
|
||||
const int log2_tile_columns = 3;
|
||||
encoder->Control(AOME_SET_CPUUSED, speed_);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, log2_tile_columns);
|
||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
encoder->Control(AV1E_SET_TILE_COLUMNS, log2_tile_columns);
|
||||
encoder->Control(AV1E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
encoder->Control(AOME_SET_ENABLEAUTOALTREF, 0);
|
||||
}
|
||||
}
|
||||
|
@ -121,14 +121,14 @@ class VP9EncodePerfTest
|
|||
unsigned int threads_;
|
||||
};
|
||||
|
||||
TEST_P(VP9EncodePerfTest, PerfTest) {
|
||||
for (size_t i = 0; i < NELEMENTS(kVP9EncodePerfTestVectors); ++i) {
|
||||
TEST_P(AV1EncodePerfTest, PerfTest) {
|
||||
for (size_t i = 0; i < NELEMENTS(kAV1EncodePerfTestVectors); ++i) {
|
||||
for (size_t j = 0; j < NELEMENTS(kEncodePerfTestSpeeds); ++j) {
|
||||
for (size_t k = 0; k < NELEMENTS(kEncodePerfTestThreads); ++k) {
|
||||
if (kVP9EncodePerfTestVectors[i].width < 512 &&
|
||||
if (kAV1EncodePerfTestVectors[i].width < 512 &&
|
||||
kEncodePerfTestThreads[k] > 1)
|
||||
continue;
|
||||
else if (kVP9EncodePerfTestVectors[i].width < 1024 &&
|
||||
else if (kAV1EncodePerfTestVectors[i].width < 1024 &&
|
||||
kEncodePerfTestThreads[k] > 2)
|
||||
continue;
|
||||
|
||||
|
@ -137,16 +137,16 @@ TEST_P(VP9EncodePerfTest, PerfTest) {
|
|||
|
||||
const aom_rational timebase = { 33333333, 1000000000 };
|
||||
cfg_.g_timebase = timebase;
|
||||
cfg_.rc_target_bitrate = kVP9EncodePerfTestVectors[i].bitrate;
|
||||
cfg_.rc_target_bitrate = kAV1EncodePerfTestVectors[i].bitrate;
|
||||
|
||||
init_flags_ = AOM_CODEC_USE_PSNR;
|
||||
|
||||
const unsigned frames = kVP9EncodePerfTestVectors[i].frames;
|
||||
const char *video_name = kVP9EncodePerfTestVectors[i].name;
|
||||
const unsigned frames = kAV1EncodePerfTestVectors[i].frames;
|
||||
const char *video_name = kAV1EncodePerfTestVectors[i].name;
|
||||
libaom_test::I420VideoSource video(
|
||||
video_name, kVP9EncodePerfTestVectors[i].width,
|
||||
kVP9EncodePerfTestVectors[i].height, timebase.den, timebase.num, 0,
|
||||
kVP9EncodePerfTestVectors[i].frames);
|
||||
video_name, kAV1EncodePerfTestVectors[i].width,
|
||||
kAV1EncodePerfTestVectors[i].height, timebase.den, timebase.num, 0,
|
||||
kAV1EncodePerfTestVectors[i].frames);
|
||||
set_speed(kEncodePerfTestSpeeds[j]);
|
||||
|
||||
aom_usec_timer t;
|
||||
|
@ -182,6 +182,6 @@ TEST_P(VP9EncodePerfTest, PerfTest) {
|
|||
}
|
||||
}
|
||||
|
||||
AV1_INSTANTIATE_TEST_CASE(VP9EncodePerfTest,
|
||||
AV1_INSTANTIATE_TEST_CASE(AV1EncodePerfTest,
|
||||
::testing::Values(::libaom_test::kRealTime));
|
||||
} // namespace
|
||||
|
|
|
@ -37,7 +37,7 @@ void Encoder::InitEncoder(VideoSource *video) {
|
|||
if (CodecInterface() == &aom_codec_av1_cx_algo) {
|
||||
// Default to 1 tile column for AV1.
|
||||
const int log2_tile_columns = 0;
|
||||
res = aom_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
|
||||
res = aom_codec_control_(&encoder_, AV1E_SET_TILE_COLUMNS,
|
||||
log2_tile_columns);
|
||||
ASSERT_EQ(AOM_CODEC_OK, res) << EncoderError();
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ struct EncodePerfTestVideo {
|
|||
int frames;
|
||||
};
|
||||
|
||||
const EncodePerfTestVideo kVP9EncodePerfTestVectors[] = {
|
||||
const EncodePerfTestVideo kAV1EncodePerfTestVectors[] = {
|
||||
{ "niklas_1280_720_30.y4m", 1280, 720, 600, 10 },
|
||||
};
|
||||
|
||||
|
@ -44,7 +44,7 @@ struct EncodeParameters {
|
|||
// TODO(JBB): quantizers / bitrate
|
||||
};
|
||||
|
||||
const EncodeParameters kVP9EncodeParameterSet[] = {
|
||||
const EncodeParameters kAV1EncodeParameterSet[] = {
|
||||
{ 0, 0, 0, 1, 0, AOM_CR_STUDIO_RANGE, AOM_CS_BT_601 },
|
||||
{ 0, 0, 0, 0, 0, AOM_CR_FULL_RANGE, AOM_CS_BT_709 },
|
||||
{ 0, 0, 1, 0, 0, AOM_CR_FULL_RANGE, AOM_CS_BT_2020 },
|
||||
|
@ -75,20 +75,20 @@ class VpxEncoderParmsGetToDecoder
|
|||
virtual void PreEncodeFrameHook(::libaom_test::VideoSource *video,
|
||||
::libaom_test::Encoder *encoder) {
|
||||
if (video->frame() == 1) {
|
||||
encoder->Control(VP9E_SET_COLOR_SPACE, encode_parms.cs);
|
||||
encoder->Control(VP9E_SET_COLOR_RANGE, encode_parms.color_range);
|
||||
encoder->Control(VP9E_SET_LOSSLESS, encode_parms.lossless);
|
||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING,
|
||||
encoder->Control(AV1E_SET_COLOR_SPACE, encode_parms.cs);
|
||||
encoder->Control(AV1E_SET_COLOR_RANGE, encode_parms.color_range);
|
||||
encoder->Control(AV1E_SET_LOSSLESS, encode_parms.lossless);
|
||||
encoder->Control(AV1E_SET_FRAME_PARALLEL_DECODING,
|
||||
encode_parms.frame_parallel);
|
||||
encoder->Control(VP9E_SET_TILE_ROWS, encode_parms.tile_rows);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, encode_parms.tile_cols);
|
||||
encoder->Control(AV1E_SET_TILE_ROWS, encode_parms.tile_rows);
|
||||
encoder->Control(AV1E_SET_TILE_COLUMNS, encode_parms.tile_cols);
|
||||
encoder->Control(AOME_SET_CPUUSED, kCpuUsed);
|
||||
encoder->Control(AOME_SET_ENABLEAUTOALTREF, 1);
|
||||
encoder->Control(AOME_SET_ARNR_MAXFRAMES, 7);
|
||||
encoder->Control(AOME_SET_ARNR_STRENGTH, 5);
|
||||
encoder->Control(AOME_SET_ARNR_TYPE, 3);
|
||||
if (encode_parms.render_size[0] > 0 && encode_parms.render_size[1] > 0)
|
||||
encoder->Control(VP9E_SET_RENDER_SIZE, encode_parms.render_size);
|
||||
encoder->Control(AV1E_SET_RENDER_SIZE, encode_parms.render_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,6 +144,6 @@ TEST_P(VpxEncoderParmsGetToDecoder, BitstreamParms) {
|
|||
}
|
||||
|
||||
AV1_INSTANTIATE_TEST_CASE(VpxEncoderParmsGetToDecoder,
|
||||
::testing::ValuesIn(kVP9EncodeParameterSet),
|
||||
::testing::ValuesIn(kVP9EncodePerfTestVectors));
|
||||
::testing::ValuesIn(kAV1EncodeParameterSet),
|
||||
::testing::ValuesIn(kAV1EncodePerfTestVectors));
|
||||
} // namespace
|
||||
|
|
|
@ -114,8 +114,8 @@ class EndToEndTestLarge
|
|||
virtual void PreEncodeFrameHook(::libaom_test::VideoSource *video,
|
||||
::libaom_test::Encoder *encoder) {
|
||||
if (video->frame() == 1) {
|
||||
encoder->Control(VP9E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, 4);
|
||||
encoder->Control(AV1E_SET_FRAME_PARALLEL_DECODING, 1);
|
||||
encoder->Control(AV1E_SET_TILE_COLUMNS, 4);
|
||||
encoder->Control(AOME_SET_CPUUSED, cpu_used_);
|
||||
if (encoding_mode_ != ::libaom_test::kRealTime) {
|
||||
encoder->Control(AOME_SET_ENABLEAUTOALTREF, 1);
|
||||
|
|
|
@ -61,7 +61,7 @@ class VPxEncoderThreadTest
|
|||
::libaom_test::Encoder *encoder) {
|
||||
if (!encoder_initialized_) {
|
||||
// Encode 4 column tiles.
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, tiles_);
|
||||
encoder->Control(AV1E_SET_TILE_COLUMNS, tiles_);
|
||||
encoder->Control(AOME_SET_CPUUSED, set_cpu_used_);
|
||||
if (encoding_mode_ != ::libaom_test::kRealTime) {
|
||||
encoder->Control(AOME_SET_ENABLEAUTOALTREF, 1);
|
||||
|
@ -70,7 +70,7 @@ class VPxEncoderThreadTest
|
|||
encoder->Control(AOME_SET_ARNR_TYPE, 3);
|
||||
} else {
|
||||
encoder->Control(AOME_SET_ENABLEAUTOALTREF, 0);
|
||||
encoder->Control(VP9E_SET_AQ_MODE, 3);
|
||||
encoder->Control(AV1E_SET_AQ_MODE, 3);
|
||||
}
|
||||
encoder_initialized_ = true;
|
||||
}
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
namespace {
|
||||
|
||||
class VP9FrameSizeTestsLarge : public ::libaom_test::EncoderTest,
|
||||
class AV1FrameSizeTestsLarge : public ::libaom_test::EncoderTest,
|
||||
public ::testing::Test {
|
||||
protected:
|
||||
VP9FrameSizeTestsLarge()
|
||||
AV1FrameSizeTestsLarge()
|
||||
: EncoderTest(&::libaom_test::kAV1), expected_res_(AOM_CODEC_OK) {}
|
||||
virtual ~VP9FrameSizeTestsLarge() {}
|
||||
virtual ~AV1FrameSizeTestsLarge() {}
|
||||
|
||||
virtual void SetUp() {
|
||||
InitializeConfig();
|
||||
|
@ -46,7 +46,7 @@ class VP9FrameSizeTestsLarge : public ::libaom_test::EncoderTest,
|
|||
int expected_res_;
|
||||
};
|
||||
|
||||
TEST_F(VP9FrameSizeTestsLarge, TestInvalidSizes) {
|
||||
TEST_F(AV1FrameSizeTestsLarge, TestInvalidSizes) {
|
||||
::libaom_test::RandomVideoSource video;
|
||||
|
||||
#if CONFIG_SIZE_LIMIT
|
||||
|
@ -57,7 +57,7 @@ TEST_F(VP9FrameSizeTestsLarge, TestInvalidSizes) {
|
|||
#endif
|
||||
}
|
||||
|
||||
TEST_F(VP9FrameSizeTestsLarge, ValidSizes) {
|
||||
TEST_F(AV1FrameSizeTestsLarge, ValidSizes) {
|
||||
::libaom_test::RandomVideoSource video;
|
||||
|
||||
#if CONFIG_SIZE_LIMIT
|
||||
|
@ -84,7 +84,7 @@ TEST_F(VP9FrameSizeTestsLarge, ValidSizes) {
|
|||
#endif
|
||||
}
|
||||
|
||||
TEST_F(VP9FrameSizeTestsLarge, OneByOneVideo) {
|
||||
TEST_F(AV1FrameSizeTestsLarge, OneByOneVideo) {
|
||||
::libaom_test::RandomVideoSource video;
|
||||
|
||||
video.SetSize(1, 1);
|
||||
|
|
|
@ -61,7 +61,7 @@ void reference_dct_2d(int16_t input[64], double output[64]) {
|
|||
for (int i = 0; i < 64; ++i) output[i] *= 2;
|
||||
}
|
||||
|
||||
TEST(VP9Idct8x8Test, AccuracyCheck) {
|
||||
TEST(AV1Idct8x8Test, AccuracyCheck) {
|
||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||
const int count_test_block = 10000;
|
||||
for (int i = 0; i < count_test_block; ++i) {
|
||||
|
|
|
@ -28,10 +28,10 @@ using libaom_test::ACMRandom;
|
|||
|
||||
const int count_test_block = 100000;
|
||||
|
||||
// Base class for VP9 intra prediction tests.
|
||||
class VP9IntraPredBase {
|
||||
// Base class for AV1 intra prediction tests.
|
||||
class AV1IntraPredBase {
|
||||
public:
|
||||
virtual ~VP9IntraPredBase() { libaom_test::ClearSystemState(); }
|
||||
virtual ~AV1IntraPredBase() { libaom_test::ClearSystemState(); }
|
||||
|
||||
protected:
|
||||
virtual void Predict(PREDICTION_MODE mode) = 0;
|
||||
|
@ -93,7 +93,7 @@ typedef void (*intra_pred_fn_t)(uint16_t *dst, ptrdiff_t stride,
|
|||
int bps);
|
||||
typedef std::tr1::tuple<intra_pred_fn_t, intra_pred_fn_t, int, int>
|
||||
intra_pred_params_t;
|
||||
class VP9IntraPredTest : public VP9IntraPredBase,
|
||||
class AV1IntraPredTest : public AV1IntraPredBase,
|
||||
public ::testing::TestWithParam<intra_pred_params_t> {
|
||||
virtual void SetUp() {
|
||||
pred_fn_ = GET_PARAM(0);
|
||||
|
@ -116,7 +116,7 @@ class VP9IntraPredTest : public VP9IntraPredBase,
|
|||
int bit_depth_;
|
||||
};
|
||||
|
||||
TEST_P(VP9IntraPredTest, IntraPredTests) {
|
||||
TEST_P(AV1IntraPredTest, IntraPredTests) {
|
||||
// max block size is 32
|
||||
DECLARE_ALIGNED(16, uint16_t, left_col[2 * 32]);
|
||||
DECLARE_ALIGNED(16, uint16_t, above_data[2 * 32 + 32]);
|
||||
|
@ -131,7 +131,7 @@ using std::tr1::make_tuple;
|
|||
#if CONFIG_AOM_HIGHBITDEPTH
|
||||
#if CONFIG_USE_X86INC
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2_TO_C_8, VP9IntraPredTest,
|
||||
SSE2_TO_C_8, AV1IntraPredTest,
|
||||
::testing::Values(make_tuple(&aom_highbd_dc_predictor_32x32_sse2,
|
||||
&aom_highbd_dc_predictor_32x32_c, 32, 8),
|
||||
make_tuple(&aom_highbd_tm_predictor_16x16_sse2,
|
||||
|
@ -158,7 +158,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||
&aom_highbd_tm_predictor_8x8_c, 8, 8)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2_TO_C_10, VP9IntraPredTest,
|
||||
SSE2_TO_C_10, AV1IntraPredTest,
|
||||
::testing::Values(make_tuple(&aom_highbd_dc_predictor_32x32_sse2,
|
||||
&aom_highbd_dc_predictor_32x32_c, 32, 10),
|
||||
make_tuple(&aom_highbd_tm_predictor_16x16_sse2,
|
||||
|
@ -185,7 +185,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||
&aom_highbd_tm_predictor_8x8_c, 8, 10)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2_TO_C_12, VP9IntraPredTest,
|
||||
SSE2_TO_C_12, AV1IntraPredTest,
|
||||
::testing::Values(make_tuple(&aom_highbd_dc_predictor_32x32_sse2,
|
||||
&aom_highbd_dc_predictor_32x32_c, 32, 12),
|
||||
make_tuple(&aom_highbd_tm_predictor_16x16_sse2,
|
||||
|
|
|
@ -42,7 +42,7 @@ class LosslessTest
|
|||
// Only call Control if quantizer > 0 to verify that using quantizer
|
||||
// alone will activate lossless
|
||||
if (cfg_.rc_max_quantizer > 0 || cfg_.rc_min_quantizer > 0) {
|
||||
encoder->Control(VP9E_SET_LOSSLESS, 1);
|
||||
encoder->Control(AV1E_SET_LOSSLESS, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,9 +42,9 @@ typedef void (*QuantizeFunc)(const tran_low_t *coeff, intptr_t count,
|
|||
typedef std::tr1::tuple<QuantizeFunc, QuantizeFunc, aom_bit_depth_t>
|
||||
QuantizeParam;
|
||||
|
||||
class VP9QuantizeTest : public ::testing::TestWithParam<QuantizeParam> {
|
||||
class AV1QuantizeTest : public ::testing::TestWithParam<QuantizeParam> {
|
||||
public:
|
||||
virtual ~VP9QuantizeTest() {}
|
||||
virtual ~AV1QuantizeTest() {}
|
||||
virtual void SetUp() {
|
||||
quantize_op_ = GET_PARAM(0);
|
||||
ref_quantize_op_ = GET_PARAM(1);
|
||||
|
@ -61,9 +61,9 @@ class VP9QuantizeTest : public ::testing::TestWithParam<QuantizeParam> {
|
|||
QuantizeFunc ref_quantize_op_;
|
||||
};
|
||||
|
||||
class VP9Quantize32Test : public ::testing::TestWithParam<QuantizeParam> {
|
||||
class AV1Quantize32Test : public ::testing::TestWithParam<QuantizeParam> {
|
||||
public:
|
||||
virtual ~VP9Quantize32Test() {}
|
||||
virtual ~AV1Quantize32Test() {}
|
||||
virtual void SetUp() {
|
||||
quantize_op_ = GET_PARAM(0);
|
||||
ref_quantize_op_ = GET_PARAM(1);
|
||||
|
@ -80,7 +80,7 @@ class VP9Quantize32Test : public ::testing::TestWithParam<QuantizeParam> {
|
|||
QuantizeFunc ref_quantize_op_;
|
||||
};
|
||||
|
||||
TEST_P(VP9QuantizeTest, OperationCheck) {
|
||||
TEST_P(AV1QuantizeTest, OperationCheck) {
|
||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||
DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[256]);
|
||||
DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
|
||||
|
@ -138,7 +138,7 @@ TEST_P(VP9QuantizeTest, OperationCheck) {
|
|||
<< "First failed at test case " << first_failure;
|
||||
}
|
||||
|
||||
TEST_P(VP9Quantize32Test, OperationCheck) {
|
||||
TEST_P(AV1Quantize32Test, OperationCheck) {
|
||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||
DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[1024]);
|
||||
DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
|
||||
|
@ -196,7 +196,7 @@ TEST_P(VP9Quantize32Test, OperationCheck) {
|
|||
<< "First failed at test case " << first_failure;
|
||||
}
|
||||
|
||||
TEST_P(VP9QuantizeTest, EOBCheck) {
|
||||
TEST_P(AV1QuantizeTest, EOBCheck) {
|
||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||
DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[256]);
|
||||
DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
|
||||
|
@ -259,7 +259,7 @@ TEST_P(VP9QuantizeTest, EOBCheck) {
|
|||
<< "First failed at test case " << first_failure;
|
||||
}
|
||||
|
||||
TEST_P(VP9Quantize32Test, EOBCheck) {
|
||||
TEST_P(AV1Quantize32Test, EOBCheck) {
|
||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||
DECLARE_ALIGNED(16, tran_low_t, coeff_ptr[1024]);
|
||||
DECLARE_ALIGNED(16, int16_t, zbin_ptr[2]);
|
||||
|
@ -325,7 +325,7 @@ using std::tr1::make_tuple;
|
|||
|
||||
#if HAVE_SSE2
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, VP9QuantizeTest,
|
||||
SSE2, AV1QuantizeTest,
|
||||
::testing::Values(make_tuple(&aom_highbd_quantize_b_sse2,
|
||||
&aom_highbd_quantize_b_c, AOM_BITS_8),
|
||||
make_tuple(&aom_highbd_quantize_b_sse2,
|
||||
|
@ -333,7 +333,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||
make_tuple(&aom_highbd_quantize_b_sse2,
|
||||
&aom_highbd_quantize_b_c, AOM_BITS_12)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
SSE2, VP9Quantize32Test,
|
||||
SSE2, AV1Quantize32Test,
|
||||
::testing::Values(make_tuple(&aom_highbd_quantize_b_32x32_sse2,
|
||||
&aom_highbd_quantize_b_32x32_c, AOM_BITS_8),
|
||||
make_tuple(&aom_highbd_quantize_b_32x32_sse2,
|
||||
|
|
|
@ -286,7 +286,7 @@ class ResizeRealtimeTest
|
|||
virtual void PreEncodeFrameHook(libaom_test::VideoSource *video,
|
||||
libaom_test::Encoder *encoder) {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP9E_SET_AQ_MODE, 3);
|
||||
encoder->Control(AV1E_SET_AQ_MODE, 3);
|
||||
encoder->Control(AOME_SET_CPUUSED, set_cpu_used_);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
. $(dirname $0)/tools_common.sh
|
||||
|
||||
# Environment check: Make sure input is available:
|
||||
# $AOM_IVF_FILE and $VP9_IVF_FILE are required.
|
||||
# $AOM_IVF_FILE and $AV1_IVF_FILE are required.
|
||||
simple_decoder_verify_environment() {
|
||||
if [ ! -e "${AOM_IVF_FILE}" ] || [ ! -e "${VP9_IVF_FILE}" ]; then
|
||||
if [ ! -e "${AOM_IVF_FILE}" ] || [ ! -e "${AV1_IVF_FILE}" ]; then
|
||||
echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
|
||||
return 1
|
||||
fi
|
||||
|
@ -51,7 +51,7 @@ simple_decoder_vp8() {
|
|||
|
||||
simple_decoder_vp9() {
|
||||
if [ "$(vp9_decode_available)" = "yes" ]; then
|
||||
simple_decoder "${VP9_IVF_FILE}" vp9 || return 1
|
||||
simple_decoder "${AV1_IVF_FILE}" vp9 || return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ simple_encoder_vp8() {
|
|||
}
|
||||
|
||||
# TODO(tomfinegan): Add a frame limit param to simple_encoder and enable this
|
||||
# test. VP9 is just too slow right now: This test takes 4m30s+ on a fast
|
||||
# test. AV1 is just too slow right now: This test takes 4m30s+ on a fast
|
||||
# machine.
|
||||
DISABLED_simple_encoder_vp9() {
|
||||
if [ "$(vp9_encode_available)" = "yes" ]; then
|
||||
|
|
|
@ -26,14 +26,14 @@ typedef void (*SubtractFunc)(int rows, int cols, int16_t *diff_ptr,
|
|||
|
||||
namespace vp9 {
|
||||
|
||||
class VP9SubtractBlockTest : public ::testing::TestWithParam<SubtractFunc> {
|
||||
class AV1SubtractBlockTest : public ::testing::TestWithParam<SubtractFunc> {
|
||||
public:
|
||||
virtual void TearDown() { libaom_test::ClearSystemState(); }
|
||||
};
|
||||
|
||||
using libaom_test::ACMRandom;
|
||||
|
||||
TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
|
||||
TEST_P(AV1SubtractBlockTest, SimpleSubtract) {
|
||||
ACMRandom rnd(ACMRandom::DeterministicSeed());
|
||||
|
||||
// FIXME(rbultje) split in its own file
|
||||
|
@ -85,19 +85,19 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
|
|||
}
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(C, VP9SubtractBlockTest,
|
||||
INSTANTIATE_TEST_CASE_P(C, AV1SubtractBlockTest,
|
||||
::testing::Values(aom_subtract_block_c));
|
||||
|
||||
#if HAVE_SSE2 && CONFIG_USE_X86INC
|
||||
INSTANTIATE_TEST_CASE_P(SSE2, VP9SubtractBlockTest,
|
||||
INSTANTIATE_TEST_CASE_P(SSE2, AV1SubtractBlockTest,
|
||||
::testing::Values(aom_subtract_block_sse2));
|
||||
#endif
|
||||
#if HAVE_NEON
|
||||
INSTANTIATE_TEST_CASE_P(NEON, VP9SubtractBlockTest,
|
||||
INSTANTIATE_TEST_CASE_P(NEON, AV1SubtractBlockTest,
|
||||
::testing::Values(aom_subtract_block_neon));
|
||||
#endif
|
||||
#if HAVE_MSA
|
||||
INSTANTIATE_TEST_CASE_P(MSA, VP9SubtractBlockTest,
|
||||
INSTANTIATE_TEST_CASE_P(MSA, AV1SubtractBlockTest,
|
||||
::testing::Values(aom_subtract_block_msa));
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace {
|
|||
using libaom_test::CodecFactory;
|
||||
using libaom_test::Decoder;
|
||||
using libaom_test::DxDataIterator;
|
||||
using libaom_test::VP9CodecFactory;
|
||||
using libaom_test::AV1CodecFactory;
|
||||
|
||||
class SvcTest : public ::testing::Test {
|
||||
protected:
|
||||
|
@ -59,7 +59,7 @@ class SvcTest : public ::testing::Test {
|
|||
codec_enc_.kf_max_dist = 100;
|
||||
|
||||
aom_codec_dec_cfg_t dec_cfg = aom_codec_dec_cfg_t();
|
||||
VP9CodecFactory codec_factory;
|
||||
AV1CodecFactory codec_factory;
|
||||
decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
|
||||
|
||||
tile_columns_ = 0;
|
||||
|
@ -76,8 +76,8 @@ class SvcTest : public ::testing::Test {
|
|||
aom_svc_init(&svc_, &codec_, aom_codec_vp9_cx(), &codec_enc_);
|
||||
EXPECT_EQ(AOM_CODEC_OK, res);
|
||||
aom_codec_control(&codec_, AOME_SET_CPUUSED, 4); // Make the test faster
|
||||
aom_codec_control(&codec_, VP9E_SET_TILE_COLUMNS, tile_columns_);
|
||||
aom_codec_control(&codec_, VP9E_SET_TILE_ROWS, tile_rows_);
|
||||
aom_codec_control(&codec_, AV1E_SET_TILE_COLUMNS, tile_columns_);
|
||||
aom_codec_control(&codec_, AV1E_SET_TILE_ROWS, tile_rows_);
|
||||
codec_initialized_ = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class TileIndependenceTest : public ::libaom_test::EncoderTest,
|
|||
cfg.threads = 1;
|
||||
fw_dec_ = codec_->CreateDecoder(cfg, 0);
|
||||
inv_dec_ = codec_->CreateDecoder(cfg, 0);
|
||||
inv_dec_->Control(VP9_INVERT_TILE_DECODE_ORDER, 1);
|
||||
inv_dec_->Control(AV1_INVERT_TILE_DECODE_ORDER, 1);
|
||||
}
|
||||
|
||||
virtual ~TileIndependenceTest() {
|
||||
|
@ -49,7 +49,7 @@ class TileIndependenceTest : public ::libaom_test::EncoderTest,
|
|||
virtual void PreEncodeFrameHook(libaom_test::VideoSource *video,
|
||||
libaom_test::Encoder *encoder) {
|
||||
if (video->frame() == 1) {
|
||||
encoder->Control(VP9E_SET_TILE_COLUMNS, n_tiles_);
|
||||
encoder->Control(AV1E_SET_TILE_COLUMNS, n_tiles_);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -384,11 +384,11 @@ fi
|
|||
|
||||
# Variables shared by tests.
|
||||
AOM_IVF_FILE="${LIBAOM_TEST_DATA_PATH}/vp80-00-comprehensive-001.ivf"
|
||||
VP9_IVF_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-09-subpixel-00.ivf"
|
||||
AV1_IVF_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-09-subpixel-00.ivf"
|
||||
|
||||
VP9_WEBM_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-00-quantizer-00.webm"
|
||||
VP9_FPM_WEBM_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-07-frame_parallel-1.webm"
|
||||
VP9_LT_50_FRAMES_WEBM_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-02-size-32x08.webm"
|
||||
AV1_WEBM_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-00-quantizer-00.webm"
|
||||
AV1_FPM_WEBM_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-07-frame_parallel-1.webm"
|
||||
AV1_LT_50_FRAMES_WEBM_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-02-size-32x08.webm"
|
||||
|
||||
YUV_RAW_INPUT="${LIBAOM_TEST_DATA_PATH}/hantro_collage_w352h288.yuv"
|
||||
YUV_RAW_INPUT_WIDTH=352
|
||||
|
@ -405,8 +405,8 @@ vlog "$(basename "${0%.*}") test configuration:
|
|||
LIBAOM_CONFIG_PATH=${LIBAOM_CONFIG_PATH}
|
||||
LIBAOM_TEST_DATA_PATH=${LIBAOM_TEST_DATA_PATH}
|
||||
AOM_IVF_FILE=${AOM_IVF_FILE}
|
||||
VP9_IVF_FILE=${VP9_IVF_FILE}
|
||||
VP9_WEBM_FILE=${VP9_WEBM_FILE}
|
||||
AV1_IVF_FILE=${AV1_IVF_FILE}
|
||||
AV1_WEBM_FILE=${AV1_WEBM_FILE}
|
||||
AOM_TEST_EXE_SUFFIX=${AOM_TEST_EXE_SUFFIX}
|
||||
AOM_TEST_FILTER=${AOM_TEST_FILTER}
|
||||
AOM_TEST_LIST_TESTS=${AOM_TEST_LIST_TESTS}
|
||||
|
|
|
@ -48,7 +48,7 @@ twopass_encoder_vp8() {
|
|||
}
|
||||
|
||||
# TODO(tomfinegan): Add a frame limit param to twopass_encoder and enable this
|
||||
# test. VP9 is just too slow right now: This test takes 31m16s+ on a fast
|
||||
# test. AV1 is just too slow right now: This test takes 31m16s+ on a fast
|
||||
# machine.
|
||||
DISABLED_twopass_encoder_vp9() {
|
||||
if [ "$(vp9_encode_available)" = "yes" ]; then
|
||||
|
|
|
@ -1044,7 +1044,7 @@ bool AudioTrack::Write(IMkvWriter* writer) const {
|
|||
const char Tracks::kOpusCodecId[] = "A_OPUS";
|
||||
const char Tracks::kVorbisCodecId[] = "A_VORBIS";
|
||||
const char Tracks::kVp8CodecId[] = "V_AOM";
|
||||
const char Tracks::kVp9CodecId[] = "V_VP9";
|
||||
const char Tracks::kVp9CodecId[] = "V_AV1";
|
||||
const char Tracks::kAV1CodecId[] = "V_AV1";
|
||||
|
||||
Tracks::Tracks() : track_entries_(NULL), track_entries_size_(0) {}
|
||||
|
|
|
@ -61,9 +61,7 @@
|
|||
|
||||
#define RAW_FRAME_HDR_SZ sizeof(uint32_t)
|
||||
|
||||
#define AOM_FOURCC 0x30385056
|
||||
#define VP9_FOURCC 0x30395056
|
||||
#define AV1_FOURCC 0x303a5056
|
||||
#define AV1_FOURCC 0x31305641
|
||||
|
||||
enum VideoFileType {
|
||||
FILE_TYPE_RAW,
|
||||
|
|
|
@ -99,11 +99,7 @@ int file_is_webm(struct WebmInputContext *webm_ctx,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!strncmp(video_track->GetCodecId(), "V_AOM", 5)) {
|
||||
aom_ctx->fourcc = AOM_FOURCC;
|
||||
} else if (!strncmp(video_track->GetCodecId(), "V_VP9", 5)) {
|
||||
aom_ctx->fourcc = VP9_FOURCC;
|
||||
} else if (!strncmp(video_track->GetCodecId(), "V_AV1", 6)) {
|
||||
if (!strncmp(video_track->GetCodecId(), "V_AV1", 5)) {
|
||||
aom_ctx->fourcc = AV1_FOURCC;
|
||||
} else {
|
||||
rewind_and_reset(webm_ctx, aom_ctx);
|
||||
|
|
|
@ -48,8 +48,6 @@ void write_webm_file_header(struct EbmlGlobal *glob,
|
|||
video_track->SetStereoMode(stereo_fmt);
|
||||
const char *codec_id;
|
||||
switch (fourcc) {
|
||||
case AOM_FOURCC: codec_id = "V_AOM"; break;
|
||||
case VP9_FOURCC: codec_id = "V_VP9"; break;
|
||||
case AV1_FOURCC: codec_id = "V_AV1"; break;
|
||||
default: codec_id = "V_AV1"; break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче