DolbyVisionComposition
The Dolby Vision composition of one frame, which turns the base layer and its RPU into an ordinary HDR10 picture: 10-bit 4:2:0 in BT.2020 with the PQ curve, limited range, the source's range as its mastering display, and no Dolby Vision metadata left on it. Every renderer that can show HDR10 can then show it.
Start one with Frame.beginDolbyVisionComposition, fill the picture with composeRows, and take it with finish. Frame.composeDolbyVision does all three in one call on the calling thread. The composition is the reason to use this class instead: it costs tens of milliseconds for a 1080p frame on one thread, and bands of rows can run on several.
The composition holds its own reference to the source frame's buffers, so the source frame may be closed as soon as this exists.
Threading. composeRows calls may run at the same time on different threads, as long as their rows do not overlap. finish and close must wait until every composeRows call has returned.
Lifetime. Close it when you do not finish it. finish hands the picture over and closes the rest, and a later close does nothing.
Properties
Functions
Composes rows startRow up to endRowExclusive. A band starts on an even row and ends on an even row or at height, because one row of 4:2:0 chroma serves two rows of the picture.