/////////////////////////////////////////////////////////////////////////////// // Internal implementation details /////////////////////////////////////////////////////////////////////////////// // // There are two levels of interfaces used to access the AOM codec: the // aom_codec_iface and the aom_codec_ctx. // // 1. aom_codec_iface_t // (Related files: aom/aom_codec.h, aom/src/aom_codec.c, // aom/internal/aom_codec_internal.h, av1/av1_cx_iface.c, // av1/av1_dx_iface.c) // // Used to initialize the codec context, which contains the configuration for // for modifying the encoder/decoder during run-time. See the other // documentation in this header file for more details. For the most part, // users will call helper functions, such as aom_codec_iface_name, // aom_codec_get_caps, etc., to interact with it. // // The main purpose of the aom_codec_iface_t is to provide a way to generate // a default codec config, find out what capabilities the implementation has, // and create an aom_codec_ctx_t (which is actually used to interact with the // codec). // // Note that the implementations for the AV1 algorithm are located in // av1/av1_cx_iface.c and av1/av1_dx_iface.c // // // 2. aom_codec_ctx_t // (Related files: aom/aom_codec.h, av1/av1_cx_iface.c, av1/av1_dx_iface.c, // aom/aomcx.h, aom/aomdx.h, aom/src/aom_encoder.c, aom/src/aom_decoder.c) // // The actual interface between user code and the codec. It stores the name // of the codec, a pointer back to the aom_codec_iface_t that initialized it, // initialization flags, a config for either encoder or the decoder, and a // pointer to internal data. // // The codec is configured / queried through calls to aom_codec_control, // which takes a control ID (listed in aomcx.h and aomdx.h) and a parameter. // In the case of "getter" control IDs, the parameter is modified to have // the requested value; in the case of "setter" control IDs, the codec's // configuration is changed based on the parameter. Note that a aom_codec_err_t // is returned, which indicates if the operation was successful or not. // // Note that for the encoder, the aom_codec_alg_priv_t points to // the aom_codec_alg_priv structure in av1/av1_cx_iface.c, and for the decoder, // the struct in av1/av1_dx_iface.c. Variables such as AV1_COMP cpi are stored // here and also used in the core algorithm. // // At the end, aom_codec_destroy should be called for each initialized // aom_codec_ctx_t.
/*!\defgroup codec Common Algorithm Interface *Thisabstractionallowsapplicationstoeasilysupportmultiplevideo *formatswithminimalcodeduplication.Thissectiondescribestheinterface *commontoallcodecs(bothencodersanddecoders). *@{
*/
/*!\brief Decorator indicating a function is potentially unused */ #ifdef AOM_UNUSED #elifdefined(__GNUC__) || defined(__clang__) #define AOM_UNUSED __attribute__((unused)) #else #define AOM_UNUSED #endif
/*!\brief Decorator indicating that given struct/union/enum is packed */ #ifndef ATTRIBUTE_PACKED #ifdefined(__GNUC__) #define ATTRIBUTE_PACKED __attribute__((packed)) #elifdefined(_MSC_VER) #define ATTRIBUTE_PACKED #else #define ATTRIBUTE_PACKED #endif #endif/* ATTRIBUTE_PACKED */
/*!\brief Current ABI version number * *\internal *IfthisfileisalteredinanywaythatchangestheABI,thisvalue *mustbebumped.Examplesinclude,butarenotlimitedto,changing *types,removingorreassigningenums,adding/removing/rearranging *fieldstostructures
*/ #define AOM_CODEC_ABI_VERSION (7 + AOM_IMAGE_ABI_VERSION) /**<\hideinitializer*/
/*!\brief ABI version mismatch */
AOM_CODEC_ABI_MISMATCH,
/*!\brief Algorithm does not have required capability */
AOM_CODEC_INCAPABLE,
/*!\brief The given bitstream is not supported. * *Thebitstreamwasunabletobeparsedatthehighestlevel.Thedecoder *isunabletoproceed.Thiserror\refSHOULDbetreatedasfataltothe
* stream. */
AOM_CODEC_UNSUP_BITSTREAM,
/*!\brief The coded data for this stream is corrupt or incomplete * *Therewasaproblemdecodingthecurrentframe.Thisreturncode *shouldonlybeusedforfailuresthatpreventfuturepicturesfrom *beingproperlydecoded.Thiserror\refMAYbetreatedasfataltothe *streamor\refMAYbetreatedasfataltothecurrentGOP.Ifdecoding *iscontinuedforthecurrentGOP,artifactsmaybepresent.
*/
AOM_CODEC_CORRUPT_FRAME,
/*!\brief An application-supplied parameter is not valid. *
*/
AOM_CODEC_INVALID_PARAM,
/*!\brief An iterator reached the end of list. *
*/
AOM_CODEC_LIST_END
} aom_codec_err_t;
/*! \brief Codec capabilities bitfield * *Eachcodecadvertisesthecapabilitiesitsupportsaspartofits *::aom_codec_iface_tinterfacestructure.Capabilitiesareextrainterfaces *orfunctionality,andarenotrequiredtobesupported. * *TheavailableflagsarespecifiedbyAOM_CODEC_CAP_*defines.
*/ typedef long aom_codec_caps_t; #define AOM_CODEC_CAP_DECODER 0x1 /**< Is a decoder */ #define AOM_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */
// Experimental feature policy // // New features may be marked as experimental. Experimental features are not // part of the stable API and may be modified or removed in a future release. // Experimental features are made available only if you pass the // AOM_CODEC_USE_EXPERIMENTAL flag to the codec init function. // // If you use experimental features, you must rebuild your code whenever you // update to a new libaom release, and you must be prepared to modify your code // when an experimental feature you use is modified or removed. If you are not // sure, DO NOT use experimental features. #define AOM_CODEC_USE_EXPERIMENTAL 0x1 /**< Enables experimental features */
/*!\brief Time Stamp Type * *Aninteger,whichwhenmultipliedbythestream'stimebase,provides *theabsolutetimeofasample.
*/ typedef int64_t aom_codec_pts_t;
/*!\brief Compressed Frame Flags * *Thistyperepresentsabitfieldcontaininginformationaboutacompressed *framethatmaybeusefultoanapplication.Themostsignificant16bits *canbeusedbyanalgorithmtoprovideadditionaldetail,forexampleto *supportframetypesthatarecodecspecific(MPEG-1D-framesforexample)
*/ typedef uint32_t aom_codec_frame_flags_t; #define AOM_FRAME_IS_KEY 0x1u /**< frame is the start of a GOP */ /*!\brief frame can be dropped without affecting the stream (no future frame
* depends on this one) */ #define AOM_FRAME_IS_DROPPABLE 0x2u /*!\brief this is an INTRA_ONLY frame */ #define AOM_FRAME_IS_INTRAONLY 0x10u /*!\brief this is an S-frame */ #define AOM_FRAME_IS_SWITCH 0x20u /*!\brief this is an error-resilient frame */ #define AOM_FRAME_IS_ERROR_RESILIENT 0x40u /*!\brief this is a key-frame dependent recovery-point frame */ #define AOM_FRAME_IS_DELAYED_RANDOM_ACCESS_POINT 0x80u
/*!\brief Return the version information (as an integer) * *Returnsapackedencodingofthelibraryversionnumber.Thiswillonly *includethemajor.minor.patchcomponentoftheversionnumber.Notethatthis *encodedvalueshouldbeaccessedthroughthemacrosprovided,astheencoding *maychangeinthefuture. *
*/
int aom_codec_version(void);
/*!\brief Return the major version number */ #define aom_codec_version_major() ((aom_codec_version() >> 16) & 0xff)
/*!\brief Return the minor version number */ #define aom_codec_version_minor() ((aom_codec_version() >> 8) & 0xff)
/*!\brief Return the patch version number */ #define aom_codec_version_patch() ((aom_codec_version() >> 0) & 0xff)
/*!\brief Return the version information (as a string) * *Returnsaprintablestringcontainingthefulllibraryversionnumber.This *maycontainadditionaltextfollowingthethreedigitversionnumber,asto *indicatereleasecandidates,pre-releaseversions,etc. *
*/ const char *aom_codec_version_str(void);
/*!\brief Return the version information (as a string) * *Returnsaprintable"extrastring".Thisisthecomponentofthestring *returnedbyaom_codec_version_str()followingthethreedigitversionnumber. *
*/ const char *aom_codec_version_extra_str(void);
/*!\brief Return the name for a given interface * *Returnsahumanreadablestringfornameofthegivencodecinterface. * *\param[in]ifaceInterfacepointer *
*/ const char *aom_codec_iface_name(aom_codec_iface_t *iface);
/*!\brief Convert error number to printable string * *Returnsahumanreadablestringforthelasterrorreturnedbythe *algorithm.Thereturnederrorwillbeonelineandwillnotcontain *anynewlinecharacters. * * *\param[in]errErrornumber. *
*/ const char *aom_codec_err_to_string(aom_codec_err_t err);
/*!\brief Get the capabilities of an algorithm. * *Retrievesthecapabilitiesbitfieldfromthealgorithm'sinterface. * *\param[in]ifacePointertothealgorithminterface *
*/
aom_codec_caps_t aom_codec_get_caps(aom_codec_iface_t *iface);
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.