Skip to content

[nodes] KeyframeSelection: Set a dynamic size for the node#2039

Merged
mugulmd merged 1 commit into
developfrom
dev/chunkableKeyframeSelection
Jun 9, 2023
Merged

[nodes] KeyframeSelection: Set a dynamic size for the node#2039
mugulmd merged 1 commit into
developfrom
dev/chunkableKeyframeSelection

Conversation

@cbentejac

@cbentejac cbentejac commented Jun 7, 2023

Copy link
Copy Markdown
Contributor

Description

Related AliceVision pull request: alicevision/AliceVision#1457

This PR sets a dynamic size for the KeyframeSelection node, thus allowing the nodes that follow to be chunked if applicable.

As its number of outputs can rarely be precisely known before it is actually computed, we set the size with what we know to be the maximum number of keyframes.

There are 3 cases to determine what the maximum number of keyframes will be:

  1. The number of input frames is known (the input is not a video) and the smart selection is enabled: the size is the minimum between the number of input frames and the maximum number of output frames for the smart selection.
  2. The number of input frames is known and the regular selection is enabled:
    a. If the maximum number of output frames for the regular selection is set, then the size is the minimum between the number of input frames and the maximum number of output frames for the regular selection;
    b. If the maximum number of output frames for the regular selection is not set, we fall back to 1).
  3. The number of input frames is not known (the input is a video): the size is the maximum number of output frames from the active selection mode.

The size is set with the minimum between the input frames (when available)
and the set maximum number of output keyframes. This allows the nodes
following the KeyframeSelection one to be chunked if applicable.
@cbentejac cbentejac added this to the Meshroom 2023.2.0 milestone Jun 7, 2023
@cbentejac cbentejac requested review from fabiencastan and mugulmd June 7, 2023 16:21
@cbentejac cbentejac self-assigned this Jun 7, 2023
@mugulmd mugulmd added the invalidate:node Invalidates the cache of one or several nodes. label Jun 9, 2023
@mugulmd mugulmd merged commit e608885 into develop Jun 9, 2023
@mugulmd mugulmd deleted the dev/chunkableKeyframeSelection branch June 9, 2023 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalidate:node Invalidates the cache of one or several nodes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants