mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/dovi_rpu: attach ext blocks to frames
This commit is contained in:
parent
f46fff27d0
commit
9073f49e6e
|
@ -95,7 +95,7 @@ int ff_dovi_attach_side_data(DOVIContext *s, AVFrame *frame)
|
|||
AVFrameSideData *sd;
|
||||
AVBufferRef *buf;
|
||||
AVDOVIMetadata *dovi;
|
||||
size_t dovi_size;
|
||||
size_t dovi_size, ext_sz;
|
||||
|
||||
if (!s->mapping || !s->color)
|
||||
return 0; /* incomplete dovi metadata */
|
||||
|
@ -121,6 +121,10 @@ int ff_dovi_attach_side_data(DOVIContext *s, AVFrame *frame)
|
|||
COPY(AVDOVIRpuDataHeader, av_dovi_get_header(dovi), &s->header, disable_residual_flag);
|
||||
COPY(AVDOVIDataMapping, av_dovi_get_mapping(dovi), s->mapping, nlq_pivots);
|
||||
COPY(AVDOVIColorMetadata, av_dovi_get_color(dovi), s->color, source_diagonal);
|
||||
ext_sz = FFMIN(sizeof(AVDOVIDmData), dovi->ext_block_size);
|
||||
for (int i = 0; i < s->num_ext_blocks; i++)
|
||||
memcpy(av_dovi_get_ext(dovi, i), &s->ext_blocks[i], ext_sz);
|
||||
dovi->num_ext_blocks = s->num_ext_blocks;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue