-
Notifications
You must be signed in to change notification settings - Fork 64
Description
🚀 The feature
Decoders usually can do more than just decode. They often also implement transformations on what they decode. For example, see the list of FFmpeg filters, which is the FFmpeg term for a transformation. Several users have requested a way to apply these decoder-native transformations.
Motivation, pitch
The main motivation is performance. We have benchmarks which show, for example, that it is much faster for FFmpeg to resize a frame while decoding than it is to pass a decoded frame to a transformation that lives outside of the decoder.
The counter pitch is that exposing such a functionality can be potentially dangerous for users. For example, there are many different ways one can resize a video frame, and it's important that users know which one they are using. We have observed model performance problems with resize specifically: users use a different resize algorithm during inference than they used for training, causing problems that are difficult to detect. Any design for this feature should include mitigations for this problem.