/* Include controls common to both the encoder and decoder */ #include"aom/aom.h"
/*!\name Algorithm interface for AV1 * *ThisinterfaceprovidesthecapabilitytodecodeAV1streams. *@{
*/
/*!\brief A single instance of the AV1 decoder. *\deprecatedThisaccessmechanismisprovidedforbackwardscompatibility; *preferaom_codec_av1_dx().
*/
extern aom_codec_iface_t aom_codec_av1_dx_algo; /*!\brief The interface to the AV1 decoder.
*/
extern aom_codec_iface_t *aom_codec_av1_dx(void);
/*!@} - end algorithm interface member group */
/** Data structure that stores bit accounting for debug
*/ typedefstruct Accounting Accounting;
/*!\brief Structure to collect a buffer index when inspecting. * *Definesastructuretoholdthebufferandreturnanindex *whencallingdecodefrominspect.Thisenablesustodecode *nonshowablesubframes.
*/ typedefstruct { /*! Pointer for new position in compressed buffer after decoding 1 OBU. */ constunsigned char *buf; /*! Index into reference buffer array to see result of decoding 1 OBU. */
int idx; /*! Is a show existing frame. */
int show_existing;
} Av1DecodeReturn;
/*!\brief Structure to hold a tile's start address and size in the bitstream. * *Definesastructuretoholdatile'sstartaddressandsizeinthebitstream.
*/ typedefstruct aom_tile_data { /*! Tile data size. */
size_t coded_tile_data_size; /*! Tile's start address. */ constvoid *coded_tile_data; /*! Extra size information. */
size_t extra_size;
} aom_tile_data;
/*!\brief Max number of tile columns * *Thisisthelimitofnumberoftilecolumnsallowedwithinaframe. * *Currentlysameas"MAX_TILE_COLS"inAV1,themaximumthatAV1supports. *
*/ #define AOM_MAX_TILE_COLS 64 /*!\brief Max number of tile rows * *Thisisthelimitofnumberoftilerowsallowedwithinaframe. * *Currentlysameas"MAX_TILE_ROWS"inAV1,themaximumthatAV1supports. *
*/ #define AOM_MAX_TILE_ROWS 64
/*!\brief Structure to hold information about tiles in a frame. * *Definesastructuretoholdaframe'stileinformation,namely *numberoftilecolumns,numberoftile_rows,andthewidthand *heightofeachtile.
*/ typedefstruct aom_tile_info { /*! Indicates the number of tile columns. */
int tile_columns; /*! Indicates the number of tile rows. */
int tile_rows; /*! Indicates the tile widths in units of SB. */
int tile_widths[AOM_MAX_TILE_COLS]; /*! Indicates the tile heights in units of SB. */
int tile_heights[AOM_MAX_TILE_ROWS]; /*! Indicates the number of tile groups present in a frame. */
int num_tile_groups;
} aom_tile_info;
/*!\brief Structure to hold information about still image coding. * *Definesastructuretoholdainformationregardingstillpicture *anditsheadertype.
*/ typedefstruct aom_still_picture_info { /*! Video is a single frame still picture */
int is_still_picture; /*! Use full header for still picture */
int is_reduced_still_picture_hdr;
} aom_still_picture_info;
/*!\brief Structure to hold information about S_FRAME. * *DefinesastructuretoholdainformationregardingS_FRAME *anditsposition.
*/ typedefstruct aom_s_frame_info { /*! Indicates if current frame is S_FRAME */
int is_s_frame; /*! Indicates if current S_FRAME is present at ALTREF frame*/
int is_s_frame_at_altref;
} aom_s_frame_info;
/*!\brief Structure to hold information about screen content tools. * *Definesastructuretoholdinformationaboutscreencontent *tools,namely:allow_screen_content_tools,allow_intrabc,and *force_integer_mv.
*/ typedefstruct aom_screen_content_tools_info { /*! Are screen content tools allowed */
int allow_screen_content_tools; /*! Is intrabc allowed */
int allow_intrabc; /*! Is integer mv forced */
int force_integer_mv;
} aom_screen_content_tools_info;
/*!\brief Structure to hold the external reference frame pointer. * *Defineastructuretoholdtheexternalreferenceframepointer.
*/ typedefstruct av1_ext_ref_frame { /*! Start pointer of external references. */
aom_image_t *img; /*! Number of available external references. */
int num;
} av1_ext_ref_frame_t;
/*!\enum aom_dec_control_id *\briefAOMdecodercontrolfunctions * *ThissetofmacrosdefinethecontrolfunctionsavailablefortheAOM *decoderinterface. *TherangefordecodercontrolIDis>=256. * *\sa#aom_codec_control(aom_codec_ctx_t*ctx,intctrl_id,...)
*/
enum aom_dec_control_id { /*!\brief Codec control function to get info on which reference frames were *updatedbythelastdecode,int*parameter
*/
AOMD_GET_LAST_REF_UPDATES = AOM_DECODER_CTRL_ID_START,
/*!\brief Codec control function to check if the indicated frame is corrupted,int*parameter
*/
AOMD_GET_FRAME_CORRUPTED,
/*!\brief Codec control function to get info on which reference frames were *usedbythelastdecode,int*parameter
*/
AOMD_GET_LAST_REF_USED,
/*!\brief Codec control function to get the dimensions that the current *frameisdecodedat,int*parameter * *Thismaybedifferenttotheintendeddisplaysizefortheframeas *specifiedinthewrapperorframeheader(seeAV1D_GET_DISPLAY_SIZE).
*/
AV1D_GET_FRAME_SIZE,
/*!\brief Codec control function to get the current frame's intended display *dimensions(asspecifiedinthewrapperorframeheader),int*parameter * *Thismaybedifferenttothedecodeddimensionsofthisframe(see *AV1D_GET_FRAME_SIZE).
*/
AV1D_GET_DISPLAY_SIZE,
/*!\brief Codec control function to get the bit depth of the stream, *unsignedint*parameter
*/
AV1D_GET_BIT_DEPTH,
/*!\brief Codec control function to get the image format of the stream, *aom_img_fmt_t*parameter
*/
AV1D_GET_IMG_FORMAT,
/*!\brief Codec control function to get the width and height (in pixels) of *thetilesinatilelist,unsignedint*parameter * *Tilewidthisinthehigh16bitsoftheoutputvalue,andtileheightis *inthelow16bitsoftheoutputvalue.
*/
AV1D_GET_TILE_SIZE,
/*!\brief Codec control function to get the tile count in a tile list, *unsignedint*parameter
*/
AV1D_GET_TILE_COUNT,
/*!\brief Codec control function to set the byte alignment of the planes in *thereferencebuffers,intparameter * *Validvaluesarepowerof2,from32to1024.Avalueof0sets *legacyalignment.I.e.Yplaneisalignedto32bytes,Uplanedirectly *followsYplane,andVplanedirectlyfollowsUplane.Defaultvalueis0.
*/
AV1_SET_BYTE_ALIGNMENT,
/*!\brief Codec control function to invert the decoding order to from right to *left,intparameter * *Thefunctionisusedinatesttoconfirmthedecodingindependenceoftile *columns.Thefunctionmaybeusedinapplicationwherethisorder *ofdecodingisdesired.intparameter * *TODO(yaowu):Reworktheunittestthatusesthiscontrol,andinafuture *release,thistest-onlycontrolshallberemoved.
*/
AV1_INVERT_TILE_DECODE_ORDER,
/*!\brief Codec control function to set the skip loop filter flag, int *parameter * *Validvaluesareintegers.Thedecoderwillskiptheloopfilter *whenitsvalueissettononzero.Iftheloopfilterisskippedthe *decodermayaccumulatedecodeartifacts.Thedefaultvalueis0.
*/
AV1_SET_SKIP_LOOP_FILTER,
/*!\brief Codec control function to retrieve a pointer to the Accounting *struct,takesAccounting**asparameter * *Ifcalledbeforeaframehasbeendecoded,thisreturnsAOM_CODEC_ERROR. *ThecallershouldensurethatAOM_CODEC_OKisreturnedbeforeattempting *todereferencetheAccountingpointer. * *\attentionWhenconfiguredwith-DCONFIG_ACCOUNTING=0,thedefault,this *returnsAOM_CODEC_INCAPABLE.
*/
AV1_GET_ACCOUNTING,
/*!\brief Codec control function to get last decoded frame quantizer, *int*parameter * *Returnedvalueusesinternalquantizerscaledefinedbythecodec.
*/
AOMD_GET_LAST_QUANTIZER,
/*!\brief Codec control function to set the range of tile decoding, int *parameter * *Avaluethatisgreaterandequaltozeroindicatesonlythespecific *row/columnisdecoded.Avaluethatis-1indicatesthewholerow/column *isdecoded.Aspecialcaseisbothvaluesare-1thatmeansthewhole *frameisdecoded.
*/
AV1_SET_DECODE_TILE_ROW,
AV1_SET_DECODE_TILE_COL,
/*!\brief Codec control function to set the tile coding mode, unsigned int *parameter * *-0=tilesarecodedinnormaltilemode *-1=tilesarecodedinlarge-scaletilemode
*/
AV1_SET_TILE_MODE,
/*!\brief Codec control function to get the frame header information of an *encodedframe,aom_tile_data*parameter
*/
AV1D_GET_FRAME_HEADER_INFO,
/*!\brief Codec control function to get the start address and size of a *tileinthecodedbitstream,aom_tile_data*parameter.
*/
AV1D_GET_TILE_DATA,
/*!\brief Codec control function to set the external references' pointers in *thedecoder,av1_ext_ref_frame_t*parameter. * *ThisisusedwhiledecodingthetilelistOBUinlarge-scaletilecoding *mode.
*/
AV1D_SET_EXT_REF_PTR,
/*!\brief Codec control function to enable the ext-tile software debug and *testingcodeinthedecoder,unsignedintparameter
*/
AV1D_EXT_TILE_DEBUG,
/*!\brief Codec control function to enable the row based multi-threading of *decoding,unsignedintparameter * *-0=disabled *-1=enabled(default)
*/
AV1D_SET_ROW_MT,
/*!\brief Codec control function to indicate whether bitstream is in *Annex-Bformat,unsignedintparameter
*/
AV1D_SET_IS_ANNEXB,
/*!\brief Codec control function to indicate which operating point to use, *intparameter * *Ascalablestreammaydefinemultipleoperatingpoints,eachofwhich *definesasetoftemporalandspatiallayerstobeprocessed.The *operatingpointindexmaytakeavaluebetween0and *operating_points_cnt_minus_1(whichisatmost31).
*/
AV1D_SET_OPERATING_POINT,
/*!\brief Codec control function to indicate whether to output one frame per *temporalunit(thedefault),oroneframeperspatiallayer,intparameter * *Inascalablestream,eachtemporalunitcorrespondstoasingle"frame" *ofvideo,andwithinatemporalunittheremaybemultiplespatiallayers *withdifferentversionsofthatframe. *Forvideoplayback,onlythehighest-qualityversion(withinthe *selectedoperatingpoint)isneeded,butforsomeusecasesitisuseful *tohaveaccesstomultipleversionsofaframewhentheyareavailable.
*/
AV1D_SET_OUTPUT_ALL_LAYERS,
/*!\brief Codec control function to set an aom_inspect_cb callback that is *invokedeachtimeaframeisdecoded,aom_inspect_init*parameter * *\attentionWhenconfiguredwith-DCONFIG_INSPECTION=0,thedefault,this *returnsAOM_CODEC_INCAPABLE.
*/
AV1_SET_INSPECTION_CALLBACK,
/*!\brief Codec control function to set the skip film grain flag, int *parameter * *Validvaluesareintegers.Thedecoderwillskipthefilmgrainwhenits *valueissettononzero.Thedefaultvalueis0.
*/
AV1D_SET_SKIP_FILM_GRAIN,
/*!\brief Codec control function to check the presence of forward key frames, *int*parameter
*/
AOMD_GET_FWD_KF_PRESENT,
/*!\brief Codec control function to get the frame flags of the previous frame *decoded,int*parameter * *Thiswillreturnaflagoftypeaom_codec_frame_flags_t.
*/
AOMD_GET_FRAME_FLAGS,
/*!\brief Codec control function to check the presence of altref frames, int* *parameter
*/
AOMD_GET_ALTREF_PRESENT,
/*!\brief Codec control function to get tile information of the previous frame *decoded,aom_tile_info*parameter * *Thiswillreturnastructoftypeaom_tile_info.
*/
AOMD_GET_TILE_INFO,
/*!\brief Codec control function to get screen content tools information, *aom_screen_content_tools_info*parameter * *Itreturnsastructoftypeaom_screen_content_tools_info,whichcontains *theheaderflagsallow_screen_content_tools,allow_intrabc,and *force_integer_mv.
*/
AOMD_GET_SCREEN_CONTENT_TOOLS_INFO,
/*!\brief Codec control function to get the still picture coding information, *aom_still_picture_info*parameter
*/
AOMD_GET_STILL_PICTURE,
/*!\brief Codec control function to get superblock size, *aom_superblock_size_t*parameter * *Itreturnsanenum,indicatingthesuperblocksizereadfromthesequence *header(0forBLOCK_64X64and1forBLOCK_128X128)
*/
AOMD_GET_SB_SIZE,
/*!\brief Codec control function to check if the previous frame *decodedhasshowexistingframeflagset,int*parameter
*/
AOMD_GET_SHOW_EXISTING_FRAME_FLAG,
/*!\brief Codec control function to get the S_FRAME coding information, *aom_s_frame_info*parameter
*/
AOMD_GET_S_FRAME_INFO,
/*!\brief Codec control function to get the show frame flag, int* parameter
*/
AOMD_GET_SHOW_FRAME_FLAG,
/*!\brief Codec control function to get the base q index of a frame, int* *parameter
*/
AOMD_GET_BASE_Q_IDX,
/*!\brief Codec control function to get the order hint of a frame, unsigned *int*parameter
*/
AOMD_GET_ORDER_HINT,
/*!\brief Codec control function to get the info of a 4x4 block. *Parameters:intmi_row,intmi_col,andMB_MODE_INFO*. * *\noteThisonlyreturnsashallowcopy,soallpointermembersshouldnot *beused.
*/
AV1D_GET_MI_INFO,
/*!\brief Codec control function to set the maximum frame size, unsigned int *parameter * *-0=unlimited(default) *-nonzero=framesize(width*height)mustbelessthanorequaltothis *maximum
*/
AOMD_SET_FRAME_SIZE_LIMIT,
};
/*!\cond */ /*!\brief AOM decoder control function parameter type * *DefinesthedatatypesthatAOMDcontrolfunctionstake. * *\noteAdditionalcommoncontrolsaredefinedinaom.h. * *\noteForeachcontrolID"X",amacro-defineof *AOM_CTRL_Xisprovided.Itisusedatcompiletimetodetermine *ifthecontrolIDissupportedbythelibaomlibraryavailable, *whenthelibaomversioncannotbecontrolled.
*/
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(AV1D_GET_FRAME_SIZE, int *) #define AOM_CTRL_AV1D_GET_FRAME_SIZE
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(AOMD_GET_SHOW_FRAME_FLAG, int *) #define AOM_CTRL_AOMD_GET_SHOW_FRAME_FLAG
AOM_CTRL_USE_TYPE(AOMD_GET_BASE_Q_IDX, int *) #define AOM_CTRL_AOMD_GET_BASE_Q_IDX
AOM_CTRL_USE_TYPE(AOMD_GET_ORDER_HINT, unsigned int *) #define AOM_CTRL_AOMD_GET_ORDER_HINT
// The AOM_CTRL_USE_TYPE macro can't be used with AV1D_GET_MI_INFO because // AV1D_GET_MI_INFO takes more than one parameter. #define AOM_CTRL_AV1D_GET_MI_INFO
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.