mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Update max overlays in one OverlayTextureProcessor
Tested adding 3, 15,16 different overlays in a single OverlayTextureProcessor. The program errored out when 16 overlays were added. PiperOrigin-RevId: 504810157
This commit is contained in:
parent
a5d43b2194
commit
1a416b17b5
1 changed files with 4 additions and 4 deletions
|
|
@ -56,11 +56,11 @@ import com.google.common.collect.ImmutableList;
|
||||||
throws FrameProcessingException {
|
throws FrameProcessingException {
|
||||||
super(useHdr);
|
super(useHdr);
|
||||||
checkArgument(!useHdr, "OverlayTextureProcessor does not support HDR colors yet.");
|
checkArgument(!useHdr, "OverlayTextureProcessor does not support HDR colors yet.");
|
||||||
// TODO: If the limit on the number of overlays ever becomes and issue, investigate expanding it
|
// The maximum number of samplers allowed in a single GL program is 16.
|
||||||
// in relation to common device limits.
|
// We use one for every overlay and one for the video.
|
||||||
checkArgument(
|
checkArgument(
|
||||||
overlays.size() <= 8,
|
overlays.size() <= 15,
|
||||||
"OverlayTextureProcessor does not more than 8 overlays in the same processor yet.");
|
"OverlayTextureProcessor does not support more than 15 overlays in the same processor.");
|
||||||
this.overlays = overlays;
|
this.overlays = overlays;
|
||||||
aspectRatioMatrix = GlUtil.create4x4IdentityMatrix();
|
aspectRatioMatrix = GlUtil.create4x4IdentityMatrix();
|
||||||
overlayMatrix = GlUtil.create4x4IdentityMatrix();
|
overlayMatrix = GlUtil.create4x4IdentityMatrix();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue