avcodec/dovi_rpu: add ext_blocks array to DOVIContext

This commit is contained in:
Niklas Haas 2024-03-23 16:52:41 +01:00
parent b90c18b38c
commit 3a1916c38a
2 changed files with 9 additions and 0 deletions

View File

@ -48,6 +48,7 @@ void ff_dovi_ctx_unref(DOVIContext *s)
{
for (int i = 0; i < FF_ARRAY_ELEMS(s->vdr); i++)
ff_refstruct_unref(&s->vdr[i]);
ff_refstruct_unref(&s->ext_blocks);
av_free(s->rpu_buf);
*s = (DOVIContext) {
@ -59,6 +60,7 @@ void ff_dovi_ctx_flush(DOVIContext *s)
{
for (int i = 0; i < FF_ARRAY_ELEMS(s->vdr); i++)
ff_refstruct_unref(&s->vdr[i]);
ff_refstruct_unref(&s->ext_blocks);
*s = (DOVIContext) {
.logctx = s->logctx,
@ -77,6 +79,7 @@ void ff_dovi_ctx_replace(DOVIContext *s, const DOVIContext *s0)
s->dv_profile = s0->dv_profile;
for (int i = 0; i <= DOVI_MAX_DM_ID; i++)
ff_refstruct_replace(&s->vdr[i], s0->vdr[i]);
ff_refstruct_replace(&s->ext_blocks, s0->ext_blocks);
}
void ff_dovi_update_cfg(DOVIContext *s, const AVDOVIDecoderConfigurationRecord *cfg)

View File

@ -44,6 +44,12 @@ typedef struct DOVIContext {
const AVDOVIDataMapping *mapping;
const AVDOVIColorMetadata *color;
/**
* Currently active extension blocks, updates on every ff_dovi_rpu_parse()
*/
AVDOVIDmData *ext_blocks;
int num_ext_blocks;
/**
* Private fields internal to dovi_rpu.c
*/