30 #ifndef LIBAVCODEC_RPI_ZC_H 31 #define LIBAVCODEC_RPI_ZC_H 45 #define RPI_ZC_SAND_8_IN_10_BUF 0 146 #define ZC_RESOLVE_FAIL 0 // return error on invalid 147 #define ZC_RESOLVE_ALLOC 1 // alloc as invalid 148 #define ZC_RESOLVE_WAIT_VALID 2 // wait for valid 149 #define ZC_RESOLVE_ALLOC_VALID 3 // alloc as valid 157 typedef struct av_rpi_zc_buf_fn_tab_s {
158 void (* free)(
void * v);
160 unsigned int (* vcsm_handle)(
void * v);
161 unsigned int (* vc_handle)(
void * v);
162 void * (* map_arm)(
void * v);
163 unsigned int (* map_vc)(
void * v);
void av_rpi_zc_free_pool_fn_t(void *pool_env)
int av_rpi_zc_get_buffer2(struct AVCodecContext *s, AVFrame *frame, int flags)
This structure describes decoded (raw) audio or video data.
AVZcEnvPtr av_rpi_zc_env_alloc(void *logctx, void *pool_env, av_rpi_zc_alloc_buf_fn_t *alloc_buf_fn, av_rpi_zc_free_pool_fn_t *free_pool_fn)
void * av_rpi_zc_buf_v(AVBufferRef *const buf)
AVBufferRef * av_rpi_zc_alloc_buf_fn_t(void *pool_env, size_t size, const AVRpiZcFrameGeometry *geo)
void av_rpi_zc_uninit2(struct AVCodecContext *const s)
int av_rpi_zc_vc_handle(const AVRpiZcRefPtr fr_ref)
int av_rpi_zc_resolve_buffer(AVBufferRef *const buf, const int may_alloc)
int av_rpi_zc_set_valid_frame(AVFrame *const frame)
AVRpiZcRefPtr av_rpi_zc_ref(void *const logging_context, const AVZcEnvPtr zc, const struct AVFrame *const frame, const enum AVPixelFormat expected_format, const int maycopy)
unsigned int av_rpi_zc_get_decoder_pool_size(const AVZcEnvPtr zc)
AVZcEnvPtr av_rpi_zc_int_env_alloc(void *const logctx)
int av_rpi_zc_init2(struct AVCodecContext *const s, void *pool_env, av_rpi_zc_alloc_buf_fn_t *alloc_buf_fn, av_rpi_zc_free_pool_fn_t *free_pool_fn)
int av_rpi_zc_length(const AVRpiZcRefPtr fr_ref)
AVRpiZcFrameGeometry av_rpi_zc_frame_geometry(const int format, const unsigned int video_width, const unsigned int video_height)
void av_rpi_zc_env_release(const AVZcEnvPtr zc)
int av_rpi_zc_offset(const AVRpiZcRefPtr fr_ref)
unsigned int bytes_per_pel
main external API structure.
struct AVZcEnv * AVZcEnvPtr
AVBufferRef * av_rpi_zc_buf(size_t numbytes, int addr_offset, void *v, const av_rpi_zc_buf_fn_tab_t *fn_tab)
void av_rpi_zc_set_decoder_pool_size(const AVZcEnvPtr zc, const unsigned int pool_size)
int av_rpi_zc_set_broken_frame(AVFrame *const frame)
unsigned int video_height
int av_rpi_zc_get_buffer(const AVZcEnvPtr zc, AVFrame *const frame)
int av_rpi_zc_resolve_frame(AVFrame *const frame, const int may_alloc)
A reference to a data buffer.
int av_rpi_zc_numbytes(const AVRpiZcRefPtr fr_ref)
void av_rpi_zc_int_env_freep(AVZcEnvPtr *zc)
int av_rpi_zc_in_use(const struct AVCodecContext *const s)
AVPixelFormat
Pixel format.
void av_rpi_zc_unref(AVRpiZcRefPtr fr_ref)