encoder.h File Reference

Declares top-level encoder structures and functions. More...

`#include <stdbool.h>`
`#include <stdio.h>`
`#include "config/aom_config.h"`
`#include "aom/aomcx.h"`
`#include "aom_util/aom_pthread.h"`
`#include "av1/common/alloccommon.h"`
`#include "av1/common/av1_common_int.h"`
`#include "av1/common/blockd.h"`
`#include "av1/common/entropymode.h"`
`#include "av1/common/enums.h"`
`#include "av1/common/reconintra.h"`
`#include "av1/common/resize.h"`
`#include "av1/common/thread_common.h"`
`#include "av1/common/timing.h"`
`#include "av1/encoder/aq_cyclicrefresh.h"`
`#include "av1/encoder/av1_ext_ratectrl.h"`
`#include "av1/encoder/av1_quantize.h"`
`#include "av1/encoder/block.h"`
`#include "av1/encoder/context_tree.h"`
`#include "av1/encoder/enc_enums.h"`
`#include "av1/encoder/encodemb.h"`
`#include "av1/encoder/external_partition.h"`
`#include "av1/encoder/firstpass.h"`
`#include "av1/encoder/global_motion.h"`
`#include "av1/encoder/level.h"`
`#include "av1/encoder/lookahead.h"`
`#include "av1/encoder/mcomp.h"`
`#include "av1/encoder/pickcdef.h"`
`#include "av1/encoder/ratectrl.h"`
`#include "av1/encoder/rd.h"`
`#include "av1/encoder/speed_features.h"`
`#include "av1/encoder/svc_layercontext.h"`
`#include "av1/encoder/temporal_filter.h"`
`#include "av1/encoder/tokenize.h"`
`#include "av1/encoder/tpl_model.h"`
`#include "av1/encoder/av1_noise_estimate.h"`
`#include "av1/encoder/bitstream.h"`
`#include "aom_dsp/variance.h"`
`#include "aom_dsp/noise_model.h"`
`#include "aom/internal/aom_codec_internal.h"`

Go to the source code of this file.

## Data Structures

struct | ResizeCfg
| Encoder config related to resize. More...
struct | PartitionCfg
| Encoder config for coding block partitioning. More...
struct | IntraModeCfg
| Encoder flags for intra prediction. More...
struct | TxfmSizeTypeCfg
| Encoder flags for transform sizes and types. More...
struct | CompoundTypeCfg
| Encoder flags for compound prediction modes. More...
struct | SuperResCfg
| Encoder config related to frame super-resolution. More...
struct | KeyFrameCfg
| Encoder config related to the coding of key frames. More...
struct | RateControlCfg
| Encoder rate control configuration parameters. More...
struct | AlgoCfg
| Algorithm configuration parameters. More...
struct | AV1EncoderConfig
| Main encoder configuration data structure. More...
struct | FrameProbInfo
| Encoder-side probabilities for pruning of various AV1 tools. More...
struct | inter_modes_info
| Struct used to hold inter mode data for fast tx search. More...
struct | VarBasedPartitionInfo
| Thresholds for variance based partitioning. More...
struct | AV1EncRowMultiThreadSync
| Encoder parameters for synchronization of row based multi-threading. More...
struct | AV1EncRowMultiThreadInfo
| Encoder data related to row-based multi-threading. More...
struct | AV1EncAllIntraMultiThreadInfo
| Encoder data related to multi-threading for allintra deltaq-mode=3. More...
struct | RestoreStateBuffers
| Buffers to be backed up during parallel encode set to be restored later. More...
struct | RestUnitSearchInfo
| Parameters related to restoration types. More...
struct | AV1LrPickStruct
| Structure to hold search parameter per restoration unit and intermediate buffer of Wiener filter used in pick filter stage of Loop restoration. More...
struct | PrimaryMultiThreadInfo
| Primary Encoder parameters related to multi-threading. More...
struct | MultiThreadInfo
| Encoder parameters related to multi-threading. More...
struct | ForceIntegerMVInfo
| Encoder info used for decision on forcing integer motion vectors. More...
struct | MBMIExtFrameBufferInfo
| Buffer to store mode information at mi_alloc_bsize (4x4 or 8x8) level. More...
struct | GlobalMotionInfo
| Parameters related to global motion search. More...
struct | InterpSearchFlags
| Flags related to interpolation filter search. More...
struct | MotionVectorSearchParams
| Parameters for motion vector search process. More...
struct | RefreshFrameInfo
| Refresh frame flags for different type of frames. More...
struct | ResizePendingParams
| Desired dimensions for an externally triggered resize. More...
struct | RefFrameDistanceInfo
| Refrence frame distance related variables. More...
struct | WinnerModeParams
| Parameters used for winner mode processing. More...
struct | ExtRefreshFrameFlagsInfo
| Frame refresh flags set by the external interface. More...
struct | ExternalFlags
| Flags signalled by the external interface at frame level. More...
struct | EncSegmentationInfo
| Segmentation related information for the current frame. More...
struct | TimeStamps
| Frame time stamps. More...
struct | CoeffBufferPool
struct | AV1_COMP_DATA
| Structure to hold data corresponding to an encoded frame. More...
struct | AV1_PRIMARY
| Top level primary encoder structure. More...
struct | AV1_COMP
| Top level encoder structure. More...
struct | EncodeFrameInput
| Input frames and last input frame. More...
struct | EncodeFrameParams
| contains per-frame encoding parameters decided upon by av1_encode_strategy() and passed down to av1_encode(). More...

## Macros

#define | NUM_RECODES_PER_FRAME 10
| Max number of recodes used to track the frame probabilities.
#define | MAX_PARALLEL_FRAMES 4
| Max number of frames that can be encoded in a parallel encode set.

## Typedefs

typedef struct AV1EncoderConfig | AV1EncoderConfig
| Main encoder configuration data structure.
typedef struct inter_modes_info | InterModesInfo
| Struct used to hold inter mode data for fast tx search.
typedef struct RestoreStateBuffers | RestoreStateBuffers
| Buffers to be backed up during parallel encode set to be restored later.
typedef struct PrimaryMultiThreadInfo | PrimaryMultiThreadInfo
| Primary Encoder parameters related to multi-threading.
typedef struct MultiThreadInfo | MultiThreadInfo
| Encoder parameters related to multi-threading.
typedef struct AV1_COMP_DATA | AV1_COMP_DATA
| Structure to hold data corresponding to an encoded frame.
typedef struct AV1_PRIMARY | AV1_PRIMARY
| Top level primary encoder structure.
typedef struct AV1_COMP | AV1_COMP
| Top level encoder structure.
typedef struct EncodeFrameInput | EncodeFrameInput
| Input frames and last input frame.
typedef struct EncodeFrameParams | EncodeFrameParams
| contains per-frame encoding parameters decided upon by av1_encode_strategy() and passed down to av1_encode().

## Enumerations

enum | COST_UPDATE_TYPE { COST_UPD_SB , COST_UPD_SBROW , COST_UPD_TILE , COST_UPD_OFF , NUM_COST_UPDATE_TYPES }
| This enum controls how often the entropy costs should be updated. More...
enum | LOOPFILTER_CONTROL { LOOPFILTER_NONE = 0 , LOOPFILTER_ALL = 1 , LOOPFILTER_REFERENCE = 2 , LOOPFILTER_SELECTIVELY }
| This enum controls to which frames loopfilter is applied. More...
enum | SKIP_APPLY_POSTPROC_FILTER { SKIP_APPLY_RESTORATION = 1 << 0 , SKIP_APPLY_SUPERRES = 1 << 1 , SKIP_APPLY_CDEF = 1 << 2 , SKIP_APPLY_LOOPFILTER = 1 << 3 }
| This enum controls the application of post-processing filters on a reconstructed frame.

## Functions

int | av1_receive_raw_frame (AV1_COMP *cpi, aom_enc_frame_flags_t frame_flags, const YV12_BUFFER_CONFIG *sd, int64_t time_stamp, int64_t end_time_stamp)
| Obtain the raw frame data.
int | av1_get_compressed_data (AV1_COMP *cpi, AV1_COMP_DATA *const cpi_data)
| Encode a frame.
int | av1_encode (AV1_COMP *const cpi, uint8_t *const dest, size_t dest_size, const EncodeFrameInput *const frame_input, const EncodeFrameParams *const frame_params, size_t *const frame_size)
| Run 1-pass/2-pass encoding.
static int | has_no_stats_stage (const AV1_COMP *const cpi)
| Check if the current stage has statistics.

## Detailed Description

Declares top-level encoder structures and functions.

## Typedef Documentation

## InterModesInfo

typedef struct inter_modes_info InterModesInfo

Struct used to hold inter mode data for fast tx search.

This struct is used to perform a full transform search only on winning candidates searched with an estimate for transform coding RD.

## Enumeration Type Documentation

## COST_UPDATE_TYPE

enum COST_UPDATE_TYPE

This enum controls how often the entropy costs should be updated.

Warning
  In case of any modifications/additions done to the enum COST_UPDATE_TYPE, the enum INTERNAL_COST_UPDATE_TYPE needs to be updated as well.

Enumerator
COST_UPD_SB | Update every sb.
COST_UPD_SBROW | Update every sb rows inside a tile.
COST_UPD_TILE | Update every tile.
COST_UPD_OFF | Turn off cost updates.
NUM_COST_UPDATE_TYPES | Number of cost update types.

## LOOPFILTER_CONTROL

enum LOOPFILTER_CONTROL

This enum controls to which frames loopfilter is applied.

Enumerator
LOOPFILTER_NONE | Disable loopfilter on all frames.
LOOPFILTER_ALL | Enable loopfilter for all frames.
LOOPFILTER_REFERENCE | Disable loopfilter on non reference frames.
LOOPFILTER_SELECTIVELY | Disable loopfilter on frames with low motion.