Skip to content
Snippets Groups Projects
Commit e831af37 authored by Romain Vimont's avatar Romain Vimont Committed by Steve Lhomme
Browse files

vout: update format after filters


The vout is created first, based on the input format. Then filters
(filter_t) could be added, possibly producing pictures in a different
format.

      input ---> filters --->    MISMATCH    [I420] vout
            I420         RGBA

To avoid a mismatch between the output of the last filter and the
expected format of the vout input, a converter was added when necessary
to compensate:

      input ---> filters ---> converter ---> [I420] vout
            I420         RGBA           I420

But this was often a waste, and it caused problems for opaque formats.

Instead, request the vout to adapt itself to the actual format produced
by the last filter. If it can, we can avoid an additional converter.

      input ---> filters --->    MISMATCH    [I420] vout
            I420         RGBA

      input ---> filters ------------------> [RGBA] vout
            I420         RGBA

If the vout does not support the new format (or does not accept to
update its format), a converter is still added like before.

Co-authored-by: Alexandre Janniaux's avatarAlexandre Janniaux <ajanni@videolabs.io>
parent 0095945c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment