-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I managed to use hevc hardware support via rpi_zc in my application by adding the following to my get_format2:
if (inFmt[i] == AV_PIX_FMT_RPI4_8) {
bcm_host_init();
vcsm_init_ex (1, -1);
ZcEnv *theEnv = av_rpi_zc_int_env_alloc (inContext);
av_rpi_zc_init2 (inContext, theEnv->pool_env, theEnv->alloc_buf, theEnv->free_pool);
inContext->refcounted_frames = 1;
av_free (theEnv);
return inFmt[i];
}
In addition I had to copy the declarations of struct AVZcEnv and struct ZcOldCtxVals from rpi_zc.c. av_rpi_zc_get_buffer2 is declared in rpi_zc.h, but it has no implementation. The implementation is called zc_get_buffer2 in rpi_zc.c, but it is not exported. So my hack seems the only way to use rpi_zc. In a previous version of the hevc patch, av_rpi_zc_init that required no parameters, was available.
Metadata
Metadata
Assignees
Labels
No labels