subtitles in black bars [v2]
This draft branch contains the 5 steps to get the core and display modules to show subtitles in black bars.
Uses parts of !4989 (merged).
!5035 (merged))
STEP 1: move to subpicture_region_rendered (Rather than reusing the subpicture_region with all its confusing fields, it's cleaner to handle a separate type with only the parts needed by display modules to render the region.
!5061 (merged))
STEP 2: make all display handling subpictures handle scaling (All display modules than render subpictures can scale & stretch a picture to display it (as well as most other display modules). We can switch them all to the SPU scale in the display module. And then let the core assume it's always true for external rendering of SPU regions.
!5113 (merged))
STEP 3: remove original rendered subpicture (The i_original_picture_witdh/height is misleading when rendering. It is not related to the original SPU source. In the renderer it's just the size of the video (or later the display). We don't need to pass that information to display modules, they already have it.
!5119 (merged))
STEP 4: place regions in the whole display area (Switch each display module to accept region placement as display coordinates. Then it doesn't matter where the regions are, relative to video area. This allows the core to put regions outside of the video area.
There might be issues with a few display modules that handle their display size internally without the core knowing: caopengllayer, macosx, mmal (always fullscreen).
STEP 5: put some regions in black bars
This is the goal of this MR: show some of the SPU regions outside of the video area. This is partly broken but shows the core is free to position the regions wherever it wants. Once the previous steps are done, we can refine this part. What works in one display module will work the same in the other ones as all coordinates (and source cropping) are handled the same after STEP 4.
The following display modules have been tested: d3d11, d3d9, wingdi (no SPU in black bar supported), opengl (Windows) The following display modules are not tested, although due to similarities with other modules there shouldn't be too work to fix them: android, VLCSampleBufferDisplay, libplacebo, XCB
Replaces !4088 (closed) which was attempting to also support display modules that rely on the core to blend subpictures. It requires handling a dynamic input video format which they don't support (yet).