This page is documenting a work in progress feature do not assume it is available on the mainline branch.
Rationale
Libav is modular, but a huge number of decoders rely on the MpegEncContext instead of having its own decoding context.
Beside being confusing that an encoding context would be used for decoders, that causes unneeded dependencies and makes difficult tackle issues when they would require deep refactoring.
Strategy
- Spit that struct in two, one carrying the encoding-specific fields, the other carrying the decoding-specific ones.
Refactor the ff_mpv* functions to use either of those contexts.
- Split from the decoding context the parts that are specific only to a family of codec from what is common.
- Make each decoder use its own context, embedding the common parts and only those.
Common components to be factored out
- Picture management
- Block management
- Error recovering/concealing
- Multithread utilities