mbox series

[FFmpeg-devel,v19,00/20] Subtitle Filtering

Message ID DM8P223MB0365B2A4EB6DBE63F83E5CD3BA6A9@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM
Headers show
Series Subtitle Filtering | expand

Message

Soft Works Dec. 3, 2021, 7:31 p.m. UTC
New in V19

- Document API changes in all relevant commits
- Move enum AVSubtitleType: Improved commit message
- Put deprecated enum values under removal guards
- Document AV_SUBTITLE_FMT_NB
- Fixed all trailing whitespace
- splitcc: Add scatter_realtime_output option
- splitcc: Emit empty subtitle frames instead of repeating
- New commit: Replace deprecated enum values

New in V18

- rebased to latest head (to fix merge conflict in allfilters.c)
- textmod: Removed two trailing blanks from sf_textmod.c
- xsubdec: fix xsubdec regression found by Michael; packet size estimation 
  as flawed
- splitcc: Fix uninitialzed locals
- splitcc: Do not propagate hwcontext on secondary output
- testsub2video: fix output timeing, re-add mutex locking and implement
  render_latest_only parameter

New in V17

- Applied almost all suggestions that were made (thanks everybody!)
- Split the initial commit, no longer moving the legacy structs (AVSubtitle..)
- Use the regular encoding API for subtitles
- Updated subtitle encoders to handle packet allocation
- Removed compatibility layer for accessing legacy encoders
- Updated the compatibility implementation for the legacy subtitle encode api
- Reordered commits and merged ffmpeg.c changes into a single commit

New in V16

- Added missing reference to subfmt.h iun libzvbi-teletextdec.c
- Fixed Fate error in patch 15/16
- Removed all trsiling whitespace in tilers.texi

New in V15

- Rebased to upstream changes 
- avcodec/subtitles: Migrate subtitle encoders to frame-based API and provide 
  compatibility shim for legacy api
- fftools/ffmpeg: Use new frame-based subtitle encoding API
- AVSubtitleArea: copy flags field, make params const
- graphicsubs2text: Don't emit duplicate frames
- graphicsubs2text: Combined OCR output into a single AVSubtitleArea
  (I have a prototype for detecting text colors and positions, but it's not 
  ready at this point)
- splitcc: cleanup local subtitle_header ref
- stripstyles: add parameter for ass layer selection
- avcodec/subtitles: deferred loading of ass header for text subtitle encoders
- verified all example command lines in the docs are working, added somre more

Kind regards,
softworkz


softworkz (20):
  avcodec,avutil: Move enum AVSubtitleType to avutil, add new and
    deprecate old values
  avutil/frame: Prepare AVFrame for subtitle handling
  avcodec/subtitles: Introduce new frame-based subtitle decoding API
  avfilter/subtitles: Update vf_subtitles to use new decoding api
  avcodec,avutil: Move ass helper functions to avutil as avpriv_ and
    extend ass dialog parsing
  avcodec/subtitles: Migrate subtitle encoders to frame-based API and
    provide a compatibility shim for the legacy api
  avcodec/subtitles: Replace deprecated enum values
  fftools/play,probe: Adjust for subtitle changes
  avfilter/subtitles: Add subtitles.c for subtitle frame allocation
  avfilter/avfilter: Handle subtitle frames
  avfilter/sbuffer: Add sbuffersrc and sbuffersink filters
  avfilter/overlaygraphicsubs: Add overlaygraphicsubs and
    graphicsub2video filters
  fftools/ffmpeg: Replace sub2video with subtitle frame filtering and
    use new frame-based subtitle encoding API
  avfilter/avfilter: Fix hardcoded input index
  avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video
    filters
  avfilter/textmod: Add textmod, censor and show_speaker filters
  avfilter/stripstyles: Add stripstyles filter
  avfilter/splitcc: Add splitcc filter for closed caption handling
  avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)
  avfilter/subscale: Add filter for scaling and/or re-arranging
    graphical subtitles

 configure                                     |   7 +-
 doc/APIchanges                                |  29 +
 doc/filters.texi                              | 756 +++++++++++++++
 fftools/ffmpeg.c                              | 584 ++++++------
 fftools/ffmpeg.h                              |  15 +-
 fftools/ffmpeg_filter.c                       | 217 +++--
 fftools/ffmpeg_hw.c                           |   2 +-
 fftools/ffmpeg_opt.c                          |   3 +-
 fftools/ffplay.c                              | 102 +-
 fftools/ffprobe.c                             |  48 +-
 libavcodec/Makefile                           |  56 +-
 libavcodec/ass.h                              | 147 +--
 libavcodec/assdec.c                           |   4 +-
 libavcodec/assenc.c                           |  92 +-
 libavcodec/avcodec.h                          |  32 +-
 libavcodec/ccaption_dec.c                     |  19 +-
 libavcodec/codec_desc.c                       |  11 +
 libavcodec/codec_desc.h                       |   8 +
 libavcodec/decode.c                           |  54 +-
 libavcodec/dvbsubdec.c                        |   2 +-
 libavcodec/dvbsubenc.c                        |  96 +-
 libavcodec/dvdsubdec.c                        |   2 +-
 libavcodec/dvdsubenc.c                        | 100 +-
 libavcodec/encode.c                           |  63 +-
 libavcodec/internal.h                         |  16 +
 libavcodec/jacosubdec.c                       |   2 +-
 libavcodec/libaribb24.c                       |   2 +-
 libavcodec/libzvbi-teletextdec.c              |  14 +-
 libavcodec/microdvddec.c                      |   7 +-
 libavcodec/movtextdec.c                       |   3 +-
 libavcodec/movtextenc.c                       | 124 ++-
 libavcodec/mpl2dec.c                          |   2 +-
 libavcodec/pgssubdec.c                        |   2 +-
 libavcodec/realtextdec.c                      |   2 +-
 libavcodec/samidec.c                          |   2 +-
 libavcodec/srtdec.c                           |   2 +-
 libavcodec/srtenc.c                           | 112 ++-
 libavcodec/subviewerdec.c                     |   2 +-
 libavcodec/tests/avcodec.c                    |   2 -
 libavcodec/textdec.c                          |   4 +-
 libavcodec/ttmlenc.c                          | 111 ++-
 libavcodec/utils.c                            | 182 ++++
 libavcodec/webvttdec.c                        |   2 +-
 libavcodec/webvttenc.c                        |  90 +-
 libavcodec/xsubdec.c                          |   2 +-
 libavcodec/xsubenc.c                          |  87 +-
 libavfilter/Makefile                          |  15 +
 libavfilter/allfilters.c                      |  13 +
 libavfilter/avfilter.c                        |  30 +-
 libavfilter/avfilter.h                        |  11 +
 libavfilter/avfiltergraph.c                   |   5 +
 libavfilter/buffersink.c                      |  54 ++
 libavfilter/buffersink.h                      |   7 +
 libavfilter/buffersrc.c                       |  72 ++
 libavfilter/buffersrc.h                       |   1 +
 libavfilter/formats.c                         |  22 +
 libavfilter/formats.h                         |   3 +
 libavfilter/internal.h                        |  19 +-
 libavfilter/sf_graphicsub2text.c              | 354 +++++++
 libavfilter/sf_splitcc.c                      | 378 ++++++++
 libavfilter/sf_stripstyles.c                  | 196 ++++
 libavfilter/sf_subscale.c                     | 883 ++++++++++++++++++
 libavfilter/sf_textmod.c                      | 697 ++++++++++++++
 libavfilter/subtitles.c                       |  63 ++
 libavfilter/subtitles.h                       |  44 +
 libavfilter/vf_overlaygraphicsubs.c           | 737 +++++++++++++++
 libavfilter/vf_overlaytextsubs.c              | 646 +++++++++++++
 libavfilter/vf_subtitles.c                    |  54 +-
 libavutil/Makefile                            |   4 +
 {libavcodec => libavutil}/ass.c               |  87 +-
 libavutil/ass_internal.h                      | 133 +++
 {libavcodec => libavutil}/ass_split.c         |  30 +-
 .../ass_split_internal.h                      |  24 +-
 libavutil/frame.c                             | 211 ++++-
 libavutil/frame.h                             |  77 +-
 libavutil/subfmt.c                            |  50 +
 libavutil/subfmt.h                            | 114 +++
 libavutil/version.h                           |   1 +
 tests/ref/fate/filter-overlay-dvdsub-2397     | 181 ++--
 tests/ref/fate/sub-dvb                        | 162 ++--
 tests/ref/fate/sub2video                      | 116 +--
 tests/ref/fate/sub2video_basic                | 135 +--
 tests/ref/fate/sub2video_time_limited         |   4 +-
 83 files changed, 7492 insertions(+), 1362 deletions(-)
 create mode 100644 libavfilter/sf_graphicsub2text.c
 create mode 100644 libavfilter/sf_splitcc.c
 create mode 100644 libavfilter/sf_stripstyles.c
 create mode 100644 libavfilter/sf_subscale.c
 create mode 100644 libavfilter/sf_textmod.c
 create mode 100644 libavfilter/subtitles.c
 create mode 100644 libavfilter/subtitles.h
 create mode 100644 libavfilter/vf_overlaygraphicsubs.c
 create mode 100644 libavfilter/vf_overlaytextsubs.c
 rename {libavcodec => libavutil}/ass.c (65%)
 create mode 100644 libavutil/ass_internal.h
 rename {libavcodec => libavutil}/ass_split.c (94%)
 rename libavcodec/ass_split.h => libavutil/ass_split_internal.h (89%)
 create mode 100644 libavutil/subfmt.c
 create mode 100644 libavutil/subfmt.h