/*! Can output one partition at a time. Each partition is returned in its *ownVPX_CODEC_CX_FRAME_PKT,withtheFRAME_IS_FRAGMENTflagsetfor *everypartitionbutthelast.Inthismodeallframesarealways *returnedpartitionbypartition.
*/ #define VPX_CODEC_CAP_OUTPUT_PARTITION 0x20000
/*! \brief Initialization-time Feature Enabling * *Certaincodecfeaturesmustbeknownatinitializationtime,toallow *forpropermemoryallocation. * *TheavailableflagsarespecifiedbyVPX_CODEC_USE_*defines.
*/ #define VPX_CODEC_USE_PSNR 0x10000 /**< Calculate PSNR on each frame */ /*!\brief Make the encoder output one partition at a time. */ #define VPX_CODEC_USE_OUTPUT_PARTITION 0x20000 #define VPX_CODEC_USE_HIGHBITDEPTH 0x40000 /**< Use high bitdepth */
/*!\brief Generic fixed size buffer structure * *Thisstructureisabletoholdareferencetoanyfixedsizebuffer.
*/ typedefstruct vpx_fixed_buf { void *buf; /**< Pointer to the data */
size_t sz; /**< Length of the buffer, in chars */
} vpx_fixed_buf_t; /**< alias for struct vpx_fixed_buf */
/*!\brief Time Stamp Type * *Aninteger,whichwhenmultipliedbythestream'stimebase,provides *theabsolutetimeofasample.
*/ typedef int64_t vpx_codec_pts_t;
/*!\brief Compressed Frame Flags * *Thistyperepresentsabitfieldcontaininginformationaboutacompressed *framethatmaybeusefultoanapplication.Themostsignificant16bits *canbeusedbyanalgorithmtoprovideadditionaldetail,forexampleto *supportframetypesthatarecodecspecific(MPEG-1D-framesforexample)
*/ typedef uint32_t vpx_codec_frame_flags_t; #define VPX_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 VPX_FRAME_IS_DROPPABLE 0x2u /*!\brief frame should be decoded but will not be shown */ #define VPX_FRAME_IS_INVISIBLE 0x4u /*!\brief this is a fragment of the encoded frame */ #define VPX_FRAME_IS_FRAGMENT 0x8u
/*!\brief Error Resilient flags * *Theseflagsdefinewhicherrorresilientfeaturestoenableinthe *encoder.Theflagsarespecifiedthroughthe *vpx_codec_enc_cfg::g_error_resilientvariable.
*/ typedef uint32_t vpx_codec_er_flags_t; /*!\brief Improve resiliency against losses of whole frames */ #define VPX_ERROR_RESILIENT_DEFAULT 0x1u /*!\brief The frame partitions are independently decodable by the bool decoder, *meaningthatpartitionscanbedecodedeventhoughearlierpartitionshave *beenlost.Notethatintrapredictionisstilldoneoverthepartition *boundary.
* \note This is only supported by VP8.*/ #define VPX_ERROR_RESILIENT_PARTITIONS 0x2u
/*!\brief Encoder output packet variants * *Thisenumerationliststhedifferentkindsofdatapacketsthatcanbe *returnedbycallstovpx_codec_get_cx_data().Algorithms\refMAY *extendthislisttoprovideadditionalfunctionality.
*/ enum vpx_codec_cx_pkt_kind {
VPX_CODEC_CX_FRAME_PKT, /**< Compressed video frame */
VPX_CODEC_STATS_PKT, /**< Two-pass statistics for this frame */
VPX_CODEC_FPMB_STATS_PKT, /**< first pass mb statistics for this frame */
VPX_CODEC_PSNR_PKT, /**< PSNR statistics for this frame */
VPX_CODEC_CUSTOM_PKT = 256/**< Algorithm extensions */
};
/*!\brief Encoder output packet * *Thisstructurecontainsthedifferentkindsofoutputdatatheencoder *mayproducewhilecompressingaframe.
*/ typedefstruct vpx_codec_cx_pkt { enum vpx_codec_cx_pkt_kind kind; /**< packet variant */ union { struct { void *buf; /**< compressed data buffer */
size_t sz; /**< length of compressed data */ /*!\brief time stamp to show frame (in timebase units) */
vpx_codec_pts_t pts; /*!\brief duration to show frame (in timebase units) */ unsignedlong duration;
vpx_codec_frame_flags_t flags; /**< flags for this frame */ /*!\brief the partition id defines the decoding order of the partitions. *Onlyapplicablewhen"outputpartition"modeisenabled.First
* partition has id 0.*/ int partition_id; /*!\brief Width and height of frames in this packet. VP8 will only use the
* first one.*/ unsignedint width[VPX_SS_MAX_LAYERS]; /**< frame width */ unsignedint height[VPX_SS_MAX_LAYERS]; /**< frame height */ /*!\brief Flag to indicate if spatial layer frame in this packet is
* encoded or dropped. VP8 will always be set to 1.*/
uint8_t spatial_layer_encoded[VPX_SS_MAX_LAYERS];
} frame; /**< data for compressed frame packet */
vpx_fixed_buf_t twopass_stats; /**< data for two-pass packet */
vpx_fixed_buf_t firstpass_mb_stats; /**< first pass mb packet */ struct vpx_psnr_pkt { unsignedint samples[4]; /**< Number of samples, total/y/u/v */
uint64_t sse[4]; /**< sum squared error, total/y/u/v */ double psnr[4]; /**< PSNR, total/y/u/v */ int spatial_layer_id; /**< Spatial layer id */
} psnr; /**< data for PSNR packet */
vpx_fixed_buf_t raw; /**< data for arbitrary packets */
/* This packet size is fixed to allow codecs to extend this *interfacewithouthavingtomanagestorageforrawpackets, *i.e.,ifit'ssmallerthan128bytes,youcanstoreinthe *packetlistdirectly.
*/ char pad[128 - sizeof(enum vpx_codec_cx_pkt_kind)]; /**< fixed sz */
} data; /**< packet data */
} vpx_codec_cx_pkt_t; /**< alias for struct vpx_codec_cx_pkt */
/*!\brief Callback function pointer / user data pair storage */ typedefstruct vpx_codec_enc_output_cx_cb_pair {
vpx_codec_enc_output_cx_pkt_cb_fn_t output_cx_pkt; /**< Callback function */ void *user_priv; /**< Pointer to private data */
} vpx_codec_priv_output_cx_pkt_cb_pair_t;
/*!\brief Rational Number * *Thisstructureholdsafractionalvalue.
*/ typedefstruct vpx_rational { int num; /**< fraction numerator */ int den; /**< fraction denominator */
} vpx_rational_t; /**< alias for struct vpx_rational */
/*!\brief Multi-pass Encoding Pass */ typedefenum vpx_enc_pass {
VPX_RC_ONE_PASS, /**< Single pass mode */
VPX_RC_FIRST_PASS, /**< First pass of multi-pass mode */
VPX_RC_LAST_PASS /**< Final pass of multi-pass mode */
} vpx_enc_pass;
/*!\brief Encoded Frame Flags * *Thistypeindicatesabitfieldtobepassedtovpx_codec_encode(),defining *per-framebooleanvalues.Byconvention,bitscommontoallcodecswillbe *namedVPX_EFLAG_*,andbitsspecifictoanalgorithmwillbenamed */algo/_eflag_*.Thelowerorder16bitsarereservedforcommonuse.
*/ typedeflong vpx_enc_frame_flags_t; #define VPX_EFLAG_FORCE_KF (1 << 0) /**< Force this frame to be a keyframe */ /** Calculate PSNR on this frame, requires g_lag_in_frames to be 0 */ #define VPX_EFLAG_CALCULATE_PSNR (1 << 1)
/*!\brief Deprecated: Algorithm specific "usage" value * *Thisvaluemustbezero.
*/ unsignedint g_usage;
/*!\brief Maximum number of threads to use * *Formulti-threadedimplementations,usenomorethanthisnumberof *threads.Thecodecmayusefewerthreadsthanallowed.Thevalue *0isequivalenttothevalue1.
*/ unsignedint g_threads;
/*!\brief Bitstream profile to use * *Somecodecssupportanotionofmultiplebitstreamprofiles.Typically *thismapstoasetoffeaturesthatareturnedonoroff.Oftenthe *profiletouseisdeterminedbythefeaturesoftheintendeddecoder. *Consultthedocumentationforthecodectodeterminethevalidvalues *forthisparameter,orsettozeroforasanedefault.
*/ unsignedint g_profile; /**< profile of bitstream to use */
/*!\brief Width of the frame * *Thisvalueidentifiesthepresentationresolutionoftheframe, *inpixels.Notethattheframespassedasinputtotheencodermust *havethisresolution.Frameswillbepresentedbythedecoderinthis *resolution,independentofanyspatialresamplingtheencodermaydo.
*/ unsignedint g_w;
/*!\brief Height of the frame * *Thisvalueidentifiesthepresentationresolutionoftheframe, *inpixels.Notethattheframespassedasinputtotheencodermust *havethisresolution.Frameswillbepresentedbythedecoderinthis *resolution,independentofanyspatialresamplingtheencodermaydo.
*/ unsignedint g_h;
/*!\brief Bit-depth of the codec * *Thisvalueidentifiesthebit_depthofthecodec, *Onlycertainbit-depthsaresupportedasidentifiedinthe *vpx_bit_depth_tenum.
*/
vpx_bit_depth_t g_bit_depth;
/*!\brief Bit-depth of the input source * *Thisvalueidentifiestheactualbit-depthoftheinputsourceinbits.It *mustnotexceedcodecbit-depth.Notethattheframespassedasinputto *theencodermustmatchcodecbit-depth.So,ifthereisamismatchbetween *sourcebit-depthandcodecbit-depth,theapplicationisrequiredto *upshifttheframetothecodecbit-depthbeforepassingitforencoding. *Thisisonlyusedforcomputingqualitymetricsrelativetotheactual *inputsourceandhasnoeffectontheencoder'soutput.
*/ unsignedint g_input_bit_depth;
/*!\brief Number of spatial coding layers. * *Thisvaluespecifiesthenumberofspatialcodinglayerstobeused.
*/ unsignedint ss_number_layers;
/*!\brief Enable auto alt reference flags for each spatial layer. * *Thesevaluesspecifyifautoaltreferenceframeisenabledforeach *spatiallayer.
*/ int ss_enable_auto_alt_ref[VPX_SS_MAX_LAYERS];
/*!\brief Target bitrate for each spatial layer. * *Thesevaluesspecifythetargetcodingbitratetobeusedforeach *spatiallayer.(inkbps)
*/ unsignedint ss_target_bitrate[VPX_SS_MAX_LAYERS];
/*!\brief Number of temporal coding layers. * *Thisvaluespecifiesthenumberoftemporallayerstobeused.
*/ unsignedint ts_number_layers;
/*!\brief Target bitrate for each temporal layer. * *Thesevaluesspecifythetargetcodingbitratetobeusedforeach *temporallayer.(inkbps)
*/ unsignedint ts_target_bitrate[VPX_TS_MAX_LAYERS];
/*!\brief Frame rate decimation factor for each temporal layer. * *Thesevaluesspecifytheframeratedecimationfactorstoapply *toeachtemporallayer.
*/ unsignedint ts_rate_decimator[VPX_TS_MAX_LAYERS];
/*!\brief Length of the sequence defining frame temporal layer membership. * *Thisvaluespecifiesthelengthofthesequencethatdefinesthe *membershipofframestotemporallayers.Forexample,ifthe *ts_periodicity=8,thentheframesareassignedtocodinglayerswitha *repeatedsequenceoflength8.
*/ unsignedint ts_periodicity;
/*!\brief Template defining the membership of frames to temporal layers. * *Thisarraydefinesthemembershipofframestotemporalcodinglayers. *Fora2-layerencodingthatassignsevennumberedframestoonetemporal *layer(0)andoddnumberedframestoasecondtemporallayer(1)with *ts_periodicity=8,thents_layer_id=(0,1,0,1,0,1,0,1).
*/ unsignedint ts_layer_id[VPX_TS_MAX_PERIODICITY];
/*!\brief Target bitrate for each spatial/temporal layer. * *Thesevaluesspecifythetargetcodingbitratetobeusedforeach *spatial/temporallayer.(inkbps) *
*/ unsignedint layer_target_bitrate[VPX_MAX_LAYERS];
/*!\brief Temporal layering mode indicating which temporal layering scheme to *use. * *Thevalue(refertoVP9E_TEMPORAL_LAYERING_MODE)specifiesthe *temporallayeringmodetouse. *
*/ int temporal_layering_mode;
/*!\brief A flag indicating whether to use external rate control parameters. *Bydefaultis0.Ifsetto1,thefollowingparameterswillbeusedinthe *ratecontrolsystem.
*/ int use_vizier_rc_params;
/*!\brief Keyframe maximum boost adjustment factor, for the first keyframe *inachunk. * *Ratecontrolparameters,setfromexternalexperimentresults. *Onlywhen|use_vizier_rc_params|issetto1,thepassinvaluewillbe *used.Otherwise,thedefaultvalueisused. *
*/
vpx_rational_t kf_frame_max_boost_first_factor;
/*!\brief Keyframe maximum boost adjustment factor, for subsequent keyframes. * *Ratecontrolparameters,setfromexternalexperimentresults. *Onlywhen|use_vizier_rc_params|issetto1,thepassinvaluewillbe *used.Otherwise,thedefaultvalueisused. *
*/
vpx_rational_t kf_frame_max_boost_subs_factor;
/*!\brief Keyframe maximum total boost adjustment factor. * *Ratecontrolparameters,setfromexternalexperimentresults. *Onlywhen|use_vizier_rc_params|issetto1,thepassinvaluewillbe *used.Otherwise,thedefaultvalueisused. *
*/
vpx_rational_t kf_max_total_boost_factor;
/*!\brief Golden frame maximum total boost adjustment factor. * *Ratecontrolparameters,setfromexternalexperimentresults. *Onlywhen|use_vizier_rc_params|issetto1,thepassinvaluewillbe *used.Otherwise,thedefaultvalueisused. *
*/
vpx_rational_t gf_max_total_boost_factor;
/*!\brief Golden frame maximum boost adjustment factor. * *Ratecontrolparameters,setfromexternalexperimentresults. *Onlywhen|use_vizier_rc_params|issetto1,thepassinvaluewillbe *used.Otherwise,thedefaultvalueisused. *
*/
vpx_rational_t gf_frame_max_boost_factor;
/*!\brief Zero motion power factor. * *Ratecontrolparameters,setfromexternalexperimentresults. *Onlywhen|use_vizier_rc_params|issetto1,thepassinvaluewillbe *used.Otherwise,thedefaultvalueisused. *
*/
vpx_rational_t zm_factor;
/*!\brief Rate-distortion multiplier for inter frames. *Themultiplierisacrucialparameterinthecalculationofratedistortion *cost.Itisoftenrelatedtotheqp(qindex)value. *Ratecontrolparameters,couldbesetfromexternalexperimentresults. *Onlywhen|use_vizier_rc_params|issetto1,thepassinvaluewillbe *used.Otherwise,thedefaultvalueisused. *
*/
vpx_rational_t rd_mult_inter_qp_fac;
/*!\brief Rate-distortion multiplier for key frames. *Themultiplierisacrucialparameterinthecalculationofratedistortion *cost.Itisoftenrelatedtotheqp(qindex)value. *Ratecontrolparameters,couldbesetfromexternalexperimentresults. *Onlywhen|use_vizier_rc_params|issetto1,thepassinvaluewillbe *used.Otherwise,thedefaultvalueisused. *
*/
vpx_rational_t rd_mult_key_qp_fac;
} vpx_codec_enc_cfg_t; /**< alias for struct vpx_codec_enc_cfg */
/*!\brief vp9 svc extra configure parameters * *Thisdefinesmax/minquantizersandscalefactorsforeachlayer *
*/ typedefstruct vpx_svc_parameters { int max_quantizers[VPX_MAX_LAYERS]; /**< Max Q for each layer */ int min_quantizers[VPX_MAX_LAYERS]; /**< Min Q for each layer */ int scaling_factor_num[VPX_MAX_LAYERS]; /**< Scaling factor-numerator */ int scaling_factor_den[VPX_MAX_LAYERS]; /**< Scaling factor-denominator */ int speed_per_layer[VPX_MAX_LAYERS]; /**< Speed setting for each sl */ int temporal_layering_mode; /**< Temporal layering mode */ int loopfilter_ctrl[VPX_MAX_LAYERS]; /**< Loopfilter ctrl for each sl */
} vpx_svc_extra_cfg_t;
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.