struct lookahead_entry {
YV12_BUFFER_CONFIG img;
int64_t ts_start;
int64_t ts_end; int show_idx; /*The show_idx of this frame*/
vpx_enc_frame_flags_t flags;
};
// The max of past frames we want to keep in the queue. #define MAX_PRE_FRAMES 1
struct lookahead_ctx { int max_sz; /* Absolute size of the queue */ int sz; /* Number of buffers currently in the queue */ int read_idx; /* Read index */ int write_idx; /* Write index */ int next_show_idx; /* The show_idx that will be assigned to the next frame
being pushed in the queue*/ struct lookahead_entry *buf; /* Buffer list */
};
/**\brief Destroys the lookahead stage
*/ void vp9_lookahead_destroy(struct lookahead_ctx *ctx);
/**\brief Check if lookahead is full * *\param[in]ctxPointertothelookaheadcontext * *Return1iflookaheadisfull,otherwisereturn0.
*/ int vp9_lookahead_full(conststruct lookahead_ctx *ctx);
/**\brief Return the next_show_idx * *\param[in]ctxPointertothelookaheadcontext * *Returntheshow_idxthatwillbeassignedtothenext *framepushedbyvp9_lookahead_push()
*/ int vp9_lookahead_next_show_idx(conststruct lookahead_ctx *ctx);
/**\brief Enqueue a source buffer * *Thisfunctionwillcopythesourceimageintoanewframebufferwith *theexpectedstride/border. * *\param[in]ctxPointertothelookaheadcontext *\param[in]srcPointertotheimagetoenqueue *\param[in]ts_startTimestampforthestartofthisframe *\param[in]ts_endTimestampfortheendofthisframe *\param[in]flagsFlagssetonthisframe
*/ int vp9_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src,
int64_t ts_start, int64_t ts_end, int use_highbitdepth,
vpx_enc_frame_flags_t flags);
/**\brief Get the next source buffer to encode * * *\param[in]ctxPointertothelookaheadcontext *\param[in]drainFlagindicatingthebuffershouldbedrained *(returnabufferregardlessofthecurrentqueuedepth) * *\retvalNULL,ifdrainsetandqueueisempty *\retvalNULL,ifdrainnotsetandqueuenotoftheconfigureddepth
*/ struct lookahead_entry *vp9_lookahead_pop(struct lookahead_ctx *ctx, int drain);
/**\brief Get a future source buffer to encode * *\param[in]ctxPointertothelookaheadcontext *\param[in]indexIndexoftheframetobereturned,0==nextframe * *\retvalNULL,ifnobufferexistsatthespecifiedindex
*/ struct lookahead_entry *vp9_lookahead_peek(struct lookahead_ctx *ctx, int index);
/**\brief Get the number of frames currently in the lookahead queue * *\param[in]ctxPointertothelookaheadcontext
*/ unsignedint vp9_lookahead_depth(struct lookahead_ctx *ctx);
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.