[vlc-devel] [RFC 0/7] Subpictures outside the video

Salah-Eddin Shaban salah at videolan.org
Mon Feb 19 11:43:03 CET 2018


Hello,

Here's my second attempt at it.

Last time I tried there was a problem. Namely that destination dimensions were set correctly only for subpictures rendered by our own renderer. For others like SSA this was not the case.

This should be fixed now. I originally had only an SSA-specific option to enable/disable SSA outside the video area. JB requested an option to control this for all subpictures so I added part 7.

These options can be modified if you like. Right now running:

vlc --no-spu-constrain

renders OSD and text subtitles in display dimensions, SSA in video dimensions. This is the default for Media Player Classic and it seems to be a reasonable default since SSA files usually require exact positioning.

vlc --no-spu-constrain --no-ssa-constrain

renders SSA too in display dimensions.

I tested this on Linux and Windows. Updated macosx.m too, it should work as well. I hope someone can verify that.

Unless you guys find something wrong with the patches, what remains to be done is, for the most part, going over remaining subtitle types and deciding how each should be rendered.

I also have to figure out how BuildSphere and BuildCube are affected.

Salah-Eddin Shaban (7):
  subpictures: support rendering subpictures in display dimensions
  opengl: support rendering subpictures in display dimensions
  osd: render osd text/icons in display dimensions
  subtitles: render text subtitles in display dimensions
  libass: allow rendering SSA subtitles in display dimensions
  direct3d: constrained spu
  subpictures: add option to enable/disable non-constrained subpictures

 include/vlc_spu.h                         |  3 +-
 include/vlc_subpicture.h                  | 13 ++++++
 include/vlc_vout_display.h                |  1 +
 modules/codec/libass.c                    |  8 ++--
 modules/codec/substext.h                  |  2 +
 modules/stream_out/transcode/video.c      |  2 +-
 modules/video_output/caopengllayer.m      |  2 +-
 modules/video_output/ios.m                |  2 +-
 modules/video_output/macosx.m             | 15 +++----
 modules/video_output/opengl/converter.h   |  1 +
 modules/video_output/opengl/display.c     | 15 ++++---
 modules/video_output/opengl/vout_helper.c | 56 ++++++++++++++++++-------
 modules/video_output/opengl/vout_helper.h |  2 +-
 modules/video_output/win32/common.c       |  8 +++-
 modules/video_output/win32/direct3d11.c   |  1 +
 modules/video_output/win32/direct3d9.c    |  1 +
 modules/video_output/win32/glwin32.c      |  3 +-
 src/libvlc-module.c                       |  1 +
 src/misc/subpicture.c                     | 12 ++++++
 src/video_output/video_output.c           | 26 ++++++++----
 src/video_output/video_text.c             |  2 +
 src/video_output/video_widgets.c          |  2 +
 src/video_output/vout_subpictures.c       | 70 ++++++++++++++++++++++---------
 23 files changed, 181 insertions(+), 67 deletions(-)

-- 
2.13.6



More information about the vlc-devel mailing list